@@ -27,12 +27,12 @@ TOFLayer::hasTOF(const Track &track)
2727{
2828 auto x = track.XOuter * 0.1 ; // [cm]
2929 auto y = track.YOuter * 0.1 ; // [cm]
30- auto z = track.ZOuter * 0.1 ; // [cm]
30+ auto z = track.ZOuter * 0.1 ; // [cm]
3131 if (mType == kBarrel ) {
3232 auto r = hypot (x, y);
3333 return (fabs (r - mRadius ) < 0.001 && fabs (z) < mLength );
3434 }
35- if (mType = kForward ) {
35+ if (mType == kForward ) {
3636 auto r = hypot (x, y);
3737 return (r > mRadiusIn ) && (r < mRadius ) && (fabs (fabs (z) - mLength ) < 0.001 );
3838 }
5656TOFLayer::makePID (const Track &track, std::array<float , 5 > &deltat, std::array<float , 5 > &nsigma)
5757{
5858 double pmass[5 ] = {0.00051099891 , 0.10565800 , 0.13957000 , 0.49367700 , 0.93827200 };
59-
59+
6060 /* * get info **/
6161 double tof = track.TOuter * 1 .e9 ; // [ns]
6262 double etof = track.ErrorT * 1 .e9 ; // [ns]
@@ -71,7 +71,7 @@ TOFLayer::makePID(const Track &track, std::array<float, 5> &deltat, std::array<f
7171 for (Int_t ipart = 0 ; ipart < 5 ; ++ipart) {
7272 double mass2 = pmass[ipart] * pmass[ipart];
7373 double texp = Lc / p * TMath::Sqrt (mass2 + p2);
74- double etexp = Lc * mass2 / p2 / TMath::Sqrt (mass2 + p2) * ep;
74+ double etexp = Lc * mass2 / p2 / TMath::Sqrt (mass2 + p2) * ep;
7575 double sigma = TMath::Sqrt (etexp * etexp + etof * etof);
7676 deltat[ipart] = tof - texp;
7777 nsigma[ipart] = deltat[ipart] / sigma;
@@ -92,7 +92,7 @@ TOFLayer::eventTime(std::vector<Track *> &tracks, std::array<float, 2> &tzero)
9292
9393 int pid = track->PID ;
9494 double mass = TDatabasePDG::Instance ()->GetParticle (pid)->Mass ();
95- double mass2 = mass * mass;
95+ double mass2 = mass * mass;
9696 double tof = track->TOuter * 1 .e9 ; // [ns]
9797 double etof = track->ErrorT * 1 .e9 ; // [ns]
9898 double L = track->L * 0.1 ; // [cm]
@@ -102,7 +102,7 @@ TOFLayer::eventTime(std::vector<Track *> &tracks, std::array<float, 2> &tzero)
102102 double c = 29.9792458 ; // [cm/ns]
103103 double Lc = L / c;
104104 double texp = Lc / p * TMath::Sqrt (mass2 + p2);
105- double etexp = Lc * mass2 / p2 / TMath::Sqrt (mass2 + p2) * ep;
105+ double etexp = Lc * mass2 / p2 / TMath::Sqrt (mass2 + p2) * ep;
106106 double sigma = TMath::Sqrt (etexp * etexp + etof * etof);
107107 double deltat = tof - texp;
108108
@@ -143,14 +143,14 @@ TOFLayer::eventTime(std::vector<Track *> &tracks, std::array<float, 2> &tzero)
143143
144144 sum = 0 .;
145145 sumw = 0 .;
146-
146+
147147 for (int jtrack = 0 ; jtrack < tracks.size (); ++jtrack) {
148148 if (itrack == jtrack) continue ; // do not use self
149-
149+
150150 auto &track = tracks[jtrack];
151151 int pid = track->PID ;
152152 double mass = TDatabasePDG::Instance ()->GetParticle (pid)->Mass ();
153- double mass2 = mass * mass;
153+ double mass2 = mass * mass;
154154 double tof = track->TOuter * 1 .e9 ; // [ns]
155155 double etof = track->ErrorT * 1 .e9 ; // [ns]
156156 double L = track->L * 0.1 ; // [cm]
@@ -160,7 +160,7 @@ TOFLayer::eventTime(std::vector<Track *> &tracks, std::array<float, 2> &tzero)
160160 double c = 29.9792458 ; // [cm/ns]
161161 double Lc = L / c;
162162 double texp = Lc / p * TMath::Sqrt (mass2 + p2);
163- double etexp = Lc * mass2 / p2 / TMath::Sqrt (mass2 + p2) * ep;
163+ double etexp = Lc * mass2 / p2 / TMath::Sqrt (mass2 + p2) * ep;
164164 double sigma = TMath::Sqrt (etexp * etexp + etof * etof);
165165 double deltat = tof - texp;
166166 double w = 1 . / (sigma * sigma);
@@ -174,18 +174,18 @@ TOFLayer::eventTime(std::vector<Track *> &tracks, std::array<float, 2> &tzero)
174174 sigma0[itrack] = std::sqrt (1 . / sumw);
175175
176176 }
177-
177+
178178 for (int itrack = 0 ; itrack < tracks.size (); ++itrack) {
179179 auto &track = tracks[itrack];
180180 track->TOuter -= time0[itrack] * 1 .e -9 ; // [s]
181181 track->ErrorT = std::hypot (track->ErrorT , sigma0[itrack] * 1 .e -9 );
182182 }
183-
183+
184184 return true ;
185185}
186186
187187/* ****************************************************************/
188188
189-
189+
190190} /* * namespace delphes **/
191191} /* * namespace o2 **/
0 commit comments