1 ////////////////////////////////////////////////////////////////////////////////
3 // AliFemtoCutMonitorParticleMomRes - the cut monitor for particles to study //
4 // the difference between reconstructed and true momentum //
6 ////////////////////////////////////////////////////////////////////////////////
7 #include "AliFemtoCutMonitorParticleMomRes.h"
12 #include "AliFemtoModelHiddenInfo.h"
14 AliFemtoCutMonitorParticleMomRes::AliFemtoCutMonitorParticleMomRes():
24 // Default constructor
25 fMomRes3D = new TH3D("MomRes3D", "Momentum resolution", 100, -0.05, 0.05, 100, -0.05, 0.05, 100, -0.05, 0.05);
26 fMomResXvsP = new TH2D("MomResXvsP", "X momentum resolution vs P", 100, 0.1, 2.0, 100, -0.05, 0.05);
27 fMomResYvsP = new TH2D("MomResYvsP", "Y momentum resolution vs P", 100, 0.1, 2.0, 100, -0.05, 0.05);
28 fMomResZvsP = new TH2D("MomResZvsP", "Z momentum resolution vs P", 100, 0.1, 2.0, 100, -0.05, 0.05);
29 fImpactXY = new TH2D("ImpactXY", "XY impact parameter vs P", 100, 0.1, 2.0, 200, -1.0, 1.0);
30 fImpactZ = new TH2D("ImpactZ", "Z impact parameter vs P" , 100, 0.1, 2.0, 200, -1.0, 1.0);
31 fSigma = new TH2D("Sigma", "Sigma to vertex vs P" , 100, 0.1, 2.0, 200, -5.0, 5.0);
34 AliFemtoCutMonitorParticleMomRes::AliFemtoCutMonitorParticleMomRes(const char *aName, float aMass):
46 snprintf(name, 200, "MomRes3D%s", aName);
47 fMomRes3D = new TH3D(name, "Momentum resolution", 100, -0.05, 0.05, 100, -0.05, 0.05, 100, -0.05, 0.05);
48 snprintf(name, 200, "MomResXvsP%s", aName);
49 fMomResXvsP = new TH2D(name, "X momentum resolution vs P", 100, 0.1, 2.0, 100, -0.05, 0.05);
50 snprintf(name, 200, "MomResYvsP%s", aName);
51 fMomResYvsP = new TH2D(name, "Y momentum resolution vs P", 100, 0.1, 2.0, 100, -0.05, 0.05);
52 snprintf(name, 200, "MomResZvsP%s", aName);
53 fMomResZvsP = new TH2D(name, "Z momentum resolution vs P", 100, 0.1, 2.0, 100, -0.05, 0.05);
54 snprintf(name, 200, "ImpactXY%s", aName);
55 fImpactXY = new TH2D(name, "XY impact parameter vs P", 100, 0.1, 2.0, 200, -1.0, 1.0);
56 snprintf(name, 200, "ImpactZ%s", aName);
57 fImpactZ = new TH2D(name, "Z impact parameter vs P" , 100, 0.1, 2.0, 200, -1.0, 1.0);
58 snprintf(name, 200, "Sigma%s", aName);
59 fSigma = new TH2D(name, "Z impact parameter vs P" , 100, 0.1, 2.0, 200, -5.0, 5.0);
62 AliFemtoCutMonitorParticleMomRes::AliFemtoCutMonitorParticleMomRes(const AliFemtoCutMonitorParticleMomRes &aCut):
73 if (fMomRes3D) delete fMomRes3D;
74 fMomRes3D = new TH3D(*aCut.fMomRes3D);
75 if (fMomResXvsP) delete fMomResXvsP;
76 fMomResXvsP = new TH2D(*aCut.fMomResXvsP);
77 if (fMomResYvsP) delete fMomResYvsP;
78 fMomResYvsP = new TH2D(*aCut.fMomResYvsP);
79 if (fMomResZvsP) delete fMomResZvsP;
80 fMomResZvsP = new TH2D(*aCut.fMomResZvsP);
81 if (fImpactXY) delete fImpactXY;
82 fImpactXY = new TH2D(*aCut.fImpactXY);
83 if (fImpactZ) delete fImpactZ;
84 fImpactZ = new TH2D(*aCut.fImpactZ);
85 if (fSigma) delete fSigma;
86 fSigma = new TH2D(*aCut.fSigma);
90 AliFemtoCutMonitorParticleMomRes::~AliFemtoCutMonitorParticleMomRes()
102 AliFemtoCutMonitorParticleMomRes& AliFemtoCutMonitorParticleMomRes::operator=(const AliFemtoCutMonitorParticleMomRes& aCut)
104 // assignment operator
108 if (fMomRes3D) delete fMomRes3D;
109 fMomRes3D = new TH3D(*aCut.fMomRes3D);
110 if (fMomResXvsP) delete fMomResXvsP;
111 fMomResXvsP = new TH2D(*aCut.fMomResXvsP);
112 if (fMomResYvsP) delete fMomResYvsP;
113 fMomResYvsP = new TH2D(*aCut.fMomResYvsP);
114 if (fMomResZvsP) delete fMomResZvsP;
115 fMomResZvsP = new TH2D(*aCut.fMomResZvsP);
116 if (fImpactXY) delete fImpactXY;
117 fImpactXY = new TH2D(*aCut.fImpactXY);
118 if (fImpactZ) delete fImpactZ;
119 fImpactZ = new TH2D(*aCut.fImpactZ);
120 if (fSigma) delete fSigma;
121 fSigma = new TH2D(*aCut.fSigma);
126 AliFemtoString AliFemtoCutMonitorParticleMomRes::Report(){
127 // Prepare report from the execution
128 string stemp = "*** AliFemtoCutMonitorParticleMomRes report";
129 AliFemtoString returnThis = stemp;
133 void AliFemtoCutMonitorParticleMomRes::Fill(const AliFemtoTrack* aTrack)
135 AliFemtoModelHiddenInfo *tInf = ( AliFemtoModelHiddenInfo *) aTrack->GetHiddenInfo();
136 fMomRes3D->Fill(tInf->GetTrueMomentum()->x() - aTrack->P().x(),
137 tInf->GetTrueMomentum()->y() - aTrack->P().y(),
138 tInf->GetTrueMomentum()->z() - aTrack->P().z());
140 fMomResXvsP->Fill(aTrack->P().mag(),
141 tInf->GetTrueMomentum()->x() - aTrack->P().x());
142 fMomResYvsP->Fill(aTrack->P().mag(),
143 tInf->GetTrueMomentum()->y() - aTrack->P().y());
144 fMomResZvsP->Fill(aTrack->P().mag(),
145 tInf->GetTrueMomentum()->z() - aTrack->P().z());
146 fImpactXY->Fill(aTrack->P().mag(),
148 fImpactZ->Fill(aTrack->P().mag(),
150 fSigma->Fill(aTrack->P().mag(),
151 aTrack->SigmaToVertex());
154 void AliFemtoCutMonitorParticleMomRes::Write()
156 // Write out the relevant histograms
158 fMomResXvsP->Write();
159 fMomResYvsP->Write();
160 fMomResZvsP->Write();
166 TList *AliFemtoCutMonitorParticleMomRes::GetOutputList()
168 TList *tOutputList = new TList();
169 tOutputList->Add(fMomRes3D);
170 tOutputList->Add(fMomResXvsP);
171 tOutputList->Add(fMomResYvsP);
172 tOutputList->Add(fMomResZvsP);
173 tOutputList->Add(fImpactXY);
174 tOutputList->Add(fImpactZ);
175 tOutputList->Add(fSigma);