18 mGlobalRichEdgeXmin= 83.988;
19 mGlobalRichEdgeXmax= 156.503;
20 mGlobalRichEdgeYmin=-228.489;
21 mGlobalRichEdgeYmax=-186.983;
22 mGlobalRichEdgeZmin= -65.781;
23 mGlobalRichEdgeZmax= 65.163;
26 mLocalOriginR = 243.13;
27 mLocalOriginPhi = -M_PI/3.;
31 hXVertex =
new TH1D(
"hXVertex",
"event vertices x [cm]",50,-2.5,2.5);
32 hYVertex =
new TH1D(
"hYVertex",
"event vertices y [cm]",50,-2.5,2.5);
33 hZVertex =
new TH1D(
"hZVertex",
"event vertices z [cm]",800,-200,200);
35 hPtGlobalPosRICH =
new TH1D(
"hPtGlobalPosRICH",
"Pt global h+ in RICH",300,0,6);
36 hPGlobalPosRICH =
new TH1D(
"hPGlobalPosRICH",
"P global h + in RICH",300,0,6);
38 hPtGlobalNegRICH =
new TH1D(
"hPtGlobalNegRICH",
"Pt global h- in RICH",300,0,6);
39 hPGlobalNegRICH =
new TH1D(
"hPGlobalNegRICH",
"P global h- in RICH",300,0,6);
41 hnHitsGlobalPosRICH =
new TH1D(
"hnHitsGlobalPosRICH",
"nHits globals + in RICH",46,0,46);
42 hnHitsGlobalNegRICH =
new TH1D(
"hnHitsGlobalNegRICH",
"nHits globals - in RICH",46,0,46);
44 hdcaGlobal =
new TH1D(
"hdcaGlobal",
"dca global tracks", 104, -1, 25);
45 hetaRICH =
new TH1D(
"hethaRICH",
"etha global RICH",200,-1,1);
46 hRLast =
new TH1D(
"hRLast",
"last hit of TPC track",200,0,200);
55 int gl3RICH::setParameters(
int maxAbsVertZ,
int minNoOfHits,
int are,
int place ,
int holders,
float minP,
float minPt,
float minR,
float maxDCA,
float minimumAbsEta )
58 if(maxAbsVertZ>=0 && maxAbsVertZ<=200) maxAbsEventVertZ = maxAbsVertZ;
59 else maxAbsEventVertZ=30.0;
61 if(minNoOfHits>=5 && minNoOfHits<=45) minNoOfHitsOnTrack = minNoOfHits;
62 else minNoOfHitsOnTrack=23;
64 if(minP>=0.0 && minP<10.0) minPExtrapolated2Rich=minP;
65 else minPExtrapolated2Rich=1.0;
67 if(minPt>=0.0 && minPt<10.0) minPtExtrapolated2Rich=minPt;
68 else minPtExtrapolated2Rich=1.0;
70 if(minR>=50.0 && minR<200.0 ) minRofLastPointOnTrack=minR;
71 else minRofLastPointOnTrack=160;
73 if(maxDCA>=0.0 && maxDCA<=100) maxDCAToEventVertex=maxDCA;
74 else maxDCAToEventVertex=10;
76 if(minimumAbsEta>0.0 && minimumAbsEta<0.5) minAbsEta=minimumAbsEta;
86 int gl3RICH::decide ( )
96 int noOfTracksExtrapolated2RICH=0;
103 if( fabs(event->getVertex().Getz()) <= maxAbsEventVertZ)
106 hXVertex->Fill(event->getVertex().Getx());
107 hYVertex->Fill(event->getVertex().Gety());
108 hZVertex->Fill(event->getVertex().Getz());
112 const float a = -1./tan(mLocalOriginPhi);
113 const float b = ( mLocalOriginR*sin(mLocalOriginPhi)
114 - a*mLocalOriginR*cos(mLocalOriginPhi) );
120 for (
int trkcnt = 0 ; trkcnt<
event->getNTracks(); trkcnt++ )
122 gTrack =
event->getTrack(trkcnt);
125 double px = gTrack->pt * cos(gTrack->psi);
126 double py = gTrack->pt * sin(gTrack->psi);
127 double pz = gTrack->pt * gTrack->tanl;
128 double p = ::sqrt(px*px+py*py+pz*pz);
130 double eta = -::log(tan(acos(pz/p)/2));
134 if( gTrack->nHits>=minNoOfHitsOnTrack && p>=minPExtrapolated2Rich && gTrack->pt>=minPtExtrapolated2Rich && fabs(eta)<=minAbsEta )
140 0==gTrack->intersectorZLine( a, b, richHit1 )
144 ( richHit1.x > mGlobalRichEdgeXmin &&
145 richHit1.x < mGlobalRichEdgeXmax &&
146 richHit1.y > mGlobalRichEdgeYmin &&
147 richHit1.y < mGlobalRichEdgeYmax &&
148 richHit1.z > mGlobalRichEdgeZmin &&
149 richHit1.z < mGlobalRichEdgeZmax )
161 double trackLength= gTrack->length/cos(atan(gTrack->tanl));
162 lastHit=gTrack->extrapolate2PathLength(trackLength);
165 if( lastHit.z>=mGlobalRichEdgeZmin && lastHit.z<=mGlobalRichEdgeZmax )
168 double Rlast=::sqrt(lastHit.x*lastHit.x+lastHit.y*lastHit.y);
171 closestHitToEventVertex = gTrack->closestApproach( event->getVertex().Getx(),
event->getVertex().Gety() );
172 double dx=fabs( event->getVertex().Getx() - closestHitToEventVertex.x );
173 double dy=fabs( event->getVertex().Gety() - closestHitToEventVertex.y );
174 double dz=fabs( event->getVertex().Getz() - closestHitToEventVertex.z );
175 double dca=::sqrt(dx*dx+dy*dy+dz*dz);
181 if(dca<maxDCAToEventVertex && Rlast>minRofLastPointOnTrack)
183 noOfTracksExtrapolated2RICH++;
194 hdcaGlobal->Fill(dca);
199 hPtGlobalPosRICH->Fill(gTrack->pt);
200 hPGlobalPosRICH->Fill(p);
201 hnHitsGlobalPosRICH->Fill(gTrack->nHits);
205 hPtGlobalNegRICH->Fill(gTrack->pt);
206 hPGlobalNegRICH->Fill(p);
207 hnHitsGlobalNegRICH->Fill(gTrack->nHits);
223 if( noOfTracksExtrapolated2RICH>0 ) {
237 int gl3RICH::end ( ) {
240 hPtGlobalPosRICH->Write();
241 hPtGlobalNegRICH->Write();
243 hPGlobalPosRICH->Write();
244 hPGlobalNegRICH->Write();
246 hnHitsGlobalPosRICH->Write();
247 hnHitsGlobalNegRICH->Write();