 |
ATLAS Offline Software
|
Calculate moments for CaloCluster objects.
More...
#include <CaloClusterMomentsMaker.h>
|
| CaloClusterMomentsMaker (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. More...
|
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | finalize () override |
|
virtual StatusCode | execute (const EventContext &ctx, xAOD::CaloClusterContainer *collection) const=0 |
| Execute on an entire collection of clusters. More...
|
|
virtual StatusCode | execute (xAOD::CaloClusterContainer *collection) final |
| Execute on an entire collection of clusters. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T, V, H > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
| DeclareInterfaceID (CaloClusterCollectionProcessor, 1, 0) |
|
virtual StatusCode | execute (xAOD::CaloClusterContainer *collection) final |
| Execute on an entire collection of clusters. More...
|
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
Calculate moments for CaloCluster objects.
- Author
- Sven Menke menke.nosp@m.@mpp.nosp@m.mu.mp.nosp@m.g.de
-
Peter Loch loch@.nosp@m.phys.nosp@m.ics.a.nosp@m.rizo.nosp@m.na.ed.nosp@m.u
- Date
- 23-March-2021 This is a CaloClusterCollectionProcessor which can be plugged into a CaloClusterMaker for calculating moments for each CaloCluster. Typically a cluster moment of a certain degree \(n\) over a variable \(x\) defined for each CaloCell member of a CaloCluster is defined as:
\[ \langle x^n\rangle = \frac{1}{E_{\rm norm}} \times \!\!\!\sum\limits_{\{{\rm cell}|E_{\rm cell}>0\}}{\!\!\!E_{\rm cell}\, x^n},\]
with
\[ E_{\rm norm} = \!\!\!\sum\limits_{\{{\rm cell}|E_{\rm cell}>0\}}{\!\!\!E_{\rm cell}}. \]
Note that only cells with positive energy are used in this definition. Common variables to calculate first and second moments of are \(\phi\), \(\eta\), and radial and longitudinal distances from the shower axis and the shower center, respectively.
- Since
- 23-March-2021: second moment of cell time distribution is calculated
- Author
- Sven Menke menke.nosp@m.@mpp.nosp@m.mu.mp.nosp@m.g.de
- Date
- 28-February-2005 This is a CaloClusterCollectionProcessor which can be plugged into a CaloClusterMaker for calculating moments for each CaloCluster. Typically a cluster moment of a certain degree \(n\) over a variable \(x\) defined for each CaloCell member of a CaloCluster is defined as:
\[ \langle x^n\rangle = \frac{1}{E_{\rm norm}} \times \!\!\!\sum\limits_{\{{\rm cell}|E_{\rm cell}>0\}}{\!\!\!E_{\rm cell}\, x^n},\]
with
\[ E_{\rm norm} = \!\!\!\sum\limits_{\{{\rm cell}|E_{\rm cell}>0\}}{\!\!\!E_{\rm cell}}. \]
Note that only cells with positive energy are used in this definition. Common variables to calculate first and second moments of are \(\phi\), \(\eta\), and radial and longitudinal distances from the shower axis and the shower center, respectively.
Definition at line 49 of file CaloClusterMomentsMaker.h.
◆ StoreGateSvc_t
◆ CaloClusterMomentsMaker()
CaloClusterMomentsMaker::CaloClusterMomentsMaker |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ DeclareInterfaceID()
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute() [1/4]
virtual StatusCode CaloClusterCollectionProcessor::execute |
Execute on an entire collection of clusters.
- Parameters
-
collection | The container of clusters. param ctx The event context. |
◆ execute() [2/4]
Execute on an entire collection of clusters.
- Parameters
-
collection | The container of clusters. param ctx The event context. |
Implements CaloClusterCollectionProcessor.
Definition at line 340 of file CaloClusterMomentsMaker.cxx.
349 typedef std::pair<clusterIdx_t, clusterIdx_t> clusterPair_t;
350 std::vector<clusterPair_t> clusterIdx;
371 if (theClusColl->size() >= noCluster) {
372 msg(MSG::ERROR) <<
"Too many clusters" <<
endmsg;
373 return StatusCode::FAILURE;
378 clusterPair_t(noCluster, noCluster));
385 for(; cellIter != cellIterEnd; cellIter++ ){
391 if ( clusterIdx[(
unsigned int)myHashId].
first != noCluster) {
395 clusterIdx[(
unsigned int)myHashId].
first = iClus;
398 clusterIdx[(
unsigned int)myHashId].
first = iClus;
409 std::vector<CaloClusterMomentsMaker_detail::cellinfo> cellinfo;
414 std::vector<IdentifierHash> theNeighbors;
419 for( ;clusIter!=clusIterEnd;++clusIter,++iClus) {
422 double w(0),xc(0),yc(0),zc(0),
mx(0),
my(0),
mz(0),
mass(0);
423 double eBad(0),ebad_dac(0),ePos(0),eBadLArQ(0),sumSig2(0),maxAbsSig(0);
424 double eLAr2(0),eLAr2Q(0);
425 double eTile2(0),eTile2Q(0);
427 int nbad(0),nbad_dac(0),nBadLArHV(0);
428 unsigned int i,nSigSampl(0);
429 unsigned int theNumOfCells = theCluster->
size();
433 int iCellScndMax(-1);
436 if (cellinfo.capacity() == 0)
437 cellinfo.reserve (theNumOfCells*2);
443 std::fill (myMoments.begin(), myMoments.end(), 0);
444 std::fill (myNorms.begin(), myNorms.end(), 0);
453 for(; cellIter != cellIterEnd; cellIter++ ){
456 const CaloCell* pCell = (*cellIter);
459 double ene = pCell->
e();
471 if ( myCDDE && ! (myCDDE->
is_tile())
473 && !((pCell->
provenance() & 0x0800) == 0x0800)) {
480 if ( myCDDE && myCDDE->
is_tile() ) {
485 if ( ((tq1&0xFF) != 0xFF) && ((tq2&0xFF) != 0xFF) ) {
499 noise->getEffectiveSigma(pCell->
ID(),pCell->
gain(),pCell->
energy()) : \
507 if ( ( std::abs(Sig) > std::abs(maxAbsSig) ) ||
508 ( std::abs(Sig) == std::abs(maxAbsSig) && thisSampl > nSigSampl ) ||
509 ( std::abs(Sig) == std::abs(maxAbsSig) && thisSampl == nSigSampl && Sig > maxAbsSig ) ) {
511 nSigSampl = thisSampl;
516 if ( std::abs(Sig) > std::abs(maxAbsSig) ) {
527 if ( clusterIdx[myHashId].
first == iClus ) {
528 theNeighbors.clear();
530 for (
const auto& nhash: theNeighbors) {
531 clusterPair_t&
idx = clusterIdx[nhash];
534 if (
idx.second == iClus )
continue;
537 if (
idx.first == noCluster ) {
539 }
else if (
idx.first != iClus ) {
547 if ( myCDDE !=
nullptr ) {
550 size_t idx((
size_t)sam);
551 if (
idx >= nCellsSamp.size() ) { nCellsSamp.resize(
idx+1, { 0, 0 } ); }
552 std::get<0>(nCellsSamp[
idx])++;
556 if ( ene > 0. &&
weight > 0) {
563 .eta = myCDDE->
eta(),
564 .phi = myCDDE->
phi(),
567 .volume = myCDDE->
volume(),
578 ci.
energy > cellinfo[iCellMax].energy ||
579 (ci.
energy == cellinfo[iCellMax].energy && ci.
identifier > cellinfo[iCellMax].identifier) ) {
580 iCellScndMax = iCellMax;
581 iCellMax = cellinfo.size()-1;
583 else if (iCellScndMax < 0 ||
584 ci.
energy > cellinfo[iCellScndMax].energy ||
585 (ci.
energy == cellinfo[iCellScndMax].energy && ci.
identifier > cellinfo[iCellScndMax].identifier) )
587 iCellScndMax = cellinfo.size()-1;
591 if (iCellMax < 0 || ci.energy > cellinfo[iCellMax].
energy ) {
592 iCellScndMax = iCellMax;
593 iCellMax = cellinfo.size()-1;
595 else if (iCellScndMax < 0 ||
596 ci.
energy > cellinfo[iCellScndMax].energy )
598 iCellScndMax = cellinfo.size()-1;
606 double dir = ci.
x*ci.
x+ci.
y*ci.
y+ci.
z*ci.
z;
622 eBadLArHV= hvFrac.first;
623 nBadLArHV=hvFrac.second;
657 if ( cellinfo.size() > 2 ) {
662 C(0,0) +=
e2*(ci.
x-xc)*(ci.
x-xc);
663 C(1,0) +=
e2*(ci.
x-xc)*(ci.
y-yc);
664 C(2,0) +=
e2*(ci.
x-xc)*(ci.
z-zc);
666 C(1,1) +=
e2*(ci.
y-yc)*(ci.
y-yc);
667 C(2,1) +=
e2*(ci.
y-yc)*(ci.
z-zc);
669 C(2,2) +=
e2*(ci.
z-zc)*(ci.
z-zc);
674 Eigen::SelfAdjointEigenSolver<Eigen::Matrix3d> eigensolver(
C);
675 if (eigensolver.info() != Eigen::Success) {
676 msg(MSG::WARNING) <<
"Failed to compute Eigenvalues -> Can't determine shower axis" <<
endmsg;
682 const Eigen::Vector3d&
S=eigensolver.eigenvalues();
683 const Eigen::Matrix3d& U=eigensolver.eigenvectors();
685 const double epsilon = 1.E-6;
687 if ( std::abs(
S[0]) >= epsilon && std::abs(
S[1]) >= epsilon && std::abs(
S[2]) >= epsilon ) {
696 double tmpAngle=
Amg::angle(tmpAxis,showerAxis);
698 if ( tmpAngle > 90*
deg ) {
699 tmpAngle = 180*
deg - tmpAngle;
703 if ( iEigen == -1 || tmpAngle <
angle ) {
714 deltaTheta = showerAxis.theta() - prAxis.theta();
723 << prAxis[
Amg::y] <<
", " << prAxis[
Amg::z] <<
") deviates more than "
725 <<
" deg from IP-to-ClusterCenter-axis (" << showerAxis[
Amg::x] <<
", "
726 << showerAxis[
Amg::y] <<
", " << showerAxis[
Amg::z] <<
")");
729 ATH_MSG_DEBUG(
"Eigenvalues close to 0, do not use principal axis");
735 << showerAxis[
Amg::y] <<
", " << showerAxis[
Amg::z] <<
")");
742 for (
auto& ci : cellinfo) {
745 ci.
r = ((currentCell-showerCenter).cross(showerAxis)).
mag();
747 ci.
lambda = (currentCell-showerCenter).
dot(showerAxis);
753 double commonNorm = 0;
754 double phi0 = cellinfo.size() > 0 ? cellinfo[0].phi : 0;
756 for(
unsigned i=0;
i<cellinfo.size();
i++) {
776 myMoments[iMoment] += ci.
energy*ci.
r*ci.
r;
782 if ( (
int)
i != iCellMax && (
int)
i != iCellScndMax ) {
783 myMoments[iMoment] += ci.
energy*ci.
r*ci.
r;
784 myNorms[iMoment] += ci.
energy*ci.
r*ci.
r;
790 myNorms[iMoment] += rm*rm*ci.
energy;
794 if ( (
int)
i != iCellMax && (
int)
i != iCellScndMax ) {
802 myNorms[iMoment] += lm*lm*ci.
energy;
808 myNorms[iMoment] += ci.
energy;
811 case SECOND_ENG_DENS:
814 myNorms[iMoment] += ci.
energy;
825 myMoments[iMoment] += ci.
energy;
828 if ( (
int)
i == iCellMax )
829 myMoments[iMoment] = ci.
energy;
836 myNorms[iMoment] += ci.
energy;
859 myNorms[iMoment] = commonNorm;
865 myMoments[iMoment] = deltaTheta;
868 myMoments[iMoment] =
angle;
871 myMoments[iMoment] = showerCenter.x();
874 myMoments[iMoment] = showerCenter.y();
877 myMoments[iMoment] = showerCenter.z();
880 myMoments[iMoment] = showerCenter.mag();
890 double r_calo(0),z_calo(0),lambda_c(0);
915 if ( z_calo != 0 && showerAxis.z() != 0 ) {
916 lambda_c = std::abs((z_calo-showerCenter.z())/showerAxis.z());
920 double r_s2 = showerAxis.x()*showerAxis.x()
921 +showerAxis.y()*showerAxis.y();
922 double r_cs = showerAxis.x()*showerCenter.x()
923 +showerAxis.y()*showerCenter.y();
924 double r_cr = showerCenter.x()*showerCenter.x()
925 +showerCenter.y()*showerCenter.y()-r_calo*r_calo;
927 double det = r_cs*r_cs/(r_s2*r_s2) - r_cr/r_s2;
930 double l1(-r_cs/r_s2);
934 if ( std::abs(
l1) < std::abs(
l2) )
935 lambda_c = std::abs(
l1);
937 lambda_c = std::abs(
l2);
941 myMoments[iMoment] = lambda_c;
946 myMoments[iMoment] += maxSampE[
i];
947 myNorms[iMoment] = commonNorm;
956 const double eSample = theCluster->
eSample(
s);
958 int nAll = nbEmpty[
i]+nbNonEmpty[
i];
960 myMoments[iMoment] += (eSample*nbEmpty[
i])/nAll;
961 myNorms[iMoment] += eSample;
969 myMoments[iMoment] = eBad;
972 myMoments[iMoment] = nbad;
974 case N_BAD_CELLS_CORR:
975 myMoments[iMoment] = nbad_dac;
977 case BAD_CELLS_CORR_E:
978 myMoments[iMoment] = ebad_dac;
981 myMoments[iMoment] = eBadLArQ/(theCluster->
e()!=0.?theCluster->
e():1.);
984 myMoments[iMoment] = ePos;
987 myMoments[iMoment] = (sumSig2>0?theCluster->
e()/sqrt(sumSig2):0.);
989 case CELL_SIGNIFICANCE:
990 myMoments[iMoment] = maxAbsSig;
992 case CELL_SIG_SAMPLING:
993 myMoments[iMoment] = nSigSampl;
996 myMoments[iMoment] = eLAr2Q/(eLAr2>0?eLAr2:1);
999 myMoments[iMoment] = eTile2Q/(eTile2>0?eTile2:1);
1001 case ENG_BAD_HV_CELLS:
1002 myMoments[iMoment] = eBadLArHV;
1004 case N_BAD_HV_CELLS:
1005 myMoments[iMoment] = nBadLArHV;
1008 myMoments[iMoment] = sqrt(myMoments[iMoment]);
1011 myMoments[iMoment] =
mass;
1022 for (
size_t iMoment = 0; iMoment !=
size; ++iMoment) {
1024 if ( myNorms[iMoment] != 0 )
1025 myMoments[iMoment] /= myNorms[iMoment];
1026 if ( moment == FIRST_PHI )
1035 for (
size_t isam(0); isam < nCellsSamp.size(); ++isam ) {
1037 if ( isam == (
size_t)
CaloCell_ID::EME2 && std::get<1>(nCellsSamp.at(isam)) > 0 ) {
1045 return StatusCode::SUCCESS;
◆ execute() [3/4]
|
inlinefinalvirtualinherited |
Execute on an entire collection of clusters.
- Parameters
-
collection | The container of clusters. (deprecated) |
Definition at line 50 of file CaloClusterCollectionProcessor.h.
52 return execute (Gaudi::Hive::currentContext(), collection);
◆ execute() [4/4]
virtual StatusCode CaloClusterCollectionProcessor::execute |
|
inlinefinal |
Execute on an entire collection of clusters.
- Parameters
-
collection | The container of clusters. (deprecated) |
Definition at line 50 of file CaloClusterCollectionProcessor.h.
52 return execute (Gaudi::Hive::currentContext(), collection);
◆ extraDeps_update_handler()
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::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode CaloClusterMomentsMaker::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 183 of file CaloClusterMomentsMaker.cxx.
188 std::string::size_type nstr(0);
int nmom(0);
192 auto fmap(momentNameToEnumMap.find(
mom));
193 if (fmap != momentNameToEnumMap.end()) {
197 if (fmap->second == SECOND_TIME) {
208 }
else if (fmap->second == NCELL_SAMPLING) {
222 <<
" not calculated in this tool - misconfiguration?");
231 switch (fmap->second) {
233 case CELL_SIGNIFICANCE:
239 case ENG_BAD_HV_CELLS:
249 std::string::size_type lstr(nstr);
251 for (
const auto& fmom : momentNameToEnumMap) {
252 lstr =
std::max(lstr, fmom.first.length());
255 for (
const auto& fmom : momentNameToEnumMap) {
256 sprintf(
buffer,
"moment name: %-*.*s - enumerator: %i", (
int)lstr,
257 (
int)lstr, fmom.first.c_str(), (
int)fmom.second);
260 auto fmom(momentNameToEnumMap.find(
"SECOND_TIME"));
261 sprintf(
buffer,
"moment name: %-*.*s - enumerator: %i", (
int)nstr,
262 (
int)nstr, fmom->first.c_str(), (
int)fmom->second);
264 fmom = momentNameToEnumMap.find(
"NCELL_SAMPLING");
265 sprintf(
buffer,
"moment name: %-*.*s - enumerator: %i", (
int)nstr,
266 (
int)nstr, fmom->first.c_str(), (
int)fmom->second);
268 return StatusCode::FAILURE;
279 ATH_MSG_INFO(
"Construct and save " << nmom <<
" cluster moments: ");
282 sprintf(
buffer,
"moment name: %-*.*s - enumerator: %i", (
int)nstr,
283 (
int)nstr, momentEnumToNameMap.at(menum).c_str(), (
int)menum);
287 auto fmom(momentNameToEnumMap.find(
"SECOND_TIME"));
288 sprintf(
buffer,
"moment name: %-*.*s - enumerator: %i (save only)",
289 (
int)nstr, (
int)nstr, fmom->first.c_str(), (
int)fmom->second);
293 auto fmom(momentNameToEnumMap.find(
"NCELL_SAMPLING"));
294 sprintf(
buffer,
"moment name: %-*.*s - enumerator: %i", (
int)nstr,
295 (
int)nstr, fmom->first.c_str(), (
int)fmom->second);
310 return StatusCode::SUCCESS;
◆ inputHandles()
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() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_absOpt
bool CaloClusterMomentsMaker::m_absOpt |
|
private |
◆ m_calculateIsolation
bool CaloClusterMomentsMaker::m_calculateIsolation |
|
private |
◆ m_calculateLArHVFraction
bool CaloClusterMomentsMaker::m_calculateLArHVFraction |
|
private |
◆ m_calculateSignificance
bool CaloClusterMomentsMaker::m_calculateSignificance |
|
private |
◆ m_calo_id
◆ m_caloDepthTool
ToolHandle<CaloDepthTool> CaloClusterMomentsMaker::m_caloDepthTool |
|
private |
◆ m_caloMgrKey
◆ m_detStore
◆ m_etaInnerWheel
double CaloClusterMomentsMaker::m_etaInnerWheel = { 2.52 } |
|
private |
◆ m_evtStore
◆ m_larHVFraction
◆ m_maxAxisAngle
double CaloClusterMomentsMaker::m_maxAxisAngle |
|
private |
◆ m_minBadLArQuality
double CaloClusterMomentsMaker::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 109 of file CaloClusterMomentsMaker.h.
◆ m_minLLongitudinal
double CaloClusterMomentsMaker::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 101 of file CaloClusterMomentsMaker.h.
◆ m_minRLateral
double CaloClusterMomentsMaker::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 91 of file CaloClusterMomentsMaker.h.
◆ m_momentsNames
std::vector<std::string> CaloClusterMomentsMaker::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 69 of file CaloClusterMomentsMaker.h.
◆ m_momentsNamesAOD
std::string CaloClusterMomentsMaker::m_momentsNamesAOD |
|
private |
◆ m_nCellsPerSampling
bool CaloClusterMomentsMaker::m_nCellsPerSampling = { false } |
|
private |
◆ m_noiseCDOKey
◆ m_secondTime
bool CaloClusterMomentsMaker::m_secondTime = { false } |
|
private |
◆ m_twoGaussianNoise
bool CaloClusterMomentsMaker::m_twoGaussianNoise |
|
private |
◆ m_useGPUCriteria
Gaudi::Property<bool> CaloClusterMomentsMaker::m_useGPUCriteria {this, "UseGPUCriteria", false, "Adopt a set of criteria that is consistent with the GPU implementation."} |
|
private |
◆ m_validMoments
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 77 of file CaloClusterMomentsMaker.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
bool CENTER_LAMBDA(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
const_cell_iterator cell_begin() const
Iterator of the underlying CaloClusterCellLink (const version)
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
void setMag(Amg::Vector3D &v, double mag)
scales the vector length without changing the angles
double getMomentValue(MomentType type) const
Retrieve individual moment - no check for existance! Returns -999 on error.
CaloSampling::CaloSample CaloSample
double angle(const Amg::Vector3D &v1, const Amg::Vector3D &v2)
calculates the opening angle between two vectors
bool EM_PROBABILITY(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
ToolHandle< CaloDepthTool > m_caloDepthTool
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloClusterContainer *theClusColl) const override final
Execute on an entire collection of clusters.
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
flt_t secondTime() const
Access second moment of cell timing distribution.
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloClusterContainer *collection) const =0
Execute on an entire collection of clusters.
double proxim(double b, double a)
weight_t weight() const
Accessor for weight associated to this cell.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
void insertMoment(MomentType type, double value)
virtual double e() const override final
get energy (data member) (synonym to method energy()
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
bool m_calculateIsolation
Set to true if cluster isolation is to be calculated.
int calo_sample(const Identifier id) const
returns an int taken from Sampling enum and describing the subCalo to which the Id belongs.
uint16_t provenance() const
get provenance (data member)
double m_minLLongitudinal
the minimal in the definition of the Longitudinal moment
double m_minBadLArQuality
the minimal cell quality in the LAr for declaring a cell bad
SG::ReadCondHandleKey< CaloNoise > m_noiseCDOKey
Key of the CaloNoise Conditions data object.
double m_etaInnerWheel
Transition from outer to inner wheel in EME2.
Gaudi::Property< bool > m_useGPUCriteria
const CaloCell_ID * m_calo_id
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
double energy() const
get energy (data member)
std::vector< std::string > m_momentsNames
vector holding the input list of names of moments to calculate.
MomentType
Enums to identify different moments.
bool m_calculateSignificance
Set to true if significance moments are need.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
bool m_absOpt
if set to true use abs E value of cells to calculate cluster moments
Description of a calorimeter cluster.
bool m_calculateLArHVFraction
Set to true to calculate E and N of cells affected by LAr HV corrections.
size_type calo_cell_hash_max() const
cell 'global' hash table max size
(Non-const) Iterator class for DataVector/DataList.
std::vector< uint16_t > ncells_store_t
Store type for number-of-cells-in-sampling counter.
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
std::vector< xAOD::CaloCluster::MomentType > m_validMoments
set of moments which will be calculated.
virtual bool badcell() const
check is cell is dead
size_t size() const
size method (forwarded from CaloClusterCellLink obj)
#define CHECK(...)
Evaluate an expression and check for errors.
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
double m_minRLateral
the minimal in the definition of the Lateral moment
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
bool SECOND_LAMBDA(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
static double fix(double phi)
def dot(G, fn, nodesToHighlight=[])
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
uint16_t quality() const
get quality (data member)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
void prefetchNext(Iter iter, Iter endIter)
Prefetch next object in sequence.
bool is_tile() const
cell belongs to Tile
bool m_nCellsPerSampling
store number of cells per sampling layer as moment
float volume() const
cell volume
ToolHandle< ILArHVFraction > m_larHVFraction
void setNumberCellsInSampling(CaloSampling::CaloSample samp, int ncells, bool isInnerWheel=false)
Set the number of cells in a sampling layer.
bool SECOND_R(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
CaloGain::CaloGain gain() const
get gain (data member )
int get_neighbours(const IdentifierHash caloHash, const LArNeighbours::neighbourOption &option, std::vector< IdentifierHash > &neighbourList) const
access to hashes for neighbours return == 0 for neighbours found
StatusCode initialize(bool used=true)
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
Eigen::Matrix< double, 3, 1 > Vector3D
bool m_secondTime
Retrieve second moment of cell times and store as moment.
bool CENTER_MAG(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
float eSample(const CaloSample sampling) const
std::string m_momentsNamesAOD
Not used anymore (with xAOD), but required when configured from COOL.
This class provides the client interface for accessing the detector description information common to...
Data object for each calorimeter readout cell.
CaloCell_ID::CaloSample getSampling() const
cell sampling
double e2(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 2nd sampling
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
#define ATH_MSG_WARNING(x)
const_cell_iterator cell_end() const
bool FIRST_ENG_DENS(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
float eta() const
cell eta
float phi() const
cell phi
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
bool hasSampling(const CaloSample s) const
Checks if certain smapling contributes to cluster.
double m_maxAxisAngle
the maximal allowed deviation from the IP-to-ClusterCenter-axis.
constexpr int pow(int base, int exp) noexcept
CaloCell_ID::CaloSample sample
void nextDDE(Iter iter, Iter endIter)
Prefetch next CaloDDE.
bool m_twoGaussianNoise
if set to true use 2-gaussian noise description for TileCal
Scalar mag() const
mag method
virtual double e() const
The total energy of the particle.
static double diff(double phi1, double phi2)
simple phi1 - phi2 calculation, but result is fixed to respect range.