1 ////////////////////////////////////////////////////////////////////////////////
3 // AliFemtoCutMonitorParticlePID - the cut monitor for particles to study //
4 // various aspects of the PID determination //
6 ////////////////////////////////////////////////////////////////////////////////
7 #include "AliFemtoCutMonitorParticlePID.h"
8 #include "AliFemtoModelHiddenInfo.h"
14 AliFemtoCutMonitorParticlePID::AliFemtoCutMonitorParticlePID():
20 // Default constructor
21 fTPCdEdx = new TH2D("TPCdEdx", "TPC dEdx vs. momentum", 200, 0.1, 4.0, 250, 0.0, 500.0);
22 fTOFTime = new TH2D("TOFTime", "TOF Time vs. momentum", 190, 0.1, 2.0, 400, -4000.0, 4000.0);
23 ftofHist=new TH2D("TOFHist","TOF momentum vs v",100,0.,1.1,100,0.,3.0);
26 AliFemtoCutMonitorParticlePID::AliFemtoCutMonitorParticlePID(const char *aName, Int_t aTOFParticle):
29 fTOFParticle(aTOFParticle),
35 snprintf(name, 200, "TPCdEdx%s", aName);
36 fTPCdEdx = new TH2D(name, "TPC dEdx vs. momentum", 200, 0.1, 4.0, 250, 0.0, 500.0);
38 snprintf(name, 200, "TOFTime%s", aName);
39 fTOFTime = new TH2D(name, "TOF Time vs. momentum", 190, 0.1, 2.0, 400, -4000.0, 4000.0);
41 snprintf(name, 200, "TOFHist%s", aName);
42 ftofHist=new TH2D(name,"TOF momentum vs v",100,0.,1.1,100,0.,3.0);
45 AliFemtoCutMonitorParticlePID::AliFemtoCutMonitorParticlePID(const AliFemtoCutMonitorParticlePID &aCut):
53 if (fTPCdEdx) delete fTPCdEdx;
54 fTPCdEdx = new TH2D(*aCut.fTPCdEdx);
56 if (fTOFTime) delete fTOFTime;
57 fTOFTime = new TH2D(*aCut.fTOFTime);
59 if (ftofHist) delete ftofHist;
60 ftofHist= new TH2D(*aCut.ftofHist);
63 AliFemtoCutMonitorParticlePID::~AliFemtoCutMonitorParticlePID()
71 AliFemtoCutMonitorParticlePID& AliFemtoCutMonitorParticlePID::operator=(const AliFemtoCutMonitorParticlePID& aCut)
73 // assignment operator
77 if (fTPCdEdx) delete fTPCdEdx;
78 fTPCdEdx = new TH2D(*aCut.fTPCdEdx);
80 if (fTOFTime) delete fTOFTime;
81 fTOFTime = new TH2D(*aCut.fTOFTime);
83 if(ftofHist) delete ftofHist;
84 ftofHist = new TH2D(*aCut.ftofHist);
88 AliFemtoString AliFemtoCutMonitorParticlePID::Report(){
89 // Prepare report from the execution
90 string stemp = "*** AliFemtoCutMonitorParticlePID report";
91 AliFemtoString returnThis = stemp;
95 void AliFemtoCutMonitorParticlePID::Fill(const AliFemtoTrack* aTrack)
97 // Fill in the monitor histograms with the values from the current track
98 float tMom = aTrack->P().Mag();
99 float tdEdx = aTrack->TPCsignal();
101 short tchg = aTrack->Charge();
102 if (fTOFParticle == 0) tTOF = aTrack->TOFpionTime();
103 if (fTOFParticle == 1) tTOF = aTrack->TOFkaonTime();
104 if (fTOFParticle == 2) tTOF = aTrack->TOFprotonTime();
106 fTPCdEdx->Fill(tMom, tdEdx);
107 fTOFTime->Fill(tMom, tTOF);
109 float vp= aTrack->VTOF();
110 ftofHist->Fill(vp,tMom);
113 void AliFemtoCutMonitorParticlePID::Write()
115 // Write out the relevant histograms
121 TList *AliFemtoCutMonitorParticlePID::GetOutputList()
123 TList *tOutputList = new TList();
124 tOutputList->Add(fTPCdEdx);
125 tOutputList->Add(fTOFTime);
126 tOutputList->Add(ftofHist);