ATLAS Offline Software
Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
BeamBackgroundFiller Class Reference

Implementation of the Beam Background Identification Method. More...

#include <BeamBackgroundFiller.h>

Inheritance diagram for BeamBackgroundFiller:
Collaboration diagram for BeamBackgroundFiller:

Classes

struct  Cache
 

Public Member Functions

 BeamBackgroundFiller (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~BeamBackgroundFiller ()=default
 
virtual StatusCode initialize () override
 
virtual StatusCode execute (const EventContext &ctx) const override
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
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 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 > &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
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void FillMatchMatrix (const EventContext &ctx, Cache &cache) const
 This function selects the muon segments with the direction parallel to the beam pipe and calorimeter clusters above certain energy threshold. More...
 
void SegmentMethod (Cache &cache) const
 This function looks at the segments found by the FillMatchMatrix function. More...
 
void OneSidedMethod (Cache &cache) const
 This function is the implementation of the "No-Time Method" and the "One-Sided Method". More...
 
void TwoSidedMethod (Cache &cache) const
 This function is the implementation of the "Two-Sided No-Time Method" and the "Two-Sided Method" that looks at the clusters matched with at least one muon segment on side A and one muon segment on side C. More...
 
void ClusterShapeMethod (Cache &cache) const
 This function is the implementation of the "Cluster-Shape Method". More...
 
double GetSegmentTime (const Muon::MuonSegment &pMuonSegment) const
 
void FindFakeJets (const EventContext &ctx, Cache &cache) const
 This function checks whether the matched clusters are contained in any jets. More...
 
void FillBeamBackgroundData (SG::WriteHandle< BeamBackgroundData > &beamBackgroundDataWriteHandle, Cache &cache) const
 This function stores all the results in BeamBackgroundData. More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadHandleKeyArray< Trk::SegmentCollectionm_segmentKeys
 ReadHandleKey for Trk::SegmentCollection from CSC. More...
 
SG::ReadHandleKey< xAOD::CaloClusterContainerm_caloClusterContainerReadHandleKey
 ReadHandleKey for CaloClusterContainer. More...
 
SG::ReadHandleKey< xAOD::JetContainerm_jetContainerReadHandleKey
 ReadHandleKey for JetContainer. More...
 
SG::WriteHandleKey< BeamBackgroundDatam_beamBackgroundDataWriteHandleKey
 
ToolHandle< Muon::IMuonSegmentSelectionToolm_segmentSelector {this, "SegmentSelector",""}
 
Gaudi::Property< double > m_thetaCutNCB {this, "cutThetaNCB", 5. * Gaudi::Units::deg}
 Inclanation cut between the segment position and its direction. More...
 
Gaudi::Property< double > m_cutDphiSegAC {this,"cutPhi", 4.* Gaudi::Units::deg}
 
Gaudi::Property< double > m_clusEnergyCut {this,"clustEnergy", 10. *Gaudi::Units::GeV}
 Minimum cut on the cluster energy to be considered. More...
 
Gaudi::Property< double > m_clusRadiusLow {this, "cutRadiusLow", 881. * Gaudi::Units::mm}
 
Gaudi::Property< double > m_clusRadiusHigh {this,"cutRadiusHigh", 4250. * Gaudi::Units::mm}
 
Gaudi::Property< double > m_cutDphiClusSeg {this, "cutDphiClusSeg", 4.* Gaudi::Units::deg}
 
Gaudi::Property< double > m_cutDradClusSeg {this,"cutDrClusSet", 40. * Gaudi::Units::cm}
 
Gaudi::Property< double > m_cutMuonTime {this, "cutMuonTime", 25.}
 
Gaudi::Property< double > m_cutClusTime {this,"cutClusTime", 2.5}
 
Gaudi::Property< double > m_cutTimeDiffAC {this,"cutTimeDiffAC", 25.}
 
Gaudi::Property< double > m_cutDrdz {this,"cutDrdz", 0.15}
 
ServiceHandle< Muon::IMuonEDMHelperSvcm_edmHelperSvc
 
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Implementation of the Beam Background Identification Method.

This implementation defines the selection criteria for identifying beam background muons, and looks for them based on several methods. The result are stored in BeamBackgroundData.

Author
David Salek David.nosp@m..Sal.nosp@m.ek@ce.nosp@m.rn.c.nosp@m.h
Revision
693115
Date
2015-09-04 09:22:39 +0200 (Fri, 04 Sep 2015)

Definition at line 37 of file BeamBackgroundFiller.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ BeamBackgroundFiller()

BeamBackgroundFiller::BeamBackgroundFiller ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 30 of file BeamBackgroundFiller.cxx.

32  : AthReentrantAlgorithm(name, pSvcLocator) {
33 }

◆ ~BeamBackgroundFiller()

virtual BeamBackgroundFiller::~BeamBackgroundFiller ( )
virtualdefault

Member Function Documentation

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ ClusterShapeMethod()

void BeamBackgroundFiller::ClusterShapeMethod ( Cache cache) const
private

This function is the implementation of the "Cluster-Shape Method".

The shape of the cluster is described by the variable dr/dz which is the ratio of the standard deviation of the radial position of the contianed cells and the standard deviation of the z-position of the contained cells. Only the clusters matched with muon segments are checked.

Definition at line 574 of file BeamBackgroundFiller.cxx.

574  {
575  cache.m_numClusterShape = 0;
576  cache.m_drdzClus.clear();
577 
578  for (unsigned int clusIndex = 0; clusIndex < cache.m_indexClus.size();
579  clusIndex++) {
580 
581  const xAOD::CaloCluster* clus = *(cache.m_indexClus[clusIndex]);
582 
583  double rClus(0.);
585  rClus = 0;
586  rClus = rClus / cosh(clus->eta());
587  double zClus = rClus * sinh(clus->eta());
588 
589  // calculate dr/dz
590  double dr = 0.;
591  double dz = 0.;
592  double drdz = -1.;
593  int nCell = 0;
594 
595  if (clus->getCellLinks() != nullptr) {
598 
599  for (; firstCell != lastCell; ++firstCell) {
600  const CaloCell* cell = *firstCell;
601 
602  if (cell->time() == 0.)
603  continue;
604  if (cell->energy() < 100.)
605  continue;
606  nCell++;
607 
608  // double rCell = sqrt(cell->x()*cell->x() + cell->y()*cell->y());
609  // double zCell = cell->z();
610  const CaloDetDescrElement* dde = cell->caloDDE();
611  const double rCell = dde->r();
612  const double zCell = dde->z();
613  dr = dr + (rCell - rClus) * (rCell - rClus);
614  dz = dz + (zCell - zClus) * (zCell - zClus);
615  }
616  }
617 
618  if (nCell) {
619  dr = sqrt(dr / nCell);
620  dz = sqrt(dz / nCell);
621  if (dz > 0.)
622  drdz = dr / dz;
623  }
624 
625  cache.m_drdzClus.push_back(drdz);
626 
627  // check dr/dz
628  if (drdz < 0.)
629  continue;
630  if (drdz < m_cutDrdz) {
631  for (unsigned int segIndex = 0; segIndex < cache.m_indexSeg.size();
632  segIndex++) {
633  if (!(cache.m_matchMatrix[clusIndex][segIndex] & 1))
634  continue;
635  cache.m_matchMatrix[clusIndex][segIndex] =
636  cache.m_matchMatrix[clusIndex][segIndex] |
638  cache.m_resultSeg[segIndex] = cache.m_resultSeg[segIndex] |
639  cache.m_matchMatrix[clusIndex][segIndex];
640  }
641  cache.m_resultClus[clusIndex] =
642  cache.m_resultClus[clusIndex] | BeamBackgroundData::ClusterShape;
643  cache.m_numClusterShape++;
644  }
645  }
646 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

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

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

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( ) const
inlineinherited

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode BeamBackgroundFiller::execute ( const EventContext &  ctx) const
overridevirtual

Definition at line 50 of file BeamBackgroundFiller.cxx.

50  {
51 
52  Cache cache{};
53  // find muon segments from beam background muon candidates and match them with
54  // calorimeter clusters
55  FillMatchMatrix(ctx, cache);
56  // apply Beam Background Identifiaction Methods
57  SegmentMethod(cache);
58  OneSidedMethod(cache);
59  TwoSidedMethod(cache);
60  ClusterShapeMethod(cache);
61  // identify fake jets
62  FindFakeJets(ctx, cache);
63 
64  // fill the results into BeamBackgroundData
66  ATH_CHECK(writeHandle.record(std::make_unique<BeamBackgroundData>()));
67  FillBeamBackgroundData(writeHandle, cache);
68 
69  return StatusCode::SUCCESS;
70 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ FillBeamBackgroundData()

void BeamBackgroundFiller::FillBeamBackgroundData ( SG::WriteHandle< BeamBackgroundData > &  beamBackgroundDataWriteHandle,
Cache cache 
) const
private

This function stores all the results in BeamBackgroundData.

Definition at line 713 of file BeamBackgroundFiller.cxx.

715  {
716 
717  writeHandle->SetNumSegment(cache.m_numSegment);
718  writeHandle->SetNumSegmentEarly(cache.m_numSegmentEarly);
719  writeHandle->SetNumSegmentACNoTime(cache.m_numSegmentACNoTime);
720  writeHandle->SetNumSegmentAC(cache.m_numSegmentAC);
721  writeHandle->SetNumMatched(cache.m_numMatched);
722  writeHandle->SetNumNoTimeLoose(cache.m_numNoTimeLoose);
723  writeHandle->SetNumNoTimeMedium(cache.m_numNoTimeMedium);
724  writeHandle->SetNumNoTimeTight(cache.m_numNoTimeTight);
725  writeHandle->SetNumOneSidedLoose(cache.m_numOneSidedLoose);
726  writeHandle->SetNumOneSidedMedium(cache.m_numOneSidedMedium);
727  writeHandle->SetNumOneSidedTight(cache.m_numOneSidedTight);
728  writeHandle->SetNumTwoSidedNoTime(cache.m_numTwoSidedNoTime);
729  writeHandle->SetNumTwoSided(cache.m_numTwoSided);
730  writeHandle->SetNumClusterShape(cache.m_numClusterShape);
731  writeHandle->SetNumJet(cache.m_numJet);
732 
733  int decision = 0;
734  for (unsigned int i = 0; i < cache.m_indexSeg.size(); i++) {
735  decision |= cache.m_resultSeg[i];
736  }
737  for (unsigned int i = 0; i < cache.m_indexClus.size(); i++) {
738  decision |= cache.m_resultClus[i];
739  }
740  writeHandle->SetDecision(decision);
741 
742  writeHandle->SetDirection(cache.m_direction);
743 
744  writeHandle->FillIndexSeg(cache.m_indexSeg);
745  writeHandle->FillResultSeg(&cache.m_resultSeg);
746  writeHandle->FillIndexClus(cache.m_indexClus);
747  writeHandle->FillMatchMatrix(&cache.m_matchMatrix);
748 
749  writeHandle->FillResultClus(&cache.m_resultClus);
750  writeHandle->FillIndexJet(cache.m_indexJet);
751  writeHandle->FillDrdzClus(&cache.m_drdzClus);
752 
753  writeHandle->FillIndexJet(cache.m_indexJet);
754  writeHandle->FillResultJet(&cache.m_resultJet);
755 
756  ATH_MSG_DEBUG("parallel segments "
757  << cache.m_numSegment << " " << cache.m_numSegmentEarly << " "
758  << cache.m_numSegmentACNoTime << " " << cache.m_numSegmentAC);
759 
760  ATH_MSG_DEBUG("matched clusters "
761  << cache.m_numMatched << " " << cache.m_numNoTimeLoose << " "
762  << cache.m_numNoTimeMedium << " " << cache.m_numNoTimeTight
763  << " " << cache.m_numOneSidedLoose << " "
764  << cache.m_numOneSidedMedium << " " << cache.m_numOneSidedTight
765  << " " << cache.m_numTwoSidedNoTime << " "
766  << cache.m_numTwoSided << " " << cache.m_numClusterShape);
767 }

◆ FillMatchMatrix()

void BeamBackgroundFiller::FillMatchMatrix ( const EventContext &  ctx,
Cache cache 
) const
private

This function selects the muon segments with the direction parallel to the beam pipe and calorimeter clusters above certain energy threshold.

Matching matrix is created to store the results of beam background identification for each cluster and segment

Select only the segements from the EI station

match in phi

Definition at line 79 of file BeamBackgroundFiller.cxx.

80  {
81  //
82 
84  // select only the CSC segments with the global direction parallel to the
85  // beam pipe
86  SG::ReadHandle<Trk::SegmentCollection> ncbSegmentHandle(key, ctx);
87  if(!ncbSegmentHandle.isPresent()) {
88  throw std::runtime_error("Could not load the " + key.key() + " segment container");
89  }
90  unsigned int ncbCounter = 0;
91  for (const Trk::Segment *ncbSegment : *ncbSegmentHandle) {
92  ++ncbCounter;
93  const Muon::MuonSegment* seg =dynamic_cast<const Muon::MuonSegment*>(ncbSegment);
94 
95  const Identifier id = m_edmHelperSvc->chamberId(*seg);
96  if (!id.is_valid()|| !m_idHelperSvc->isMuon(id)) {
97  ATH_MSG_WARNING("Found a muon segment in the container which pretends not to be a muon segment..");
98  continue;
99  }
100  Muon::MuonStationIndex::StIndex stIndex = m_idHelperSvc->stationIndex(id);
102  if (stIndex != Muon::MuonStationIndex::EI) {
103  ATH_MSG_VERBOSE("Segment "<<m_idHelperSvc->toStringChamber(id)<<" is not in EI");
104  continue;
105  }
106  const Amg::Vector3D& globalDir = seg->globalDirection();
107  if (std::abs(globalDir.theta()) < m_thetaCutNCB) {
108  continue;
109  }
110  constexpr int highestSegQual = 3;
111  if (!m_segmentSelector->select(*seg,false, highestSegQual)) {
112  continue;
113  }
114  ElementLink<Trk::SegmentCollection> segLink{*ncbSegmentHandle, ncbCounter - 1};
115  cache.m_indexSeg.push_back(segLink);
116  }
117  }
118 
119  cache.m_resultSeg.assign(cache.m_indexSeg.size(), 0);
120 
121  // find matching clusters
123  if (!caloClusterContainerReadHandle.isPresent()){
124  throw std::runtime_error("Failed to load the calorimeter cluster container");
125  }
126  ATH_MSG_DEBUG(m_caloClusterContainerReadHandleKey<< " retrieved from StoreGate");
127 
128  constexpr std::array<CaloSampling::CaloSample, 24> caloLayers{CaloSampling::CaloSample::PreSamplerB,
133 
135 
140 
141  unsigned int caloClusterCounter = 0;
142  for (const xAOD::CaloCluster* thisCaloCluster : *caloClusterContainerReadHandle) {
143  ++caloClusterCounter;
144  double eClus{0.};
145  for (auto lay : caloLayers){
146  eClus +=thisCaloCluster->eSample(lay);
147  }
148  // ignore low energy clusters
149  if (eClus < m_clusEnergyCut){
150  ATH_MSG_VERBOSE("Cluster with energy "<<eClus<<" is below threshold "<<m_clusEnergyCut);
151  continue;
152  }
153  double rClus{0.};
154  if (!thisCaloCluster->retrieveMoment(xAOD::CaloCluster_v1::CENTER_MAG, rClus)) {
155  ATH_MSG_DEBUG("Failed to retrieve the CENTER_MAG moment");
156  continue;
157  }
158  rClus = rClus / std::cosh(thisCaloCluster->eta());
159 
160  // remove clusters at low radius (outside the CSC acceptance)
161  if (rClus < m_clusRadiusLow || rClus > m_clusRadiusHigh) {
162  ATH_MSG_VERBOSE("Radius cut not passed "<<rClus<<" needs to be in "
164  continue;
165  }
166  const double phiClus = thisCaloCluster->phi();
167 
168 
169  std::vector<int> matchedSegmentsPerCluster(cache.m_indexSeg.size(), 0);
170  bool matched{false};
171 
172  for (unsigned int j = 0; j < cache.m_indexSeg.size(); j++) {
173  const Muon::MuonSegment* seg = dynamic_cast<const Muon::MuonSegment*>(*(cache.m_indexSeg[j]));
174 
175  const Amg::Vector3D& globalPos = seg->globalPosition();
176  const double phiSeg = globalPos.phi();
177 
179  if (P4Helpers::deltaPhi(phiClus, phiSeg) < std::abs(m_cutDphiClusSeg)) {
180  ATH_MSG_VERBOSE("Delta phi "<<P4Helpers::deltaPhi(phiClus, phiSeg)
181  <<" exceeds maximum cut "<<m_cutDphiClusSeg
182  <<"Segment: "<<Amg::toString(globalPos)<<", phi: "<<globalPos.phi()
183  <<" --- Cluster: "<<phiClus);
184  continue;
185  }
186 
187  const double rSeg = globalPos.perp();
188  // match in radius
189  if (std::abs(rClus - rSeg) > m_cutDradClusSeg) {
190  ATH_MSG_VERBOSE("Radial difference "<<std::abs(rClus - rSeg)<<" exceeds maximum cut "<<m_cutDradClusSeg
191  <<"Segment: "<<Amg::toString(globalPos)<<", phi: "<<globalPos.perp()
192  <<" --- Cluster: "<<rClus);
193  continue;
194  }
195  matchedSegmentsPerCluster[j] = 1;
196  matched = true;
197  cache.m_resultSeg[j] |= BeamBackgroundData::Matched;
198  }
199 
200  if (!matched) {
201  ATH_MSG_VERBOSE("Calo cluster does not match with segment");
202  continue;
203  }
205  clusLink.toIndexedElement(*caloClusterContainerReadHandle, caloClusterCounter - 1);
206  cache.m_indexClus.push_back(std::move(clusLink));
207  cache.m_matchMatrix.push_back(std::move(matchedSegmentsPerCluster));
208  ++cache.m_numMatched;
209  }
210 
211  cache.m_resultClus.assign(cache.m_indexClus.size(), 1);
212 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ FindFakeJets()

void BeamBackgroundFiller::FindFakeJets ( const EventContext &  ctx,
Cache cache 
) const
private

This function checks whether the matched clusters are contained in any jets.

If yes, the jet is marked as fake jet and the corresponding result of the Beam Background Identification Method is stored (using the OR condition if more than one cluster is found within one jet)

Definition at line 655 of file BeamBackgroundFiller.cxx.

656  {
657  cache.m_numJet = 0;
658  cache.m_indexJet.clear();
659  cache.m_resultJet.clear();
660 
661  // find the jet that contains this cluster
662  SG::ReadHandle<xAOD::JetContainer> jetContainerReadHandle(
664 
665  if (!jetContainerReadHandle.isValid()) {
666  ATH_MSG_WARNING("Invalid ReadHandle to JetContainer with name: "
668  } else {
669  ATH_MSG_DEBUG(m_jetContainerReadHandleKey << " retrieved from StoreGate");
670 
671  unsigned int jetCounter = 0;
672  for (const auto *thisJet : *jetContainerReadHandle) {
673  bool isFakeJet = false;
674  int resultJet = 0;
675 
676  xAOD::JetConstituentVector vec = thisJet->getConstituents();
677  xAOD::JetConstituentVector::iterator constIt = vec.begin();
678  xAOD::JetConstituentVector::iterator constItE = vec.end();
679 
680  for (; constIt != constItE; ++constIt) {
681  if (constIt->type() != xAOD::Type::CaloCluster)
682  continue;
683  const xAOD::CaloCluster* jetConst =
684  dynamic_cast<const xAOD::CaloCluster*>(constIt->rawConstituent());
685 
686  for (unsigned int clusIndex = 0; clusIndex < cache.m_indexClus.size();
687  clusIndex++) {
688  const xAOD::CaloCluster* clus = *(cache.m_indexClus[clusIndex]);
689 
690  if (jetConst == clus) {
691  isFakeJet = true;
692  resultJet = resultJet | cache.m_resultClus[clusIndex];
693  }
694  }
695  }
696 
697  if (isFakeJet) {
699  jetLink.toIndexedElement(*jetContainerReadHandle, jetCounter);
700  cache.m_indexJet.push_back(jetLink);
701  cache.m_resultJet.push_back(resultJet);
702  cache.m_numJet++;
703  }
704  jetCounter++;
705  }
706  }
707 }

◆ GetSegmentTime()

double BeamBackgroundFiller::GetSegmentTime ( const Muon::MuonSegment pMuonSegment) const
private

Need to check how to translate the bcid bitmaps into timings

Definition at line 216 of file BeamBackgroundFiller.cxx.

216  {
217  double time{0.};
218  unsigned int nMeas{0};
219  for (const Trk::MeasurementBase* meas : pMuonSegment.containedMeasurements()) {
220  const Trk::RIO_OnTrack* rot = dynamic_cast<const Trk::RIO_OnTrack*>(meas);
221  if (!rot) {
222  continue;
223  }
224  ++nMeas;
225  const Trk::PrepRawData* prd = rot->prepRawData();
227  const Muon::MMPrepData* mmPrd = static_cast<const Muon::MMPrepData*>(prd);
228  time += mmPrd->time();
229  } else if (prd->type(Trk::PrepRawDataType::sTgcPrepData)) {
230  const Muon::sTgcPrepData* sTgcPrd = static_cast<const Muon::sTgcPrepData*>(prd);
231  time += sTgcPrd->time();
232  } else if (prd->type(Trk::PrepRawDataType::MdtPrepData)) {
233  const Muon::MdtPrepData* mdtPrd = static_cast<const Muon::MdtPrepData*>(prd);
234  constexpr double tdcBinSize = 0.78125; //25/32; exact number: (1000.0/40.079)/32.0
235  time += tdcBinSize * mdtPrd->tdc();
236  } else if (prd->type(Trk::PrepRawDataType::TgcPrepData)) {
238  --nMeas;
239  } else if (prd->type(Trk::PrepRawDataType::CscPrepData)) {
240  const Muon::CscPrepData* cscPrd = static_cast<const Muon::CscPrepData*>(prd);
241  time += cscPrd->time();
242  } else {
243  ATH_MSG_WARNING("You can't have "<<m_idHelperSvc->toString(prd->identify())<<" in a EI segment.");
244  --nMeas;
245  }
246 
247  }
248  return time / std::max(nMeas, 1u);
249 }

◆ initialize()

StatusCode BeamBackgroundFiller::initialize ( )
overridevirtual

Definition at line 36 of file BeamBackgroundFiller.cxx.

36  {
37  CHECK(m_edmHelperSvc.retrieve());
38  CHECK(m_idHelperSvc.retrieve());
39 
40  ATH_CHECK(m_segmentKeys.initialize());
41  ATH_CHECK(m_segmentSelector.retrieve(EnableTool{!m_segmentKeys.empty()}));
44 
46  return StatusCode::SUCCESS;
47 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isClonable()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

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

Definition at line 30 of file AthCommonMsg.h.

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

◆ OneSidedMethod()

void BeamBackgroundFiller::OneSidedMethod ( Cache cache) const
private

This function is the implementation of the "No-Time Method" and the "One-Sided Method".

The "One-Sided Method" compares the time of the calorimeter cluster with the expected time. The expected time is calculated based on the direction of the beam background muon which is reconstructed from the position and time of the muon segment. The "No-Time Method" does not use the time information of the muon segment thus the direction of the beam background muon is not known. Therefore, the cluster time is compared to two expected time values (corresponding to both A->C and C->A directions).

Definition at line 361 of file BeamBackgroundFiller.cxx.

361  {
362  //
363  for (unsigned int clusIndex = 0; clusIndex < cache.m_indexClus.size();
364  clusIndex++) {
365 
366  const xAOD::CaloCluster* clus = *(cache.m_indexClus[clusIndex]);
367 
368  double rClus(0.);
370  continue;
371  }
372  rClus = rClus / std::cosh(clus->eta());
373  double zClus = rClus * std::sinh(clus->eta());
374  double tClus = clus->time();
375 
376  // calculate expected cluster time
377  double expectedClusterTimeAC = -(zClus + std::hypot(rClus, zClus)) * inv_c;
378  double expectedClusterTimeCA = -(-zClus + std::hypot(rClus, zClus)) * inv_c;
379 
380  for (unsigned int segIndex = 0; segIndex < cache.m_indexSeg.size(); segIndex++) {
381 
382  if (!(cache.m_matchMatrix[clusIndex][segIndex] & BeamBackgroundData::Matched)){
383  continue;
384  }
385  const Muon::MuonSegment* seg = dynamic_cast<const Muon::MuonSegment*>(*(cache.m_indexSeg[segIndex]));
386 
387  const Amg::Vector3D& globalPos = seg->globalPosition();
388  double zSeg = globalPos.z();
389 
390  double tSeg = GetSegmentTime(*seg);
391 
392  // muon segment: in-time (1), early (2), ambiguous (0)
393  int timeStatus = 0;
394  double inTime = -(-std::abs(zSeg) + globalPos.mag()) * inv_c;
395  double early = -(std::abs(zSeg) + globalPos.mag()) * inv_c;
396  if (std::abs(tSeg - inTime) < m_cutMuonTime)
397  timeStatus = 1;
398  if (std::abs(tSeg - early) < m_cutMuonTime)
399  timeStatus = 2;
400 
401  // reconstruct beam background direction: A->C (1), C->A (-1)
402  int direction = 0;
403  if ((zSeg > 0 && timeStatus == 2) || (zSeg < 0 && timeStatus == 1))
404  direction = 1;
405  if ((zSeg > 0 && timeStatus == 1) || (zSeg < 0 && timeStatus == 2))
406  direction = -1;
407 
408  // check the cluster time without the beam background direction
409  // information
410  if (std::abs(tClus - expectedClusterTimeAC) < m_cutClusTime ||
411  std::abs(tClus - expectedClusterTimeCA) < m_cutClusTime) {
412  cache.m_matchMatrix[clusIndex][segIndex] |= BeamBackgroundData::NoTimeLoose;
413  }
414  if ((std::abs(tClus - expectedClusterTimeAC) < m_cutClusTime && -tClus > m_cutClusTime) ||
415  (std::abs(tClus - expectedClusterTimeCA) < m_cutClusTime && -tClus > m_cutClusTime)) {
416  cache.m_matchMatrix[clusIndex][segIndex] |= BeamBackgroundData::NoTimeMedium;
417  }
418  if ((std::abs(tClus - expectedClusterTimeAC) < m_cutClusTime && -tClus > 2. * m_cutClusTime) ||
419  (std::abs(tClus - expectedClusterTimeCA) < m_cutClusTime && -tClus > 2. * m_cutClusTime)) {
420  cache.m_matchMatrix[clusIndex][segIndex] |= BeamBackgroundData::NoTimeTight;
421  }
422 
423  // check the cluster time with the beam background direction information
424  if (direction == 1) {
425  if (std::abs(tClus - expectedClusterTimeAC) < m_cutClusTime) {
426  cache.m_matchMatrix[clusIndex][segIndex] |= BeamBackgroundData::OneSidedLoose;
427  }
428  if (std::abs(tClus - expectedClusterTimeAC) < m_cutClusTime && -tClus > m_cutClusTime) {
429  cache.m_matchMatrix[clusIndex][segIndex] |= BeamBackgroundData::OneSidedMedium;
430  }
431  if (std::abs(tClus - expectedClusterTimeAC) < m_cutClusTime && -tClus > 2. * m_cutClusTime) {
432  cache.m_matchMatrix[clusIndex][segIndex] |= BeamBackgroundData::OneSidedTight;
433  }
434  } else if (direction == -1) {
435  if (std::abs(tClus - expectedClusterTimeCA) < m_cutClusTime) {
436  cache.m_matchMatrix[clusIndex][segIndex] |= BeamBackgroundData::OneSidedLoose;
437  }
438  if (std::abs(tClus - expectedClusterTimeCA) < m_cutClusTime && -tClus > m_cutClusTime) {
439  cache.m_matchMatrix[clusIndex][segIndex] |= BeamBackgroundData::OneSidedMedium;
440  }
441  if (std::abs(tClus - expectedClusterTimeCA) < m_cutClusTime && -tClus > 2. * m_cutClusTime) {
442  cache.m_matchMatrix[clusIndex][segIndex] |= BeamBackgroundData::OneSidedTight;
443  }
444  }
445 
446  cache.m_resultClus[clusIndex] |= cache.m_matchMatrix[clusIndex][segIndex];
447  cache.m_resultSeg[segIndex] |= cache.m_matchMatrix[clusIndex][segIndex];
448  }
449 
450  if (cache.m_resultClus[clusIndex] & BeamBackgroundData::NoTimeLoose)
451  cache.m_numNoTimeLoose++;
452  if (cache.m_resultClus[clusIndex] & BeamBackgroundData::NoTimeMedium)
453  cache.m_numNoTimeMedium++;
454  if (cache.m_resultClus[clusIndex] & BeamBackgroundData::NoTimeTight)
455  cache.m_numNoTimeTight++;
456 
457  if (cache.m_resultClus[clusIndex] & BeamBackgroundData::OneSidedLoose)
458  cache.m_numOneSidedLoose++;
459  if (cache.m_resultClus[clusIndex] & BeamBackgroundData::OneSidedMedium)
460  cache.m_numOneSidedMedium++;
461  if (cache.m_resultClus[clusIndex] & BeamBackgroundData::OneSidedTight)
462  cache.m_numOneSidedTight++;
463  }
464 }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ SegmentMethod()

void BeamBackgroundFiller::SegmentMethod ( Cache cache) const
private

This function looks at the segments found by the FillMatchMatrix function.

The following results are set:

  • number of segments with the direciton parallel to the beam pipe (all the segments in the matching matrix)
  • number of such segments with early time
  • number of segment pairs on side A and C
  • number of segment pairs on side A and C with the corresponding time difference

take only the segments on side A (z > 0)

Definition at line 261 of file BeamBackgroundFiller.cxx.

261  {
263  for (unsigned int segIndex = 0; segIndex < cache.m_indexSeg.size(); ++segIndex) {
264 
265  const Muon::MuonSegment* seg =dynamic_cast<const Muon::MuonSegment*>(*(cache.m_indexSeg[segIndex]));
266 
267  const Amg::Vector3D& globalPos = seg->globalPosition();
268  double zSeg = globalPos.z();
269 
271  if (zSeg < 0.) {
272  continue;
273  }
274 
275 
276  double tSeg = GetSegmentTime(*seg);
277  cache.m_numSegment++;
278  cache.m_resultSeg[segIndex] |= BeamBackgroundData::Segment;
279 
280  // muon segment: in-time (1), early (2), ambiguous (0)
281  int timeStatus = 0;
282  double inTime = -(-std::abs(zSeg) + globalPos.mag()) * inv_c;
283  double early = -(std::abs(zSeg) + globalPos.mag()) * inv_c;
284  if (std::abs(tSeg - inTime) < m_cutMuonTime)
285  timeStatus = 1;
286  if (std::abs(tSeg - early) < m_cutMuonTime)
287  timeStatus = 2;
288 
289  if (timeStatus == 2) {
290  cache.m_numSegmentEarly++;
291  cache.m_resultSeg[segIndex] |= BeamBackgroundData::SegmentEarly;
292  }
293 
294 
295 
296  unsigned int segIndexA = segIndex;
297 
298  double tSegA = tSeg;
299  int timeStatusA = timeStatus;
300 
301  double phiSegA = globalPos.phi();
302 
303  for (unsigned int segIndexC = 0; segIndexC < cache.m_indexSeg.size(); segIndexC++) {
304 
305  const Muon::MuonSegment* segC = dynamic_cast<const Muon::MuonSegment*>(*(cache.m_indexSeg[segIndexC]));
306 
307  const Amg::Vector3D& globalPos = segC->globalPosition();
308  double zSegC = globalPos.z();
309 
310  // take only the segments on side C (z < 0)
311  if (zSegC > 0.) {
312  continue;
313  }
314  double tSegC = GetSegmentTime(*segC);
315 
316 
317 
318  // muon segment: in-time (1), early (2), ambiguous (0)
319  int timeStatusC = 0;
320  double inTime = -(-std::abs(zSegC) + globalPos.mag()) * inv_c;
321  double early = -(std::abs(zSegC) + globalPos.mag()) * inv_c;
322  if (std::abs(tSegC - inTime) < m_cutMuonTime)
323  timeStatusC = 1;
324  if (std::abs(tSegC - early) < m_cutMuonTime)
325  timeStatusC = 2;
326 
327  double phiSegC = globalPos.phi();
328 
329  // match in phi
330  if (std::abs(P4Helpers::deltaPhi(phiSegA, phiSegC)) > m_cutDphiSegAC) {
331  continue;
332  }
333  cache.m_numSegmentACNoTime++;
334  cache.m_resultSeg[segIndexA] |= BeamBackgroundData::SegmentACNoTime;
335  cache.m_resultSeg[segIndexC] |= BeamBackgroundData::SegmentACNoTime;
336 
337  if (timeStatusA == 0 || timeStatusC == 0)
338  continue;
339 
340  // check the time difference
341  if (std::abs(tSegA - tSegC) > m_cutTimeDiffAC) {
342  cache.m_numSegmentAC++;
343  cache.m_resultSeg[segIndexA] |= BeamBackgroundData::SegmentAC;
344  cache.m_resultSeg[segIndexC] |= BeamBackgroundData::SegmentAC;
345  }
346  }
347  }
348 }

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ TwoSidedMethod()

void BeamBackgroundFiller::TwoSidedMethod ( Cache cache) const
private

This function is the implementation of the "Two-Sided No-Time Method" and the "Two-Sided Method" that looks at the clusters matched with at least one muon segment on side A and one muon segment on side C.

In case of the "Two-Sided Method", corresponding time difference of the muon segments is required and the direction of the beam background muon is also stored.

Definition at line 475 of file BeamBackgroundFiller.cxx.

475  {
476 
477 
478  for (unsigned int clusIndex = 0; clusIndex < cache.m_indexClus.size(); clusIndex++) {
479 
480  for (unsigned int segIndexA = 0; segIndexA < cache.m_indexSeg.size(); segIndexA++) {
481 
482  if (!(cache.m_matchMatrix[clusIndex][segIndexA] & BeamBackgroundData::Matched))
483  continue;
484 
485  const Muon::MuonSegment* seg = dynamic_cast<const Muon::MuonSegment*>(*(cache.m_indexSeg[segIndexA]));
486 
487  const Amg::Vector3D& globalPos = seg->globalPosition();
488  double zSegA = globalPos.z();
489  // take only the segments on side A (z > 0)
490  if (zSegA < 0.) {
491  continue;
492  }
493  double tSegA = GetSegmentTime(*seg);
494 
495  // muon segment: in-time (1), early (2), ambiguous (0)
496  int timeStatusA = 0;
497  double inTime = -(-std::abs(zSegA) + globalPos.mag()) * inv_c;
498  double early = -(std::abs(zSegA) + globalPos.mag()) * inv_c;
499  if (std::abs(tSegA - inTime) < m_cutMuonTime)
500  timeStatusA = 1;
501  if (std::abs(tSegA - early) < m_cutMuonTime)
502  timeStatusA = 2;
503 
504 
505  for (unsigned int segIndexC = 0; segIndexC < cache.m_indexSeg.size(); segIndexC++) {
506 
507  if (!(cache.m_matchMatrix[clusIndex][segIndexC] & BeamBackgroundData::Matched)){
508  continue;
509  }
510  const Muon::MuonSegment* seg = dynamic_cast<const Muon::MuonSegment*>(*(cache.m_indexSeg[segIndexC]));
511 
512  const Amg::Vector3D& globalPos = seg->globalPosition();
513  double zSegC = globalPos.z();
514 
515  // take only the segments on side C (z < 0)
516  if (zSegC > 0.) {
517  continue;
518  }
519 
520  double tSegC = GetSegmentTime(*seg);
521 
522  // muon segment: in-time (1), early (2), ambiguous (0)
523  int timeStatusC = 0;
524  double inTime = -(-std::abs(zSegC) + globalPos.mag()) * inv_c;
525  double early = -(std::abs(zSegC) + globalPos.mag()) * inv_c;
526  if (std::abs(tSegC - inTime) < m_cutMuonTime)
527  timeStatusC = 1;
528  if (std::abs(tSegC - early) < m_cutMuonTime)
529  timeStatusC = 2;
530 
531 
532 
533  cache.m_matchMatrix[clusIndex][segIndexA] |=BeamBackgroundData::TwoSidedNoTime;
534  cache.m_matchMatrix[clusIndex][segIndexC] |=BeamBackgroundData::TwoSidedNoTime;
535  cache.m_resultSeg[segIndexA] |= cache.m_matchMatrix[clusIndex][segIndexA];
536  cache.m_resultSeg[segIndexC] |= cache.m_matchMatrix[clusIndex][segIndexC];
537 
538  if (timeStatusA == 0 || timeStatusC == 0)
539  continue;
540 
541  // check the time difference
542  if (std::abs(tSegA - tSegC) > m_cutTimeDiffAC) {
543  cache.m_matchMatrix[clusIndex][segIndexA] |= BeamBackgroundData::TwoSided;
544  cache.m_matchMatrix[clusIndex][segIndexC] |= BeamBackgroundData::TwoSided;
545  cache.m_resultSeg[segIndexA] |= cache.m_matchMatrix[clusIndex][segIndexA];
546  cache.m_resultSeg[segIndexC] |= cache.m_matchMatrix[clusIndex][segIndexC];
547 
548  // direction of beam background
549  if (timeStatusA == 2)
550  cache.m_direction++; // A->C
551  if (timeStatusC == 2)
552  cache.m_direction--; // C->A
553  }
554  }
555 
556  cache.m_resultClus[clusIndex] |= cache.m_matchMatrix[clusIndex][segIndexA];
557  }
558 
559  if (cache.m_resultClus[clusIndex] & BeamBackgroundData::TwoSidedNoTime)
560  cache.m_numTwoSidedNoTime++;
561  if (cache.m_resultClus[clusIndex] & BeamBackgroundData::TwoSided)
562  cache.m_numTwoSided++;
563  }
564 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_beamBackgroundDataWriteHandleKey

SG::WriteHandleKey<BeamBackgroundData> BeamBackgroundFiller::m_beamBackgroundDataWriteHandleKey
private
Initial value:
{
this, "BeamBackgroundKey", "BeamBackgroundData",
"WriteHandleKey for BeamBackgroundData"}

Definition at line 126 of file BeamBackgroundFiller.h.

◆ m_caloClusterContainerReadHandleKey

SG::ReadHandleKey<xAOD::CaloClusterContainer> BeamBackgroundFiller::m_caloClusterContainerReadHandleKey
private
Initial value:
{
this, "caloClusterContainerKey", "CaloCalTopoClusters",
"ReadHandleKey for CaloClusterContainer"}

ReadHandleKey for CaloClusterContainer.

Definition at line 116 of file BeamBackgroundFiller.h.

◆ m_clusEnergyCut

Gaudi::Property<double> BeamBackgroundFiller::m_clusEnergyCut {this,"clustEnergy", 10. *Gaudi::Units::GeV}
private

Minimum cut on the cluster energy to be considered.

Definition at line 139 of file BeamBackgroundFiller.h.

◆ m_clusRadiusHigh

Gaudi::Property<double> BeamBackgroundFiller::m_clusRadiusHigh {this,"cutRadiusHigh", 4250. * Gaudi::Units::mm}
private

Definition at line 144 of file BeamBackgroundFiller.h.

◆ m_clusRadiusLow

Gaudi::Property<double> BeamBackgroundFiller::m_clusRadiusLow {this, "cutRadiusLow", 881. * Gaudi::Units::mm}
private

Definition at line 143 of file BeamBackgroundFiller.h.

◆ m_cutClusTime

Gaudi::Property<double> BeamBackgroundFiller::m_cutClusTime {this,"cutClusTime", 2.5}
private

Definition at line 152 of file BeamBackgroundFiller.h.

◆ m_cutDphiClusSeg

Gaudi::Property<double> BeamBackgroundFiller::m_cutDphiClusSeg {this, "cutDphiClusSeg", 4.* Gaudi::Units::deg}
private

Definition at line 146 of file BeamBackgroundFiller.h.

◆ m_cutDphiSegAC

Gaudi::Property<double> BeamBackgroundFiller::m_cutDphiSegAC {this,"cutPhi", 4.* Gaudi::Units::deg}
private

Definition at line 136 of file BeamBackgroundFiller.h.

◆ m_cutDradClusSeg

Gaudi::Property<double> BeamBackgroundFiller::m_cutDradClusSeg {this,"cutDrClusSet", 40. * Gaudi::Units::cm}
private

Definition at line 147 of file BeamBackgroundFiller.h.

◆ m_cutDrdz

Gaudi::Property<double> BeamBackgroundFiller::m_cutDrdz {this,"cutDrdz", 0.15}
private

Definition at line 154 of file BeamBackgroundFiller.h.

◆ m_cutMuonTime

Gaudi::Property<double> BeamBackgroundFiller::m_cutMuonTime {this, "cutMuonTime", 25.}
private

Definition at line 151 of file BeamBackgroundFiller.h.

◆ m_cutTimeDiffAC

Gaudi::Property<double> BeamBackgroundFiller::m_cutTimeDiffAC {this,"cutTimeDiffAC", 25.}
private

Definition at line 153 of file BeamBackgroundFiller.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_edmHelperSvc

ServiceHandle<Muon::IMuonEDMHelperSvc> BeamBackgroundFiller::m_edmHelperSvc
private
Initial value:
{
this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
"Handle to the service providing the IMuonEDMHelperSvc interface"}

Definition at line 155 of file BeamBackgroundFiller.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> BeamBackgroundFiller::m_idHelperSvc
private
Initial value:
{
this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}

Definition at line 158 of file BeamBackgroundFiller.h.

◆ m_jetContainerReadHandleKey

SG::ReadHandleKey<xAOD::JetContainer> BeamBackgroundFiller::m_jetContainerReadHandleKey
private
Initial value:
{
this, "jetContainerKey", "AntiKt4EMTopoJets",
"ReadHandleKey for JetContainer"}

ReadHandleKey for JetContainer.

Definition at line 121 of file BeamBackgroundFiller.h.

◆ m_segmentKeys

SG::ReadHandleKeyArray<Trk::SegmentCollection> BeamBackgroundFiller::m_segmentKeys
private
Initial value:
{
this, "SegmentKeys", {"NCB_TrackMuonSegments", } ,
"Muon segment collections from the MS patterns"}

ReadHandleKey for Trk::SegmentCollection from CSC.

Definition at line 110 of file BeamBackgroundFiller.h.

◆ m_segmentSelector

ToolHandle<Muon::IMuonSegmentSelectionTool> BeamBackgroundFiller::m_segmentSelector {this, "SegmentSelector",""}
private

Definition at line 130 of file BeamBackgroundFiller.h.

◆ m_thetaCutNCB

Gaudi::Property<double> BeamBackgroundFiller::m_thetaCutNCB {this, "cutThetaNCB", 5. * Gaudi::Units::deg}
private

Inclanation cut between the segment position and its direction.

Definition at line 134 of file BeamBackgroundFiller.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
xAOD::CaloCluster_v1::CENTER_MAG
@ CENTER_MAG
Cluster Centroid ( )
Definition: CaloCluster_v1.h:135
BeamBackgroundFiller::m_jetContainerReadHandleKey
SG::ReadHandleKey< xAOD::JetContainer > m_jetContainerReadHandleKey
ReadHandleKey for JetContainer.
Definition: BeamBackgroundFiller.h:121
BeamBackgroundFiller::SegmentMethod
void SegmentMethod(Cache &cache) const
This function looks at the segments found by the FillMatchMatrix function.
Definition: BeamBackgroundFiller.cxx:261
xAOD::CaloCluster_v1::time
flt_t time() const
Access cluster time.
Trk::PrepRawDataType::MdtPrepData
@ MdtPrepData
BeamBackgroundFiller::m_cutDphiSegAC
Gaudi::Property< double > m_cutDphiSegAC
Definition: BeamBackgroundFiller.h:136
BeamBackgroundFiller::m_clusRadiusHigh
Gaudi::Property< double > m_clusRadiusHigh
Definition: BeamBackgroundFiller.h:144
BeamBackgroundData::ClusterShape
@ ClusterShape
Definition: BeamBackgroundData.h:68
xAOD::CaloCluster_v1::cell_begin
const_cell_iterator cell_begin() const
Iterator of the underlying CaloClusterCellLink (const version)
Definition: CaloCluster_v1.h:812
Muon::MMPrepData
Class to represent MM measurements.
Definition: MMPrepData.h:22
CaloCell_ID_FCS::TileExt2
@ TileExt2
Definition: FastCaloSim_CaloCell_ID.h:39
constants.EMB1
int EMB1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:53
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
max
#define max(a, b)
Definition: cfImp.cxx:41
Trk::PrepRawDataType::TgcPrepData
@ TgcPrepData
Trk::PrepRawDataType::MMPrepData
@ MMPrepData
BeamBackgroundFiller::m_caloClusterContainerReadHandleKey
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloClusterContainerReadHandleKey
ReadHandleKey for CaloClusterContainer.
Definition: BeamBackgroundFiller.h:116
BeamBackgroundData::OneSidedTight
@ OneSidedTight
Definition: BeamBackgroundData.h:65
BeamBackgroundFiller::FillBeamBackgroundData
void FillBeamBackgroundData(SG::WriteHandle< BeamBackgroundData > &beamBackgroundDataWriteHandle, Cache &cache) const
This function stores all the results in BeamBackgroundData.
Definition: BeamBackgroundFiller.cxx:713
BeamBackgroundData::OneSidedLoose
@ OneSidedLoose
Definition: BeamBackgroundData.h:63
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CaloCell_ID_FCS::TileExt0
@ TileExt0
Definition: FastCaloSim_CaloCell_ID.h:37
BeamBackgroundFiller::m_cutDphiClusSeg
Gaudi::Property< double > m_cutDphiClusSeg
Definition: BeamBackgroundFiller.h:146
CaloCell_ID_FCS::TileBar1
@ TileBar1
Definition: FastCaloSim_CaloCell_ID.h:32
BeamBackgroundFiller::m_cutDradClusSeg
Gaudi::Property< double > m_cutDradClusSeg
Definition: BeamBackgroundFiller.h:147
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
CaloCell_ID_FCS::FCAL1
@ FCAL1
Definition: FastCaloSim_CaloCell_ID.h:41
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
BeamBackgroundData::Matched
@ Matched
Definition: BeamBackgroundData.h:59
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
Trk::PrepRawData::type
virtual bool type(PrepRawDataType type) const =0
Interface method checking the type.
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
BeamBackgroundData::SegmentAC
@ SegmentAC
Definition: BeamBackgroundData.h:58
python.TurnDataReader.dr
dr
Definition: TurnDataReader.py:112
CaloCell_ID_FCS::HEC2
@ HEC2
Definition: FastCaloSim_CaloCell_ID.h:29
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
CaloCell_ID_FCS::TileGap3
@ TileGap3
Definition: FastCaloSim_CaloCell_ID.h:36
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:83
xAOD::CaloCluster
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition: Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloCluster.h:19
BeamBackgroundData::TwoSidedNoTime
@ TwoSidedNoTime
Definition: BeamBackgroundData.h:66
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
BeamBackgroundData::Segment
@ Segment
Definition: BeamBackgroundData.h:55
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
BeamBackgroundFiller::m_cutDrdz
Gaudi::Property< double > m_cutDrdz
Definition: BeamBackgroundFiller.h:154
Trk::PrepRawDataType::CscPrepData
@ CscPrepData
BeamBackgroundFiller::m_thetaCutNCB
Gaudi::Property< double > m_thetaCutNCB
Inclanation cut between the segment position and its direction.
Definition: BeamBackgroundFiller.h:134
BeamBackgroundFiller::GetSegmentTime
double GetSegmentTime(const Muon::MuonSegment &pMuonSegment) const
Definition: BeamBackgroundFiller.cxx:216
BeamBackgroundFiller::m_edmHelperSvc
ServiceHandle< Muon::IMuonEDMHelperSvc > m_edmHelperSvc
Definition: BeamBackgroundFiller.h:155
BeamBackgroundFiller::m_cutTimeDiffAC
Gaudi::Property< double > m_cutTimeDiffAC
Definition: BeamBackgroundFiller.h:153
BeamBackgroundData::NoTimeLoose
@ NoTimeLoose
Definition: BeamBackgroundData.h:60
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
P4Helpers::deltaPhi
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
Definition: P4Helpers.h:29
AthCommonDataStore
Definition: AthCommonDataStore.h:52
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
CaloCell_ID_FCS::HEC1
@ HEC1
Definition: FastCaloSim_CaloCell_ID.h:28
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
BeamBackgroundData::NoTimeMedium
@ NoTimeMedium
Definition: BeamBackgroundData.h:61
BeamBackgroundFiller::m_cutMuonTime
Gaudi::Property< double > m_cutMuonTime
Definition: BeamBackgroundFiller.h:151
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
lumiFormat.i
int i
Definition: lumiFormat.py:92
BeamBackgroundFiller::m_clusRadiusLow
Gaudi::Property< double > m_clusRadiusLow
Definition: BeamBackgroundFiller.h:143
CaloCell_ID_FCS::TileBar0
@ TileBar0
Definition: FastCaloSim_CaloCell_ID.h:31
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
Muon::CscPrepData
Class representing clusters from the CSC.
Definition: CscPrepData.h:39
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
CaloCell_ID_FCS::TileGap2
@ TileGap2
Definition: FastCaloSim_CaloCell_ID.h:35
Muon::MuonStationIndex::EI
@ EI
Definition: MuonStationIndex.h:26
BeamBackgroundFiller::FindFakeJets
void FindFakeJets(const EventContext &ctx, Cache &cache) const
This function checks whether the matched clusters are contained in any jets.
Definition: BeamBackgroundFiller.cxx:655
Trk::Segment::containedMeasurements
const std::vector< const Trk::MeasurementBase * > & containedMeasurements() const
returns the vector of Trk::MeasurementBase objects
Definition: TrkEvent/TrkSegment/TrkSegment/Segment.h:166
Trk::Segment
Definition: TrkEvent/TrkSegment/TrkSegment/Segment.h:56
BeamBackgroundFiller::ClusterShapeMethod
void ClusterShapeMethod(Cache &cache) const
This function is the implementation of the "Cluster-Shape Method".
Definition: BeamBackgroundFiller.cxx:574
constants.EME1
int EME1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:55
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Muon::CscPrepData::time
double time() const
Returns the time.
Definition: CscPrepData.h:158
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
xAOD::CaloCluster_v1::retrieveMoment
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
Definition: CaloCluster_v1.cxx:738
BeamBackgroundFiller::m_cutClusTime
Gaudi::Property< double > m_cutClusTime
Definition: BeamBackgroundFiller.h:152
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Muon::sTgcPrepData::time
short int time() const
Definition: sTgcPrepData.h:156
xAOD::JetConstituent::rawConstituent
const IParticle * rawConstituent() const
Access the real underlying IParticle.
Definition: JetConstituentVector.h:102
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
BeamBackgroundFiller::m_clusEnergyCut
Gaudi::Property< double > m_clusEnergyCut
Minimum cut on the cluster energy to be considered.
Definition: BeamBackgroundFiller.h:139
BeamBackgroundData::TwoSided
@ TwoSided
Definition: BeamBackgroundData.h:67
CaloCell_ID_FCS::TileGap1
@ TileGap1
Definition: FastCaloSim_CaloCell_ID.h:34
xAOD::CaloCluster_v1::getCellLinks
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
Definition: CaloCluster_v1.cxx:905
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
Trk::PrepRawData
Definition: PrepRawData.h:62
Trk::MeasurementBase
Definition: MeasurementBase.h:58
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
Muon::MdtPrepData::tdc
int tdc() const
Returns the TDC (typically range is 0 to 2500).
Definition: MdtPrepData.h:161
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
CaloCell_ID_FCS::TileExt1
@ TileExt1
Definition: FastCaloSim_CaloCell_ID.h:38
xAOD::JetConstituent::type
Type::ObjectType type() const
The full 4-momentum of the particle.
Definition: JetConstituentVector.h:91
CaloCell_ID_FCS::EME3
@ EME3
Definition: FastCaloSim_CaloCell_ID.h:26
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
Trk::PrepRawDataType::sTgcPrepData
@ sTgcPrepData
python.ElectronD3PDObject.matched
matched
Definition: ElectronD3PDObject.py:138
Muon::MMPrepData::time
short int time() const
Returns the time (in ns)
Definition: MMPrepData.h:222
BeamBackgroundData::NoTimeTight
@ NoTimeTight
Definition: BeamBackgroundData.h:62
Muon::MdtPrepData
Class to represent measurements from the Monitored Drift Tubes.
Definition: MdtPrepData.h:37
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::RIO_OnTrack::prepRawData
virtual const Trk::PrepRawData * prepRawData() const =0
returns the PrepRawData (also known as RIO) object to which this RIO_OnTrack is associated.
BeamBackgroundFiller::m_beamBackgroundDataWriteHandleKey
SG::WriteHandleKey< BeamBackgroundData > m_beamBackgroundDataWriteHandleKey
Definition: BeamBackgroundFiller.h:126
CaloCell_ID_FCS::HEC0
@ HEC0
Definition: FastCaloSim_CaloCell_ID.h:27
BeamBackgroundFiller::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: BeamBackgroundFiller.h:158
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
BeamBackgroundFiller::m_segmentSelector
ToolHandle< Muon::IMuonSegmentSelectionTool > m_segmentSelector
Definition: BeamBackgroundFiller.h:130
a
TList * a
Definition: liststreamerinfos.cxx:10
BeamBackgroundFiller::FillMatchMatrix
void FillMatchMatrix(const EventContext &ctx, Cache &cache) const
This function selects the muon segments with the direction parallel to the beam pipe and calorimeter ...
Definition: BeamBackgroundFiller.cxx:79
h
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CaloCell_ID_FCS::PreSamplerE
@ PreSamplerE
Definition: FastCaloSim_CaloCell_ID.h:23
CaloCell_ID_FCS::PreSamplerB
@ PreSamplerB
Definition: FastCaloSim_CaloCell_ID.h:19
CaloDetDescrElement::z
float z() const
cell z
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:367
xAOD::CaloCluster_v1::cell_end
const_cell_iterator cell_end() const
Definition: CaloCluster_v1.h:813
BeamBackgroundFiller::OneSidedMethod
void OneSidedMethod(Cache &cache) const
This function is the implementation of the "No-Time Method" and the "One-Sided Method".
Definition: BeamBackgroundFiller.cxx:361
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
CaloCell_ID_FCS::FCAL2
@ FCAL2
Definition: FastCaloSim_CaloCell_ID.h:42
Muon::MuonStationIndex::StIndex
StIndex
enum to classify the different station layers in the muon spectrometer
Definition: MuonStationIndex.h:23
xAOD::JetConstituentVector
A vector of jet constituents at the scale used during jet finding.
Definition: JetConstituentVector.h:117
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
Muon::MuonSegment::globalPosition
virtual const Amg::Vector3D & globalPosition() const override final
global position
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:157
xAOD::JetConstituentVector::iterator
Definition: JetConstituentVector.h:121
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
Muon::MuonSegment
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:45
BeamBackgroundFiller::m_segmentKeys
SG::ReadHandleKeyArray< Trk::SegmentCollection > m_segmentKeys
ReadHandleKey for Trk::SegmentCollection from CSC.
Definition: BeamBackgroundFiller.h:110
BeamBackgroundFiller::TwoSidedMethod
void TwoSidedMethod(Cache &cache) const
This function is the implementation of the "Two-Sided No-Time Method" and the "Two-Sided Method" that...
Definition: BeamBackgroundFiller.cxx:475
CaloDetDescrElement::r
float r() const
cell r
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:348
BeamBackgroundData::OneSidedMedium
@ OneSidedMedium
Definition: BeamBackgroundData.h:64
CaloCell_ID_FCS::HEC3
@ HEC3
Definition: FastCaloSim_CaloCell_ID.h:30
CaloCell_ID_FCS::FCAL0
@ FCAL0
Definition: FastCaloSim_CaloCell_ID.h:40
Muon::sTgcPrepData
Class to represent sTgc measurements.
Definition: sTgcPrepData.h:20
CaloCell_ID_FCS::EMB3
@ EMB3
Definition: FastCaloSim_CaloCell_ID.h:22
CaloCell_ID_FCS::TileBar2
@ TileBar2
Definition: FastCaloSim_CaloCell_ID.h:33
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
BeamBackgroundData::SegmentEarly
@ SegmentEarly
Definition: BeamBackgroundData.h:56
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56
BeamBackgroundData::SegmentACNoTime
@ SegmentACNoTime
Definition: BeamBackgroundData.h:57
fitman.k
k
Definition: fitman.py:528
Muon::MuonSegment::globalDirection
const Amg::Vector3D & globalDirection() const
global direction
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:163
ServiceHandle< ICondSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37