ATLAS Offline Software
Loading...
Searching...
No Matches
CaloClusterMomentsMaker_DigiHSTruth Class Reference

#include <CaloClusterMomentsMaker_DigiHSTruth.h>

Inheritance diagram for CaloClusterMomentsMaker_DigiHSTruth:
Collaboration diagram for CaloClusterMomentsMaker_DigiHSTruth:

Public Member Functions

 CaloClusterMomentsMaker_DigiHSTruth (const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode execute (const EventContext &ctx, xAOD::CaloClusterContainer *theClusColl) const override final
 Execute on an entire collection of clusters.
virtual StatusCode initialize () override
virtual StatusCode finalize () override
virtual StatusCode execute (xAOD::CaloClusterContainer *collection) final
 Execute on an entire collection of clusters.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
 DeclareInterfaceID (CaloClusterCollectionProcessor, 1, 0)

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

std::vector< std::string > m_momentsNames
 vector holding the input list of names of moments to calculate.
std::vector< xAOD::CaloCluster::MomentTypem_validMoments
 set of moments which will be calculated.
const CaloCell_IDm_calo_id
double m_maxAxisAngle
 the maximal allowed deviation from the IP-to-ClusterCenter-axis.
double m_minRLateral
 the minimal \(r\) in the definition of the Lateral moment
double m_minLLongitudinal
 the minimal \(\lambda\) in the definition of the Longitudinal moment
double m_minBadLArQuality
 the minimal cell quality in the LAr for declaring a cell bad
bool m_calculateSignificance
 Set to true if significance moments are need.
bool m_calculateIsolation
 Set to true if cluster isolation is to be calculated.
bool m_calculateLArHVFraction
 Set to true to calculate E and N of cells affected by LAr HV corrections.
bool m_twoGaussianNoise
 if set to true use 2-gaussian noise description for TileCal
ToolHandle< CaloDepthToolm_caloDepthTool
SG::ReadCondHandleKey< CaloDetDescrManagerm_caloMgrKey
SG::ReadHandleKey< CaloCellContainerm_signalCellKey {this,"SignalCells","AllCalo_DigiHSTruth"}
SG::ReadCondHandleKey< CaloNoisem_noiseCDOKey {this,"CaloNoiseKey","totalNoise","SG Key of CaloNoise data object"}
 Key of the CaloNoise Conditions data object.
ToolHandle< ILArHVFractionm_larHVFraction
std::string m_momentsNamesAOD
 Not used anymore (with xAOD), but required when configured from COOL.
bool m_absOpt
 if set to true use abs E value of cells to calculate
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 44 of file CaloClusterMomentsMaker_DigiHSTruth.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ CaloClusterMomentsMaker_DigiHSTruth()

CaloClusterMomentsMaker_DigiHSTruth::CaloClusterMomentsMaker_DigiHSTruth ( const std::string & type,
const std::string & name,
const IInterface * parent )

Not used anymore (with xAOD), but required when configured from COOL.

Definition at line 114 of file CaloClusterMomentsMaker_DigiHSTruth.cxx.

117 :AthAlgTool(type, name, parent),
118 m_calo_id(nullptr),
120 m_minRLateral(4*cm),
122 m_minBadLArQuality(4000),
126 m_twoGaussianNoise(false),
127 m_caloDepthTool("CaloDepthTool",this),
128 m_larHVFraction("LArHVFraction",this),
129 m_absOpt(false)
130{
131 // Name(s) of Moments to calculate
132 declareProperty("MomentsNames",m_momentsNames);
133
134 // Name(s) of Moments which can be stored on the AOD - all others go to ESD
135 // m_momentsNamesAOD.push_back(std::string("FIRST_PHI"));
136 // m_momentsNamesAOD.push_back(std::string("FIRST_ETA"));
137 // m_momentsNamesAOD.push_back(std::string("SECOND_R"));
138 // m_momentsNamesAOD.push_back(std::string("SECOND_LAMBDA"));
139 // m_momentsNamesAOD.push_back(std::string("CENTER_LAMBDA"));
140 // m_momentsNamesAOD.push_back(std::string("FIRST_ENG_DENS"));
141 // m_momentsNamesAOD.push_back(std::string("ENG_BAD_CELLS"));
142 // m_momentsNamesAOD.push_back(std::string("N_BAD_CELLS"));
143
144 //declareProperty("AODMomentsNames",m_momentsNamesAOD);
145 // maximum allowed angle between shower axis and the vector pointing
146 // to the shower center from the IP in degrees. This property is need
147 // to protect against cases where all significant cells are in one sampling
148 // and the shower axis can not be defined from them
149 declareProperty("MaxAxisAngle",m_maxAxisAngle);
150 declareProperty("MinRLateral",m_minRLateral);
151 declareProperty("MinLLongitudinal",m_minLLongitudinal);
152 declareProperty("MinBadLArQuality",m_minBadLArQuality);
153 // use 2-gaussian noise for Tile
154 declareProperty("TwoGaussianNoise",m_twoGaussianNoise);
155 declareProperty("LArHVFraction",m_larHVFraction,"Tool Handle for LArHVFraction");
156
158 declareProperty("AODMomentsNames",m_momentsNamesAOD);
159 // Use weighting of neg. clusters option?
160 declareProperty("WeightingOfNegClusters", m_absOpt);
161}
#define deg
AthAlgTool()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
double m_minRLateral
the minimal in the definition of the Lateral moment
std::vector< std::string > m_momentsNames
vector holding the input list of names of moments to calculate.
double m_minBadLArQuality
the minimal cell quality in the LAr for declaring a cell bad
bool m_calculateLArHVFraction
Set to true to calculate E and N of cells affected by LAr HV corrections.
bool m_absOpt
if set to true use abs E value of cells to calculate
bool m_calculateIsolation
Set to true if cluster isolation is to be calculated.
bool m_twoGaussianNoise
if set to true use 2-gaussian noise description for TileCal
double m_maxAxisAngle
the maximal allowed deviation from the IP-to-ClusterCenter-axis.
double m_minLLongitudinal
the minimal in the definition of the Longitudinal moment
bool m_calculateSignificance
Set to true if significance moments are need.
std::string m_momentsNamesAOD
Not used anymore (with xAOD), but required when configured from COOL.

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ DeclareInterfaceID()

CaloClusterCollectionProcessor::DeclareInterfaceID ( CaloClusterCollectionProcessor ,
1 ,
0  )
inherited

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute() [1/2]

StatusCode CaloClusterMomentsMaker_DigiHSTruth::execute ( const EventContext & ctx,
xAOD::CaloClusterContainer * collection ) const
finaloverridevirtual

Execute on an entire collection of clusters.

Parameters
collectionThe container of clusters. param ctx The event context.

Implements CaloClusterCollectionProcessor.

Definition at line 277 of file CaloClusterMomentsMaker_DigiHSTruth.cxx.

280{
281
282 ATH_MSG_DEBUG("Executing " << name());
283
284 SG::ReadHandle<CaloCellContainer> signalCells(m_signalCellKey,ctx);
285
286 // Maps cell IdentifierHash to cluster index in cluster collection.
287 // Only used when cluster isolation moment is calculated.
288 using clusterIdx_t = std::uint16_t;
289 typedef std::pair<clusterIdx_t, clusterIdx_t> clusterPair_t;
290 std::vector<clusterPair_t> clusterIdx;
291 const clusterIdx_t noCluster = std::numeric_limits<clusterIdx_t>::max();
292
293 const CaloNoise* noise=nullptr;
295 SG::ReadCondHandle<CaloNoise> noiseHdl{m_noiseCDOKey,ctx};
296 noise=*noiseHdl;
297 }
298
299 SG::ReadCondHandle<CaloDetDescrManager> caloMgrHandle{ m_caloMgrKey, ctx };
300 const CaloDetDescrManager* caloDDMgr = *caloMgrHandle;
301
302 // Counters for number of empty and non-empty neighbor cells per sampling layer
303 // Only used when cluster isolation moment is calculated.
304 int nbEmpty[CaloCell_ID::Unknown];
305 int nbNonEmpty[CaloCell_ID::Unknown];
306
307 // prepare stuff from entire collection in case isolation moment
308 // should be calculated
309
310 if ( m_calculateIsolation ) {
311
312 if (theClusColl->size() >= noCluster) {
313 msg(MSG::ERROR) << "Too many clusters" << endmsg;
314 return StatusCode::FAILURE;
315 }
316
317 // initialize with "empty" values
318 clusterIdx.resize(m_calo_id->calo_cell_hash_max(),
319 clusterPair_t(noCluster, noCluster));
320
321 int iCluster = 0;
322 for (xAOD::CaloCluster* theCluster : *theClusColl) {
323 // loop over all cell members and fill cell vector for used cells
324 xAOD::CaloCluster::cell_iterator cellIter = theCluster->cell_begin();
325 xAOD::CaloCluster::cell_iterator cellIterEnd = theCluster->cell_end();
326 for(; cellIter != cellIterEnd; cellIter++ ){
327 CxxUtils::prefetchNext(cellIter, cellIterEnd);
328 const CaloCell* myCell = *cellIter;
329
330 const CaloDetDescrElement * caloDDE = myCell->caloDDE();
331 IdentifierHash hashid=caloDDE->calo_hash() ;
332 if(! hashid.is_valid() ) continue;
333 if(hashid >= (signalCells)->size()) continue;
334 myCell = (*signalCells).findCell(hashid);
335 if(!myCell) continue;
336
337
338 Identifier myId = myCell->ID();
339 IdentifierHash myHashId = m_calo_id->calo_cell_hash(myId);
340 if ( clusterIdx[(unsigned int)myHashId].first != noCluster) {
341 // check weight and assign to current cluster if weight is > 0.5
342 double weight = cellIter.weight();
343 if ( weight > 0.5 )
344 clusterIdx[(unsigned int)myHashId].first = iCluster;
345 }
346 else {
347 clusterIdx[(unsigned int)myHashId].first = iCluster;
348 }
349 }
350 ++iCluster;
351 }
352 }
353
354 // Move allocation of temporary arrays outside the cluster loop.
355 // That way, we don't need to delete and reallocate them
356 // each time through the loop.
357
358 std::vector<CaloClusterMomentsMaker_DigiHSTruth_detail::cellinfo> cellinfo;
359 std::vector<double> maxSampE (CaloCell_ID::Unknown);
360 std::vector<double> myMoments(m_validMoments.size(),0);
361 std::vector<double> myNorms(m_validMoments.size(),0);
362 std::vector<IdentifierHash> theNeighbors;
363 // loop over individual clusters
364 xAOD::CaloClusterContainer::iterator clusIter = theClusColl->begin();
365 xAOD::CaloClusterContainer::iterator clusIterEnd = theClusColl->end();
366 int iClus = 0;
367 for( ;clusIter!=clusIterEnd;++clusIter,++iClus) {
368 xAOD::CaloCluster * theCluster = *clusIter;
369
370 double w(0),xc(0),yc(0),zc(0);
371 double eBad(0),ebad_dac(0),ePos(0),eBadLArQ(0),sumSig2(0),maxAbsSig(0);
372 double eLAr2(0),eLAr2Q(0);
373 double eTile2(0),eTile2Q(0);
374 double eBadLArHV(0);
375 int nbad(0),nbad_dac(0),nBadLArHV(0);
376 unsigned int ncell(0),i,nSigSampl(0);
377 unsigned int theNumOfCells = theCluster->size();
378 double theClusterEnergy = 0;
379 double theClusterAbsEnergy = 0;
380 double theClusterEta = 0;
381 double theClusterPhi = 0;
382
383 // these two are needed for the LATERAL moment
384 int iCellMax(-1);
385 int iCellScndMax(-1);
386
387 if (cellinfo.capacity() == 0)
388 cellinfo.reserve (theNumOfCells*2);
389 cellinfo.resize (theNumOfCells);
390
391 double phi0 = theCluster->phi();;
392 for(i=0;i<(unsigned int)CaloCell_ID::Unknown;i++)
393 maxSampE[i] = 0;
394
395 if ( !m_momentsNames.empty() ) {
396 std::fill (myMoments.begin(), myMoments.end(), 0);
397 std::fill (myNorms.begin(), myNorms.end(), 0);
398 if ( m_calculateIsolation ) {
399 std::fill_n(nbNonEmpty, CaloCell_ID::Unknown, 0);
400 std::fill_n(nbEmpty, CaloCell_ID::Unknown, 0);
401 }
402
403 // loop over all cell members and calculate the center of mass
404 xAOD::CaloCluster::cell_iterator cellIter = theCluster->cell_begin();
405 xAOD::CaloCluster::cell_iterator cellIterEnd = theCluster->cell_end();
406 for(; cellIter != cellIterEnd; cellIter++ ){
407 CaloPrefetch::nextDDE(cellIter, cellIterEnd);
408 const CaloCell* pCell = (*cellIter);
409 const CaloDetDescrElement * caloDDE = pCell->caloDDE();
410 IdentifierHash hashid=caloDDE->calo_hash() ;
411 if(! hashid.is_valid() ) continue;
412
413 if(hashid >= (signalCells)->size()) continue;
414 pCell = (*signalCells).findCell(hashid);
415
416 Identifier myId = pCell->ID();
417
418 const CaloDetDescrElement* myCDDE = pCell->caloDDE();
419 double ene = pCell->e();
420 if(m_absOpt) ene = std::abs(ene);
421 double weight = cellIter.weight();//theCluster->getCellWeight(cellIter);
422
423 double thePhi;
424 double cellPhi = myCDDE->phi();
425 thePhi = proxim (cellPhi, phi0);
426
427 theClusterEnergy += weight * ene;
428 theClusterAbsEnergy += weight*std::abs(ene);
429 theClusterEta += weight*std::abs(ene)*pCell->eta();
430 theClusterPhi += weight*std::abs(ene)* thePhi;
431 if ( pCell->badcell() ) {
432 eBad += ene*weight;
433 nbad++;
434 if(ene!=0){
435 ebad_dac+=ene*weight;
436 nbad_dac++;
437 }
438 }
439 else {
440 if ( ! (myCDDE->is_tile())
441 && ((pCell->provenance() & 0x2000) == 0x2000)
442 && !((pCell->provenance() & 0x0800) == 0x0800)) {
443 if ( pCell->quality() > m_minBadLArQuality ) {
444 eBadLArQ += ene*weight;
445 }
446 eLAr2 += ene*weight*ene*weight;
447 eLAr2Q += ene*weight*ene*weight*pCell->quality();
448 }
449 if ( myCDDE->is_tile() ) {
450 uint16_t tq = pCell->quality();
451 uint8_t tq1 = (0xFF00&tq)>>8; // quality in channel 1
452 uint8_t tq2 = (0xFF&tq); // quality in channel 2
453 // reject cells with either 0xFF00 or 0xFF
454 if ( ((tq1&0xFF) != 0xFF) && ((tq2&0xFF) != 0xFF) ) {
455 eTile2 += ene*weight*ene*weight;
456 // take the worse of both qualities (one might be 0 in
457 // 1-channel cases)
458 eTile2Q += ene*weight*ene*weight*(tq1>tq2?tq1:tq2);
459 }
460 }
461 }
462 if ( ene > 0 ) {
463 ePos += ene*weight;
464 }
466 const float sigma = m_twoGaussianNoise ? \
467 noise->getEffectiveSigma(pCell->ID(),pCell->gain(),pCell->energy()) : \
468 noise->getNoise(pCell->ID(),pCell->gain());
469 sumSig2 += sigma*sigma;
470 // use geomtery weighted energy of cell for leading cell significance
471 double Sig = (sigma>0?ene*weight/sigma:0);
472 if ( std::abs(Sig) > std::abs(maxAbsSig) ) {
473 maxAbsSig = Sig;
474 nSigSampl = myCDDE->getSampling();
475 }
476 }
477 if ( m_calculateIsolation ) {
478 // get all 2D Neighbours if the cell is not inside another cluster with
479 // larger weight
480
481 IdentifierHash myHashId = m_calo_id->calo_cell_hash(myId);
482 if ( clusterIdx[myHashId].first == iClus ) {
483 theNeighbors.clear();
484 m_calo_id->get_neighbours(myHashId, LArNeighbours::all2D, theNeighbors);
485 for (const auto& nhash: theNeighbors) {
486 clusterPair_t& idx = clusterIdx[nhash];
487
488 // only need to look at each cell once per cluster
489 if ( idx.second == iClus ) continue;
490 idx.second = iClus;
491
492 if ( idx.first == noCluster ) {
493 ++ nbEmpty[m_calo_id->calo_sample(nhash)];
494 } else if ( idx.first != iClus ) {
495 ++ nbNonEmpty[m_calo_id->calo_sample(nhash)];
496 }
497
498 }
499 }
500 }
501
502 if ( myCDDE && ene > 0. && weight > 0) {
503 // get all geometric information needed ...
504 CaloClusterMomentsMaker_DigiHSTruth_detail::cellinfo& ci = cellinfo[ncell];
505 ci.x = myCDDE->x();
506 ci.y = myCDDE->y();
507 ci.z = myCDDE->z();
508 ci.eta = myCDDE->eta();
509 ci.phi = myCDDE->phi();
510 ci.energy = ene*weight;
511 ci.volume = myCDDE->volume();
512 ci.sample = myCDDE->getSampling();
513 if ( ci.energy > maxSampE[(unsigned int)ci.sample] )
514 maxSampE[(unsigned int)ci.sample] = ci.energy;
515
516 if (iCellMax < 0 || ci.energy > cellinfo[iCellMax].energy ) {
517 iCellScndMax = iCellMax;
518 iCellMax = ncell;
519 }
520 else if (iCellScndMax < 0 ||
521 ci.energy > cellinfo[iCellScndMax].energy )
522 {
523 iCellScndMax = ncell;
524 }
525
526 xc += ci.energy*ci.x;
527 yc += ci.energy*ci.y;
528 zc += ci.energy*ci.z;
529 w += ci.energy;
530
531 ncell++;
532 }
533 } //end of loop over all cells
534
535 if ( w > 0 ) {
536 xc/=w;
537 yc/=w;
538 zc/=w;
539 Amg::Vector3D showerCenter(xc,yc,zc);
540 w=0;
541
542
543 //log << MSG::WARNING << "Found bad cells " << xbad_dac << " " << ybad_dac << " " << zbad_dac << " " << ebad_dac << endmsg;
544 //log << MSG::WARNING << "Found Cluster " << xbad_dac << " " << ybad_dac << " " << zbad_dac << " " << endmsg;
545 // shower axis is just the vector pointing from the IP to the shower center
546 // in case there are less than 3 cells in the cluster
547
548 Amg::Vector3D showerAxis(xc,yc,zc);
549 Amg::setMag(showerAxis,1.0);
550
551 // otherwise the principal direction with the largest absolute
552 // eigenvalue will be used unless it's angle w.r.t. the vector pointing
553 // from the IP to the shower center is larger than allowed by the
554 // property m_maxAxisAngle
555
556 double angle(0),deltaPhi(0),deltaTheta(0);
557 if ( ncell > 2 ) {
558 Eigen::Matrix3d C=Eigen::Matrix3d::Zero();
559 for(i=0;i<ncell;i++) {
560 const CaloClusterMomentsMaker_DigiHSTruth_detail::cellinfo& ci = cellinfo[i];
561 const double e2 = ci.energy * ci.energy;
562
563 C(0,0) += e2*(ci.x-xc)*(ci.x-xc);
564 C(1,0) += e2*(ci.x-xc)*(ci.y-yc);
565 C(2,0) += e2*(ci.x-xc)*(ci.z-zc);
566
567 C(1,1) += e2*(ci.y-yc)*(ci.y-yc);
568 C(2,1) += e2*(ci.y-yc)*(ci.z-zc);
569
570 C(2,2) += e2*(ci.z-zc)*(ci.z-zc);
571 w += e2;
572 }
573
574 C/=w;
575
576
577 Eigen::SelfAdjointEigenSolver<Eigen::Matrix3d> eigensolver(C);
578 if (eigensolver.info() != Eigen::Success) {
579 msg(MSG::WARNING) << "Failed to compute Eigenvalues -> Can't determine shower axis" << endmsg;
580 }
581 else {
582 // don't use the principal axes if at least one of the 3
583 // diagonal elements is 0
584
585
586 const Eigen::Vector3d& S=eigensolver.eigenvalues();
587 const Eigen::Matrix3d& U=eigensolver.eigenvectors();
588
589 const double epsilon = 1.E-6;
590
591 if ( std::abs(S[0]) >= epsilon && std::abs(S[1]) >= epsilon && std::abs(S[2]) >= epsilon ) {
592
593 Amg::Vector3D prAxis(showerAxis);
594
595 int iEigen = -1;
596
597 for (i=0;i<3;i++) {
598 Amg::Vector3D tmpAxis=U.col(i);
599
600 // calculate the angle
601 double tmpAngle=Amg::angle(tmpAxis,showerAxis);
602
603 if ( tmpAngle > 90*deg ) {
604 tmpAngle = 180*deg - tmpAngle;
605 tmpAxis = -tmpAxis;
606 }
607
608 if ( iEigen == -1 || tmpAngle < angle ) {
609 iEigen = i;
610 angle = tmpAngle;
611 prAxis = tmpAxis;
612 }
613
614 }//end for loop
615
616 // calculate theta and phi angle differences
617
618 deltaPhi = CaloPhiRange::diff(showerAxis.phi(),prAxis.phi());
619
620 deltaTheta = showerAxis.theta() - prAxis.theta();
621
622 // check the angle
623
624 if ( angle < m_maxAxisAngle ) {
625 showerAxis = prAxis;
626 }
627 else
628 ATH_MSG_DEBUG("principal Direction (" << prAxis[Amg::x] << ", "
629 << prAxis[Amg::y] << ", " << prAxis[Amg::z] << ") deviates more than "
630 << m_maxAxisAngle*(1./deg)
631 << " deg from IP-to-ClusterCenter-axis (" << showerAxis[Amg::x] << ", "
632 << showerAxis[Amg::y] << ", " << showerAxis[Amg::z] << ")");
633 }//end if !S[i]==0
634 }// end else got Eigenvalues
635 } //end if ncell>2
636
637 ATH_MSG_DEBUG("Shower Axis = (" << showerAxis.x() << ", "
638 << showerAxis.y() << ", " << showerAxis.z() << ")");
639
640 // calculate radial distance from and the longitudinal distance
641 // along the shower axis for each cell. The cluster center is
642 // at r=0 and lambda=0
643
644 for (auto& ci : cellinfo) {
645 const Amg::Vector3D currentCell(ci.x,ci.y,ci.z);
646 // calculate distance from shower axis r
647 ci.r = ((currentCell-showerCenter).cross(showerAxis)).mag();
648 // calculate distance from shower center along shower axis
649 ci.lambda = (currentCell-showerCenter).dot(showerAxis);
650 }
651
652 // loop over all positive energy cells and calculate all desired moments
653
654 // define common norm for all simple moments
655 double commonNorm = 0;
656 double phi0 = ncell > 0 ? cellinfo[0].phi : 0;
657 for(i=0;i<ncell;i++) {
658 const CaloClusterMomentsMaker_DigiHSTruth_detail::cellinfo& ci = cellinfo[i];
659 // loop over all valid moments
660 commonNorm += ci.energy;
661 for(size_t iMoment = 0, size = m_validMoments.size();
662 iMoment != size;
663 ++ iMoment)
664 {
665 // now calculate the actual moments
666 switch (m_validMoments[iMoment]) {
667 case FIRST_ETA_DigiHSTruth:
668 myMoments[iMoment] += ci.energy*ci.eta;
669 break;
670 case FIRST_PHI_DigiHSTruth:
671 // first cell decides the sign in order to avoid
672 // overlap problem at phi = -pi == +pi
673 // need to be normalized to the range [-pi,+pi] in the end
674 myMoments[iMoment] += ci.energy * proxim (ci.phi, phi0);
675 break;
676 case SECOND_R_DigiHSTruth:
677 myMoments[iMoment] += ci.energy*ci.r*ci.r;
678 break;
679 case SECOND_LAMBDA_DigiHSTruth:
680 myMoments[iMoment] += ci.energy*ci.lambda*ci.lambda;
681 break;
682 case LATERAL_DigiHSTruth:
683 if ( (int)i != iCellMax && (int)i != iCellScndMax ) {
684 myMoments[iMoment] += ci.energy*ci.r*ci.r;
685 myNorms[iMoment] += ci.energy*ci.r*ci.r;
686 }
687 else {
688 double rm = ci.r;
689 if ( rm < m_minRLateral )
690 rm = m_minRLateral;
691 myNorms[iMoment] += rm*rm*ci.energy;
692 }
693 break;
694 case LONGITUDINAL_DigiHSTruth:
695 if ( (int)i != iCellMax && (int)i != iCellScndMax ) {
696 myMoments[iMoment] += ci.energy*ci.lambda*ci.lambda;
697 myNorms[iMoment] += ci.energy*ci.lambda*ci.lambda;
698 }
699 else {
700 double lm = ci.lambda;
701 if ( lm < m_minLLongitudinal )
703 myNorms[iMoment] += lm*lm*ci.energy;
704 }
705 break;
706 case FIRST_ENG_DENS_DigiHSTruth:
707 if ( ci.volume > 0 ) {
708 myMoments[iMoment] += ci.energy*ci.energy/ci.volume;
709 myNorms[iMoment] += ci.energy;
710 }
711 break;
712 case SECOND_ENG_DENS_DigiHSTruth:
713 if ( ci.volume > 0 ) {
714 myMoments[iMoment] += ci.energy*std::pow(ci.energy/ci.volume,2);
715 myNorms[iMoment] += ci.energy;
716 }
717 break;
718 case ENG_FRAC_EM_DigiHSTruth:
719 if ( ci.sample == CaloCell_ID::EMB1
720 || ci.sample == CaloCell_ID::EMB2
721 || ci.sample == CaloCell_ID::EMB3
722 || ci.sample == CaloCell_ID::EME1
723 || ci.sample == CaloCell_ID::EME2
724 || ci.sample == CaloCell_ID::EME3
725 || ci.sample == CaloCell_ID::FCAL0 )
726 myMoments[iMoment] += ci.energy;
727 break;
728 case ENG_FRAC_MAX_DigiHSTruth:
729 if ( (int)i == iCellMax )
730 myMoments[iMoment] = ci.energy;
731 break;
732 default:
733 // nothing to be done for other moments
734 break;
735 }
736 }
737 } //end of loop over cell
738
739 const auto hvFrac=m_larHVFraction->getLArHVFrac(theCluster->getCellLinks(),ctx);
740 eBadLArHV= hvFrac.first;
741 nBadLArHV=hvFrac.second;
742
743
744 // assign moments which don't need the loop over the cells
745 for (size_t iMoment = 0, size = m_validMoments.size();
746 iMoment != size;
747 ++ iMoment)
748 {
749 // now calculate the actual moments
750 switch (m_validMoments[iMoment]) {
751 case FIRST_ETA_DigiHSTruth:
752 case FIRST_PHI_DigiHSTruth:
753 case SECOND_R_DigiHSTruth:
754 case SECOND_LAMBDA_DigiHSTruth:
755 case ENG_FRAC_EM_DigiHSTruth:
756 case ENG_FRAC_MAX_DigiHSTruth:
757 myNorms[iMoment] = commonNorm;
758 break;
759 case DELTA_PHI_DigiHSTruth:
760 myMoments[iMoment] = deltaPhi;
761 break;
762 case DELTA_THETA_DigiHSTruth:
763 myMoments[iMoment] = deltaTheta;
764 break;
765 case DELTA_ALPHA_DigiHSTruth:
766 myMoments[iMoment] = angle;
767 break;
768 case CENTER_X_DigiHSTruth:
769 myMoments[iMoment] = showerCenter.x();
770 break;
771 case CENTER_Y_DigiHSTruth:
772 myMoments[iMoment] = showerCenter.y();
773 break;
774 case CENTER_Z_DigiHSTruth:
775 myMoments[iMoment] = showerCenter.z();
776 break;
777 case CENTER_MAG_DigiHSTruth:
778 myMoments[iMoment] = showerCenter.mag();
779 break;
780 case CENTER_LAMBDA_DigiHSTruth:
781 // calculate the longitudinal distance along the shower axis
782 // of the shower center from the calorimeter start
783
784 // first need calo boundary at given eta phi try LAREM barrel
785 // first, then LAREM endcap OW, then LAREM endcap IW, then
786 // FCal
787 {
788 double r_calo(0),z_calo(0),lambda_c(0);
789 r_calo = m_caloDepthTool->get_entrance_radius(CaloCell_ID::EMB1,
790 showerCenter.eta(),
791 showerCenter.phi(),
792 caloDDMgr);
793 if ( r_calo == 0 ) {
794 z_calo = m_caloDepthTool->get_entrance_z(CaloCell_ID::EME1,
795 showerCenter.eta(),
796 showerCenter.phi(),
797 caloDDMgr);
798 if ( z_calo == 0 )
799 z_calo = m_caloDepthTool->get_entrance_z(CaloCell_ID::EME2,
800 showerCenter.eta(),
801 showerCenter.phi(),
802 caloDDMgr);
803 if ( z_calo == 0 )
804 z_calo = m_caloDepthTool->get_entrance_z(CaloCell_ID::FCAL0,
805 showerCenter.eta(),
806 showerCenter.phi(),
807 caloDDMgr);
808 if ( z_calo == 0 ) // for H6 TB without EMEC outer wheel
809 z_calo = m_caloDepthTool->get_entrance_z(CaloCell_ID::HEC0,
810 showerCenter.eta(),
811 showerCenter.phi(),
812 caloDDMgr);
813 if ( z_calo != 0 && showerAxis.z() != 0 ) {
814 lambda_c = std::abs((z_calo-showerCenter.z())/showerAxis.z());
815 }
816 }
817 else {
818 double r_s2 = showerAxis.x()*showerAxis.x()
819 +showerAxis.y()*showerAxis.y();
820 double r_cs = showerAxis.x()*showerCenter.x()
821 +showerAxis.y()*showerCenter.y();
822 double r_cr = showerCenter.x()*showerCenter.x()
823 +showerCenter.y()*showerCenter.y()-r_calo*r_calo;
824 if ( r_s2 > 0 ) {
825 double det = r_cs*r_cs/(r_s2*r_s2) - r_cr/r_s2;
826 if ( det > 0 ) {
827 det = sqrt(det);
828 double l1(-r_cs/r_s2);
829 double l2(l1);
830 l1 += det;
831 l2 -= det;
832 if ( std::abs(l1) < std::abs(l2) )
833 lambda_c = std::abs(l1);
834 else
835 lambda_c = std::abs(l2);
836 }
837 }
838 }
839 myMoments[iMoment] = lambda_c;
840 }
841 break;
842 case ENG_FRAC_CORE_DigiHSTruth:
843 for(i=0;i<(int)CaloCell_ID::Unknown;i++)
844 myMoments[iMoment] += maxSampE[i];
845 myNorms[iMoment] = commonNorm;
846 break;
847 case ISOLATION_DigiHSTruth:
848 {
849 // loop over empty and filled perimeter cells and
850 // get a weighted ratio by means of energy fraction per layer
851 for(unsigned int i=0; i != CaloSampling::Unknown; ++ i) {
853 if (theCluster->hasSampling(s)) {
854 const double eSample = theCluster->eSample(s);
855 if (eSample > 0) {
856 int nAll = nbEmpty[i]+nbNonEmpty[i];
857 if (nAll > 0) {
858 myMoments[iMoment] += (eSample*nbEmpty[i])/nAll;
859 myNorms[iMoment] += eSample;
860 }
861 }//end of eSample>0
862 }//end has sampling
863 }//end loop over samplings
864 }
865 break;
866 case ENG_BAD_CELLS_DigiHSTruth:
867 myMoments[iMoment] = eBad;
868 break;
869 case N_BAD_CELLS_DigiHSTruth:
870 myMoments[iMoment] = nbad;
871 break;
872 case N_BAD_CELLS_CORR_DigiHSTruth:
873 myMoments[iMoment] = nbad_dac;
874 break;
875 case BAD_CELLS_CORR_E_DigiHSTruth:
876 myMoments[iMoment] = ebad_dac;
877 break;
878 case BADLARQ_FRAC_DigiHSTruth:
879 myMoments[iMoment] = eBadLArQ/(theCluster->e()!=0.?theCluster->e():1.);
880 break;
881 case ENG_POS_DigiHSTruth:
882 myMoments[iMoment] = ePos;
883 break;
884 case SIGNIFICANCE_DigiHSTruth:
885 myMoments[iMoment] = (sumSig2>0?theCluster->e()/sqrt(sumSig2):0.);
886 break;
887 case CELL_SIGNIFICANCE_DigiHSTruth:
888 myMoments[iMoment] = maxAbsSig;
889 break;
890 case CELL_SIG_SAMPLING_DigiHSTruth:
891 myMoments[iMoment] = nSigSampl;
892 break;
893 case AVG_LAR_Q_DigiHSTruth:
894 myMoments[iMoment] = eLAr2Q/(eLAr2>0?eLAr2:1);
895 break;
896 case AVG_TILE_Q_DigiHSTruth:
897 myMoments[iMoment] = eTile2Q/(eTile2>0?eTile2:1);
898 break;
899 case ENG_BAD_HV_CELLS_DigiHSTruth:
900 myMoments[iMoment] = eBadLArHV;
901 break;
902 case N_BAD_HV_CELLS_DigiHSTruth:
903 myMoments[iMoment] = nBadLArHV;
904 break;
905 case ENERGY_DigiHSTruth:
906 myMoments[iMoment] = theClusterEnergy;
907 break;
908 case ETA_DigiHSTruth:
909 if(theClusterAbsEnergy > 0)
910 myMoments[iMoment] = theClusterEta / theClusterAbsEnergy;
911 else{
912 myMoments[iMoment] = 0;
913 }
914 break;
915 case PHI_DigiHSTruth:
916 if(theClusterAbsEnergy > 0)
917 myMoments[iMoment] = CaloPhiRange::fix(theClusterPhi / theClusterAbsEnergy);
918 else{
919 myMoments[iMoment] = 0;
920 }
921 break;
922 default:
923 // nothing to be done for other moments
924 break;
925 }
926 }
927 }
928
929 // normalize moments and copy to Cluster Moment Store
930 size_t size= m_validMoments.size();
931 for (size_t iMoment = 0; iMoment != size; ++iMoment) {
933 if ( myNorms[iMoment] != 0 )
934 myMoments[iMoment] /= myNorms[iMoment];
935 if ( moment == FIRST_PHI_DigiHSTruth )
936 myMoments[iMoment] = CaloPhiRange::fix(myMoments[iMoment]);
937
938 theCluster->insertMoment(moment,myMoments[iMoment]);
939 }
940 }
941 }
942
943 return StatusCode::SUCCESS;
944}
Scalar deltaPhi(const MatrixBase< Derived > &vec) const
#define endmsg
#define ATH_MSG_DEBUG(x)
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
MsgStream & msg() const
virtual double e() const override final
get energy (data member) (synonym to method energy()
Definition CaloCell.h:333
double energy() const
get energy (data member)
Definition CaloCell.h:327
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Definition CaloCell.h:321
uint16_t provenance() const
get provenance (data member)
Definition CaloCell.h:354
virtual double eta() const override final
get eta (through CaloDetDescrElement)
Definition CaloCell.h:382
uint16_t quality() const
get quality (data member)
Definition CaloCell.h:348
virtual bool badcell() const
check is cell is dead
Definition CaloCell.cxx:144
CaloGain::CaloGain gain() const
get gain (data member )
Definition CaloCell.h:361
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
Definition CaloCell.h:295
SG::ReadCondHandleKey< CaloNoise > m_noiseCDOKey
Key of the CaloNoise Conditions data object.
SG::ReadHandleKey< CaloCellContainer > m_signalCellKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
std::vector< xAOD::CaloCluster::MomentType > m_validMoments
set of moments which will be calculated.
CaloCell_ID::CaloSample getSampling() const
cell sampling
static double fix(double phi)
static double diff(double phi1, double phi2)
simple phi1 - phi2 calculation, but result is fixed to respect range.
DataModel_detail::iterator< DataVector > iterator
Definition DataVector.h:842
bool is_valid() const
Check if id is in a valid state.
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
size_t size() const
size method (forwarded from CaloClusterCellLink obj)
CaloClusterCellLink::iterator cell_iterator
Iterator of the underlying CaloClusterCellLink (non-const version)
virtual double e() const
The total energy of the particle.
void insertMoment(MomentType type, double value)
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.
const_cell_iterator cell_begin() const
Iterator of the underlying CaloClusterCellLink (const version)
CaloSampling::CaloSample CaloSample
bool hasSampling(const CaloSample s) const
Checks if certain smapling contributes to cluster.
struct color C
void setMag(Amg::Vector3D &v, double mag)
scales the vector length without changing the angles
double angle(const Amg::Vector3D &v1, const Amg::Vector3D &v2)
calculates the opening angle between two vectors
Eigen::Matrix< double, 3, 1 > Vector3D
void nextDDE(Iter iter, Iter endIter)
Prefetch next CaloDDE.
void prefetchNext(Iter iter, Iter endIter)
Prefetch next object in sequence.
Definition prefetch.h:130
dot(G, fn, nodesToHighlight=[])
Definition dot.py:5
double e2(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 2nd sampling
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
setWord1 uint16_t
double proxim(double b, double a)
Definition proxim.h:17

◆ execute() [2/2]

virtual StatusCode CaloClusterCollectionProcessor::execute ( xAOD::CaloClusterContainer * collection)
inlinefinalvirtual

Execute on an entire collection of clusters.

Parameters
collectionThe container of clusters. (deprecated)

Reimplemented from CaloClusterCollectionProcessor.

Definition at line 50 of file CaloClusterCollectionProcessor.h.

51 {
52 return execute (Gaudi::Hive::currentContext(), collection);
53 }
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloClusterContainer *theClusColl) const override final
Execute on an entire collection of clusters.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode CaloClusterMomentsMaker_DigiHSTruth::finalize ( )
overridevirtual

Definition at line 946 of file CaloClusterMomentsMaker_DigiHSTruth.cxx.

947{
948 return StatusCode::SUCCESS;
949}

◆ initialize()

StatusCode CaloClusterMomentsMaker_DigiHSTruth::initialize ( )
overridevirtual

Definition at line 165 of file CaloClusterMomentsMaker_DigiHSTruth.cxx.

166{
167
168 //FIXME: All that could be done at initialize!
170 m_calculateIsolation = false;
171
172 // translate all moment names specified in MomentsNames property to moment enums,
173 // check that they are all valid and there are no repeating names
174 for(const auto& name: m_momentsNames) {
175 const MomentName* it =
176 std::lower_bound (moment_names, moment_names_end, name);
177 //std::find(moment_names, moment_names_end, name);
178 //moment_names.find(name);
179
180 for(const auto& testName: moment_names){
181 if(name == testName.name) it = &testName;
182 }
183 if (it != moment_names_end) {
184 m_validMoments.push_back (it->mom);
185 switch (it->mom) {
186 case SIGNIFICANCE_DigiHSTruth:
187 case CELL_SIGNIFICANCE_DigiHSTruth:
189 break;
190 case ISOLATION_DigiHSTruth:
192 break;
193 case ENG_BAD_HV_CELLS_DigiHSTruth:
195 default:
196 break;
197 }
198 }
199 else {
200 msg(MSG::ERROR) << "Moment " << name
201 << " is not a valid Moment name and will be ignored! "
202 << "Valid names are:";
203 int count = 0;
204 for (const MomentName& m : moment_names)
205 msg() << ((count++)==0?" ":", ") << m.name;
206 msg() << endmsg;
207 }
208 }
209
210 // sort and remove duplicates, order is not required for any of the code below
211 // but still may be useful property
213/*
214 m_validMoments.erase(std::unique(m_validMoments.begin(),
215 m_validMoments.end()),
216 m_validMoments.end());
217*/
218
219
220 /*
221 // translate moment names in AODMomentsNames property into set of enums,
222 // only take valid names which are also in MomentsNames property
223 m_momentsAOD.reserve(m_momentsNamesAOD.size());
224 for(const auto& name: m_momentsNamesAOD) {
225 const MomentName* it =
226 std::lower_bound (moment_names, moment_names_end, name);
227 if (it != moment_names_end) {
228 if (std::find(m_validMoments.begin(), m_validMoments.end(), it->mom)
229 != m_validMoments.end())
230 {
231 m_momentsAOD.push_back(it->mom);
232 }
233 }
234 }
235 */
236
237 ATH_CHECK(detStore()->retrieve(m_calo_id,"CaloCell_ID"));
238
239 ATH_CHECK(m_caloDepthTool.retrieve());
240 ATH_CHECK(m_caloMgrKey.initialize());
241
243 ATH_CHECK(m_noiseCDOKey.initialize());
244 }
245
247 ATH_CHECK(m_larHVFraction.retrieve());
248 }
249 else {
250 m_larHVFraction.disable();
251 }
252
253 return StatusCode::SUCCESS;
254
255}
#define ATH_CHECK
Evaluate an expression and check for errors.
const ServiceHandle< StoreGateSvc > & detStore() const
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146
retrieve(aClass, aKey=None)
Definition PyKernel.py:110
void stable_sort(DataModel_detail::iterator< DVL > beg, DataModel_detail::iterator< DVL > end)
Specialization of stable_sort for DataVector/List.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_absOpt

bool CaloClusterMomentsMaker_DigiHSTruth::m_absOpt
private

if set to true use abs E value of cells to calculate

  • * cluster moments

Definition at line 141 of file CaloClusterMomentsMaker_DigiHSTruth.h.

◆ m_calculateIsolation

bool CaloClusterMomentsMaker_DigiHSTruth::m_calculateIsolation
private

Set to true if cluster isolation is to be calculated.

Definition at line 111 of file CaloClusterMomentsMaker_DigiHSTruth.h.

◆ m_calculateLArHVFraction

bool CaloClusterMomentsMaker_DigiHSTruth::m_calculateLArHVFraction
private

Set to true to calculate E and N of cells affected by LAr HV corrections.

Definition at line 114 of file CaloClusterMomentsMaker_DigiHSTruth.h.

◆ m_calculateSignificance

bool CaloClusterMomentsMaker_DigiHSTruth::m_calculateSignificance
private

Set to true if significance moments are need.

Definition at line 108 of file CaloClusterMomentsMaker_DigiHSTruth.h.

◆ m_calo_id

const CaloCell_ID* CaloClusterMomentsMaker_DigiHSTruth::m_calo_id
private

Definition at line 75 of file CaloClusterMomentsMaker_DigiHSTruth.h.

◆ m_caloDepthTool

ToolHandle<CaloDepthTool> CaloClusterMomentsMaker_DigiHSTruth::m_caloDepthTool
private

Definition at line 121 of file CaloClusterMomentsMaker_DigiHSTruth.h.

◆ m_caloMgrKey

SG::ReadCondHandleKey<CaloDetDescrManager> CaloClusterMomentsMaker_DigiHSTruth::m_caloMgrKey
private
Initial value:
{
this,
"CaloDetDescrManager",
"CaloDetDescrManager"
}

Definition at line 123 of file CaloClusterMomentsMaker_DigiHSTruth.h.

123 {
124 this,
125 "CaloDetDescrManager",
126 "CaloDetDescrManager"
127 };

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_larHVFraction

ToolHandle<ILArHVFraction> CaloClusterMomentsMaker_DigiHSTruth::m_larHVFraction
private

Definition at line 134 of file CaloClusterMomentsMaker_DigiHSTruth.h.

◆ m_maxAxisAngle

double CaloClusterMomentsMaker_DigiHSTruth::m_maxAxisAngle
private

the maximal allowed deviation from the IP-to-ClusterCenter-axis.

Definition at line 79 of file CaloClusterMomentsMaker_DigiHSTruth.h.

◆ m_minBadLArQuality

double CaloClusterMomentsMaker_DigiHSTruth::m_minBadLArQuality
private

the minimal cell quality in the LAr for declaring a cell bad

This defines the minimal quality (large values mean worse shape) a cell needs to exceed in order to be considered as not compatible with a normal ionization signal.

Definition at line 105 of file CaloClusterMomentsMaker_DigiHSTruth.h.

◆ m_minLLongitudinal

double CaloClusterMomentsMaker_DigiHSTruth::m_minLLongitudinal
private

the minimal \(\lambda\) in the definition of the Longitudinal moment

This defines the minimal distance along the shower axis from the cluster center the two leading cells might have before this value is used instead of their real distance in the normalization of the LONGITUDINAL moment.

Definition at line 97 of file CaloClusterMomentsMaker_DigiHSTruth.h.

◆ m_minRLateral

double CaloClusterMomentsMaker_DigiHSTruth::m_minRLateral
private

the minimal \(r\) in the definition of the Lateral moment

This defines the minimal distance the two leading cells might have before this value is used instead of their real distance in the normalization of the LATERAL moment.

Definition at line 87 of file CaloClusterMomentsMaker_DigiHSTruth.h.

◆ m_momentsNames

std::vector<std::string> CaloClusterMomentsMaker_DigiHSTruth::m_momentsNames
private

vector holding the input list of names of moments to calculate.

This is the list of desired names of moments given in the jobOptions.

Definition at line 65 of file CaloClusterMomentsMaker_DigiHSTruth.h.

◆ m_momentsNamesAOD

std::string CaloClusterMomentsMaker_DigiHSTruth::m_momentsNamesAOD
private

Not used anymore (with xAOD), but required when configured from COOL.

Definition at line 137 of file CaloClusterMomentsMaker_DigiHSTruth.h.

◆ m_noiseCDOKey

SG::ReadCondHandleKey<CaloNoise> CaloClusterMomentsMaker_DigiHSTruth::m_noiseCDOKey {this,"CaloNoiseKey","totalNoise","SG Key of CaloNoise data object"}
private

Key of the CaloNoise Conditions data object.

Typical values are '"electronicNoise', 'pileupNoise', or '"totalNoise' (default)

Definition at line 133 of file CaloClusterMomentsMaker_DigiHSTruth.h.

133{this,"CaloNoiseKey","totalNoise","SG Key of CaloNoise data object"};

◆ m_signalCellKey

SG::ReadHandleKey<CaloCellContainer> CaloClusterMomentsMaker_DigiHSTruth::m_signalCellKey {this,"SignalCells","AllCalo_DigiHSTruth"}
private

Definition at line 129 of file CaloClusterMomentsMaker_DigiHSTruth.h.

129{this,"SignalCells","AllCalo_DigiHSTruth"};

◆ m_twoGaussianNoise

bool CaloClusterMomentsMaker_DigiHSTruth::m_twoGaussianNoise
private

if set to true use 2-gaussian noise description for TileCal

Definition at line 119 of file CaloClusterMomentsMaker_DigiHSTruth.h.

◆ m_validMoments

std::vector<xAOD::CaloCluster::MomentType> CaloClusterMomentsMaker_DigiHSTruth::m_validMoments
private

set of moments which will be calculated.

This set will hold each valid enum indexed if its name was found on the input list (m_momentsNames) and in the list of valid moment names (m_validNames).

Definition at line 73 of file CaloClusterMomentsMaker_DigiHSTruth.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: