]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG4/GammaConv/AliV0Reader.h
update to run TPC+ITS analysis
[u/mrichter/AliRoot.git] / PWG4 / GammaConv / AliV0Reader.h
index b6df568637a5cd9e17bb1ce79182d1663973bc6d..6fd36252dfeafddb7ccf1fc1292813713377f0d2 100644 (file)
@@ -108,7 +108,8 @@ class AliV0Reader : public TObject {
   /*
    *Returns the number of contributors to the vertex
    */
-  Int_t GetNumberOfContributorsVtx() const{return fESDEvent->GetPrimaryVertex()->GetNContributors();}
+  //  Int_t GetNumberOfContributorsVtx() const{return fESDEvent->GetPrimaryVertex()->GetNContributors();}
+  Int_t GetNumberOfContributorsVtx();
   
   /*
    * Check if there are any more good v0s left in the v0 stack
@@ -414,37 +415,73 @@ class AliV0Reader : public TObject {
   /*
    * Gets the Number of the TPC clusters of the negative track.
    */
-  Double_t GetNegativeTracknTPCClusters() const{return fCurrentNegativeESDTrack->GetNcls(1);}
+  Int_t GetNegativeTracknTPCClusters() const{return fCurrentNegativeESDTrack->GetNcls(1);}
 
   /*
    * Gets the Number of the TPC clusters of the positive track.
    */
-  Double_t GetPositiveTracknTPCClusters() const{return fCurrentPositiveESDTrack->GetNcls(1);}
+  Int_t GetPositiveTracknTPCClusters() const{return fCurrentPositiveESDTrack->GetNcls(1);}
        
+
+  /*
+   * Gets the Number of the TPC findable clusters of the negative track.
+   */
+  Int_t GetNegativeTracknTPCFClusters() const{return fCurrentNegativeESDTrack->GetTPCNclsF();}
+
+  /*
+   * Gets the Number of the TPC findable clusters of the positive track.
+   */
+  Int_t GetPositiveTracknTPCFClusters() const{return fCurrentPositiveESDTrack->GetTPCNclsF();}
+
   /*
    * Gets the Number of the ITS clusters of the negative track.
    */
-  Double_t GetNegativeTracknITSClusters() const{return fCurrentNegativeESDTrack->GetNcls(0);}
+  Int_t GetNegativeTracknITSClusters() const{return fCurrentNegativeESDTrack->GetNcls(0);}
 
   /*
    * Gets the Number of the ITS clusters of the positive track.
    */
-  Double_t GetPositiveTracknITSClusters() const{return fCurrentPositiveESDTrack->GetNcls(0);}
+  Int_t GetPositiveTracknITSClusters() const{return fCurrentPositiveESDTrack->GetNcls(0);}
+
+  /*
+   * Gets the chi2 of the TPC  negative track.
+   */
+  Double_t GetNegativeTrackTPCchi2() const{return fCurrentNegativeESDTrack->GetTPCchi2();}
+
+  /*
+   * Gets the chi2 of the TPC  the positive track.
+   */
+  Double_t GetPositiveTrackTPCchi2() const{return fCurrentPositiveESDTrack->GetTPCchi2();}
        
   /*
    * Update data which need to be updated every event.
    */
   void UpdateEventByEventData();
+
+  /*
+   * Gets the MaxRCut value.
+   */
+  Double_t GetMaxVertexZ() const{return fMaxVertexZ;}
        
   /*
    * Gets the MaxRCut value.
    */
   Double_t GetMaxRCut() const{return fMaxR;}
+
+   /*
+    * Gets the MinRCut value.
+    */
+   Double_t GetMinRCut() const{return fMinR;}
        
   /*
    * Gets the Eta cut value.
    */
   Double_t GetEtaCut() const{return fEtaCut;}
+
+  /*
+   * Gets the Rapidity Meson cut value.
+   */
+  Double_t GetRapidityMesonCut() const{return fRapidityMesonCut;}
        
   /*
    * Gets the Pt cut value.
@@ -463,6 +500,12 @@ class AliV0Reader : public TObject {
    */
   Double_t GetMinClsTPCCut() const{return fMinClsTPC;}
        
+  /*
+   * Gets the MinClsTPC value.
+   */
+  Double_t GetMinClsTPCCutToF() const{return fMinClsTPCToF;}
+       
+
 
   /*
    * Gets the line cut values.
@@ -485,6 +528,10 @@ class AliV0Reader : public TObject {
    */
   Double_t GetAlphaCutMeson() const{return fAlphaCutMeson;}
 
+  /*
+   * Gets the Minimum alpha cut value for the mesons.
+   */
+  Double_t GetAlphaMinCutMeson() const{return fAlphaMinCutMeson;}
 
   Double_t GetPositiveTrackLength() const{return fCurrentPositiveESDTrack->GetIntegratedLength();}
   Double_t GetNegativeTrackLength() const{return fCurrentNegativeESDTrack->GetIntegratedLength();}
@@ -492,15 +539,29 @@ class AliV0Reader : public TObject {
   Double_t GetPositiveNTPCClusters() const{return fCurrentPositiveESDTrack->GetTPCNcls();}
   Double_t GetNegativeNTPCClusters() const{return fCurrentNegativeESDTrack->GetTPCNcls();}
        
+  /*
+   * Sets the MaxVertexZ value.
+   */
+  void SetMaxVertexZ(Double_t maxVertexZ){fMaxVertexZ=maxVertexZ;}
+
   /*
    * Sets the MaxRCut value.
    */
   void SetMaxRCut(Double_t maxR){fMaxR=maxR;}
-       
+  /*   
+   * Sets the MinRCut value.
+   */
+  void SetMinRCut(Double_t minR){fMinR=minR;}
+
   /*
    * Sets the EtaCut value.
    */
   void SetEtaCut(Double_t etaCut){fEtaCut=etaCut;}
+
+  /*
+   * Sets the Rapidity Meson Cut value.
+   */
+  void SetRapidityMesonCut(Double_t RapidityMesonCut){fRapidityMesonCut=RapidityMesonCut;}
        
   /*
    * Sets the PtCut value.
@@ -518,11 +579,17 @@ class AliV0Reader : public TObject {
    */
   void SetMaxZCut(Double_t maxZ){fMaxZ=maxZ;}
        
- /*
 /*
    * Sets the MinClsTPC value.
    */
   void SetMinClsTPCCut(Double_t minClsTPC){fMinClsTPC=minClsTPC;}
+
+  /*
+   * Sets the MinClsTPC value.
+   */
+  void SetMinClsTPCCutToF(Double_t minClsTPCToF){fMinClsTPCToF=minClsTPCToF;}
        
+
   /*
    * Sets the LineCut values.
    */
@@ -545,6 +612,12 @@ class AliV0Reader : public TObject {
   void SetAlphaCutMeson(Double_t alpha){fAlphaCutMeson=alpha;}
        
 
+  /*
+   * Sets the AlphaCut for the mesons.
+   */
+  void SetAlphaMinCutMeson(Double_t alpha){fAlphaMinCutMeson=alpha;}
+
+
   /*
    * Sets the XVertexCut value.
    */
@@ -595,6 +668,11 @@ class AliV0Reader : public TObject {
    */
   void SetPIDMinPnSigmaAbovePionLine(Double_t MinPnSigmaAbovePion){fPIDMinPnSigmaAbovePionLine=MinPnSigmaAbovePion;}
 
+ /*
+   * Sets the PIDMinPnSigmaAbovePion cut value for the tracks.
+   */
+  void SetPIDMaxPnSigmaAbovePionLine(Double_t MaxPnSigmaAbovePion){fPIDMaxPnSigmaAbovePionLine=MaxPnSigmaAbovePion;}
+
   /*
    * Sets the SigmaMassCut value.
    */
@@ -659,6 +737,15 @@ class AliV0Reader : public TObject {
    */
   void SetPIDMinPPionRejectionLowP(Double_t PIDMinPPionRejectionLowP ){fPIDMinPPionRejectionLowP=PIDMinPPionRejectionLowP;}
 
+  /*
+   *Set if we want to use Gamma Selection based on Qt from Armenteros
+   */
+  void SetDoQtGammaSelection(Bool_t doQtGammaSelection){fDoQtGammaSelection=doQtGammaSelection;}
+  /*
+   * Sets the MaxQtCut value.
+   */
+  void SetQtMax(Double_t qtMax){fQtMax=qtMax;}
+
   /*
    * Updates the V0 information of the current V0.
    */
@@ -668,7 +755,13 @@ class AliV0Reader : public TObject {
    * Resets the V0 index.
    */
   void ResetV0IndexNumber(){fCurrentV0IndexNumber=0;}
-       
+  
+
+  /*
+   * Returns number of good v0s in the event
+   */
+  Int_t GetNGoodV0s() const {return fNumberOfGoodV0s;}
+
   /*
    * Sets the histograms.
    */
@@ -679,6 +772,11 @@ class AliV0Reader : public TObject {
    */
   Bool_t CheckForPrimaryVertex();
        
+  /*
+   * Check for primary vertex Z.
+   */
+  Bool_t CheckForPrimaryVertexZ();
+
   /*
    * Gets a vector of good v0s.
    */
@@ -692,6 +790,8 @@ class AliV0Reader : public TObject {
 
   void SetUseOwnXYZCalculation(Bool_t flag){fUseOwnXYZCalculation=flag;}
 
+  void SetUseConstructGamma(Bool_t flag){fUseConstructGamma=flag;}
+
   Bool_t GetHelixCenter(AliESDtrack* track, Double_t b,Int_t charge, Double_t center[2]);
        
   Bool_t GetConvPosXY(AliESDtrack* ptrack,AliESDtrack* ntrack, Double_t b, Double_t convpos[2]);
@@ -718,16 +818,25 @@ class AliV0Reader : public TObject {
 
   void SetESDtrackCuts(AliESDtrackCuts * const trackCuts){fEsdTrackCuts = trackCuts;}
 
+  void SetNEventsForBG(Int_t nev){nEventsForBGCalculation = nev;}
+
   Int_t CountESDTracks();
 
   Int_t GetCurrentV0IndexNumber() const {return fCurrentV0IndexNumber;}
 
   Bool_t CheckIfPi0IsMother(Int_t label);
+  Bool_t CheckIfEtaIsMother(Int_t label);
 
   static void InitESDpid(Int_t type=0);
   static void SetESDpid(AliESDpid * const pid) {fgESDpid=pid;}
   static AliESDpid* GetESDpid() {return fgESDpid;}
+
+  void SetUseChargedTracksMultiplicityForBG(Bool_t flag){fUseChargedTrackMultiplicityForBG = flag;}
+  
+  Int_t GetPindex(Int_t i) {return fV0Pindex.at(i);}
+  Int_t GetNindex(Int_t i) {return fV0Nindex.at(i);}
+
+  void ResetNGoodV0s(){fNumberOfGoodV0s=0;}
 
 
  private:
@@ -779,19 +888,25 @@ class AliV0Reader : public TObject {
   Bool_t fUseKFParticle;   // flag 
   Bool_t fUseESDTrack;     // flag 
   Bool_t fDoMC;            // flag 
-       
+
+  //Event Cuts
+  Double_t fMaxVertexZ;
   //cuts
   Double_t fMaxR; //r cut
+  Double_t fMinR; //r cut
   Double_t fEtaCut; //eta cut
+  Double_t fRapidityMesonCut; //rapidity for meson cut
   Double_t fPtCut; // pt cut
   Double_t fSinglePtCut; // pt cut for electron/positron
   Double_t fMaxZ; //z cut
   Double_t fMinClsTPC;
+  Double_t fMinClsTPCToF;
   Double_t fLineCutZRSlope; //linecut
   Double_t fLineCutZValue; //linecut
   Double_t fChi2CutConversion; //chi2cut
   Double_t fChi2CutMeson;  //chi2cut
   Double_t fAlphaCutMeson;  //alphacut
+  Double_t fAlphaMinCutMeson;  //alphacut
   Double_t fPIDProbabilityCutNegativeParticle; //pid cut
   Double_t fPIDProbabilityCutPositiveParticle; //pid cut
   Bool_t   fDodEdxSigmaCut; // flag to use the dEdxCut based on sigmas
@@ -799,6 +914,7 @@ class AliV0Reader : public TObject {
   Double_t fPIDnSigmaBelowElectronLine; // sigma cut
   Double_t fPIDnSigmaAbovePionLine;     // sigma cut
   Double_t fPIDMinPnSigmaAbovePionLine; // sigma cut
+  Double_t fPIDMaxPnSigmaAbovePionLine; // sigma cut
   Double_t fDoKaonRejectionLowP;   // Kaon rejection at low p
   Double_t fDoProtonRejectionLowP; // Proton rejection at low p
   Double_t fDoPionRejectionLowP;   // Pion rejection at low p
@@ -808,7 +924,8 @@ class AliV0Reader : public TObject {
   Double_t fPIDMinPKaonRejectionLowP; // Momentum limit to apply kaon rejection
   Double_t fPIDMinPProtonRejectionLowP; // Momentum limit to apply proton rejection
   Double_t fPIDMinPPionRejectionLowP; // Momentum limit to apply proton rejection
-
+  Bool_t   fDoQtGammaSelection; // Select gammas using qtMax
+  Double_t fQtMax; // Maximum Qt from Armenteros to select Gammas
   Double_t fXVertexCut; //vertex cut
   Double_t fYVertexCut; //vertex cut
   Double_t fZVertexCut; // vertexcut
@@ -819,6 +936,8 @@ class AliV0Reader : public TObject {
 
   Bool_t fUseOwnXYZCalculation; //flag that determines if we use our own calculation of xyz (markus)
 
+  Bool_t fUseConstructGamma; //flag that determines if we use ConstructGamma method from AliKF
+
   Bool_t fDoCF; //flag
 
   Bool_t fUseOnFlyV0Finder; //flag
@@ -826,6 +945,9 @@ class AliV0Reader : public TObject {
   Bool_t fUpdateV0AlreadyCalled; //flag
        
   TClonesArray* fCurrentEventGoodV0s; //vector of good v0s
+  vector<Int_t> fV0Pindex;
+  vector<Int_t> fV0Nindex;  
   //  vector<AliKFParticle> fPreviousEventGoodV0s; // vector of good v0s from prevous events
 
   Bool_t fCalculateBackground; //flag
@@ -837,7 +959,12 @@ class AliV0Reader : public TObject {
 
   static AliESDpid* fgESDpid;                 // ESD pid object
 
-  ClassDef(AliV0Reader,10)
+  Int_t nEventsForBGCalculation;
+  
+  Bool_t fUseChargedTrackMultiplicityForBG;
+  Int_t fNumberOfGoodV0s;
+
+  ClassDef(AliV0Reader,16)
 };
 
 inline void AliV0Reader::InitESDpid(Int_t type)
@@ -859,13 +986,13 @@ inline void AliV0Reader::InitESDpid(Int_t type)
 
   // data
   if (type==1){
-    alephParameters[0] = 0.0283086;
+    alephParameters[0] = 0.0283086/0.97;
     alephParameters[1] = 2.63394e+01;
     alephParameters[2] = 5.04114e-11;
     alephParameters[3] = 2.12543e+00;
     alephParameters[4] = 4.88663e+00;
     fgESDpid->GetTOFResponse().SetTimeResolution(130.);
-    fgESDpid->GetTPCResponse().SetMip(47.9);
+    fgESDpid->GetTPCResponse().SetMip(50.);
   }
 
   fgESDpid->GetTPCResponse().SetBetheBlochParameters(