147 |
} //ELENA |
} //ELENA |
148 |
|
|
149 |
/** |
/** |
150 |
|
* CaloLevel2 |
151 |
|
**/ |
152 |
|
Bool_t CaloLevel2::IsGood(Bool_t strict) { |
153 |
|
// |
154 |
|
if ( strict ){ |
155 |
|
if ( !good ) return(false); |
156 |
|
if ( !perr[0] ) return(false); |
157 |
|
if ( !perr[1] ) return(false); |
158 |
|
if ( !perr[2] ) return(false); |
159 |
|
if ( !perr[3] ) return(false); |
160 |
|
if ( !swerr[0] ) return(false); |
161 |
|
if ( !swerr[1] ) return(false); |
162 |
|
if ( !swerr[2] ) return(false); |
163 |
|
if ( !swerr[3] ) return(false); |
164 |
|
if ( !crc[0] ) return(false); |
165 |
|
if ( !crc[1] ) return(false); |
166 |
|
if ( !crc[2] ) return(false); |
167 |
|
if ( !crc[3] ) return(false); |
168 |
|
} else { |
169 |
|
if ( perr[0] == 129 || perr[0] == 136 || perr[0] == 142 || perr[0] == 143 ) return(false); |
170 |
|
if ( perr[1] == 129 || perr[1] == 136 || perr[1] == 142 || perr[1] == 143 ) return(false); |
171 |
|
if ( perr[2] == 129 || perr[2] == 136 || perr[2] == 142 || perr[2] == 143 ) return(false); |
172 |
|
if ( perr[3] == 129 || perr[3] == 136 || perr[3] == 142 || perr[3] == 143 ) return(false); |
173 |
|
}; |
174 |
|
// |
175 |
|
return(true); |
176 |
|
} |
177 |
|
|
178 |
|
/** |
179 |
* Fills a struct cCaloLevel2 with values from a CaloLevel2 object (to put data into a F77 common). |
* Fills a struct cCaloLevel2 with values from a CaloLevel2 object (to put data into a F77 common). |
180 |
*/ |
*/ |
181 |
void CaloLevel2::GetLevel2Struct(cCaloLevel2 *l2) const { |
void CaloLevel2::GetLevel2Struct(cCaloLevel2 *l2) const { |
291 |
**/ |
**/ |
292 |
void CaloLevel2::GetElectronEnergy(Float_t &energy, Float_t &sigma){ |
void CaloLevel2::GetElectronEnergy(Float_t &energy, Float_t &sigma){ |
293 |
if ( nstrip == 0 ) return; |
if ( nstrip == 0 ) return; |
294 |
energy = qtot * 260.; |
energy = qtot / 260.; |
295 |
// energy = qtot * 40.82 * 0.000106; |
// energy = qtot * 40.82 * 0.000106; |
296 |
sigma = 0.; |
sigma = 0.; |
297 |
if ( energy > 0. ) sigma = energy * (0.01183 + 0.121/sqrt(energy)); |
if ( energy > 0. ) sigma = energy * (0.01183 + 0.121/sqrt(energy)); |