Execute method.
191{
192
193
194
195
196
198
199
200
201
205
206 double mc_eta =
gen->momentum().pseudoRapidity();
207 double mc_phi =
gen->momentum().phi();
208
210
213 m_data->m_mc_eta = mc_eta;
214 m_data->m_mc_phi = mc_phi;
215
216 int nClus = pClusColl->size();
218 m_data->m_cls_ener->resize(nClus, 0.0);
219 m_data->m_cls_ener_unw->resize(nClus, 0.0);
220 m_data->m_cls_lambda->resize(nClus, 0.0);
221 m_data->m_cls_eta->resize(nClus, 0.0);
222 m_data->m_cls_phi->resize(nClus, 0.0);
223
224 m_data->m_cls_smpener->resize(nClus);
225 m_data->m_cls_smpener_unw->resize(nClus);
226
227 m_data->m_cls_eprep->resize(nClus);
228 m_data->m_cls_dmener->resize(nClus);
230 for(int i_cls=0; i_cls<nClus; i_cls++){
231
232 (*
m_data->m_cls_smpener)[i_cls].
resize(CaloSampling::Unknown, 0.0);
233 (*
m_data->m_cls_smpener_unw)[i_cls].
resize(CaloSampling::Unknown, 0.0);
236 }
237 m_data->m_cls_engcalib->resize(nClus, 0.0);
238 m_data->m_cls_recostat->resize(nClus, 0);
239 m_data->m_cls_pi0prob->resize(nClus, 0.0);
240 m_data->m_cls_isol->resize(nClus, 0.0);
241 m_data->m_cls_oocener->resize(nClus, 0.0);
242 m_data->m_cls_calib_emfrac->resize(nClus, 0.0);
243 m_data->m_cls_engcalibpres->resize(nClus, 0.0);
244
247 unsigned int iClus = 0;
248 for( ;clusIter!=clusIterEnd;++clusIter,++iClus) {
250
251 (*
m_data->m_cls_ener)[iClus] = theCluster->
e();
252
253 for(
int i_smp=0; i_smp<(
int)CaloSampling::Unknown; i_smp++){
255 }
256
257
258 double mx_calib_tot=0;
261 return StatusCode::FAILURE;
262 }
263 m_data->m_engClusSumCalib += mx_calib_tot;
264 (*
m_data->m_cls_engcalib)[iClus] = mx_calib_tot;
265
266 double mx_calib_emb0=0, mx_calib_eme0=0, mx_calib_tileg3=0;
270 ATH_MSG_ERROR(
"One of the moment ENG_CALIB_EMB0, ENG_CALIB_EME0, ENG_CALIB_TILEG3 is absent" );
271 return StatusCode::FAILURE;
272 }else{
273 (*
m_data->m_cls_engcalibpres)[iClus] = (mx_calib_emb0+mx_calib_eme0+mx_calib_tileg3);
274 }
275
278 if(pClusColl->size() != pClusCollCalib->size()) {
279 ATH_MSG_WARNING(
"Different size of calibrated and uncalibrated cluster collection "
280 << pClusColl->size() << " " << pClusCollCalib->size() );
281 return StatusCode::SUCCESS;
282 }
283
285
286
287 const CaloRecoStatus& recoStatus = theClusterCalib->
recoStatus();
288
290
291
292 double pi0Prob = 0;
294
295 pi0Prob = -1.0;
296 } else {
297 if ( pi0Prob < 0 ) pi0Prob = 0;
298 if ( pi0Prob > 1 ) pi0Prob = 1;
299 }
300 (*
m_data->m_cls_pi0prob)[iClus] = pi0Prob;
301 }
302
303
304 double mx_isol;
307 return StatusCode::FAILURE;
308 }else{
309 (*
m_data->m_cls_isol)[iClus] = mx_isol;
310 }
311
312 double mx_calib_oocL;
315 return StatusCode::FAILURE;
316 }else{
317 (*
m_data->m_cls_oocener)[iClus] = mx_calib_oocL;
318 }
319
320 double mx_calib_emfrac;
323 return StatusCode::FAILURE;
324 }else{
325 (*
m_data->m_cls_calib_emfrac)[iClus] = mx_calib_emfrac;
326 }
327
328
329
330
333 for(; cellIter != cellIterEnd; cellIter++ ){
334 const CaloCell* pCell = (*cellIter);
335 Identifier myId = pCell->
ID();
337 (*
m_data->m_cls_ener_unw)[iClus] += pCell->
e();
338 (*
m_data->m_cls_smpener_unw)[iClus][(
int)nsmp] += pCell->
e();
339 }
340
341 double clusEner = (*
m_data->m_cls_ener_unw)[iClus];
342 double clusLambda=0;
345 return StatusCode::FAILURE;
346 }
347 (*
m_data->m_cls_lambda)[iClus] = clusLambda;
348 (*
m_data->m_cls_eta)[iClus] = theCluster->
eta();
349 (*
m_data->m_cls_phi)[iClus] = theCluster->
phi();
351
352
353
354
355
356
357 for(
int i_dma=0; i_dma<
m_data->m_narea; i_dma++){
358
359 double dmVal=0;
362 return StatusCode::FAILURE;
363 }
364 (*
m_data->m_cls_dmener)[iClus][i_dma] = dmVal;
365
366
367
368 double eprep = 0.0;
372 x = (*
m_data->m_cls_smpener_unw)[iClus][CaloSampling::PreSamplerB];
375 }
376 break;
378 x = (*
m_data->m_cls_smpener_unw)[iClus][CaloSampling::EMB3];
379 y = (*
m_data->m_cls_smpener_unw)[iClus][CaloSampling::TileBar0];
382 }
383 break;
385 x = (*
m_data->m_cls_smpener_unw)[iClus][CaloSampling::TileGap3];
388 }
389 break;
391 x = (*
m_data->m_cls_smpener_unw)[iClus][CaloSampling::PreSamplerE];
394 }
395 break;
397 x = (*
m_data->m_cls_smpener_unw)[iClus][CaloSampling::EME3];
398 y = (*
m_data->m_cls_smpener_unw)[iClus][CaloSampling::HEC0];
401 }
402 break;
404 eprep = (*
m_data->m_cls_ener_unw)[iClus];
405 break;
407 eprep = (*
m_data->m_cls_ener_unw)[iClus];
408 break;
410 eprep = (*
m_data->m_cls_ener_unw)[iClus];
411 break;
412 default:
414 return StatusCode::FAILURE;
415 break;
416 }
417 (*
m_data->m_cls_eprep)[iClus][i_dma] = eprep;
418
419 }
420
421 }
422 }
423
424
425
426
427 for(
int i_cls=0; i_cls<
m_data->m_ncls; i_cls++){
428 double edm_uncorrected = 0.0;
429 for(
int i_dma=0; i_dma<
m_data->m_narea; i_dma++){
431 if( (*
m_data->m_cls_eprep)[i_cls][i_dma] <= 0.0 &&
437 {
438 edm_uncorrected += (*
m_data->m_cls_dmener)[i_cls][i_dma];
439 (*
m_data->m_cls_dmener)[i_cls][i_dma] = 0.0;
440 }
441 }
442
443 for(
int i_dma=0; i_dma<
m_data->m_narea; i_dma++){
445 (*
m_data->m_cls_dmener)[i_cls][i_dma] += edm_uncorrected;
446 }
447 }
448 }
449
451
452 return StatusCode::SUCCESS;
453}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
ServiceHandle< StoreGateSvc > & evtStore()
virtual double e() const override final
get energy (data member) (synonym to method energy()
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
virtual const store_type & getStatusWord() const
retrieve the entire status word
DataModel_detail::const_iterator< DataVector > const_iterator
const T * at(size_type n) const
Access an element, as an rvalue.
std::vector< xAOD::CaloCluster::MomentType > m_momentForDMArea
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
virtual double eta() const
The pseudorapidity ( ) of the particle.
virtual double e() const
The total energy of the particle.
CaloClusterCellLink::const_iterator const_cell_iterator
Iterator of the underlying CaloClusterCellLink (explicitly const version).
const_cell_iterator cell_end() const
float eSample(const CaloSample sampling) const
virtual double phi() const
The azimuthal angle ( ) of the particle.
MomentType
Enums to identify different moments.
@ ENG_CALIB_OUT_L
Attached Calibration Hit energy outside clusters but inside the calorimeter with loose matching (Angl...
@ EM_PROBABILITY
Classification probability to be em-like.
@ ENG_CALIB_DEAD_UNCLASS
Attached Calibration Hit energy in dead material in unclassified areas of the detector.
@ ENG_CALIB_DEAD_HEC0
Attached Calibration Hit energy in dead material between EME3 and HEC0.
@ ENG_CALIB_DEAD_TILEG3
Attached Calibration Hit energy in dead material before scintillator.
@ CENTER_LAMBDA
Shower depth at Cluster Centroid.
@ ENG_CALIB_DEAD_EME0
Attached Calibration Hit energy in dead material before EME0, between EME0 and EME1.
@ ENG_CALIB_DEAD_TILE0
Attached Calibration Hit energy in dead material between EMB3 and TILE0.
@ ENG_CALIB_FRAC_EM
Calibration Hit energy inside the cluster caused by e/gamma/pi0.
@ ENG_CALIB_DEAD_FCAL
Attached Calibration Hit energy in dead material before FCAL, between FCAL and HEC.
@ ENG_CALIB_TOT
Calibration Hit energy inside the cluster.
@ ENG_CALIB_DEAD_LEAKAGE
Attached Calibration Hit energy in dead material behind calorimeters.
@ ENG_CALIB_EMB0
Calibration Hit energy inside the cluster barrel presampler.
@ ENG_CALIB_EME0
Calibration Hit energy inside the cluster endcap presampler.
@ ENG_CALIB_DEAD_EMB0
Attached Calibration Hit energy in dead material before EMB0, between EMB0 and EMB1.
@ ISOLATION
Energy weighted fraction of non-clustered perimeter cells.
@ ENG_CALIB_TILEG3
Calibration Hit energy inside the cluster scintillator.
const_cell_iterator cell_begin() const
Iterator of the underlying CaloClusterCellLink (const version).
CaloRecoStatus & recoStatus()
Accesssor to CaloRecoStatus (non-const).
HepMC3::ConstGenParticlePtr ConstGenParticlePtr
virtual bool resize(size_t sz) override
Change the size of all aux data vectors.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.