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():
22 // Default constructor
23 fYPt = new TH2D("YPt", "Rapidity vs Pt", 100, -1.0, 1.0, 100, 0.1, 2.0);
24 fYPhi = new TH2D("YPhi", "Rapidity vs Phi", 100, -1.0, 1.0, 100, -TMath::Pi(), TMath::Pi());
25 fPtPhi = new TH2D("PtPhi", "Pt vs Phi", 100, 0.1, 2.0, 100, -TMath::Pi(), TMath::Pi());
26 fEtaPhi = new TH2D("EtaPhi", "Pseudorapidity vs Phi", 100, -1.0, 1.0, 100, -TMath::Pi(), TMath::Pi());
27 fEtaPt = new TH2D("EtaPt", "Pseudorapidity vs Pt", 100, -1.0, 1.0, 100, 0.1, 2.0);
30 AliFemtoCutMonitorParticleYPt::AliFemtoCutMonitorParticleYPt(const char *aName, float aMass):
41 snprintf(name, 200, "YPt%s", aName);
42 fYPt = new TH2D(name, "Rapdity vs Pt", 100, -1.0, 1.0, 100, 0.1, 2.0);
43 snprintf(name, 200, "YPhi%s", aName);
44 fYPhi = new TH2D(name, "Rapidity vs Phi", 100, -1.0, 1.0, 100, -TMath::Pi(), TMath::Pi());
45 snprintf(name, 200, "PtPhi%s", aName);
46 fPtPhi = new TH2D(name, "Pt vs Phi", 100, 0.1, 2.0, 100, -TMath::Pi(), TMath::Pi());
47 snprintf(name, 200, "EtaPhi%s", aName);
48 fEtaPhi = new TH2D(name, "Pseudorapidity vs Phi", 100, -1.0, 1.0, 100, -TMath::Pi(), TMath::Pi());
49 snprintf(name, 200, "EtaPt%s", aName);
50 fEtaPt = new TH2D(name, "Pseudorapidity vs Pt", 100, -1.0, 1.0, 100, 0.1, 2.0);
53 AliFemtoCutMonitorParticleYPt::AliFemtoCutMonitorParticleYPt(const AliFemtoCutMonitorParticleYPt &aCut):
63 if (fYPt) delete fYPt;
64 fYPt = new TH2D(*aCut.fYPt);
65 fYPhi = new TH2D(*aCut.fYPhi);
66 fPtPhi = new TH2D(*aCut.fPtPhi);
67 fEtaPhi = new TH2D(*aCut.fEtaPhi);
68 fEtaPt = new TH2D(*aCut.fEtaPt);
72 AliFemtoCutMonitorParticleYPt::~AliFemtoCutMonitorParticleYPt()
82 AliFemtoCutMonitorParticleYPt& AliFemtoCutMonitorParticleYPt::operator=(const AliFemtoCutMonitorParticleYPt& aCut)
84 // assignment operator
88 if (fYPt) delete fYPt;
89 fYPt = new TH2D(*aCut.fYPt);
90 if (fYPhi) delete fYPhi;
91 fYPhi = new TH2D(*aCut.fYPhi);
92 if (fPtPhi) delete fPtPhi;
93 fPtPhi = new TH2D(*aCut.fPtPhi);
94 if (fEtaPhi) delete fEtaPhi;
95 fEtaPhi = new TH2D(*aCut.fEtaPhi);
96 if (fEtaPt) delete fEtaPt;
97 fEtaPt = new TH2D(*aCut.fEtaPt);
102 AliFemtoString AliFemtoCutMonitorParticleYPt::Report(){
103 // Prepare report from the execution
104 string stemp = "*** AliFemtoCutMonitorParticleYPt report";
105 AliFemtoString returnThis = stemp;
109 void AliFemtoCutMonitorParticleYPt::Fill(const AliFemtoTrack* aTrack)
111 // Fill in the monitor histograms with the values from the current track
112 float tEnergy = ::sqrt(aTrack->P().mag2()+fMass*fMass);
113 float tRapidity = 0.5*::log((tEnergy+aTrack->P().z())/(tEnergy-aTrack->P().z()));
114 float tPt = ::sqrt((aTrack->P().x())*(aTrack->P().x())+(aTrack->P().y())*(aTrack->P().y()));
115 float tEta = -TMath::Log(TMath::Tan(aTrack->P().theta()/2.0));
116 float tPhi = aTrack->P().phi();
118 fYPt->Fill(tRapidity, tPt);
119 fYPhi->Fill(tRapidity, tPhi);
120 fPtPhi->Fill(tPt, tPhi);
121 fEtaPhi->Fill(tEta, tPhi);
122 fEtaPt->Fill(tEta, tPt);
125 void AliFemtoCutMonitorParticleYPt::Write()
127 // Write out the relevant histograms
135 TList *AliFemtoCutMonitorParticleYPt::GetOutputList()
137 TList *tOutputList = new TList();
138 tOutputList->Add(fYPt);
139 tOutputList->Add(fYPhi);
140 tOutputList->Add(fPtPhi);
141 tOutputList->Add(fEtaPhi);
142 tOutputList->Add(fEtaPt);