29 |
|
|
30 |
void CaloNuclei::Clear(){ |
void CaloNuclei::Clear(){ |
31 |
// |
// |
32 |
|
UN = 0; |
33 |
tr = 0; |
tr = 0; |
34 |
sntr = 0; |
sntr = 0; |
35 |
interplane = 0; |
interplane = 0; |
36 |
preq = 0.; |
preq = 0.; |
37 |
postq = 0.; |
postq = 0.; |
38 |
|
stdedx1 = 0.; |
39 |
|
ethr = 0.; |
40 |
dedx1 = 0.; |
dedx1 = 0.; |
41 |
dedx3 = 0.; |
dedx3 = 0.; |
42 |
qpremean = 0.; |
qpremean = 0.; |
109 |
if ( debug ) printf(" Processing event at OBT %u PKT %u time %u \n",OBT,PKT,atime); |
if ( debug ) printf(" Processing event at OBT %u PKT %u time %u \n",OBT,PKT,atime); |
110 |
// |
// |
111 |
Clear(); |
Clear(); |
112 |
|
// |
113 |
if ( debug ) printf(" Always calculate stdedx1 \n"); |
if ( debug ) printf(" Always calculate stdedx1 \n"); |
114 |
// |
// |
115 |
// Always calculate stdedx1 |
// Always calculate stdedx1 |
142 |
// find energy released along the strip of maximum on the first plane and on the two neighbour strips |
// find energy released along the strip of maximum on the first plane and on the two neighbour strips |
143 |
// |
// |
144 |
if ( indx > 0 ){ |
if ( indx > 0 ){ |
145 |
Int_t mindx = (Int_t)TMath::LocMax(indx,stfpl); |
Int_t mindx = (Int_t)TMath::LocMax(indx,vfpl); |
146 |
for (Int_t ii=0; ii<indx; ii++){ |
for (Int_t ii=0; ii<indx; ii++){ |
147 |
if ( stfpl[ii] == stfpl[mindx] ) stdedx1 += vfpl[ii]; |
if ( stfpl[ii] == stfpl[mindx] ) stdedx1 += vfpl[ii]; |
148 |
if ( (mindx-1)>=0 && stfpl[ii] == stfpl[mindx-1] ) stdedx1 += vfpl[ii]; |
if ( (mindx-1)>=0 && stfpl[ii] == (stfpl[mindx]-1) ) stdedx1 += vfpl[ii]; |
149 |
if ( (mindx+1)<96 && stfpl[ii] == stfpl[mindx+1] ) stdedx1 += vfpl[ii]; |
if ( (mindx+1)<96 && stfpl[ii] == (stfpl[mindx]+1) ) stdedx1 += vfpl[ii]; |
150 |
|
// if ( (mindx-1)>=0 && stfpl[ii] == stfpl[mindx-1] ) stdedx1 += vfpl[ii]; |
151 |
|
// if ( (mindx+1)<96 && stfpl[ii] == stfpl[mindx+1] ) stdedx1 += vfpl[ii]; |
152 |
}; |
}; |
153 |
} else { |
} else { |
154 |
stdedx1 = 0.; |
stdedx1 = 0.; |
177 |
}; |
}; |
178 |
} else { |
} else { |
179 |
if ( ntr >= 0 ){ |
if ( ntr >= 0 ){ |
180 |
printf(" ERROR: you asked not to use a track but you are looking for track number %i !\n",ntr); |
if ( debug ) printf(" ERROR: you asked not to use a track but you are looking for track number %i !\n",ntr); |
181 |
printf(" ERROR: CaloNuclei variables not completely filled \n"); |
if ( debug ) printf(" ERROR: CaloNuclei variables not completely filled \n"); |
182 |
return; |
return; |
183 |
}; |
}; |
184 |
}; |
}; |
506 |
}; |
}; |
507 |
// |
// |
508 |
qpremeanN /= (Float_t)RN; |
qpremeanN /= (Float_t)RN; |
509 |
|
UN = RN; |
510 |
// |
// |
511 |
if ( debug ) printf(" charge is %f \n",sqrt(qpremean)); |
if ( debug ) printf(" charge is %f \n",sqrt(qpremean)); |
512 |
// |
// |