ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
ActsTrk::CaloBasedRoICreatorTool Class Reference

#include <CaloBasedRoICreatorTool.h>

Inheritance diagram for ActsTrk::CaloBasedRoICreatorTool:
Collaboration diagram for ActsTrk::CaloBasedRoICreatorTool:

Public Member Functions

 CaloBasedRoICreatorTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~CaloBasedRoICreatorTool ()=default
 
virtual StatusCode initialize () override
 
virtual StatusCode defineRegionsOfInterest (const EventContext &ctx, TrigRoiDescriptorCollection &collectionRoI) const override
 

Private Attributes

SG::ReadHandleKey< ROIPhiRZContainerm_caloClusterROIKey
 
SG::ReadCondHandleKey< InDet::BeamSpotDatam_beamSpotKey
 
Gaudi::Property< double > m_deltaEta {this, "DeltaEtaCaloRoI", .1}
 
Gaudi::Property< double > m_deltaPhi {this, "DeltaPhiCaloRoI", .25}
 
Gaudi::Property< double > m_deltaZ {this, "DeltaZCaloRoI", 300.}
 

Detailed Description

Definition at line 16 of file CaloBasedRoICreatorTool.h.

Constructor & Destructor Documentation

◆ CaloBasedRoICreatorTool()

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

Definition at line 9 of file CaloBasedRoICreatorTool.cxx.

12  : base_class(type, name, parent)
13 {}

◆ ~CaloBasedRoICreatorTool()

virtual ActsTrk::CaloBasedRoICreatorTool::~CaloBasedRoICreatorTool ( )
virtualdefault

Member Function Documentation

◆ defineRegionsOfInterest()

StatusCode ActsTrk::CaloBasedRoICreatorTool::defineRegionsOfInterest ( const EventContext &  ctx,
TrigRoiDescriptorCollection collectionRoI 
) const
overridevirtual

Definition at line 25 of file CaloBasedRoICreatorTool.cxx.

27 {
28  // Define RoI as not a FS RoI
29  collectionRoI.push_back( new TrigRoiDescriptor(false) );
30  // Define RoI as composite RoI
31  collectionRoI.back()->setComposite(true);
32 
33  // Retrieve Beam Spot data
35  ATH_CHECK( beamSpotHandle.isValid() );
36  const InDet::BeamSpotData* beamSpotData = beamSpotHandle.cptr();
37 
38  // Retrieve the Calo info
39  ATH_MSG_DEBUG("Retrieving Calo info from key " << m_caloClusterROIKey.key());
41  ATH_CHECK( caloClustersHandle.isValid() );
42  const ROIPhiRZContainer* caloClusters = caloClustersHandle.cptr();
43  ATH_MSG_DEBUG(" \\__ Retrived " << caloClusters->size() << " elements");
44 
45  // Add component RoIs
46  collectionRoI.back()->reserve(caloClusters->size());
47  double beamZ = beamSpotData->beamVtx().position().z();
48  for (const ROIPhiRZ& calo_roi : *caloClusters) {
49  double phi = calo_roi.phi();
50  // skip duplicates < -pi and >pi
51  if (std::abs(phi) >= M_PI && phi != -M_PI)
52  continue;
53 
54  double eta = calo_roi.eta();
55  double z = beamZ;
56  double roiPhiMin = phi - m_deltaPhi;
57  double roiPhiMax = phi + m_deltaPhi;
58  double roiEtaMin = eta - m_deltaEta;
59  double roiEtaMax = eta + m_deltaEta;
60  double roiZMin = beamZ - m_deltaZ;
61  double roiZMax = beamZ + m_deltaZ;
62 
63  collectionRoI.back()->push_back( new TrigRoiDescriptor(eta, roiEtaMin, roiEtaMax,
64  phi, roiPhiMin ,roiPhiMax,
65  z, roiZMin, roiZMax ) );
66  }
67 
68  ATH_MSG_DEBUG("Created composite RoI from Calo with " << collectionRoI.back()->size() << " RoIs");
69  return StatusCode::SUCCESS;
70 }

◆ initialize()

StatusCode ActsTrk::CaloBasedRoICreatorTool::initialize ( )
overridevirtual

Definition at line 15 of file CaloBasedRoICreatorTool.cxx.

16 {
17  ATH_MSG_DEBUG("Inizializing " << name() << " ..." );
18 
21 
22  return StatusCode::SUCCESS;
23 }

Member Data Documentation

◆ m_beamSpotKey

SG::ReadCondHandleKey< InDet::BeamSpotData > ActsTrk::CaloBasedRoICreatorTool::m_beamSpotKey
private
Initial value:
{this, "BeamSpotKey", "BeamSpotData",
"SG key for beam spot"}

Definition at line 37 of file CaloBasedRoICreatorTool.h.

◆ m_caloClusterROIKey

SG::ReadHandleKey< ROIPhiRZContainer > ActsTrk::CaloBasedRoICreatorTool::m_caloClusterROIKey
private
Initial value:
{this, "CaloClusterRoIContainer", "",
"Name of the calo cluster ROIs in Phi,R,Z parameterization"}

Definition at line 33 of file CaloBasedRoICreatorTool.h.

◆ m_deltaEta

Gaudi::Property< double > ActsTrk::CaloBasedRoICreatorTool::m_deltaEta {this, "DeltaEtaCaloRoI", .1}
private

Definition at line 41 of file CaloBasedRoICreatorTool.h.

◆ m_deltaPhi

Gaudi::Property< double > ActsTrk::CaloBasedRoICreatorTool::m_deltaPhi {this, "DeltaPhiCaloRoI", .25}
private

Definition at line 43 of file CaloBasedRoICreatorTool.h.

◆ m_deltaZ

Gaudi::Property< double > ActsTrk::CaloBasedRoICreatorTool::m_deltaZ {this, "DeltaZCaloRoI", 300.}
private

Definition at line 45 of file CaloBasedRoICreatorTool.h.


The documentation for this class was generated from the following files:
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ActsTrk::CaloBasedRoICreatorTool::m_deltaEta
Gaudi::Property< double > m_deltaEta
Definition: CaloBasedRoICreatorTool.h:42
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
ROIPhiRZContainer
container for phi sorted ROIs defined by phi, r and z.
Definition: ROIPhiRZContainer.h:50
M_PI
#define M_PI
Definition: ActiveFraction.h:11
RoiDescriptor::size
virtual unsigned size() const override final
number of constituents
Definition: RoiDescriptor.h:145
InDet::BeamSpotData::beamVtx
const Trk::RecVertex & beamVtx() const noexcept
Definition: BeamSpotData.h:79
ActsTrk::CaloBasedRoICreatorTool::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: CaloBasedRoICreatorTool.h:38
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
RoiDescriptor::push_back
void push_back(const IRoiDescriptor *roi)
add a RoiDescriptor
Definition: RoiDescriptor.h:157
RoiDescriptor::reserve
void reserve(size_t s)
reserve elements in vector
Definition: RoiDescriptor.h:154
z
#define z
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ActsTrk::CaloBasedRoICreatorTool::m_caloClusterROIKey
SG::ReadHandleKey< ROIPhiRZContainer > m_caloClusterROIKey
Definition: CaloBasedRoICreatorTool.h:34
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
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
Trk::Vertex::position
const Amg::Vector3D & position() const
return position of vertex
Definition: Vertex.cxx:72
DataVector::back
const T * back() const
Access the last element in the collection as an rvalue.
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
ActsTrk::CaloBasedRoICreatorTool::m_deltaPhi
Gaudi::Property< double > m_deltaPhi
Definition: CaloBasedRoICreatorTool.h:44
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
InDet::BeamSpotData
Definition: BeamSpotData.h:21
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
RoiDescriptor::setComposite
void setComposite(bool b=true)
Definition: RoiDescriptor.h:138
ActsTrk::CaloBasedRoICreatorTool::m_deltaZ
Gaudi::Property< double > m_deltaZ
Definition: CaloBasedRoICreatorTool.h:46
TrigRoiDescriptor
Athena::TPCnvVers::Current TrigRoiDescriptor
Definition: TrigSteeringEventTPCnv.cxx:68
ROIPhiRZ
Definition: ROIPhiRZContainer.h:19