In case of no geometry (InstanceNoGeo) the AliCluster3D part is
authordibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 10 Dec 2007 09:25:41 +0000 (09:25 +0000)
committerdibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 10 Dec 2007 09:25:41 +0000 (09:25 +0000)
initialized but not filled with the relevant volId part. Now it is fixed
This is needed for monitoring.

HMPID/AliHMPIDCluster.cxx
HMPID/AliHMPIDParam.cxx
HMPID/AliHMPIDParam.h

index 7791855..2765046 100644 (file)
@@ -39,6 +39,10 @@ void AliHMPIDCluster::SetClusterParams(Double_t xL,Double_t yL,Int_t iCh  )
   //get L->T cs matrix for a given chamber
   const TGeoHMatrix *t2l= AliGeomManager::GetTracking2LocalMatrix(volId);
 
+  if(AliHMPIDParam::fgInstanceType)               //if there is no geometry we cannot retrieve the volId (only for monitoring)
+  {
+    new(this) AliCluster3D(); return;
+  }
   
 
   //transformation from the pad cs to local
@@ -114,7 +118,7 @@ void AliHMPIDCluster::CoG()
   fNlocMax=0;                                               // proper status from this method
   fSt=kCoG;
   
-  SetClusterParams(fX,fY,fCh);                              //need to fill the AliCluster3D part
+  if(AliHMPIDParam::fgInstanceType) SetClusterParams(fX,fY,fCh);                              //need to fill the AliCluster3D part
  
 }//CoG()
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -252,7 +256,7 @@ Int_t AliHMPIDCluster::Solve(TClonesArray *pCluLst,Bool_t isTryUnfold)
   Int_t iCluCnt=pCluLst->GetEntriesFast();                                               //get current number of clusters already stored in the list by previous operations
   if(isTryUnfold==kFALSE || Size()==1) {                                                 //if cluster contains single pad there is no way to improve the knowledge 
     fSt = (isTryUnfold)? kSi1: kNot;
-    SetClusterParams(fX,fY,fCh);  
+    if(AliHMPIDParam::fgInstanceType) SetClusterParams(fX,fY,fCh);  
     new ((*pCluLst)[iCluCnt++]) AliHMPIDCluster(*this);  //add this raw cluster 
     return 1;
   } 
@@ -324,7 +328,7 @@ Int_t AliHMPIDCluster::Solve(TClonesArray *pCluLst,Bool_t isTryUnfold)
 
 // case 2 -> loc max found. Check # of loc maxima 
  if ( fNlocMax >= kMaxLocMax)  { 
-   SetClusterParams(fX,fY,fCh);                                                           // if # of local maxima exceeds kMaxLocMax...
+ if(AliHMPIDParam::fgInstanceType) SetClusterParams(fX,fY,fCh);                                                           // if # of local maxima exceeds kMaxLocMax...
    fSt = kMax;   new ((*pCluLst)[iCluCnt++]) AliHMPIDCluster(*this);                      //...add this raw cluster  
    } else {                                                                               //or resonable number of local maxima to fit and user requested it
   // Now ready for minimization step
@@ -359,7 +363,7 @@ Int_t AliHMPIDCluster::Solve(TClonesArray *pCluLst,Bool_t isTryUnfold)
         if ( !IsInPc()) fSt = kEdg;                                                      // if Out of Pc
         if(fSt==kNoLoc) fNlocMax=0;                                                      // if with no loc max (pads with same charge..)
       }
-      SetClusterParams(fX,fY,fCh);                                                      //need to fill the AliCluster3D part
+      if(AliHMPIDParam::fgInstanceType) SetClusterParams(fX,fY,fCh);                                                      //need to fill the AliCluster3D part
       new ((*pCluLst)[iCluCnt++]) AliHMPIDCluster(*this);                               //add new unfolded cluster
       
    }
index 6dab01f..78ebef3 100644 (file)
@@ -42,6 +42,7 @@ Float_t AliHMPIDParam::fgAllX=0;
 Float_t AliHMPIDParam::fgAllY=0;
 
 Int_t AliHMPIDParam::fgSigmas=4;
+Bool_t AliHMPIDParam::fgInstanceType=kTRUE;  
 
 AliHMPIDParam* AliHMPIDParam::fgInstance=0x0;        //singleton pointer               
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -54,7 +55,10 @@ AliHMPIDParam::AliHMPIDParam(Bool_t noGeo=kFALSE):TNamed("HmpidParam","default v
   fRadNmean = MeanIdxRad(); //initialization of the running ref. index of freon
   
   Float_t dead=2.6;// cm of the dead zones between PCs-> See 2CRC2099P1
-  
+
+
+  if(noGeo==kTRUE) fgInstanceType=kFALSE;                                                   //instance from ideal geometry, no actual geom is present
+    
   if(noGeo==kFALSE && !gGeoManager)  
   {
     TGeoManager::Import("geometry.root");
index 5ec1688..5bf3a78 100644 (file)
@@ -55,6 +55,7 @@ public:
   static Bool_t  IsOverTh    (Float_t q                      )     {return q >= fgSigmas;                            }  //is digit over threshold?
   
   Double_t GetRefIdx         (                               )     {return fRadNmean;                                }  //refractive index of freon
+  Bool_t  GetInstType (                               )     {return fgInstanceType;                            }  //return if the instance is from geom or ideal                        
   
   inline static Bool_t IsInDead(Float_t x,Float_t y        );                                                           //is the point in dead area?
   static Bool_t  IsInside    (Float_t x,Float_t y,Float_t d=0)     {return  x>-d&&y>-d&&x<fgkMaxPcX[kMaxPc]+d&&y<fgkMaxPcY[kMaxPc]+d; } //is point inside chamber boundaries?
@@ -87,13 +88,14 @@ public:
   void     Point       (Int_t c,Double_t *p,Int_t plane                     )const{Lors2Mars(c,0,0,p,plane);}      //point of given chamber plane
 
   void     SetRefIdx   (Double_t refRadIdx                                  ) {fRadNmean = refRadIdx;}             //set refractive index of freon
-  
+    
   
   enum EPlaneId {kPc,kRad,kAnod};            //3 planes in chamber 
   enum ETrackingFlags {kMipDistCut=-9,kMipQdcCut=-5,kNoPhotAccept=-11};     //flags for Reconstruction
 
-  static Int_t fgSigmas;   //sigma Cut
-
+  static Int_t    fgSigmas;   //sigma Cut
+  static Bool_t   fgInstanceType;             //kTRUE if from geomatry kFALSE if from ideal geometry
+  
 protected:
   static /*const*/ Float_t fgkMinPcX[6];                                                           //limits PC
   static /*const*/ Float_t fgkMinPcY[6];                                                           //limits PC