]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Allow to do cluster-track matching with TPC only tracks or Global tracks - Rongrong
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 1 Aug 2011 21:56:13 +0000 (21:56 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 1 Aug 2011 21:56:13 +0000 (21:56 +0000)
EMCAL/AliEMCALRecoUtils.cxx
EMCAL/AliEMCALRecoUtils.h

index 3e341e2b48ce895f1248da8683c441129fd57c76..8b3552ac456b80882afb16618308ff46e4fdbeab 100644 (file)
@@ -71,11 +71,11 @@ AliEMCALRecoUtils::AliEMCALRecoUtils():
   fNCellsFromEMCALBorder(0), fNoEMCALBorderAtEta0(kTRUE),
   fAODFilterMask(32),
   fMatchedTrackIndex(0x0), fMatchedClusterIndex(0x0), 
-  fResidualEta(0x0), fResidualPhi(0x0), fCutEtaPhiSum(kTRUE), fCutEtaPhiSeparate(kFALSE), fCutR(0.1), fCutEta(0.02), fCutPhi(0.04), fMass(0.139), fStep(1),
+  fResidualEta(0x0), fResidualPhi(0x0), fCutEtaPhiSum(kTRUE), fCutEtaPhiSeparate(kFALSE), fCutR(0.1), fCutEta(0.02), fCutPhi(0.04), fMass(0.139), fStep(50),
   fRejectExoticCluster(kFALSE),
-  fCutMinTrackPt(0), fCutMinNClusterTPC(0), fCutMinNClusterITS(0), fCutMaxChi2PerClusterTPC(0), fCutMaxChi2PerClusterITS(0),
-  fCutRequireTPCRefit(0), fCutRequireITSRefit(0), fCutAcceptKinkDaughters(0),
-  fCutMaxDCAToVertexXY(0), fCutMaxDCAToVertexZ(0),fCutDCAToVertex2D(0),fPIDUtils(),
+  fTrackCutsType(kTPCOnlyCut), fCutMinTrackPt(0), fCutMinNClusterTPC(-1), fCutMinNClusterITS(-1), fCutMaxChi2PerClusterTPC(1e10), fCutMaxChi2PerClusterITS(1e10),
+  fCutRequireTPCRefit(kFALSE), fCutRequireITSRefit(kFALSE), fCutAcceptKinkDaughters(kFALSE),
+  fCutMaxDCAToVertexXY(1e10), fCutMaxDCAToVertexZ(1e10),fCutDCAToVertex2D(kFALSE),fPIDUtils(),
   fUseTimeCorrectionFactors(kFALSE),  fTimeCorrectionFactorsSet(kFALSE)
 {
 //
@@ -114,10 +114,7 @@ AliEMCALRecoUtils::AliEMCALRecoUtils():
   fResidualEta           = new TArrayF();
   
   InitTrackCuts();
-  
   fPIDUtils              = new AliEMCALPIDUtils();
-
-
 }
 
 //______________________________________________________________________
@@ -136,7 +133,7 @@ AliEMCALRecoUtils::AliEMCALRecoUtils(const AliEMCALRecoUtils & reco)
   fCutEtaPhiSum(reco.fCutEtaPhiSum), fCutEtaPhiSeparate(reco.fCutEtaPhiSeparate), fCutR(reco.fCutR), fCutEta(reco.fCutEta), fCutPhi(reco.fCutPhi),
   fMass(reco.fMass), fStep(reco.fStep),
   fRejectExoticCluster(reco.fRejectExoticCluster),
-  fCutMinTrackPt(reco.fCutMinTrackPt), fCutMinNClusterTPC(reco.fCutMinNClusterTPC), fCutMinNClusterITS(reco.fCutMinNClusterITS), 
+  fTrackCutsType(reco.fTrackCutsType), fCutMinTrackPt(reco.fCutMinTrackPt), fCutMinNClusterTPC(reco.fCutMinNClusterTPC), fCutMinNClusterITS(reco.fCutMinNClusterITS), 
   fCutMaxChi2PerClusterTPC(reco.fCutMaxChi2PerClusterTPC), fCutMaxChi2PerClusterITS(reco.fCutMaxChi2PerClusterITS),
   fCutRequireTPCRefit(reco.fCutRequireTPCRefit), fCutRequireITSRefit(reco.fCutRequireITSRefit),
   fCutAcceptKinkDaughters(reco.fCutAcceptKinkDaughters),
@@ -191,6 +188,7 @@ AliEMCALRecoUtils & AliEMCALRecoUtils::operator = (const AliEMCALRecoUtils & rec
   fStep                      = reco.fStep;
   fRejectExoticCluster       = reco.fRejectExoticCluster;
 
+  fTrackCutsType             = reco.fTrackCutsType;
   fCutMinTrackPt             = reco.fCutMinTrackPt;
   fCutMinNClusterTPC         = reco.fCutMinNClusterTPC;
   fCutMinNClusterITS         = reco.fCutMinNClusterITS; 
@@ -256,8 +254,7 @@ AliEMCALRecoUtils & AliEMCALRecoUtils::operator = (const AliEMCALRecoUtils & rec
     if(fMatchedClusterIndex)delete fMatchedClusterIndex;
     fMatchedClusterIndex = 0;
   }
-  
-  
+   
   return *this;
 }
 
@@ -1635,21 +1632,47 @@ Bool_t AliEMCALRecoUtils::IsAccepted(AliESDtrack *esdTrack)
 void AliEMCALRecoUtils::InitTrackCuts()
 {
   //Intilize the track cut criteria
-  //By default these cuts are set according to AliESDtrackCuts::GetStandardITSTPCTrackCuts2010()
+  //By default these cuts are set according to AliESDtrackCuts::GetStandardTPCOnlyTrackCuts()
   //Also you can customize the cuts using the setters
   
-  //TPC
-  SetMinNClustersTPC(70);
-  SetMaxChi2PerClusterTPC(4);
-  SetAcceptKinkDaughters(kFALSE);
-  SetRequireTPCRefit(kTRUE);
-  
-  //ITS
-  SetRequireITSRefit(kTRUE);
-  SetMaxDCAToVertexZ(2);
-  SetDCAToVertex2D(kFALSE);
-  SetMaxChi2PerClusterITS(); //which by default sets the value to 1e10.
-  SetMinNClustersITS();
+  switch (fTrackCutsType)
+    {
+    case kTPCOnlyCut:
+      {
+       AliInfo(Form("Track cuts for matching: GetStandardTPCOnlyTrackCuts()\n"));
+       //TPC
+       SetMinNClustersTPC(70);
+       SetMaxChi2PerClusterTPC(4);
+       SetAcceptKinkDaughters(kFALSE);
+       SetRequireTPCRefit(kFALSE);
+
+       //ITS
+       SetRequireITSRefit(kFALSE);
+       SetMaxDCAToVertexZ(3.2);
+       SetMaxDCAToVertexXY(2.4);
+       SetDCAToVertex2D(kTRUE);
+
+       break;
+      }
+    
+    case kGlobalCut:
+      {
+       AliInfo(Form("Track cuts for matching: GetStandardITSTPCTrackCuts2010(kTURE)\n"));
+       //TPC
+       SetMinNClustersTPC(70);
+       SetMaxChi2PerClusterTPC(4);
+       SetAcceptKinkDaughters(kFALSE);
+       SetRequireTPCRefit(kTRUE);
+
+       //ITS
+       SetRequireITSRefit(kTRUE);
+       SetMaxDCAToVertexZ(2);
+       SetMaxDCAToVertexXY();
+       SetDCAToVertex2D(kFALSE);
+
+       break;
+      }
+    }
 }
 
 //___________________________________________________
@@ -1684,7 +1707,7 @@ void AliEMCALRecoUtils::Print(const Option_t *) const
       printf("To cut on dEta and dPhi separately, use: SwitchOnCutEtaPhiSeparate()\n");
     }
 
-  printf("Mass hypothesis = %2.3f[GeV/c^2], extrapolation step = %2.2f[cm]\n",fMass,fStep);
+  printf("Mass hypothesis = %2.3f [GeV/c^2], extrapolation step = %2.2f[cm]\n",fMass,fStep);
 
   printf("Track cuts: \n");
   printf("Minimum track pT: %1.2f\n",fCutMinTrackPt);
index ceb407e0a33d106bb88b5a94576034f85793483f..ededa1a57c7adda3ae37ccd85632f41344d22123 100644 (file)
@@ -48,6 +48,7 @@ public:
   enum PositionAlgorithms{kUnchanged=-1,kPosTowerIndex=0, kPosTowerGlobal=1};
   enum ParticleType{kPhoton=0, kElectron=1,kHadron =2, kUnknown=-1};
   enum { kNCuts = 11 }; //track matching
+  enum TrackCutsType{kTPCOnlyCut=0, kGlobalCut=1};
 
   //-----------------------------------------------------
   //Position recalculation
@@ -245,6 +246,8 @@ public:
   //Track Cuts 
   Bool_t  IsAccepted(AliESDtrack *track);
   void    InitTrackCuts();
+  void    SetTrackCutsType(Int_t type) { fTrackCutsType = type; InitTrackCuts(); }
+  Int_t   GetTrackCutsType() const     { return fTrackCutsType; }
 
   // track quality cut setters  
   void    SetMinTrackPt(Double_t pt=0)              { fCutMinTrackPt           = pt   ;}
@@ -316,6 +319,7 @@ private:
   Bool_t     fRejectExoticCluster;      // Switch on or off exotic cluster rejection
 
   // Track cuts  
+  Int_t      fTrackCutsType;             // Esd track cuts type for matching
   Double_t   fCutMinTrackPt;             // Cut on track pT
   Int_t      fCutMinNClusterTPC;         // Min number of tpc clusters
   Int_t      fCutMinNClusterITS;         // Min number of its clusters