1 ////////////////////////////////////////////////////////////////////////////////
3 // AliFemtoCutMonitorParticleYPt - the cut monitor for particles to study //
4 // the difference between reconstructed and true momentum //
6 ////////////////////////////////////////////////////////////////////////////////
7 #include "AliFemtoCutMonitorParticleYPt.h"
8 #include "AliFemtoModelHiddenInfo.h"
14 AliFemtoCutMonitorParticleYPt::AliFemtoCutMonitorParticleYPt():
26 // Default constructor
27 fYPt = new TH2D("YPt", "Rapidity vs Pt", 140, -1.4, 1.4, 100, 0.0, 5.0);
28 fYPhi = new TH2D("YPhi", "Rapidity vs Phi", 140, -1.4, 1.4, 100, -TMath::Pi(), TMath::Pi());
29 fPtPhi = new TH2D("PtPhi", "Pt vs Phi", 100, 0.0, 5.0, 100, -TMath::Pi(), TMath::Pi());
30 fEtaPhi = new TH2D("EtaPhi", "Pseudorapidity vs Phi", 140, -1.4, 1.4, 100, -TMath::Pi(), TMath::Pi());
31 fEtaPt = new TH2D("EtaPt", "Pseudorapidity vs Pt", 140, -1.4, 1.4, 100, 0.0, 5.0);
32 // fEtaPhiW = new TH2D("EtaPhiW", "Pseudorapidity vs Phi chi2/N weighted", 140, -1.4, 1.4, 100, -TMath::Pi(), TMath::Pi());
33 // fEtaPtW = new TH2D("EtaPtW", "Pseudorapidity vs Pt chi2/N weighted", 140, -1.4, 1.4, 100, 0.0, 5.0)
35 fDCARPt = new TH2D("DCARPt", "DCA in XY vs. Pt", 400, -3.0, 3.0, 100,0.0,5.0);
36 fDCAZPt = new TH2D("DCAZPt", "DCA in Z vs. Pt", 400, -3.0, 3.0, 100,0.0,5.0);
39 AliFemtoCutMonitorParticleYPt::AliFemtoCutMonitorParticleYPt(const char *aName, float aMass):
54 snprintf(name, 200, "YPt%s", aName);
55 fYPt = new TH2D(name, "Rapdity vs Pt", 140, -1.4, 1.4, 100, 0.0, 5.0);
56 snprintf(name, 200, "YPhi%s", aName);
57 fYPhi = new TH2D(name, "Rapidity vs Phi", 140, -1.4, 1.4, 100, -TMath::Pi(), TMath::Pi());
58 snprintf(name, 200, "PtPhi%s", aName);
59 fPtPhi = new TH2D(name, "Pt vs Phi", 100, 0.0, 5.0, 100, -TMath::Pi(), TMath::Pi());
60 snprintf(name, 200, "EtaPhi%s", aName);
61 fEtaPhi = new TH2D(name, "Pseudorapidity vs Phi", 140, -1.4, 1.4, 100, -TMath::Pi(), TMath::Pi());
62 snprintf(name, 200, "EtaPt%s", aName);
63 fEtaPt = new TH2D(name, "Pseudorapidity vs Pt", 140, -1.4, 1.4, 100, 0.0, 5.0);
64 // snprintf(name, 200, "EtaPhiW%s", aName);
65 // fEtaPhiW = new TH2D(name, "Pseudorapidity vs Phi chi2/N weighted", 140, -1.4, 1.4, 100, -TMath::Pi(), TMath::Pi());
66 // snprintf(name, 200, "EtaPtW%s", aName);
67 // fEtaPtW = new TH2D(name, "Pseudorapidity vs Pt chi2/N weighted", 140, -1.4, 1.4, 100, 0.0, 2.0);
68 snprintf(name, 200, "DCARPt%s", aName);
69 fDCARPt = new TH2D(name, "DCA in XY vs. Pt", 400, -3.0, 3.0, 100,0.0,3.0);
70 snprintf(name, 200, "DCAZPt%s", aName);
71 fDCAZPt = new TH2D(name, "DCA in Z vs. Pt", 400, -3.0, 3.0, 100,0.0,3.0);
74 AliFemtoCutMonitorParticleYPt::AliFemtoCutMonitorParticleYPt(const AliFemtoCutMonitorParticleYPt &aCut):
88 fYPt = new TH2D(*aCut.fYPt);
89 fYPhi = new TH2D(*aCut.fYPhi);
90 fPtPhi = new TH2D(*aCut.fPtPhi);
91 fEtaPhi = new TH2D(*aCut.fEtaPhi);
92 fEtaPt = new TH2D(*aCut.fEtaPt);
93 // fEtaPhiW = new TH2D(*aCut.fEtaPhiW);
94 // fEtaPtW = new TH2D(*aCut.fEtaPtW);
95 fDCARPt = new TH2D(*aCut.fDCARPt);
96 fDCAZPt = new TH2D(*aCut.fDCAZPt);
100 AliFemtoCutMonitorParticleYPt::~AliFemtoCutMonitorParticleYPt()
114 AliFemtoCutMonitorParticleYPt& AliFemtoCutMonitorParticleYPt::operator=(const AliFemtoCutMonitorParticleYPt& aCut)
116 // assignment operator
120 if (fYPt) delete fYPt;
121 fYPt = new TH2D(*aCut.fYPt);
122 if (fYPhi) delete fYPhi;
123 fYPhi = new TH2D(*aCut.fYPhi);
124 if (fPtPhi) delete fPtPhi;
125 fPtPhi = new TH2D(*aCut.fPtPhi);
126 if (fEtaPhi) delete fEtaPhi;
127 fEtaPhi = new TH2D(*aCut.fEtaPhi);
128 if (fEtaPt) delete fEtaPt;
129 fEtaPt = new TH2D(*aCut.fEtaPt);
130 // if (fEtaPhiW) delete fEtaPhiW;
131 // fEtaPhiW = new TH2D(*aCut.fEtaPhiW);
132 // if (fEtaPtW) delete fEtaPtW;
133 // fEtaPtW = new TH2D(*aCut.fEtaPtW);
134 if (fDCARPt) delete fDCARPt;
135 fDCARPt = new TH2D(*aCut.fDCARPt);
136 if (fDCAZPt) delete fDCAZPt;
137 fDCAZPt = new TH2D(*aCut.fDCAZPt);
142 AliFemtoString AliFemtoCutMonitorParticleYPt::Report(){
143 // Prepare report from the execution
144 string stemp = "*** AliFemtoCutMonitorParticleYPt report";
145 AliFemtoString returnThis = stemp;
149 void AliFemtoCutMonitorParticleYPt::Fill(const AliFemtoTrack* aTrack)
151 // Fill in the monitor histograms with the values from the current track
152 float tEnergy = ::sqrt(aTrack->P().Mag2()+fMass*fMass);
153 if(tEnergy==abs(aTrack->P().z())) tEnergy+=0.001;
154 float tRapidity = 0.5*::log((tEnergy+aTrack->P().z())/(tEnergy-aTrack->P().z()));
155 float tPt = ::sqrt((aTrack->P().x())*(aTrack->P().x())+(aTrack->P().y())*(aTrack->P().y()));
158 if(aTrack->P().Theta()==0)
161 tEta = -TMath::Log(TMath::Tan(aTrack->P().Theta()/2.0));
162 float tPhi = aTrack->P().Phi();
164 float dcar = aTrack->ImpactD();
165 float dcaz = aTrack->ImpactZ();
166 // if (aTrack->TPCncls() > 0)
167 // chi2w = aTrack->TPCchi2()/aTrack->TPCncls();
171 // cout << " CMYPt: " << fYPt << " " << fYPt->GetEntries() << " " << tRapidity << " " << tPt << endl;
173 fYPt->Fill(tRapidity, tPt);
174 fYPhi->Fill(tRapidity, tPhi);
175 fPtPhi->Fill(tPt, tPhi);
176 fEtaPhi->Fill(tEta, tPhi);
177 fEtaPt->Fill(tEta, tPt);
178 // fEtaPhiW->Fill(tEta, tPhi, chi2w);
179 // fEtaPtW->Fill(tEta, tPt, chi2w);
180 fDCARPt->Fill(dcar, tPt);
181 fDCAZPt->Fill(dcaz, tPt);
184 void AliFemtoCutMonitorParticleYPt::Write()
186 // Write out the relevant histograms
192 // fEtaPhiW->Write();
198 TList *AliFemtoCutMonitorParticleYPt::GetOutputList()
200 TList *tOutputList = new TList();
201 tOutputList->Add(fYPt);
202 tOutputList->Add(fYPhi);
203 tOutputList->Add(fPtPhi);
204 tOutputList->Add(fEtaPhi);
205 tOutputList->Add(fEtaPt);
206 // tOutputList->Add(fEtaPhiW);
207 // tOutputList->Add(fEtaPtW);
208 tOutputList->Add(fDCARPt);
209 tOutputList->Add(fDCAZPt);