29 #include "StBadDcaAnalysis.h"
34 StBadDcaAnalysis::StBadDcaAnalysis(
const char* inputDir,
35 const char* outRootName)
44 StBadDcaAnalysis::~StBadDcaAnalysis()
55 StBadDcaAnalysis::initMore()
62 StBadDcaAnalysis::initHistograms()
64 cout <<
"StBadDcaAnalysis::initHistograms()" << endl;
74 const char* cPM[2] = {
"Plus",
"Minus"};
76 for(
int ipm=0; ipm<2; ipm++){
79 setName(name,
"h3DcaXYGlFitPtsPtPr",cPM[ipm]);
80 pm[ipm].h3DcaXYGlFitPtsPtPr
82 nDcaXYGlBin,dcaXYGlMin,dcaXYGlMax,
83 nFitPtsBin,fitPtsMin,fitPtsMax,
84 nPtTinyBin,ptTinyMin,ptTinyMax);
86 pm[ipm].h3DcaXYGlFitPtsPtPr->SetXTitle(
"dcaXYGl");
87 pm[ipm].h3DcaXYGlFitPtsPtPr->SetYTitle(
"fitPts");
88 pm[ipm].h3DcaXYGlFitPtsPtPr->SetZTitle(
"ptPr");
91 setName(name,
"h3DcaXYGlAllPtsPtPr",cPM[ipm]);
92 pm[ipm].h3DcaXYGlAllPtsPtPr
94 nDcaXYGlBin,dcaXYGlMin,dcaXYGlMax,
95 nFitPtsBin,fitPtsMin,fitPtsMax,
96 nPtTinyBin,ptTinyMin,ptTinyMax);
98 pm[ipm].h3DcaXYGlAllPtsPtPr->SetXTitle(
"dcaXYGl");
99 pm[ipm].h3DcaXYGlAllPtsPtPr->SetYTitle(
"allPts");
100 pm[ipm].h3DcaXYGlAllPtsPtPr->SetZTitle(
"ptPr");
103 setName(name,
"h3DcaXYGlRatioPtsPtPr",cPM[ipm]);
104 pm[ipm].h3DcaXYGlRatioPtsPtPr
105 =
new TH3D(name,name,
106 nDcaXYGlBin,dcaXYGlMin,dcaXYGlMax,
108 nPtTinyBin,ptTinyMin,ptTinyMax);
110 pm[ipm].h3DcaXYGlRatioPtsPtPr->SetXTitle(
"dcaXYGl");
111 pm[ipm].h3DcaXYGlRatioPtsPtPr->SetYTitle(
"ratioPts");
112 pm[ipm].h3DcaXYGlRatioPtsPtPr->SetZTitle(
"ptPr");
115 setName(name,
"h3DcaXYGlFirstRowPtPr",cPM[ipm]);
116 pm[ipm].h3DcaXYGlFirstRowPtPr
117 =
new TH3D(name,name,
118 nDcaXYGlBin,dcaXYGlMin,dcaXYGlMax,
120 nPtTinyBin,ptTinyMin,ptTinyMax);
122 pm[ipm].h3DcaXYGlFirstRowPtPr->SetXTitle(
"dcaXYGl");
123 pm[ipm].h3DcaXYGlFirstRowPtPr->SetYTitle(
"firstRow");
124 pm[ipm].h3DcaXYGlFirstRowPtPr->SetZTitle(
"ptPr");
127 setName(name,
"h3DcaXYGlLastRowPtPr",cPM[ipm]);
128 pm[ipm].h3DcaXYGlLastRowPtPr
129 =
new TH3D(name,name,
130 nDcaXYGlBin,dcaXYGlMin,dcaXYGlMax,
132 nPtTinyBin,ptTinyMin,ptTinyMax);
134 pm[ipm].h3DcaXYGlLastRowPtPr->SetXTitle(
"dcaXYGl");
135 pm[ipm].h3DcaXYGlLastRowPtPr->SetYTitle(
"firstRow");
136 pm[ipm].h3DcaXYGlLastRowPtPr->SetZTitle(
"ptPr");
139 setName(name,
"h3DcaXYGlLocalPhiPtPr",cPM[ipm]);
140 pm[ipm].h3DcaXYGlLocalPhiPtPr
141 =
new TH3D(name,name,
142 nDcaXYGlBin,dcaXYGlMin,dcaXYGlMax,
144 nPtTinyBin,ptTinyMin,ptTinyMax);
146 pm[ipm].h3DcaXYGlLocalPhiPtPr->SetXTitle(
"dcaXYGl");
147 pm[ipm].h3DcaXYGlLocalPhiPtPr->SetYTitle(
"localPhi");
148 pm[ipm].h3DcaXYGlLocalPhiPtPr->SetZTitle(
"ptPr");
159 StBadDcaAnalysis::trackLoop()
162 cout <<
"StBadDcaAnalysis::spectraTrackLoop()" << endl;
164 Int_t nTrack = mHiMicroEvent->NTrack();
167 Float_t vertexZ = mHiMicroEvent->VertexZ();
169 for(Int_t i=0; i<nTrack; i++){
174 if(!CutRc::AcceptTrackVtxZHalf(track,vertexZ))
continue;
177 Float_t ptPr = track->PtPr();
181 float fitPts = track->FitPts();
182 float allPts = track->AllPts();
183 float ratioPts = float(fitPts/allPts);
184 float firstRow = track->FirstPadRow();
185 float lastRow = track->LastPadRow();
187 float dcaXYGl = track->DcaXYGl();
188 float phiGlDeg = track->PhiGl()*180./M_PI;;
189 phiGlDeg = (phiGlDeg<-165) ? (phiGlDeg += 360) : phiGlDeg;
191 int ic=(track->Charge()>0) ? 0 : 1;
193 if(CutRc::AcceptEta(track)){
195 pm[ic].h3DcaXYGlFitPtsPtPr->Fill(dcaXYGl,fitPts,ptPr);
198 pm[ic].h3DcaXYGlAllPtsPtPr->Fill(dcaXYGl,allPts,ptPr);
201 pm[ic].h3DcaXYGlRatioPtsPtPr->Fill(dcaXYGl,ratioPts,ptPr);
203 if(CutRc::AcceptFitPts(track)){
205 pm[ic].h3DcaXYGlFirstRowPtPr->Fill(dcaXYGl,firstRow,ptPr);
208 pm[ic].h3DcaXYGlLastRowPtPr->Fill(dcaXYGl,lastRow,ptPr);
221 StBadDcaAnalysis::fillEventHistograms()
232 return CutRc::Accept(event);
240 StBadDcaAnalysis::finishHistograms()