1 #ifndef ALIANALYSISNUCLEIMASS_H
2 #define ALIANALYSISNUCLEIMASS_H
8 #include <AliAnalysisTaskSE.h>
9 #include <AliPIDResponse.h>
21 class AliESDtrackCuts;
26 class AliAnalysisNucleiMass : public AliAnalysisTaskSE {
28 AliAnalysisNucleiMass();
29 AliAnalysisNucleiMass(const char *name);
31 virtual ~AliAnalysisNucleiMass();
33 virtual void UserCreateOutputObjects();
34 virtual void UserExec(Option_t *option);
35 virtual void Terminate(Option_t *);
39 void SetCentrality(Double_t CentMin=0., Double_t CentMax=100.) {Centrality[0]=CentMin; Centrality[1]=CentMax;};
41 void SetFilterBit(Int_t TestFilterBit=16) {FilterBit=TestFilterBit;}
43 void SetAbsEtaLimit(Double_t etaMin=0., Double_t etaMax=0.8) {EtaLimit[0]=etaMin;EtaLimit[1]=etaMax;}
44 void SetDCACut(Double_t DCAxyCUT=0.1, Double_t DCAzCUT=1000.0) {DCAxyCut=DCAxyCUT; DCAzCut=DCAzCUT;}
46 void SetNsigmaTPCCut(Double_t nSigmaTpcCut=2) {NsigmaTpcCut=nSigmaTpcCut;}
47 void SetNminTPCcluster(Int_t nMinTPCcluster=0) {NminTpcCluster=nMinTPCcluster;}
48 void SetTrdCut(Int_t kTRDcut=0) {iTrdCut=kTRDcut;}
51 void SetisSignalCheck(Int_t IsSignalCheck=2) {kSignalCheck=IsSignalCheck;}
52 void SetMtofMethod(Int_t iMtofMethod=1) {iMtof=iMtofMethod;}
53 void SetPvtxNucleiCorrection(Int_t kMomVtxCorr=1) {kPvtxCorr=kMomVtxCorr;}
56 AliAnalysisNucleiMass(const AliAnalysisNucleiMass &old);
57 AliAnalysisNucleiMass& operator=(const AliAnalysisNucleiMass &source);
59 static const Int_t nbin=46; // Number of pt bins in Tof Mass distributions
60 static const Int_t nBconf=2; // Number of Magnetic field configuration (B++ and B--)
61 static const Int_t nPart=9; // Number of particle type: e,mu,pi,K...
62 static const Int_t nSpec=18; // Number of particle species: particles: e+,e-,mu+,mu-,...
64 //Variables settings with public methods:
65 Double_t Centrality[2]; // Centrality bin (min and max)
66 Int_t FilterBit; // Filter Bit to be used
67 Double_t EtaLimit[2]; // Eta windows in analysis
68 Double_t DCAxyCut; // Cut on DCA-xy
69 Double_t DCAzCut; // Cut on DCA-z
70 Double_t NsigmaTpcCut; // number of sigma Tpc Cut
71 Int_t NminTpcCluster; // Number of minimum TPC clusters
72 Int_t iTrdCut; // iTrdCut==0-> No TRD cut; iTrdCut==1-> Yes TRD cut: yes TRD; iTrdCut==2->Yes TRD cut: no TRD;
73 Int_t kSignalCheck; // kSignalCheck==1->Fill all plots ; kSignalCheck==0->Fill only TH1 ; kSignalCheck==2-> Fill TH1 and some TH2 usefull in analysis
74 Int_t iMtof; // iMtof==1->m~pVtx ; iMtof==2->m~pExp ; iMtof==4->m~<p> (same correction for particle and antiparticle) ; iMtof==8->m~<p> (different correction for particle and antiparticle)
75 //Use only iMtof<=2; In the next commit also iMtof>2 will work well...
76 Int_t kPvtxCorr; // kPvtxCorr==1->Momentum at the primary vertex for (anti)nuclei is rescaled ; kPvtxCorr==0->no correction
79 Int_t iBconf; //! If Magnetic Field configuration is down or up
80 Bool_t kTOF; //! kTOFout and kTIME required
82 AliAODEvent* fAOD; //! AOD object
83 AliESDEvent* fESD; //! ESD object
84 AliVEvent* fEvent; //! general object
85 AliPIDResponse *fPIDResponse; //! pointer to PID response
86 TList *fList[nBconf]; //! lists for slot
88 TH1F *htemp[nBconf]; //! Temp. plot: avoid a problem with the merge of the output when a TList is empty (of the opposite magnetic field configuration)
89 TH1F *hCentrality[nBconf][2]; //! Centrality of the selected and analyzed events
90 TH1F *hZvertex[nBconf][2]; //! z-vertex distribution before and after the cuts on the event
92 TH1F *hEta[nBconf]; //! Eta distribution of the tracks
93 TH1F *hPhi[nBconf]; //! Phi particle distribution
94 TH2F *fEtaPhi[nBconf]; //! Phi vs Eta particle distribution
95 TH1F *hNTpcCluster[nBconf]; //! # of the TPC clusters after the track cuts
96 TH1F *hNTrdSlices[nBconf]; //! Number of the TRD slices after the track cuts
99 TH2F *fdEdxVSp[nBconf][2]; //! dedx vs pTpc
100 TProfile *hDeDxExp[nBconf][9]; //! TPC spline used
101 TH2F *fNsigmaTpc[nBconf][9]; //! NsigmaTPC vs. pTpc
102 TH2F *fNsigmaTpc_kTOF[nBconf][18]; //! NsigmaTPC vs. pt when kTOF is required and in DCAxyCut
105 TH2F *fBetaTofVSp[nBconf][2]; //! beta vs pVtx
106 TProfile *hBetaExp[nBconf][9]; //! TOF expected beta
107 TH2F *fNsigmaTof[nBconf][9]; //! NsigmaTOF vs. pT
108 TH2F *fNsigmaTof_DcaCut[nBconf][18]; //! NsigmaTOF vs. pT
110 //TPC and TOF conbined
111 TH2F *fM2vsP_NoTpcCut[nBconf][2][2]; //! M2 vs. P w/o the DCAxyCut
112 TH2F *fM2vsP[nBconf][2][18]; //! M2 vs. P with NsigmaTpcCut for each particle species, w/o the DCAxyCut
113 TH2F *fM2vsZ[nBconf][10]; //! M2 vs. Z in various pT bins
116 TH1D *hDCAxy[nBconf][18][nbin]; //! DCAxy distribution with NsigmaTpcCut for each particle species, in pT bins
117 TH1D *hDCAz[nBconf][18][nbin]; //! DCAz distribution with NsigmaTpcCut for each particle species, in pT bins
119 //TOF mass distributions
120 TH1D *hM2CutDCAxy[nBconf][18][nbin]; //! Tof m2 distribution in DCAxyCut and with NsigmaTpcCut
121 TH1D *hM2CutGroundDCAxy[nBconf][18][nbin]; //! Tof m2 distribution in the background of DCAxyCut (secondary nuclei selection) and with NsigmaTpcCut
124 TH2F *fPmeanVsBetaGamma[nBconf][18]; //! <p>/p vs beta*gamma for pi,K,p
125 TProfile *prPmeanVsBetaGamma[nBconf][18]; //! <p>/p vs beta*gamma for pi,K,p (profile)
128 TF2 *fPvtxTrueVsReco[2]; //! TF1 pVtx_True vs pVtx_Reco calculated with MC for d, He3
129 TProfile *prPvtxTrueVsReco[nBconf][2]; //! TProfile pVtx_True vs pVtx_Reco calculated with MC for d, He3 (as Check)
131 TF1 *fPmeanVsBGcorr[10]; //! <p>/p as a function of beta*gamma for pi,K,p,d,He3
132 TProfile *prPmeanVsBGcorr[nBconf][10]; //! <p>/p vs beta*gamma for pi,K,p,d,He3 as calculated from the parameterization (as Check)
134 //------------------------------Methods----------------------------------------
135 void MomVertexCorrection(Double_t p, Double_t *pC, Double_t eta, Int_t FlagPid);
137 void GetMassFromPvertex(Double_t beta, Double_t p, Double_t &M2);
138 void GetZTpc(Double_t dedx, Double_t pTPC, Double_t M2, Double_t &Z2);
140 void GetMassFromPvertexCorrected(Double_t beta, Double_t *pC, Double_t *Mass2);
142 void GetMassFromExpTimes(Double_t beta, Double_t *IntTimes, Double_t *Mass2);
143 void GetPmeanVsBetaGamma(Double_t *IntTimes, Double_t *pVtx, Int_t FlagPid, Int_t FlagPidTof, Double_t charge, Double_t DCAxy);
145 void GetMassFromMeanMom(Double_t beta, Double_t *IntTimes, Double_t *pVtx, Double_t charge, Double_t *Mass2, Int_t FlagPid, Int_t FlagPidTof, Double_t DCAxy);
148 ClassDef(AliAnalysisNucleiMass, 1);