]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
remove argument from method, pass the parameter via data member switchable
authorgconesab <gustavo.conesa.balbastre@cern.ch>
Thu, 30 Oct 2014 19:01:39 +0000 (20:01 +0100)
committergconesab <gustavo.conesa.balbastre@cern.ch>
Thu, 30 Oct 2014 19:02:01 +0000 (20:02 +0100)
EMCAL/AliEMCALRecoUtils.cxx
EMCAL/AliEMCALRecoUtils.h

index 13b469ae0b989fcbb9189422441bbdf91cdf30f3..0c42ff3154fd35aeee4bd973231702f1574181ad 100644 (file)
@@ -141,10 +141,12 @@ AliEMCALRecoUtils::AliEMCALRecoUtils(const AliEMCALRecoUtils & reco)
   //Copy ctor
   
   for (Int_t i = 0; i < 15 ; i++) { fMisalRotShift[i]      = reco.fMisalRotShift[i]      ; 
-                                   fMisalTransShift[i]    = reco.fMisalTransShift[i]    ; }
+                                    fMisalTransShift[i]    = reco.fMisalTransShift[i]    ; }
   for (Int_t i = 0; i < 7  ; i++) { fNonLinearityParams[i] = reco.fNonLinearityParams[i] ; }
   for (Int_t i = 0; i < 3  ; i++) { fSmearClusterParam[i]  = reco.fSmearClusterParam[i]  ; }
 
+  fUseMassForTracking = reco.fUseMassForTracking;
+
 }
 
 
@@ -223,7 +225,8 @@ AliEMCALRecoUtils & AliEMCALRecoUtils::operator = (const AliEMCALRecoUtils & rec
   fCutDCAToVertex2D          = reco.fCutDCAToVertex2D;
   fCutRequireITSStandAlone   = reco.fCutRequireITSStandAlone; 
   fCutRequireITSpureSA       = reco.fCutRequireITSpureSA;
-
+  fUseMassForTracking        = reco.fUseMassForTracking;
+  
   if (reco.fResidualEta) {
     // assign or copy construct
     if (fResidualEta) { 
@@ -1015,9 +1018,11 @@ void AliEMCALRecoUtils::InitParameters()
   fCutMaxDCAToVertexZ  = 1e10;              
   fCutDCAToVertex2D    = kFALSE;
   
-  fCutRequireITSStandAlone = kFALSE; //MARCEL
+  fCutRequireITSStandAlone = kFALSE; //Marcel
   fCutRequireITSpureSA     = kFALSE; //Marcel
   
+  fUseMassForTracking      = kFALSE;
+  
   //Misalignment matrices
   for (Int_t i = 0; i < 15 ; i++) 
   {
@@ -2003,8 +2008,7 @@ Int_t  AliEMCALRecoUtils::FindMatchedClusterInClusterArr(const AliExternalTrackP
 //------------------------------------------------------------------------------------
 Bool_t AliEMCALRecoUtils::ExtrapolateTrackToEMCalSurface(AliVTrack *track,
                                                          Double_t emcalR, Double_t mass,
-                                                         Double_t step, Double_t minpt,
-                                                         Bool_t useMassForTracking)
+                                                         Double_t step, Double_t minpt)
 { 
   // Extrapolate track to EMCAL surface
 
@@ -2033,13 +2037,13 @@ Bool_t AliEMCALRecoUtils::ExtrapolateTrackToEMCalSurface(AliVTrack *track,
     
     if (esdt)
     {
-      if ( useMassForTracking ) mass = esdt->GetMassForTracking();
-      else                      mass = esdt->GetMass(onlyTPC);
+      if ( fUseMassForTracking ) mass = esdt->GetMassForTracking();
+      else                       mass = esdt->GetMass(onlyTPC);
     }
     else
     {
-      if ( useMassForTracking ) mass = aodt->GetMassForTracking();
-      else                      mass = aodt->M();
+      if ( fUseMassForTracking ) mass = aodt->GetMassForTracking();
+      else                       mass = aodt->M();
     }
   }
 
index b8c89bc4a8abb52f965c83c33bb5a4fde68d88fd..6da7567cbb96e30c84d4319639737f43b165c928 100644 (file)
@@ -227,8 +227,7 @@ public:
                                           Float_t &dEta, Float_t &dPhi);
   static Bool_t ExtrapolateTrackToEMCalSurface(AliVTrack *track, /*note, on success the call will change the track*/
                                                Double_t emcalR=440, Double_t mass=0.1396,
-                                               Double_t step=20, Double_t minpT=0.35,
-                                               Bool_t useMassForTracking = kFALSE);
+                                               Double_t step=20, Double_t minpT=0.35);
   static Bool_t ExtrapolateTrackToEMCalSurface(AliExternalTrackParam *trkParam, 
                                                Double_t emcalR, Double_t mass, Double_t step, 
                                                Float_t &eta, Float_t &phi, Float_t &pt);
@@ -271,7 +270,11 @@ public:
   void     SetStep(Double_t step)                     { fStepSurface = step           ; }
   void     SetStepCluster(Double_t step)              { fStepCluster = step           ; }
   void     SetITSTrackSA(Bool_t isITS)                { fITSTrackSA = isITS           ; } //Special Handle of AliExternTrackParam    
-    
+  
+  Bool_t   IsMassForTrackingUsed()                    { return fUseMassForTracking     ; }
+  void     SwitchOnUseMassForTracking()               { fUseMassForTracking = kTRUE    ; }
+  void     SwitchOffUseMassForTracking()              { fUseMassForTracking = kFALSE   ; }
+  
   // Exotic cells / clusters
   Bool_t   IsExoticCell(Int_t absId, AliVCaloCells* cells, Int_t bc =-1) ;
   void     SwitchOnRejectExoticCell()                 { fRejectExoticCells = kTRUE     ; }
@@ -425,7 +428,9 @@ private:
   Bool_t     fCutRequireITSStandAlone;   // Require ITSStandAlone
   Bool_t     fCutRequireITSpureSA;       // ITS pure standalone tracks
   
-  ClassDef(AliEMCALRecoUtils, 22)
+  static Bool_t fUseMassForTracking;     // Change mass hypothesis.
+  
+  ClassDef(AliEMCALRecoUtils, 23)
 };
 #endif // ALIEMCALRECOUTILS_H