adding function to create default tpc-only cuts
authorjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 1 Oct 2009 14:46:47 +0000 (14:46 +0000)
committerjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 1 Oct 2009 14:46:47 +0000 (14:46 +0000)
adding function to get reference multiplicity from tpc-only tracks
removing functions that are deprecated for more than 6 months

ANALYSIS/AliESDtrackCuts.cxx
ANALYSIS/AliESDtrackCuts.h
PWG4/JetTasks/AliAnaESDSpectraQA.cxx

index 4bf2705..9423023 100644 (file)
@@ -515,6 +515,51 @@ Long64_t AliESDtrackCuts::Merge(TCollection* list) {
   return count+1;
 }
 
+//____________________________________________________________________
+AliESDtrackCuts* AliESDtrackCuts::GetStandardTPCOnlyTrackCuts()
+{
+  // creates an AliESDtrackCuts object and fills it with standard values for TPC-only cuts
+  // see ALICE note: ...
+  
+  Printf("AliESDtrackCuts::GetStandardTPCOnlyTrackCuts: Creating track cuts for TPC-only.");
+  
+  AliESDtrackCuts* esdTrackCuts = new AliESDtrackCuts;
+  
+  esdTrackCuts->SetMinNClustersTPC(50);
+  esdTrackCuts->SetMaxChi2PerClusterTPC(4);
+  esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
+  
+  esdTrackCuts->SetMaxDCAToVertexZ(3.2);
+  esdTrackCuts->SetMaxDCAToVertexXY(2.4);
+  esdTrackCuts->SetDCAToVertex2D(kTRUE);
+  
+  return esdTrackCuts;
+}
+
+//____________________________________________________________________
+Int_t AliESDtrackCuts::GetReferenceMultiplicity(AliESDEvent* esd, Bool_t tpcOnly)
+{
+  // Gets reference multiplicity following the standard cuts and a defined fiducial volume
+  // tpcOnly = kTRUE -> consider TPC-only tracks
+  //         = kFALSE -> consider global tracks
+  
+  if (!tpcOnly)
+  {
+    Printf("AliESDtrackCuts::GetReferenceMultiplicity: Not implemented for global tracks!");
+    return -1;
+  }
+  
+  AliESDtrackCuts* esdTrackCuts = GetStandardTPCOnlyTrackCuts();
+  esdTrackCuts->SetEtaRange(-0.8, 0.8);
+  esdTrackCuts->SetPtRange(0.15);
+  
+  Int_t nTracks = esdTrackCuts->CountAcceptedTracks(esd);
+  
+  delete esdTrackCuts;
+  esdTrackCuts = 0;
+  
+  return nTracks;
+}
 
 //____________________________________________________________________
 Float_t AliESDtrackCuts::GetSigmaToVertex(AliESDtrack* esdTrack)
@@ -1313,38 +1358,3 @@ void AliESDtrackCuts::DrawHistograms()
   fhChi2PerClusterTPC[1]->DrawCopy("SAME");*/
 }
 
-Float_t AliESDtrackCuts::GetMinNsigmaToVertex() const
-{
-  // deprecated, please use GetMaxNsigmaToVertex
-
-  Printf("WARNING: AliESDtrackCuts::GetMinNsigmaToVertex is DEPRECATED and will be removed in the next release. Please use GetMaxNsigmaToVertex instead. Renaming was done to improve code readability.");
-
-  return GetMaxNsigmaToVertex();
-}
-
-void AliESDtrackCuts::SetMinNsigmaToVertex(Float_t sigma)
-{
-  // deprecated, will be removed in next release
-
-  Printf("WARNING: AliESDtrackCuts::SetMinNsigmaToVertex is DEPRECATED and will be removed in the next release. Please use SetMaxNsigmaToVertex instead. Renaming was done to improve code readability.");
-  
-  SetMaxNsigmaToVertex(sigma);
-}
-
-void AliESDtrackCuts::SetAcceptKingDaughters(Bool_t b)
-{
-  // deprecated, will be removed in next release
-
-  Printf("WARNING: AliESDtrackCuts::SetAcceptKingDaughters is DEPRECATED and will be removed in the next release. Please use SetAcceptKinkDaughters instead. Renaming was done to improve code readability.");
-  
-  SetAcceptKinkDaughters(b);
-}
-
-Bool_t AliESDtrackCuts::GetAcceptKingDaughters() const
-{
-  // deprecated, will be removed in next release
-
-  Printf("WARNING: AliESDtrackCuts::GetAcceptKingDaughters is DEPRECATED and will be removed in the next release. Please use GetAcceptKinkDaughters instead. Renaming was done to improve code readability.");
-  
-  return GetAcceptKinkDaughters();
-}
index 3d49d13..3570d70 100644 (file)
@@ -49,8 +49,13 @@ public:
   Bool_t AcceptTrack(AliESDtrack* esdTrack);
   TObjArray* GetAcceptedTracks(AliESDEvent* esd, Bool_t bTPC = kFALSE);
   Int_t CountAcceptedTracks(AliESDEvent* esd);
+  
+  static Int_t GetReferenceMultiplicity(AliESDEvent* esd, Bool_t tpcOnly);
 
   static AliESDtrack* GetTPCOnlyTrack(AliESDEvent* esd, Int_t iTrack);
+  
+  // Standard cut definitions
+  static AliESDtrackCuts* GetStandardTPCOnlyTrackCuts();
 
   virtual Long64_t Merge(TCollection* list);
   virtual void Copy(TObject &c) const;
@@ -80,12 +85,6 @@ public:
   void SetMinDCAToVertexXY(Float_t dist=0.)           {fCutMinDCAToVertexXY = dist;}
   void SetMinDCAToVertexZ(Float_t dist=0.)            {fCutMinDCAToVertexZ = dist;}
   void SetDCAToVertex2D(Bool_t b=kFALSE)              {fCutDCAToVertex2D = b;}
-  
-  // deprecated, will be removed in next release
-  void SetMinNsigmaToVertex(Float_t sigma=1e10);
-  Float_t GetMinNsigmaToVertex() const;
-  void SetAcceptKingDaughters(Bool_t b=kFALSE);
-  Bool_t  GetAcceptKingDaughters() const;
 
   // getters
 
@@ -109,13 +108,13 @@ public:
   Bool_t  GetDCAToVertex2D()         const   { return fCutDCAToVertex2D;}
   Bool_t  GetRequireSigmaToVertex( ) const   { return fCutSigmaToVertexRequired;}
 
-  void GetPRange(Float_t& r1, Float_t& r2)   {r1=fPMin;   r2=fPMax;}
-  void GetPtRange(Float_t& r1, Float_t& r2)  {r1=fPtMin;  r2=fPtMax;}
-  void GetPxRange(Float_t& r1, Float_t& r2)  {r1=fPxMin;  r2=fPxMax;}
-  void GetPyRange(Float_t& r1, Float_t& r2)  {r1=fPyMin;  r2=fPyMax;}
-  void GetPzRange(Float_t& r1, Float_t& r2)  {r1=fPzMin;  r2=fPzMax;}
-  void GetEtaRange(Float_t& r1, Float_t& r2) {r1=fEtaMin; r2=fEtaMax;}
-  void GetRapRange(Float_t& r1, Float_t& r2) {r1=fRapMin; r2=fRapMax;}
+  void GetPRange(Float_t& r1, Float_t& r2)  const {r1=fPMin;   r2=fPMax;}
+  void GetPtRange(Float_t& r1, Float_t& r2) const {r1=fPtMin;  r2=fPtMax;}
+  void GetPxRange(Float_t& r1, Float_t& r2) const {r1=fPxMin;  r2=fPxMax;}
+  void GetPyRange(Float_t& r1, Float_t& r2) const {r1=fPyMin;  r2=fPyMax;}
+  void GetPzRange(Float_t& r1, Float_t& r2) const {r1=fPzMin;  r2=fPzMax;}
+  void GetEtaRange(Float_t& r1, Float_t& r2) const {r1=fEtaMin; r2=fEtaMax;}
+  void GetRapRange(Float_t& r1, Float_t& r2) const {r1=fRapMin; r2=fRapMax;}
 
   // track kinmatic cut setters
   void SetPRange(Float_t r1=0, Float_t r2=1e10)       {fPMin=r1;   fPMax=r2;}
index b87f88a..8b080b0 100644 (file)
@@ -64,7 +64,7 @@ AliAnaESDSpectraQA::AliAnaESDSpectraQA(const char *name):
   DefineOutput(0, TList::Class());
   InitHistPointers();
   //fTrackCuts = new AliESDtrackCuts;
-  fTrackCuts->SetAcceptKingDaughters(kFALSE);
+  fTrackCuts->SetAcceptKinkDaughters(kFALSE);
   fTrackCuts->SetRequireTPCRefit(kTRUE);
   fTrackCuts->SetEtaRange(-1,1);
   // Add chisq criterium to reject 'bad' tracks that might not make it as prim