]>
Commit | Line | Data |
---|---|---|
00114ecb | 1 | //////////////////////////////////////////////////////////////////////////////// |
2 | // // | |
3 | // AliFemtoCutMonitorParticleVertPos - the cut monitor for particles to study // | |
4 | // the difference between reconstructed and true momentum // | |
5 | // // | |
6 | //////////////////////////////////////////////////////////////////////////////// | |
7 | #include "AliFemtoCutMonitorParticleVertPos.h" | |
8 | #include "AliFemtoModelHiddenInfo.h" | |
4c399116 | 9 | #include "AliFemtoModelGlobalHiddenInfo.h" |
00114ecb | 10 | #include <TH1D.h> |
11 | #include <TH2D.h> | |
12 | #include <TList.h> | |
13 | #include <TMath.h> | |
14 | ||
15 | AliFemtoCutMonitorParticleVertPos::AliFemtoCutMonitorParticleVertPos(): | |
16 | fVertPos(0), | |
4c399116 | 17 | fEtaZ(0), |
8101bddd | 18 | fRadPos(0), |
19 | fEmPointX(0), | |
20 | fEmPointY(0), | |
21 | fEmPointZ(0), | |
22 | fEmPointT(0) | |
00114ecb | 23 | { |
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); | |
4c399116 | 27 | fRadPos = new TH1D("RadPos", "Radial position", 200, 0.0, 1.0); |
8101bddd | 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); | |
32 | ||
00114ecb | 33 | } |
34 | ||
35 | AliFemtoCutMonitorParticleVertPos::AliFemtoCutMonitorParticleVertPos(const char *aName): | |
36 | AliFemtoCutMonitor(), | |
37 | fVertPos(0), | |
1e79fae4 | 38 | fEtaZ(0), |
8101bddd | 39 | fRadPos(0), |
40 | fEmPointX(0), | |
41 | fEmPointY(0), | |
42 | fEmPointZ(0), | |
43 | fEmPointT(0) | |
00114ecb | 44 | { |
45 | // Normal constructor | |
46 | char name[200]; | |
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); | |
4c399116 | 51 | snprintf(name, 200, "RadPos%s", aName); |
52 | fRadPos = new TH1D(name, "Radial position", 200, 0.0, 1.0); | |
8101bddd | 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); | |
00114ecb | 61 | } |
62 | ||
63 | AliFemtoCutMonitorParticleVertPos::AliFemtoCutMonitorParticleVertPos(const AliFemtoCutMonitorParticleVertPos &aCut): | |
64 | AliFemtoCutMonitor(), | |
65 | fVertPos(0), | |
1e79fae4 | 66 | fEtaZ(0), |
8101bddd | 67 | fRadPos(0), |
68 | fEmPointX(0), | |
69 | fEmPointY(0), | |
70 | fEmPointZ(0), | |
71 | fEmPointT(0) | |
00114ecb | 72 | { |
73 | // copy constructor | |
74 | if (fVertPos) delete fVertPos; | |
75 | fVertPos = new TH2D(*aCut.fVertPos); | |
76 | if (fEtaZ) delete fEtaZ; | |
77 | fEtaZ = new TH2D(*aCut.fEtaZ); | |
4c399116 | 78 | if (fRadPos) delete fRadPos; |
79 | fRadPos = new TH1D(*aCut.fRadPos); | |
8101bddd | 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); | |
00114ecb | 88 | } |
89 | ||
90 | AliFemtoCutMonitorParticleVertPos::~AliFemtoCutMonitorParticleVertPos() | |
91 | { | |
92 | // Destructor | |
93 | delete fVertPos; | |
94 | delete fEtaZ; | |
4c399116 | 95 | delete fRadPos; |
8101bddd | 96 | delete fEmPointX; |
97 | delete fEmPointY; | |
98 | delete fEmPointZ; | |
99 | delete fEmPointT; | |
00114ecb | 100 | } |
101 | ||
102 | AliFemtoCutMonitorParticleVertPos& AliFemtoCutMonitorParticleVertPos::operator=(const AliFemtoCutMonitorParticleVertPos& aCut) | |
103 | { | |
104 | // assignment operator | |
105 | if (this == &aCut) | |
106 | return *this; | |
107 | ||
108 | if (fVertPos) delete fVertPos; | |
109 | fVertPos = new TH2D(*aCut.fVertPos); | |
110 | if (fEtaZ) delete fEtaZ; | |
111 | fEtaZ = new TH2D(*aCut.fEtaZ); | |
4c399116 | 112 | if (fRadPos) delete fRadPos; |
113 | fRadPos = new TH1D(*aCut.fRadPos); | |
8101bddd | 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); | |
00114ecb | 122 | |
123 | return *this; | |
124 | } | |
125 | ||
126 | AliFemtoString AliFemtoCutMonitorParticleVertPos::Report(){ | |
127 | // Prepare report from the execution | |
128 | string stemp = "*** AliFemtoCutMonitorParticleVertPos report"; | |
129 | AliFemtoString returnThis = stemp; | |
130 | return returnThis; | |
131 | } | |
132 | ||
133 | void AliFemtoCutMonitorParticleVertPos::Fill(const AliFemtoTrack* aTrack) | |
134 | { | |
135 | // Fill in the monitor histograms with the values from the current track | |
4c399116 | 136 | AliFemtoModelGlobalHiddenInfo *hinfo = dynamic_cast<AliFemtoModelGlobalHiddenInfo *>(aTrack->GetHiddenInfo()); |
00114ecb | 137 | if (hinfo) { |
69c1c8ff | 138 | float tEta = -TMath::Log(TMath::Tan(hinfo->GetTrueMomentum()->Theta()/2.0)); |
00114ecb | 139 | |
4c399116 | 140 | fVertPos->Fill(hinfo->GetGlobalEmissionPoint()->x(), hinfo->GetGlobalEmissionPoint()->y()); |
141 | fEtaZ->Fill(hinfo->GetGlobalEmissionPoint()->z(), tEta); | |
69c1c8ff | 142 | fRadPos->Fill(hinfo->GetGlobalEmissionPoint()->Perp()); |
00114ecb | 143 | } |
8101bddd | 144 | |
145 | AliFemtoModelHiddenInfo *hminfo = dynamic_cast<AliFemtoModelHiddenInfo *>(aTrack->GetHiddenInfo()); | |
146 | if (hminfo) { | |
147 | fEmPointX->Fill(hminfo->GetEmissionPoint()->x()); | |
148 | fEmPointY->Fill(hminfo->GetEmissionPoint()->y()); | |
149 | fEmPointZ->Fill(hminfo->GetEmissionPoint()->z()); | |
150 | fEmPointT->Fill(hminfo->GetEmissionPoint()->t()); | |
151 | } | |
00114ecb | 152 | } |
153 | ||
154 | void AliFemtoCutMonitorParticleVertPos::Write() | |
155 | { | |
156 | // Write out the relevant histograms | |
157 | fVertPos->Write(); | |
158 | fEtaZ->Write(); | |
4c399116 | 159 | fRadPos->Write(); |
8101bddd | 160 | fEmPointX->Write(); |
161 | fEmPointY->Write(); | |
162 | fEmPointZ->Write(); | |
163 | fEmPointT->Write(); | |
00114ecb | 164 | } |
165 | ||
166 | TList *AliFemtoCutMonitorParticleVertPos::GetOutputList() | |
167 | { | |
168 | TList *tOutputList = new TList(); | |
169 | tOutputList->Add(fVertPos); | |
170 | tOutputList->Add(fEtaZ); | |
4c399116 | 171 | tOutputList->Add(fRadPos); |
8101bddd | 172 | tOutputList->Add(fEmPointX); |
173 | tOutputList->Add(fEmPointY); | |
174 | tOutputList->Add(fEmPointZ); | |
175 | tOutputList->Add(fEmPointT); | |
00114ecb | 176 | |
177 | return tOutputList; | |
178 | } |