1 ////////////////////////////////////////////////////////////////////////////////
3 // AliFemtoCutMonitorParticleVertPos - the cut monitor for particles to study //
4 // the difference between reconstructed and true momentum //
6 ////////////////////////////////////////////////////////////////////////////////
7 #include "AliFemtoCutMonitorParticleVertPos.h"
8 #include "AliFemtoModelHiddenInfo.h"
9 #include "AliFemtoModelGlobalHiddenInfo.h"
15 AliFemtoCutMonitorParticleVertPos::AliFemtoCutMonitorParticleVertPos():
24 // Default constructor
25 fVertPos = new TH2D("VertPos", "Vertex position", 200, -20.0, 20.0, 200, -20.0, 20.0);
26 fEtaZ = new TH2D("EtaZPos", "Z vs. Eta", 200, -100.0, 100.0, 100, -1.5, 1.5);
27 fRadPos = new TH1D("RadPos", "Radial position", 200, 0.0, 1.0);
28 fEmPointX = new TH1D("EmPointX","Emission point x", 400, -200.0, 200.0);
29 fEmPointY = new TH1D("EmPointY","Emission point y", 400, -200.0, 200.0);
30 fEmPointZ = new TH1D("EmPointZ","Emission point z", 400, -200.0, 200.0);
31 fEmPointT = new TH1D("EmPointT","Emission point t", 400, -200.0, 200.0);
35 AliFemtoCutMonitorParticleVertPos::AliFemtoCutMonitorParticleVertPos(const char *aName):
47 snprintf(name, 200, "VertPos%s", aName);
48 fVertPos = new TH2D(name, "Rapdity vs Pt", 200, -20.0, 20.0, 200, -20.0, 20.0);
49 snprintf(name, 200, "EtaZPos%s", aName);
50 fEtaZ = new TH2D(name, "Z vs. Eta", 200, -100.0, 100.0, 100, -1.5, 1.5);
51 snprintf(name, 200, "RadPos%s", aName);
52 fRadPos = new TH1D(name, "Radial position", 200, 0.0, 1.0);
53 snprintf(name, 200, "EmPosX%s", aName);
54 fEmPointX = new TH1D(name,"Emission point x", 400, -200.0, 200.0);
55 snprintf(name, 200, "EmPosY%s", aName);
56 fEmPointY = new TH1D(name,"Emission point y", 400, -200.0, 200.0);
57 snprintf(name, 200, "EmPosZ%s", aName);
58 fEmPointZ = new TH1D(name,"Emission point z", 400, -200.0, 200.0);
59 snprintf(name, 200, "EmPosT%s", aName);
60 fEmPointT = new TH1D(name,"Emission point t", 400, -200.0, 200.0);
63 AliFemtoCutMonitorParticleVertPos::AliFemtoCutMonitorParticleVertPos(const AliFemtoCutMonitorParticleVertPos &aCut):
74 if (fVertPos) delete fVertPos;
75 fVertPos = new TH2D(*aCut.fVertPos);
76 if (fEtaZ) delete fEtaZ;
77 fEtaZ = new TH2D(*aCut.fEtaZ);
78 if (fRadPos) delete fRadPos;
79 fRadPos = new TH1D(*aCut.fRadPos);
80 if (fEmPointX) delete fEmPointX;
81 fEmPointX = new TH1D(*aCut.fEmPointX);
82 if (fEmPointY) delete fEmPointY;
83 fEmPointY = new TH1D(*aCut.fEmPointY);
84 if (fEmPointZ) delete fEmPointZ;
85 fEmPointZ = new TH1D(*aCut.fEmPointZ);
86 if (fEmPointT) delete fEmPointT;
87 fEmPointT = new TH1D(*aCut.fEmPointT);
90 AliFemtoCutMonitorParticleVertPos::~AliFemtoCutMonitorParticleVertPos()
102 AliFemtoCutMonitorParticleVertPos& AliFemtoCutMonitorParticleVertPos::operator=(const AliFemtoCutMonitorParticleVertPos& aCut)
104 // assignment operator
108 if (fVertPos) delete fVertPos;
109 fVertPos = new TH2D(*aCut.fVertPos);
110 if (fEtaZ) delete fEtaZ;
111 fEtaZ = new TH2D(*aCut.fEtaZ);
112 if (fRadPos) delete fRadPos;
113 fRadPos = new TH1D(*aCut.fRadPos);
114 if (fEmPointX) delete fEmPointX;
115 fEmPointX = new TH1D(*aCut.fEmPointX);
116 if (fEmPointY) delete fEmPointY;
117 fEmPointY = new TH1D(*aCut.fEmPointY);
118 if (fEmPointZ) delete fEmPointZ;
119 fEmPointZ = new TH1D(*aCut.fEmPointZ);
120 if (fEmPointT) delete fEmPointT;
121 fEmPointT = new TH1D(*aCut.fEmPointT);
126 AliFemtoString AliFemtoCutMonitorParticleVertPos::Report(){
127 // Prepare report from the execution
128 string stemp = "*** AliFemtoCutMonitorParticleVertPos report";
129 AliFemtoString returnThis = stemp;
133 void AliFemtoCutMonitorParticleVertPos::Fill(const AliFemtoTrack* aTrack)
135 // Fill in the monitor histograms with the values from the current track
136 AliFemtoModelGlobalHiddenInfo *hinfo = dynamic_cast<AliFemtoModelGlobalHiddenInfo *>(aTrack->GetHiddenInfo());
138 float tEta = -TMath::Log(TMath::Tan(hinfo->GetTrueMomentum()->Theta()/2.0));
140 fVertPos->Fill(hinfo->GetGlobalEmissionPoint()->x(), hinfo->GetGlobalEmissionPoint()->y());
141 fEtaZ->Fill(hinfo->GetGlobalEmissionPoint()->z(), tEta);
142 fRadPos->Fill(hinfo->GetGlobalEmissionPoint()->Perp());
145 AliFemtoModelHiddenInfo *hminfo = dynamic_cast<AliFemtoModelHiddenInfo *>(aTrack->GetHiddenInfo());
147 fEmPointX->Fill(hminfo->GetEmissionPoint()->x());
148 fEmPointY->Fill(hminfo->GetEmissionPoint()->y());
149 fEmPointZ->Fill(hminfo->GetEmissionPoint()->z());
150 fEmPointT->Fill(hminfo->GetEmissionPoint()->t());
154 void AliFemtoCutMonitorParticleVertPos::Write()
156 // Write out the relevant histograms
166 TList *AliFemtoCutMonitorParticleVertPos::GetOutputList()
168 TList *tOutputList = new TList();
169 tOutputList->Add(fVertPos);
170 tOutputList->Add(fEtaZ);
171 tOutputList->Add(fRadPos);
172 tOutputList->Add(fEmPointX);
173 tOutputList->Add(fEmPointY);
174 tOutputList->Add(fEmPointZ);
175 tOutputList->Add(fEmPointT);