ATLAS Offline Software
CaloCluster_v1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // System include(s):
6 #include <cmath>
7 #include <iostream>
8 #include <array>
9 #include <numeric>
10 
11 // EDM include(s):
14 #include "AthLinks/ElementLink.h"
15 
16 // Local include(s):
20 
21 namespace xAOD {
22 
24  : IParticle(),
25  m_samplingPattern(0),
26  m_cellLinks(nullptr)
27  {
29  }
30 
31 
33  : IParticle(other),
34  m_samplingPattern(other.samplingPattern()),
35  m_cellLinks(nullptr),
36  m_recoStatus(other.m_recoStatus),
37  m_secondTime(other.m_secondTime) {
38  setSignalState(other.signalState());
39  this->makePrivateStore(other);
40 #if !(defined(SIMULATIONBASE) || defined(XAOD_ANALYSIS))
41  const CaloClusterCellLink* links=other.getCellLinks();
42  if (links) {
43  this->addCellLink(std::make_unique<CaloClusterCellLink>(*links));
44  }
45  static const Accessor<ElementLink<CaloClusterCellLinkContainer> > accCellLinks("CellLink");
46  if (accCellLinks.isAvailable(*this)) { //In case an element link was copied by makePrivateStore, invalidate it
47  accCellLinks(*this).reset();
48  } //end if have element link to CaloClusterCellLink
49 #endif // not defined(SIMULATIONBASE) || defined(XAOD_ANALYSIS)
50  }
51 
52 
54  if (this == &other) {
55  return *this;
56  }
57 
58  SG::AuxElement::operator=( other ); //Call assignment operator of base-class
59  m_recoStatus=other.m_recoStatus;
60  setSignalState(other.signalState());
61  m_samplingPattern=other.m_samplingPattern;
62  m_secondTime = other.m_secondTime;
63 
64 #if !(defined(SIMULATIONBASE) || defined(XAOD_ANALYSIS))
65  const CaloClusterCellLink* links=other.getCellLinks();
66  if (links) {
67  this->addCellLink(std::make_unique<CaloClusterCellLink>(*links));
68  }
69  static const Accessor<ElementLink<CaloClusterCellLinkContainer> > accCellLinks("CellLink");
70  if (accCellLinks.isAvailable(*this)) { //In case an element link was copied by SG::AuxElement::operator=, invalidate it
71  accCellLinks(*this).reset();
72  } //end if have element link to CaloClusterCellLink
73 #endif // not defined(SIMULATIONBASE) || defined(XAOD_ANALYSIS)
74  return *this;
75  }
76 
77 
79  }
80 
81  void CaloCluster_v1::setSamplingPattern( const unsigned sp, const bool clearSamplingVars) {
82 
83  // Check sampling variables ....
84  static const Accessor< std::vector< float > > etaAcc( "eta_sampl" );
85  static const Accessor< std::vector< float > > phiAcc( "phi_sampl" );
86  static const Accessor< std::vector< float > > eAcc( "e_sampl" );
87  static const Accessor< std::vector< float > > emaxAcc( "emax_sampl" );
88  static const Accessor< std::vector< float > > etamaxAcc( "etamax_sampl" );
89  static const Accessor< std::vector< float > > phimaxAcc( "phimax_sampl" );
90  static const Accessor< std::vector< float > > etasizeAcc( "etasize_sampl" );
91  static const Accessor< std::vector< float > > phisizeAcc( "phisize_sampl" );
92 
93  static const std::array< const Accessor< std::vector< float > >*, 8 > allAcc = {
94  { &etaAcc, &phiAcc, &eAcc, &emaxAcc, &phimaxAcc, &etamaxAcc, &etasizeAcc,
95  &phisizeAcc } };
96  for( const auto *a : allAcc ) {
97  if( a->isAvailable( *this ) ) {
98  if (!(*a)(*this).empty()) {
99  if (clearSamplingVars){
100  (*a)(*this).clear();
101  }
102  else{
103  std::cerr << "CaloCluster_v1 ERROR Attempt update sampling "
104  << "pattern while sampling variables are already set!"
105  << std::endl;
106  }
107  //std::abort();
108  }
109  }
110  }
111 
113  }
114 
115 
121  double CaloCluster_v1::pt(const State s) const {
122  // Calculate the momentum of the object:
123  double theE = 0;
124  double theM = 0;
125  switch (s) {
126  case CALIBRATED:
127  theE=calE();
128  theM=calM();
129  break;
130  case UNCALIBRATED:
131  theE=rawE();
132  theM=rawM();
133  break;
134  case ALTCALIBRATED:
135  theE=altE();
136  theM=altM();
137  break;
138  default:
139  break;
140  }
141 
142  double p = 0.0;
143  if( std::abs( theM ) < 0.00001 ) {
144  p = theE;
145  } else {
146  p = std::sqrt( theE * theE - theM * theM );
147  if( theE < 0 ) {
148  p = -p;
149  }
150  }
151 
152  // Calculate sinTh:
153  double aEta = std::abs( eta(s) );
154  if( aEta > 710.0 ) {
155  aEta = 710.0;
156  }
157  const double sinTh = 1.0 / std::cosh( aEta );
158 
159  // Calculate pT from these two:
160  return p * sinTh;
161  }
162 
167  double CaloCluster_v1::e(const State s) const
168  {
169  switch (s) {
170  case CALIBRATED:
171  return calE();
172  break;
173  case UNCALIBRATED:
174  return rawE();
175  break;
176  case ALTCALIBRATED:
177  return altE();
178  break;
179  default:
180  return 0;
181  }
182  }
183 
188  double CaloCluster_v1::eta(const State s) const
189  {
190  switch (s) {
191  case CALIBRATED:
192  return calEta();
193  break;
194  case UNCALIBRATED:
195  return rawEta();
196  break;
197  case ALTCALIBRATED:
198  return altEta();
199  break;
200  default:
201  return -999;
202  }
203  }
204 
205 
210  double CaloCluster_v1::phi(const State s) const
211  {
212  switch (s) {
213  case CALIBRATED:
214  return calPhi();
215  break;
216  case UNCALIBRATED:
217  return rawPhi();
218  break;
219  case ALTCALIBRATED:
220  return altPhi();
221  break;
222  default:
223  return -999;
224  }
225  }
230  double CaloCluster_v1::m(const State s) const {
231  switch (s) {
232  case CALIBRATED:
233  return calM();
234  break;
235  case UNCALIBRATED:
236  return rawM();
237  break;
238  case ALTCALIBRATED:
239  return altM();
240  break;
241  default:
242  return -999;
243  }
244  }
245 
246 
247  double CaloCluster_v1::pt() const {
248  return pt(m_signalState);
249  }
250 
251  double CaloCluster_v1::eta() const
252  {
253  return eta (m_signalState);
254  }
255 
256  double CaloCluster_v1::phi() const
257  {
258  return phi (m_signalState);
259  }
260 
261  double CaloCluster_v1::m() const {
262  return m(m_signalState);
263  }
264 
265  double CaloCluster_v1::e() const {
266  return e(m_signalState);
267  }
268 
269 
273 
274  void CaloCluster_v1::setBadChannelList(const CaloClusterBadChannelList& bcl) {
275  static const Accessor<xAOD::CaloClusterBadChannelList> accBCL("BadChannelList");
276  accBCL(*this)=bcl;
277  }
278 
280  static const Accessor<xAOD::CaloClusterBadChannelList> accBCL("BadChannelList");
281  return accBCL(*this);
282  }
283 
285  static const Accessor<CaloCluster_v1::flt_t> accRawE("rawE");
286  accRawE(*this)=value;
287  }
288 
290  static const Accessor<CaloCluster_v1::flt_t> accRawEta("rawEta");
291  accRawEta(*this)=value;
292  }
293 
295  static const Accessor<CaloCluster_v1::flt_t> accRawPhi("rawPhi");
296  accRawPhi(*this)=value;
297  }
298 
300  static const Accessor<CaloCluster_v1::flt_t> accRawM("rawM");
301  accRawM(*this)=value;
302  }
303 
304  //----------------------------------------------------------------
305 
307  static const Accessor<CaloCluster_v1::flt_t> accCalE("calE");
308  accCalE(*this)=value;
309  }
310 
312  static const Accessor<CaloCluster_v1::flt_t> accCalEta("calEta");
313  accCalEta(*this)=value;
314  }
315 
317  static const Accessor<CaloCluster_v1::flt_t> accCalPhi("calPhi");
318  accCalPhi(*this)=value;
319  }
320 
322  static const Accessor<CaloCluster_v1::flt_t> accCalM("calM");
323  accCalM(*this)=value;
324  }
325 
326  //----------------------------------------------------------------
327 
329  static const Accessor<CaloCluster_v1::flt_t> accAltE("altE");
330  accAltE(*this)=value;
331  }
332 
334  static const Accessor<CaloCluster_v1::flt_t> accAltEta("altEta");
335  accAltEta(*this)=value;
336  }
337 
339  static const Accessor<CaloCluster_v1::flt_t> accAltPhi("altPhi");
340  accAltPhi(*this)=value;
341  }
342 
344  static const Accessor<CaloCluster_v1::flt_t> accAltM("altM");
345  accAltM(*this)=value;
346  }
347 
352 
357 
362 
363 
364  CaloCluster_v1::ClusterSize CaloCluster_v1::clusterSize() const {
365  static const Accessor<unsigned> acc("clusterSize");
366  return (CaloCluster_v1::ClusterSize)acc(*this);
367  }
368 
370  static const Accessor<unsigned> acc("clusterSize");
371  acc(*this)=sc;
372  }
373 
374 
376  switch (m_signalState) {
377  case CALIBRATED:
378  return setCalE(theE);
379  break;
380  case UNCALIBRATED:
381  return setRawE(theE);
382  break;
383  case ALTCALIBRATED:
384  return setAltE(theE);
385  break;
386  default:
387  break;
388  }
389  }
390 
392  switch (m_signalState) {
393  case CALIBRATED:
394  return setCalEta(theEta);
395  break;
396  case UNCALIBRATED:
397  return setRawEta(theEta);
398  break;
399  case ALTCALIBRATED:
400  return setAltEta(theEta);
401  break;
402  default:
403  break;
404  }
405  }
406 
408  switch (m_signalState) {
409  case CALIBRATED:
410  return setCalPhi(thePhi);
411  break;
412  case UNCALIBRATED:
413  return setRawPhi(thePhi);
414  break;
415  case ALTCALIBRATED:
416  return setAltPhi(thePhi);
417  break;
418  default:
419  break;
420  }
421  }
422 
423 
425  switch (m_signalState) {
426  case CALIBRATED:
427  return setCalM(theM);
428  break;
429  case UNCALIBRATED:
430  return setRawM(theM);
431  break;
432  case ALTCALIBRATED:
433  return setAltM(theM);
434  break;
435  default:
436  break;
437  }
438  }
439 
442  return true;
443  }
444 
446  switch (s) {
447  case CALIBRATED:
448  return GenVecFourMom_t(pt(s),calEta(),calPhi(),calM());
449  case UNCALIBRATED:
450  return GenVecFourMom_t(pt(s),rawEta(),rawPhi(), rawM());
451  case ALTCALIBRATED:
452  return GenVecFourMom_t(pt(s),altEta(),altPhi(), altM());
453  default:
454  return GenVecFourMom_t();
455  }
456  }
458  return genvecP4(m_signalState);
459  }
460 
461  double CaloCluster_v1::rapidity() const {
462  return genvecP4().Rapidity();
463  }
464 
466  return p4(m_signalState);
467  }
468 
469 
472  switch(s) {
473  case CALIBRATED:
474  p4.SetPtEtaPhiM(pt(s),calEta(),calPhi(),calM());
475  break;
476  case UNCALIBRATED:
477  p4.SetPtEtaPhiM(pt(s),rawEta(),rawPhi(), rawM());
478  break;
479  case ALTCALIBRATED:
480  p4.SetPtEtaPhiM(pt(s),altEta(),altPhi(), altM());
481  break;
482  default:
483  break;
484  }
485  return p4;
486  }
487 
488 
490  return Type::CaloCluster;
491  }
492 
493 
494  float CaloCluster_v1::getSamplVarFromAcc(const Accessor< std::vector <float > >& acc , const CaloSample sampling, const float errorvalue) const {
495  const std::vector<float>& vec=acc(*this);
496  const unsigned idx=sampVarIdx(sampling);
497  if (idx<vec.size() ) {
498  return vec[idx];
499  }
500 
501  //std::cout <<Sampling " << sampling << ", Pattern=" << std::hex <<m_samplingPattern << std::dec << ", index=" << idx << " size=" << vec.size() << std::endl;
502  return errorvalue;
503  }
504 
505  bool CaloCluster_v1::setSamplVarFromAcc(const Accessor< std::vector <float > >& acc, const CaloSample sampling, const float value) {
506  const unsigned idx=sampVarIdx(sampling);
507  std::vector<float>& vec=acc(*this);
508  //std::cout << "Set sampling var. Sampling " << sampling << ", index=" << idx << " size=" << vec.size() << std::endl;
509  if (idx==CaloSampling::Unknown) {
510  std::cout << "ERROR: Sampling #" << sampling << " is not part of this cluster!" << std::endl;
511  return false;
512  }
513 
514  if (vec.size()<nSamples())
515  vec.resize(nSamples());
516  vec[idx]=value;
517  return true;
518  }
519 
520 
521  float CaloCluster_v1::eSample( CaloSample sampling ) const {
522  static const Accessor< std::vector <float > > eAcc("e_sampl");
523  return getSamplVarFromAcc(eAcc,sampling,0.0); //Return energy 0 in case of failure (eg. sampling not set)
524  }
525 
526  bool CaloCluster_v1::setEnergy(const CaloSample sampling, const float theEnergy) {
527  static const Accessor< std::vector <float > > eAcc("e_sampl");
528  return setSamplVarFromAcc(eAcc,sampling,theEnergy);
529  }
530 
531 
532  float CaloCluster_v1::etaSample(const CaloSample sampling) const {
533  static const Accessor< std::vector <float > > etaAcc("eta_sampl");
534  if (!etaAcc.isAvailable( *this )){
535  return -999;
536  }
537 
538  return getSamplVarFromAcc(etaAcc,sampling);
539  }
540 
541  bool CaloCluster_v1::setEta(const CaloSample sampling, const float eta) {
542  static const Accessor< std::vector <float > > etaAcc("eta_sampl");
543  return setSamplVarFromAcc(etaAcc,sampling,eta);
544  }
545 
546 
547  float CaloCluster_v1::phiSample(const CaloSample sampling) const {
548  static const Accessor< std::vector <float > > phiAcc("phi_sampl");
549  if (!phiAcc.isAvailable( *this )){
550  return -999;
551  }
552 
553  return getSamplVarFromAcc(phiAcc,sampling);
554  }
555 
556  bool CaloCluster_v1::setPhi(const CaloSample sampling, const float phi) {
557  static const Accessor< std::vector <float > > phiAcc("phi_sampl");
558  return setSamplVarFromAcc(phiAcc,sampling,phi);
559  }
560 
561 
562 
563  float CaloCluster_v1::energy_max(const CaloSample sampling) const {
564  static const Accessor< std::vector <float > > emaxAcc("emax_sampl");
565  if (!emaxAcc.isAvailable( *this )){
566  return 0.0;
567  }
568  return getSamplVarFromAcc(emaxAcc,sampling,0.0); //Return energy 0 in case of failure (eg. sampling not set)
569  }
570 
571  bool CaloCluster_v1::setEmax(const CaloSample sampling, const float eMax ) {
572  static const Accessor< std::vector <float > > emaxAcc("emax_sampl");
573  return setSamplVarFromAcc(emaxAcc,sampling,eMax);
574  }
575 
576  float CaloCluster_v1::etamax(const CaloSample sampling) const {
577  static const Accessor< std::vector <float > > etamaxAcc("etamax_sampl");
578  if (!etamaxAcc.isAvailable( *this )){
579  return -999;
580  }
581  return getSamplVarFromAcc(etamaxAcc,sampling);
582  }
583 
584  bool CaloCluster_v1::setEtamax(const CaloSample sampling, const float etaMax ) {
585  static const Accessor< std::vector <float > > etamaxAcc("etamax_sampl");
586  return setSamplVarFromAcc(etamaxAcc,sampling,etaMax);
587  }
588 
589  float CaloCluster_v1::phimax(const CaloSample sampling) const {
590  static const Accessor< std::vector <float > > phimaxAcc("phimax_sampl");
591  if (!phimaxAcc.isAvailable( *this )){
592  return -999;
593  }
594  return getSamplVarFromAcc(phimaxAcc,sampling);
595  }
596 
597  bool CaloCluster_v1::setPhimax(const CaloSample sampling, const float phiMax ) {
598  static const Accessor< std::vector <float > > phimaxAcc("phimax_sampl");
599  return setSamplVarFromAcc(phimaxAcc,sampling,phiMax);
600  }
601 
602 
603  float CaloCluster_v1::etasize(const CaloSample sampling) const {
604  static const Accessor< std::vector <float > > etasizeAcc("etasize_sampl");
605  if (!etasizeAcc.isAvailable( *this )){
606  return -999;
607  }
608  return getSamplVarFromAcc(etasizeAcc, sampling);
609  }
610 
611  bool CaloCluster_v1::setEtasize(const CaloSample sampling, const float etaSize ) {
612  static const Accessor< std::vector <float > > etasizeAcc("etasize_sampl");
613  return setSamplVarFromAcc(etasizeAcc,sampling,etaSize);
614  }
615 
616  float CaloCluster_v1::phisize(const CaloSample sampling) const {
617  static const Accessor< std::vector <float > > phisizeAcc("phisize_sampl");
618  if (!phisizeAcc.isAvailable( *this )){
619  return -999;
620  }
621  return getSamplVarFromAcc(phisizeAcc,sampling);
622  }
623 
624  bool CaloCluster_v1::setPhisize(const CaloSample sampling, const float phiSize ) {
625  static const Accessor< std::vector <float > > phisizeAcc("phisize_sampl");
626  return setSamplVarFromAcc(phisizeAcc,sampling,phiSize);
627  }
628 
629 
630  float CaloCluster_v1::energyBE(const unsigned sample) const {
631  if (sample>3) return -999;
634  double energy=0;
635  if (this->hasSampling(barrelSample)) {
636  energy+=eSample(barrelSample); //Check for errorcode? Should not happen...
637  }
638  if (this->hasSampling(endcapSample)) {
639  energy+=eSample(endcapSample);
640  }
641  return energy;
642  }
643 
644  float CaloCluster_v1::etaBE(const unsigned sample) const {
645  if (sample>3) {return -999;}
648  const bool haveBarrel=this->hasSampling(barrelSample);
649  const bool haveEndcap=this->hasSampling(endcapSample);
650  if (haveBarrel && haveEndcap) {
651  //cluster spans barren and endcap
652  float eBarrel=eSample(barrelSample); //Check for errorcode? Should not happen...
653  float eEndcap=eSample(endcapSample);
654 
655  float etaBarrel=etaSample(barrelSample);
656  float etaEndcap=etaSample(endcapSample);
657  float eSum=eBarrel + eEndcap;
658  if (eSum > 100 /*MeV*/) {
659  //E-weighted average ...
660  if ((eBarrel > 0 && eEndcap > 0) || (eBarrel < 0 && eEndcap < 0))
661  return (eBarrel * etaBarrel + eEndcap * etaEndcap) / eSum;
662  else if (eBarrel > 0)
663  return etaBarrel;
664  else
665  return etaEndcap;
666  }//else eSum==0 case, should never happen
667  return (0.5 * (etaBarrel + etaEndcap));
668  }
669  if (haveBarrel) {
670  return etaSample(barrelSample);
671  }
672  if (haveEndcap) {
673  return etaSample(endcapSample);
674  }
675 
676  //Should never reach this point ...
677  return -999;
678  }
679 
680  float CaloCluster_v1::phiBE(const unsigned sample) const {
681  if (sample>3) {return -999;}
684  const bool haveBarrel=this->hasSampling(barrelSample);
685  const bool haveEndcap=this->hasSampling(endcapSample);
686  if (haveBarrel && haveEndcap) {
687  //cluster spans barren and endcap
688  float eBarrel=eSample(barrelSample); //Check for errorcode? Should not happen...
689  float eEndcap=eSample(endcapSample);
690  float eSum=eBarrel+eEndcap;
691  float phiBarrel=phiSample(barrelSample);
692  float phiEndcap=phiSample(endcapSample);
693  if (eSum != 0.0) {
694  if ((eBarrel > 0 && eEndcap > 0) || (eBarrel < 0 && eEndcap < 0)) {
695  float phiSum = eSum * phiBarrel + eEndcap * CaloPhiRange::diff(phiEndcap, phiBarrel);
696  return CaloPhiRange::fix(phiSum / eSum);
697  } else if (eBarrel > 0)
698  return phiBarrel;
699  else
700  return phiEndcap;
701  }
702  // energy==0 case, should never happen
703  return CaloPhiRange::fix(0.5 * (phiBarrel + phiEndcap));
704  }
705  if (haveBarrel) {
706  return phiSample(barrelSample);
707  }
708  if (haveEndcap) {
709  return phiSample(endcapSample);
710  }
711 
712  //Should never reach this point ...
713  return -999;
714  }
715 
716 
718 
719  static const Accessor< std::vector< float > > etaAcc( "eta_sampl" );
720  static const Accessor< std::vector< float > > phiAcc( "phi_sampl" );
721  static const Accessor< std::vector< float > > eAcc( "e_sampl" );
722  static const Accessor< std::vector< float > > emaxAcc( "emax_sampl" );
723  static const Accessor< std::vector< float > > etamaxAcc( "etamax_sampl" );
724  static const Accessor< std::vector< float > > phimaxAcc( "phimax_sampl" );
725  static const Accessor< std::vector< float > > etasizeAcc( "etasize_sampl" );
726  static const Accessor< std::vector< float > > phisizeAcc( "phisize_sampl" );
727 
728  static const std::array< const Accessor< std::vector< float > >*, 8 > allAcc = {
729  { &etaAcc, &phiAcc, &eAcc, &emaxAcc, &phimaxAcc, &etamaxAcc,
730  &etasizeAcc, &phisizeAcc } };
731  for (const auto *a : allAcc) {
732  if (a->isAvailableWritable(*this)) {
733  (*a)(*this).clear();
734  }
735  }
736  }
737 
739 
740  // Get the moment accessor:
741  const Accessor< float >* acc = momentAccessorV1( type );
742  if (!acc){
743  return false;
744  }
745  // Check if the moment is available:
746  if( ! acc->isAvailable( *this ) ) {
747  return false;
748  }
749  // Retrieve the moment:
750  value = ( *acc )( *this );
751  return true;
752  }
753 
755  const Accessor<float>* acc = momentAccessorV1(type);
756  if ( acc != nullptr ) { (*acc)(*this) = value; } // new protection needed non-scalar moment type!
757  }
758 
761  // only implemented for one moment
762  if ( acc != nullptr ) { (*acc)(*this) = values; }
763  }
764 
767  // only known moments of this type
768  if ( acc == nullptr || !acc->isAvailable(*this) ) { return false; }
769  // retrieve data
770  values = (*acc)(*this);
771  return true;
772  }
773 
789  // Set the number of cells in a given sampling
790  void CaloCluster_v1::setNumberCellsInSampling(CaloSampling::CaloSample samp,int ncells,bool isInnerWheel) {
791  const Accessor<ncells_store_t>* acc = momentContainerAccessorV1(NCELL_SAMPLING); // should always be valid!
792  // cast to cell counter type and limit value range
793  ncells_t nc(adjustToRange<int,ncells_t>(ncells));
794  // check index and extend store if needed
795  size_t idx((size_t)samp);
796  if ( idx >= (*acc)(*this).size() ) { (*acc)(*this).resize(idx+1,0); }
797  // set counts
798  (*acc)(*this)[idx] = isInnerWheel ? setUpperCount<ncells_t>((*acc)(*this)[idx],nc) : setLowerCount<ncells_t>((*acc)(*this)[idx],nc);
799  }
800 
801  // Retrieve the number of cells in a given sampling
804  //
805  if ( acc != nullptr && acc->isAvailable(*this) ) {
806  size_t idx((size_t)samp);
807  return ( idx < (*acc)(*this).size() ) // valid sampling
808  ? isInnerWheel // check if inner wheel cell count is requested
809  ? extractUpperCount<int>((*acc)(*this)[idx])
810  : extractLowerCount<int>((*acc)(*this)[idx])
811  : 0;
812  } else {
813  return 0;
814  }
815  }
816 
817  // Get number of all cells
819  std::vector<int> ncells;
820  return getNumberCellsInSampling<std::vector<int> >(ncells) ? std::accumulate(ncells.begin(),ncells.end(),0) : 0;
821  }
822 
823  unsigned int CaloCluster_v1::getClusterEtaSize() const{
824  const unsigned clustersize=clusterSize();
825  unsigned int size = 0;
826  if(clustersize==SW_55ele ||
827  clustersize==SW_55gam ||
828  clustersize==SW_55Econv){
829  size = 5;
830  }else if(clustersize==SW_35ele ||
831  clustersize==SW_37ele ||
832  clustersize==SW_35gam ||
833  clustersize==SW_37gam ||
834  clustersize==SW_35Econv ||
835  clustersize==SW_37Econv){
836  size = 3;
837  }else if(clustersize==SW_7_11){
838  size = 7;
839  }
840 
841  return size;
842 
843  }
844 
845  unsigned int CaloCluster_v1::getClusterPhiSize() const{
846  const ClusterSize clustersize=clusterSize();
847  unsigned int size = 0;
848  if(clustersize==SW_55ele ||
849  clustersize==SW_55gam ||
850  clustersize==SW_55Econv ||
851  clustersize==SW_35ele ||
852  clustersize==SW_35gam ||
853  clustersize==SW_35Econv){
854  size = 5;
855  }else if(
856  clustersize==SW_37ele ||
857  clustersize==SW_37gam ||
858  clustersize==SW_37Econv){
859  size = 7;
860  }else if(clustersize==SW_7_11){
861  size = 11;
862  }
863  return size;
864  }
865 
866 
867 
868 
869 
870 
871 #if !(defined(SIMULATIONBASE) || defined(XAOD_ANALYSIS))
873  IProxyDict* sg /*= nullptr*/)
874  {
875  if (!m_cellLinks || !cccl){
876  return false;
877  }
878  cccl->push_back(m_cellLinks.release());//The links are now owned by the container
879  const size_t idx=cccl->size()-1; //Use index for speed
880  static const Accessor<ElementLink<CaloClusterCellLinkContainer> > accCellLinks("CellLink");
881  const CaloClusterCellLinkContainer& ref=*cccl;
883  accCellLinks(*this)=el;
884  return true;
885  }
886  bool
888  const EventContext& ctx)
889  {
890  if (!m_cellLinks || !cccl) {
891  return false;
892  }
893  // The links are now owned by the container
894  cccl->push_back(m_cellLinks.release());
895  const size_t idx = cccl->size() - 1; // Use index for speed
897  accCellLinks("CellLink");
898  const CaloClusterCellLinkContainer& ref = *cccl;
900  accCellLinks(*this) = el;
901  return true;
902  }
903 
904  const CaloClusterCellLink*
906  {
907  if (m_cellLinks) {
908  return m_cellLinks.get();
909  }
910  static const Accessor<ElementLink<CaloClusterCellLinkContainer> > accCellLinks("CellLink");
911  if (!accCellLinks.isAvailable(*this)){
912  return nullptr;
913  }
914 
915  const ElementLink<CaloClusterCellLinkContainer>& el=accCellLinks(*this);
916  if (el.isValid()){
917  return *el;
918  }
919 
920  return nullptr;
921  }
922 
923  bool CaloCluster_v1::removeCell(const CaloCell* ptrToDelete) {
924  //1. Get a ptr to the CaloClusterCellLink
926  if (!cccl){
927  return false; // No link found (expected for TopoClusters in xAOD files)
928  }
929  // 2. Remove cell
930  return cccl->removeCell(ptrToDelete);
931  }
932 
933 
934 #endif // not defined(SIMULATIONBASE) || defined(XAOD_ANALYSIS)
935 
940 
941 #if !(defined(SIMULATIONBASE) || defined(XAOD_ANALYSIS))
943  accCellLinks( "CellLink" );
944  if( accCellLinks.isAvailableWritable( *this ) ) {
945  accCellLinks( *this ).toPersistent();
946  }
947 #endif // not defined(SIMULATIONBASE) || defined(XAOD_ANALYSIS)
948 
949  static const Accessor< ElementLink< xAOD::CaloClusterContainer_v1 > > accSisterCluster("SisterCluster");
950  if( accSisterCluster.isAvailableWritable( *this ) ) {
951  accSisterCluster( *this ).toPersistent();
952  }
953 
954  // Return gracefully:
955  }
956 
958  static const Accessor< ElementLink< xAOD::CaloClusterContainer_v1 > > accSisterCluster("SisterCluster");
959  if (!accSisterCluster.isAvailable(*this)){
960  return nullptr;
961  }
962  const ElementLink<CaloClusterContainer_v1>& el = accSisterCluster(*this);
963  if (el.isValid()) {
964  return *el;
965  }
966  return nullptr;
967  }
968 
970  static const Accessor< ElementLink< xAOD::CaloClusterContainer_v1 > > accSisterCluster("SisterCluster");
972  if (!accSisterCluster.isAvailable(*this)){
973  return empty;
974  }
975  return accSisterCluster(*this);
976  }
977 
979  {
980  static const Accessor< ElementLink<xAOD::CaloClusterContainer_v1 > > accSisterCluster("SisterCluster");
981  accSisterCluster(*this)=sister;
982  return true;
983  }
984 
986 
988  if ( m_secondTime < 0. ) {
989  double stime(0.); return this->retrieveMoment(SECOND_TIME,stime) ? stime : 0.;
990  } else {
991  return m_secondTime;
992  }
993  }
994 
995 #if !(defined(SIMULATIONBASE) || defined(XAOD_ANALYSIS))
996 size_t CaloCluster_v1::size() const {
998  if (!cl) return 0;
999  return cl->size();
1000  }
1001 #endif // not defined(SIMULATIONBASE) || defined(XAOD_ANALYSIS)
1002 
1003 } // namespace xAOD
xAOD::CaloCluster_v1::phimax
float phimax(const CaloSample sampling) const
Retrieve of cell with maximum energy in given sampling.
Definition: CaloCluster_v1.cxx:589
xAOD::CaloCluster_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition: CaloCluster_v1.cxx:256
xAOD::CaloCluster_v1::nSamples
unsigned nSamples() const
Definition: CaloCluster_v1.h:884
xAOD::CaloCluster_v1::rawE
flt_t rawE() const
xAOD::AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1, float, IP2D_pb, setIP2D_pb) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1
GetLCDefs::Unknown
@ Unknown
Definition: GetLCDefs.h:21
xAOD::CaloCluster_v1::m_secondTime
double m_secondTime
Second cell time moment (transient only)
Definition: CaloCluster_v1.h:689
xAOD::CaloCluster_v1::setPhisize
bool setPhisize(const CaloSample sampling, const float phiSize)
Set the cluster size in for a given sampling.
Definition: CaloCluster_v1.cxx:624
xAOD::CaloCluster_v1::ClusterSize
ClusterSize
Enumeration to identify different cluster sizes.
Definition: CaloCluster_v1.h:86
xAOD::momentAccessorV1
const SG::AuxElement::Accessor< float > * momentAccessorV1(xAOD::CaloCluster_v1::MomentType moment)
Helper function for managing cluster moment Accessor objects.
Definition: CaloClusterAccessors_v1.cxx:25
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
xAOD::CaloCluster_v1::rawEta
flt_t rawEta() const
Get in signal state UNCALIBRATED.
xAOD::CaloCluster_v1::setRawM
void setRawM(flt_t)
Set mass for singal state UNCALIBRATED.
Definition: CaloCluster_v1.cxx:299
xAOD::CaloCluster_v1::numberCells
int numberCells() const
Return total number of cells in cluster.
Definition: CaloCluster_v1.cxx:818
xAOD::CaloCluster_v1::CaloSample
CaloSampling::CaloSample CaloSample
Definition: CaloCluster_v1.h:66
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
AuxStoreAccessorMacros.h
xAOD::CaloCluster_v1::m_signalState
State m_signalState
Current signal state.
Definition: CaloCluster_v1.h:680
xAOD::CaloCluster_v1::SW_37Econv
@ SW_37Econv
Definition: CaloCluster_v1.h:98
xAOD::CaloCluster_v1::calE
flt_t calE() const
Geet Energy in signal state CALIBRATED.
xAOD::CaloCluster_v1::setAltM
void setAltM(flt_t)
Set mass for singal state ALTCALIBRATED.
Definition: CaloCluster_v1.cxx:343
xAOD::CaloCluster_v1::secondTime
flt_t secondTime() const
Access second moment of cell timing distribution.
Definition: CaloCluster_v1.cxx:987
InDetAccessor::phi0
@ phi0
Definition: InDetAccessor.h:33
xAOD::CaloCluster_v1::clearSamplingData
void clearSamplingData()
Clear the sampling data.
Definition: CaloCluster_v1.cxx:717
accumulate
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
Definition: FPGATrackSimMatrixAccumulator.cxx:22
xAOD::CaloCluster_v1::calEta
flt_t calEta() const
Get in signal state CALIBRATED.
xAOD::CaloCluster_v1::State
State
enum of possible signal states.
Definition: CaloCluster_v1.h:304
xAOD::CaloCluster_v1::setAltEta
void setAltEta(flt_t)
Set for signal state ALTCALIBRATED.
Definition: CaloCluster_v1.cxx:333
xAOD::CaloCluster_v1::m_recoStatus
CaloRecoStatus m_recoStatus
Reco status (transient only)
Definition: CaloCluster_v1.h:686
xAOD::CaloCluster_v1::m
virtual double m() const
The invariant mass of the particle.
Definition: CaloCluster_v1.cxx:261
xAOD::etaMax
etaMax
Definition: HIEventShape_v2.cxx:46
xAOD::CaloCluster_v1::SW_55gam
@ SW_55gam
Definition: CaloCluster_v1.h:92
xAOD::CaloCluster_v1::insertMoment
void insertMoment(MomentType type, double value)
Definition: CaloCluster_v1.cxx:754
xAOD::other
@ other
Definition: TrackingPrimitives.h:509
xAOD::CaloCluster_v1::etasize
float etasize(const CaloSample sampling) const
Returns cluster size in for a given sampling.
Definition: CaloCluster_v1.cxx:603
xAOD::rawPhi
setRawEt rawPhi
Definition: TrigCaloCluster_v1.cxx:29
athena.value
value
Definition: athena.py:124
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::CaloCluster_v1::setLink
bool setLink(CaloClusterCellLinkContainer *CCCL, IProxyDict *sg=nullptr)
Set up an ElementLink to a CaloClusterCellLink object.
Definition: CaloCluster_v1.cxx:872
xAOD::CaloCluster_v1::phiBE
float phiBE(const unsigned layer) const
Get the phi in one layer of the EM Calo.
Definition: CaloCluster_v1.cxx:680
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
xAOD::CaloCluster_v1::setCalEta
void setCalEta(flt_t)
Set for signal state CALIBRATED.
Definition: CaloCluster_v1.cxx:311
stime
std::string stime()
return the current data and time
Definition: computils.cxx:214
xAOD::CaloCluster_v1::setSamplingPattern
void setSamplingPattern(const unsigned sp, const bool clearSamplingVars=false)
Set sampling pattern (one bit per sampling.
Definition: CaloCluster_v1.cxx:81
xAOD::CaloCluster_v1::setEnergy
bool setEnergy(const CaloSample sampling, const float e)
Set energy for a given sampling. Returns false if the sample isn't part of the cluster.
Definition: CaloCluster_v1.cxx:526
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
xAOD::CaloCluster_v1::GenVecFourMom_t
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > GenVecFourMom_t
Base 4 Momentum type for calo.
Definition: CaloCluster_v1.h:346
xAOD::CaloCluster_v1::etamax
float etamax(const CaloSample sampling) const
Retrieve of cell with maximum energy in given sampling.
Definition: CaloCluster_v1.cxx:576
xAOD::CaloCluster_v1::ncells_t
uint8_t ncells_t
Type for number-of-cells-in-sampling counter.
Definition: CaloCluster_v1.h:72
empty
bool empty(TH1 *h)
Definition: computils.cxx:295
IProxyDict
A proxy dictionary.
Definition: AthenaKernel/AthenaKernel/IProxyDict.h:47
xAOD::CaloCluster_v1::calM
flt_t calM() const
Get mass in signal state CALIBRATED.
xAOD::CaloCluster_v1::setEmax
bool setEmax(const CaloSample sampling, const float eMax)
Set the Energy of the cell with the highest energy in a particular sampling.
Definition: CaloCluster_v1.cxx:571
xAOD::CaloCluster_v1::SW_7_11
@ SW_7_11
Definition: CaloCluster_v1.h:105
xAOD::CaloCluster
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition: Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloCluster.h:19
xAOD::CaloCluster_v1::SW_37gam
@ SW_37gam
Definition: CaloCluster_v1.h:94
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
xAOD::CaloCluster_v1::MomentType
MomentType
Enums to identify different moments.
Definition: CaloCluster_v1.h:120
xAOD::CaloCluster_v1::NCELL_SAMPLING
@ NCELL_SAMPLING
Number of cells in sampling layer.
Definition: CaloCluster_v1.h:182
xAOD::CaloCluster_v1::etaSample
float etaSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
Definition: CaloCluster_v1.cxx:532
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
xAOD::CaloCluster_v1::setSecondTime
void setSecondTime(flt_t stime)
Set second moment of cell timing distribution.
Definition: CaloCluster_v1.cxx:985
xAOD::CaloCluster_v1::SW_37ele
@ SW_37ele
Definition: CaloCluster_v1.h:90
xAOD::CaloCluster_v1::clusterSize
ClusterSize clusterSize() const
Get cluster size.
Definition: CaloCluster_v1.cxx:364
xAOD::CaloCluster_v1::etaBE
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
Definition: CaloCluster_v1.cxx:644
xAOD::CaloCluster_v1::SW_55Econv
@ SW_55Econv
Definition: CaloCluster_v1.h:96
xAOD::CaloCluster_v1::setE
void setE(flt_t)
Definition: CaloCluster_v1.cxx:375
xAOD::CaloCluster_v1::setPhimax
bool setPhimax(const CaloSample sampling, const float phiMax)
Set the phi of the cell with the highest energy in a particular sampling.
Definition: CaloCluster_v1.cxx:597
xAOD::CaloCluster_v1::CaloCluster_v1
CaloCluster_v1()
Default constructor.
Definition: CaloCluster_v1.cxx:23
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
xAOD::CaloClusterBadChannelList
std::vector< CaloClusterBadChannelData > CaloClusterBadChannelList
Definition: Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloClusterBadChannelData.h:19
xAOD::CaloCluster_v1::setCalPhi
void setCalPhi(flt_t)
Set for signal state CALIBRATED.
Definition: CaloCluster_v1.cxx:316
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
xAOD::CaloCluster_v1::setRawE
void setRawE(flt_t)
Set Energy for signal state UNCALIBRATED.
Definition: CaloCluster_v1.cxx:284
xAOD::CaloCluster_v1::removeCell
bool removeCell(const CaloCell *ptr)
Method to remove a cell to the cluster (slow!) (Beware: Kinematics not updated!)
Definition: CaloCluster_v1.cxx:923
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
xAOD::CaloCluster_v1::genvecP4
GenVecFourMom_t genvecP4() const
The full 4-momentum of the particle : GenVector type.
Definition: CaloCluster_v1.cxx:457
xAOD::CaloCluster_v1::setCalM
void setCalM(flt_t)
Set mass for singal state CALIBRATED.
Definition: CaloCluster_v1.cxx:321
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:113
xAOD::CaloCluster_v1::getClusterEtaSize
unsigned int getClusterEtaSize() const
Get eta size from cluster size.
Definition: CaloCluster_v1.cxx:823
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
xAOD::CaloCluster_v1::CALIBRATED
@ CALIBRATED
Definition: CaloCluster_v1.h:307
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
xAOD::CaloCluster_v1::energy_max
float energy_max(const CaloSample sampling) const
Retrieve maximum cell energy in given sampling.
Definition: CaloCluster_v1.cxx:563
xAOD::CaloCluster_v1::getSisterClusterLink
const ElementLink< xAOD::CaloClusterContainer_v1 > & getSisterClusterLink() const
Get a link to a 'sister' cluster (eg the non-calibrated counterpart)
Definition: CaloCluster_v1.cxx:969
xAOD::CaloCluster_v1::ncells_store_t
std::vector< uint16_t > ncells_store_t
Store type for number-of-cells-in-sampling counter.
Definition: CaloCluster_v1.h:80
DMTest::links
links
Definition: CLinks_v1.cxx:22
xAOD::CaloCluster_v1::m_samplingPattern
unsigned m_samplingPattern
bit-pattern describing the calo samplings contributing to this cluster
Definition: CaloCluster_v1.h:677
xAOD::CaloCluster_v1::SW_35gam
@ SW_35gam
Definition: CaloCluster_v1.h:93
xAOD::CaloCluster_v1::getSisterCluster
const CaloCluster_v1 * getSisterCluster() const
Get a pointer to a 'sister' cluster (eg the non-calibrated counterpart)
Definition: CaloCluster_v1.cxx:957
xAOD::CaloCluster_v1::setSignalState
bool setSignalState(const State s)
Switch signal state.
Definition: CaloCluster_v1.cxx:440
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
xAOD::CaloCluster_v1::size
size_t size() const
size method (forwarded from CaloClusterCellLink obj)
Definition: CaloCluster_v1.cxx:996
xAOD::CaloCluster_v1::setAltE
void setAltE(flt_t)
Set Energy for signal state ALTCALIBRATED.
Definition: CaloCluster_v1.cxx:328
xAOD::CaloCluster_v1::setRawEta
void setRawEta(flt_t)
Set for signal state UNCALIBRATED.
Definition: CaloCluster_v1.cxx:289
CaloPhiRange.h
CaloPhiRange class declaration.
xAOD::CaloCluster_v1::calPhi
flt_t calPhi() const
Get in signal state CALIBRATED.
xAOD::CaloCluster_v1::retrieveMoment
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
Definition: CaloCluster_v1.cxx:738
xAOD::CaloCluster_v1::phiSample
float phiSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
Definition: CaloCluster_v1.cxx:547
PowhegPythia8EvtGen_jetjet.theEnergy
int theEnergy
Definition: PowhegPythia8EvtGen_jetjet.py:12
xAOD::CaloCluster_v1::setSisterClusterLink
bool setSisterClusterLink(const ElementLink< CaloClusterContainer_v1 > &sister)
Set a link to a 'sister' cluster (eg the non-calibrated counterpart)
Definition: CaloCluster_v1.cxx:978
xAOD::CaloCluster_v1::m_cellLinks
std::unique_ptr< CaloClusterCellLink > m_cellLinks
Unique ptr to cell links.
Definition: CaloCluster_v1.h:683
xAOD::CaloCluster_v1::getClusterPhiSize
unsigned int getClusterPhiSize() const
Get phi size from cluster size.
Definition: CaloCluster_v1.cxx:845
CaloPhiRange::fix
static double fix(double phi)
Definition: CaloPhiRange.cxx:14
xAOD::CaloCluster_v1::getCellLinks
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
Definition: CaloCluster_v1.cxx:905
xAOD::CaloCluster_v1::setSamplVarFromAcc
bool setSamplVarFromAcc(const Accessor< std::vector< float > > &acc, const CaloSample sampling, const float value)
Definition: CaloCluster_v1.cxx:505
xAOD::CaloCluster_v1::p4
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition: CaloCluster_v1.cxx:465
xAOD::CaloCluster_v1::rawM
flt_t rawM() const
Get mass in signal state UNCALIBRATED.
xAOD::CaloCluster_v1::UNCALIBRATED
@ UNCALIBRATED
Definition: CaloCluster_v1.h:306
xAOD::CaloCluster_v1::pt
virtual double pt() const
The transverse momentum ( ) of the particle (negative for negative-energy clusters)
Definition: CaloCluster_v1.cxx:247
xAOD::CaloCluster_v1::~CaloCluster_v1
virtual ~CaloCluster_v1()
Destructor.
Definition: CaloCluster_v1.cxx:78
xAOD::CaloCluster_v1::FourMom_t
IParticle::FourMom_t FourMom_t
Definition of the 4-momentum type.
Definition: CaloCluster_v1.h:343
xAOD::CaloCluster_v1::sampVarIdx
unsigned sampVarIdx(const CaloSample) const
Definition: CaloCluster_v1.h:868
xAOD::CaloCluster_v1::badChannelList
const CaloClusterBadChannelList & badChannelList() const
Definition: CaloCluster_v1.cxx:279
xAOD::CaloCluster_v1::altE
flt_t altE() const
Get Energy in signal state ALTCALIBRATED.
xAOD::CaloCluster_v1::setNumberCellsInSampling
void setNumberCellsInSampling(CaloSampling::CaloSample samp, int ncells, bool isInnerWheel=false)
Set the number of cells in a sampling layer.
Definition: CaloCluster_v1.cxx:790
xAOD::CaloCluster_v1::flt_t
float flt_t
Definition: CaloCluster_v1.h:64
xAOD::CaloCluster_v1::SW_55ele
@ SW_55ele
Definition: CaloCluster_v1.h:88
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::AuxElement::makePrivateStore
void makePrivateStore()
Create a new (empty) private store for this object.
Definition: AuxElement.cxx:192
xAOD::CaloCluster_v1::SW_35Econv
@ SW_35Econv
Definition: CaloCluster_v1.h:97
xAOD::CaloCluster_v1::setCalE
void setCalE(flt_t)
Set Energy for signal state CALIBRATED.
Definition: CaloCluster_v1.cxx:306
SG::AuxElement::operator=
AuxElement & operator=(const AuxElement &other)
Assignment.
CaloClusterAccessors_v1.h
xAOD::CaloCluster_v1::altPhi
flt_t altPhi() const
Get in signal state ALTCALIBRATED.
xAOD::CaloCluster_v1::eSample
float eSample(const CaloSample sampling) const
Definition: CaloCluster_v1.cxx:521
a
TList * a
Definition: liststreamerinfos.cxx:10
xAOD::CaloCluster_v1::operator=
CaloCluster_v1 & operator=(const xAOD::CaloCluster_v1 &other)
Assignment operator.
Definition: CaloCluster_v1.cxx:53
xAOD::CaloCluster_v1::addCellLink
void addCellLink(CaloClusterCellLink *CCCL)
Definition: CaloCluster_v1.h:721
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
xAOD::CaloCluster_v1::setClusterSize
void setClusterSize(const ClusterSize)
Get cluster size.
Definition: CaloCluster_v1.cxx:369
xAOD::CaloCluster_v1::rawPhi
flt_t rawPhi() const
Get in signal state UNCALIBRATED.
xAOD::CaloCluster_v1::ALTCALIBRATED
@ ALTCALIBRATED
Definition: CaloCluster_v1.h:308
ref
const boost::regex ref(r_ef)
CaloCell_ID_FCS::PreSamplerE
@ PreSamplerE
Definition: FastCaloSim_CaloCell_ID.h:23
CaloCell_ID_FCS::PreSamplerB
@ PreSamplerB
Definition: FastCaloSim_CaloCell_ID.h:19
SG::Accessor::isAvailableWritable
bool isAvailableWritable(ELT &e) const
Test to see if this variable exists in the store and is writable.
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
xAOD::CaloCluster_v1::getOwnCellLinks
CaloClusterCellLink * getOwnCellLinks()
Get a pointer to the owned CaloClusterCellLink object (non-const version)
Definition: CaloCluster_v1.h:762
AUXSTORE_PRIMITIVE_GETTER
#define AUXSTORE_PRIMITIVE_GETTER(CL, TYPE, NAME)
Macro creating the reader function for a primitive auxiliary property.
Definition: AuxStoreAccessorMacros.h:59
xAOD::CaloCluster_v1::energyBE
float energyBE(const unsigned layer) const
Get the energy in one layer of the EM Calo.
Definition: CaloCluster_v1.cxx:630
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
CaloClusterContainer.h
xAOD::CaloCluster_v1::setPhi
bool setPhi(const CaloSample sampling, const float phi)
Set in a given sampling. Returns false if the sample isn't part of the cluster.
Definition: CaloCluster_v1.cxx:556
xAOD::CaloCluster_v1::phisize
float phisize(const CaloSample sampling) const
Returns cluster size in for a given sampling.
Definition: CaloCluster_v1.cxx:616
xAOD::CaloCluster_v1::toPersistent
void toPersistent()
Function preparing the object to be persistified.
Definition: CaloCluster_v1.cxx:939
xAOD::CaloCluster_v1::altEta
flt_t altEta() const
Get in signal state ALTCALIBRATED.
xAOD::CaloCluster_v1::setEtamax
bool setEtamax(const CaloSample sampling, const float etaMax)
Set the eta of the cell with the highest energy in a particular sampling.
Definition: CaloCluster_v1.cxx:584
SG::ConstAccessor< T, AuxAllocator_t< T > >::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
xAOD::CaloCluster_v1::SECOND_TIME
@ SECOND_TIME
Second moment of cell time distribution in cluster.
Definition: CaloCluster_v1.h:180
CaloCluster_v1.h
xAOD::CaloCluster_v1::setEtasize
bool setEtasize(const CaloSample sampling, const float etaSize)
Set the cluster size in for a given sampling.
Definition: CaloCluster_v1.cxx:611
xAOD::CaloCluster_v1::setEta
bool setEta(const CaloSample sampling, const float eta)
Set in a given sampling. Returns false if the sample isn't part of the cluster.
Definition: CaloCluster_v1.cxx:541
xAOD::CaloCluster_v1::SW_35ele
@ SW_35ele
Definition: CaloCluster_v1.h:89
xAOD::CaloCluster_v1::type
virtual Type::ObjectType type() const
The type of the object as a simple enumeration.
Definition: CaloCluster_v1.cxx:489
xAOD::CaloCluster_v1::hasSampling
bool hasSampling(const CaloSample s) const
Checks if certain smapling contributes to cluster.
Definition: CaloCluster_v1.h:890
xAODType::ObjectType
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition: ObjectType.h:32
xAOD::CaloCluster_v1::setAltPhi
void setAltPhi(flt_t)
Set for signal state ALTCALIBRATED.
Definition: CaloCluster_v1.cxx:338
xAOD::CaloCluster_v1::altM
flt_t altM() const
Get mass in signal state ALTCALIBRATED.
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
xAOD::CaloCluster_v1::getSamplVarFromAcc
float getSamplVarFromAcc(const Accessor< std::vector< float > > &acc, const CaloSample sampling, const float errorvalue=-999) const
Definition: CaloCluster_v1.cxx:494
xAOD::CaloCluster_v1::rapidity
virtual double rapidity() const
The true rapidity (y) of the particle.
Definition: CaloCluster_v1.cxx:461
xAOD::CaloCluster_v1::e
virtual double e() const
The total energy of the particle.
Definition: CaloCluster_v1.cxx:265
plotBeamSpotMon.nc
int nc
Definition: plotBeamSpotMon.py:83
xAOD::momentContainerAccessorV1
const SG::AuxElement::Accessor< xAOD::CaloCluster_v1::ncells_store_t > * momentContainerAccessorV1(xAOD::CaloCluster_v1::MomentType moment)
Helper function for managing cluster moment Accessor objects.
Definition: CaloClusterAccessors_v1.cxx:155
xAOD::CaloCluster_v1::setM
void setM(flt_t)
Set Mass for the current signal state.
Definition: CaloCluster_v1.cxx:424
xAOD::CaloCluster_v1::setRawPhi
void setRawPhi(flt_t)
Set for signal state UNCALIBRATED.
Definition: CaloCluster_v1.cxx:294
CaloPhiRange::diff
static double diff(double phi1, double phi2)
simple phi1 - phi2 calculation, but result is fixed to respect range.
Definition: CaloPhiRange.cxx:22
xAOD::CaloCluster_v1::numberCellsInSampling
int numberCellsInSampling(const CaloSample samp, bool isInnerWheel=false) const
Returns number of cells in given sampling.
Definition: CaloCluster_v1.cxx:802