ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Muon::MuonPRDSelectionTool Class Reference

#include <MuonPRDSelectionTool.h>

Inheritance diagram for Muon::MuonPRDSelectionTool:
Collaboration diagram for Muon::MuonPRDSelectionTool:

Public Member Functions

 MuonPRDSelectionTool (const std::string &type, const std::string &name, const IInterface *parent)
 Default AlgTool functions. More...
 
virtual ~MuonPRDSelectionTool ()=default
 
StatusCode initialize ()
 
bool calibrateAndSelect (const MuonSystemExtension::Intersection &intersection, const MuonLayerPrepRawData &layerPrepRawData, MuonLayerROTs &layerROTs) const
 IMuonPRDSelectionTool interface: calibrateAndSelect. More...
 
bool calibrateAndSelectMdt (const MuonSystemExtension::Intersection &intersection, const MdtPrepDataCollection &prds, std::vector< const MdtDriftCircleOnTrack * > &rots) const
 calibrate and select MDTs in a collection More...
 
template<class COL >
bool calibrateAndSelectCluster (const MuonSystemExtension::Intersection &intersection, const COL &prds, std::vector< const MuonClusterOnTrack * > &rots) const
 calibrate and select clusters in a collection More...
 
const MdtDriftCircleOnTrackcalibrateAndSelect (const MuonSystemExtension::Intersection &intersection, const MdtPrepData &mdt) const
 IMuonPRDSelectionTool interface: calibrate and select single MDT. More...
 
const MuonClusterOnTrackcalibrateAndSelect (const Trk::TrackParameters &pars, const MuonCluster &clus) const
 IMuonPRDSelectionTool interface: calibrate and select single cluster. More...
 
const MuonClusterOnTrackcalibrateAndSelect (const MuonSystemExtension::Intersection &intersection, const MuonCluster &clus) 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 sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &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
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 IAlgTool interface. More...
 

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

Amg::Vector3D intersectMDT (const MdtPrepData &mdt, const Amg::Vector3D &position, const Amg::Vector3D &direction, bool usePlane) const
 intersect MDT surface or tube plane More...
 
bool calibrateAndSelectMdt (const MuonSystemExtension::Intersection &intersection, const MdtPrepDataCollection &prds, MuonLayerROTs &layerROTs) const
 calibrate and select MDTs in a collection More...
 
template<class COL >
bool calibrateAndSelectCluster (const MuonSystemExtension::Intersection &intersection, const COL &prds, MuonLayerROTs &layerROTs) const
 calibrate and select clusters in a collection 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

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
ToolHandle< IMdtDriftCircleOnTrackCreatorm_mdtCreator {this,"MdtDriftCircleOnTrackCreator","Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator"}
 
ToolHandle< IMuonClusterOnTrackCreatorm_clusterCreator {this,"MuonClusterOnTrackCreator","Muon::MuonClusterOnTrackCreator/MuonClusterOnTrackCreator"}
 
double m_distanceToTubeCut
 cuts More...
 
double m_secondCoordinateCut
 
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

Definition at line 27 of file MuonPRDSelectionTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MuonPRDSelectionTool()

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

Default AlgTool functions.

Definition at line 11 of file MuonPRDSelectionTool.cxx.

11  :
13  m_distanceToTubeCut(1000.),
15  {
16  declareInterface<IMuonPRDSelectionTool>(this);
17  }

◆ ~MuonPRDSelectionTool()

virtual Muon::MuonPRDSelectionTool::~MuonPRDSelectionTool ( )
virtualdefault

Member Function Documentation

◆ calibrateAndSelect() [1/4]

const MdtDriftCircleOnTrack * Muon::MuonPRDSelectionTool::calibrateAndSelect ( const MuonSystemExtension::Intersection intersection,
const MdtPrepData mdt 
) const
virtual

IMuonPRDSelectionTool interface: calibrate and select single MDT.

Implements Muon::IMuonPRDSelectionTool.

Definition at line 78 of file MuonPRDSelectionTool.cxx.

78  {
79 
80  // calculate intersection with tube
81  const Amg::Vector3D& direction = intersection.trackParameters->momentum();
82  Amg::Vector3D intersect = intersectMDT(mdt,intersection.trackParameters->position(),direction,true);
83 
84 
85  // calculate local position of the intersection in tube frame
86  const Identifier& id = mdt.identify();
87  const MuonGM::MdtReadoutElement* detEl = mdt.detectorElement();
88  const Trk::Surface& surface = mdt.detectorElement()->surface(id);
89  Amg::Vector2D localPosition{Amg::Vector2D::Zero()};
90  if( !surface.globalToLocal(intersect,direction,localPosition) ){
91  ATH_MSG_VERBOSE(" globalToLocal failed for " << m_idHelperSvc->toString(id) );
92  return nullptr;
93  }
94 
95  // bound checks
96  double tubeHalfLen = 0.5*detEl->getActiveTubeLength( m_idHelperSvc->mdtIdHelper().tubeLayer(id),m_idHelperSvc->mdtIdHelper().tube(id) );
97  double distanceAlongTube = localPosition[Trk::locZ];
98 
99  if( msgLvl(MSG::VERBOSE) ) {
100  msg(MSG::VERBOSE) << " Intersected " << m_idHelperSvc->toString(id) << " distance to wire " << localPosition[Trk::locR]
101  << " error " << Amg::error(*intersection.trackParameters->covariance(),Trk::locX) << " along tube (%) " << distanceAlongTube/tubeHalfLen;
102 
103  }
104  if( std::abs(distanceAlongTube) > tubeHalfLen + m_secondCoordinateCut ) {
105  if( msgLvl(MSG::VERBOSE) ) msg(MSG::VERBOSE) << " outside tube second coordinate range, dropping " << endmsg;
106  return nullptr;
107  }
108 
109  if( std::abs(localPosition[Trk::locR]) > m_distanceToTubeCut ) {
110  if( msgLvl(MSG::VERBOSE) ) msg(MSG::VERBOSE) << " too far from wire, dropping " << endmsg;
111  return nullptr;
112  }
113 
114  // shift intersection within tube
115  if( distanceAlongTube > tubeHalfLen ){
116  localPosition[Trk::locZ] = distanceAlongTube < 0 ? -tubeHalfLen : tubeHalfLen;
117  surface.localToGlobal(localPosition,direction,intersect);
118  if( msgLvl(MSG::VERBOSE) ) msg(MSG::VERBOSE) << " outside tube, shifting";
119  }
121 
122  // calibrate hit
123  const MdtDriftCircleOnTrack* mdtROT = m_mdtCreator->createRIO_OnTrack( mdt, intersect, &direction );
124  if( !mdtROT ) ATH_MSG_VERBOSE(" Failed to calibrate " << m_idHelperSvc->toString(id));
125  return mdtROT;
126  }

◆ calibrateAndSelect() [2/4]

const MuonClusterOnTrack * Muon::MuonPRDSelectionTool::calibrateAndSelect ( const MuonSystemExtension::Intersection intersection,
const MuonCluster clus 
) const
virtual

Implements Muon::IMuonPRDSelectionTool.

Definition at line 166 of file MuonPRDSelectionTool.cxx.

166  {
167  return calibrateAndSelect(*intersection.trackParameters,clus);
168  }

◆ calibrateAndSelect() [3/4]

bool Muon::MuonPRDSelectionTool::calibrateAndSelect ( const MuonSystemExtension::Intersection intersection,
const MuonLayerPrepRawData layerPrepRawData,
MuonLayerROTs layerROTs 
) const
virtual

IMuonPRDSelectionTool interface: calibrateAndSelect.

Implements Muon::IMuonPRDSelectionTool.

Definition at line 27 of file MuonPRDSelectionTool.cxx.

27  {
28 
29  if( msgLvl(MSG::DEBUG) ){
30  msg(MSG::DEBUG) << " intersection: in sector " << intersection.layerSurface.sector
31  << " region " << MuonStationIndex::regionName(intersection.layerSurface.regionIndex)
32  << " layer " << MuonStationIndex::layerName(intersection.layerSurface.layerIndex)
33  << " r " << intersection.trackParameters->position().perp() << " z " << intersection.trackParameters->position().z()
34  << " phi " << intersection.trackParameters->position().phi()
35  << " local (" << intersection.trackParameters->parameters()[Trk::loc1] << "," << intersection.trackParameters->parameters()[Trk::loc2] << ")";
36  if( intersection.trackParameters->covariance() ) {
37  msg(MSG::DEBUG) << " err (" << Amg::error(*intersection.trackParameters->covariance(),Trk::loc1) << "," << Amg::error(*intersection.trackParameters->covariance(),Trk::loc2) << ")";
38  }
39 
40  if( !layerPrepRawData.mdts.empty() ) msg(MSG::DEBUG) << " MDTs " << layerPrepRawData.mdts.size();
41  if( !layerPrepRawData.rpcs.empty() ) msg(MSG::DEBUG) << " RPCs " << layerPrepRawData.rpcs.size();
42  if( !layerPrepRawData.tgcs.empty() ) msg(MSG::DEBUG) << " TGCs " << layerPrepRawData.tgcs.size();
43  if( !layerPrepRawData.cscs.empty() ) msg(MSG::DEBUG) << " CSCs " << layerPrepRawData.cscs.size();
44  if( !layerPrepRawData.stgcs.empty() ) msg(MSG::DEBUG) << " STGCs " << layerPrepRawData.stgcs.size();
45  if( !layerPrepRawData.mms.empty() ) msg(MSG::DEBUG) << " MMs " << layerPrepRawData.mms.size();
46  msg(MSG::DEBUG) << endmsg;
47  }
48 
49  // loop over MDT collections
50  for( const auto *col : layerPrepRawData.mdts ){
52  }
53 
54  // loop over RPC collections
55  for( const auto *col : layerPrepRawData.rpcs ){
57  }
58 
59  // loop over TGC collections
60  for( const auto *col : layerPrepRawData.tgcs ){
62  }
63 
64  // loop over STGC collections
65  for( const auto *col : layerPrepRawData.stgcs ){
67  }
68 
69  // loop over MM collections
70  for( const auto *col : layerPrepRawData.mms ){
72  }
73 
74  return true;
75  }

◆ calibrateAndSelect() [4/4]

const MuonClusterOnTrack * Muon::MuonPRDSelectionTool::calibrateAndSelect ( const Trk::TrackParameters pars,
const MuonCluster clus 
) const
virtual

IMuonPRDSelectionTool interface: calibrate and select single cluster.

Implements Muon::IMuonPRDSelectionTool.

Definition at line 128 of file MuonPRDSelectionTool.cxx.

128  {
129 
130  // basic info
131  const Identifier& id = clus.identify();
132  const Trk::Surface& surf = clus.detectorElement()->surface(id);
133 
134  // calculate intersection
135  const Amg::Vector3D& position = pars.position();
136  const Amg::Vector3D& direction = pars.momentum();
137  Trk::Intersection slIntersection = clus.detectorElement()->surface(id).straightLineIntersection(position,direction,false,false);
138  Amg::Vector3D intersect = slIntersection.position;
139 
140 
141  // get local position
142  Amg::Vector2D localPosition;
143  if( !surf.globalToLocal(intersect,direction,localPosition) ){
144  ATH_MSG_VERBOSE(" globalToLocal failed for " << m_idHelperSvc->toString(id) );
145  return nullptr;
146  }
147 
148  if( msgLvl(MSG::VERBOSE) ) msg(MSG::VERBOSE) << " Intersected " << m_idHelperSvc->toString(id) << " local position " << localPosition[Trk::loc1] << " " << localPosition[Trk::loc2];
149 
150  if( !surf.insideBounds(localPosition, m_distanceToTubeCut, m_secondCoordinateCut) ) {
151  if( msgLvl(MSG::VERBOSE) ) msg(MSG::VERBOSE) << " outside bounds, dropping " << endmsg;
152  return nullptr;
153  }
155 
156  const MuonClusterOnTrack *cluster = m_clusterCreator->createRIO_OnTrack(clus, intersect);
157 
158  if( !cluster ){
159  ATH_MSG_VERBOSE(" --- cluster creation failed ");
160  return nullptr;
161  }
162 
163  return cluster;
164  }

◆ calibrateAndSelectCluster() [1/2]

template<class COL >
bool Muon::MuonPRDSelectionTool::calibrateAndSelectCluster ( const MuonSystemExtension::Intersection intersection,
const COL &  prds,
MuonLayerROTs layerROTs 
) const
inlineprivate

calibrate and select clusters in a collection

Definition at line 80 of file MuonPRDSelectionTool.h.

80  {
81  std::vector<const MuonClusterOnTrack*> rots;
83  if( !rots.empty() ) layerROTs.addClusters(rots,m_idHelperSvc->technologyIndex(rots.front()->identify()));
84  return true;
85  }

◆ calibrateAndSelectCluster() [2/2]

template<class COL >
bool Muon::MuonPRDSelectionTool::calibrateAndSelectCluster ( const MuonSystemExtension::Intersection intersection,
const COL &  prds,
std::vector< const MuonClusterOnTrack * > &  rots 
) const
inline

calibrate and select clusters in a collection

Definition at line 49 of file MuonPRDSelectionTool.h.

49  {
50  for( typename COL::const_iterator it = prds.begin(); it != prds.end();++it ){
51  const MuonClusterOnTrack* rot = calibrateAndSelect(intersection,**it);
52  if( rot ) rots.push_back(rot);
53  }
54  return true;
55  }

◆ calibrateAndSelectMdt() [1/2]

bool Muon::MuonPRDSelectionTool::calibrateAndSelectMdt ( const MuonSystemExtension::Intersection intersection,
const MdtPrepDataCollection prds,
MuonLayerROTs layerROTs 
) const
inlineprivate

calibrate and select MDTs in a collection

Definition at line 71 of file MuonPRDSelectionTool.h.

71  {
72  std::vector<const MdtDriftCircleOnTrack*> rots;
74  if( !rots.empty() ) layerROTs.addMdts(rots);
75  return true;
76  }

◆ calibrateAndSelectMdt() [2/2]

bool Muon::MuonPRDSelectionTool::calibrateAndSelectMdt ( const MuonSystemExtension::Intersection intersection,
const MdtPrepDataCollection prds,
std::vector< const MdtDriftCircleOnTrack * > &  rots 
) const
inlinevirtual

calibrate and select MDTs in a collection

Implements Muon::IMuonPRDSelectionTool.

Definition at line 39 of file MuonPRDSelectionTool.h.

39  {
40  for( MdtPrepDataCollection::const_iterator it = prds.begin(); it != prds.end();++it ){
41  const MdtDriftCircleOnTrack* rot = calibrateAndSelect(intersection,**it);
42  if( rot ) rots.push_back(rot);
43  }
44  return true;
45  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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; }

◆ extraDeps_update_handler()

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

Add StoreName to extra input/output deps as needed.

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

◆ initialize()

StatusCode Muon::MuonPRDSelectionTool::initialize ( )

Definition at line 19 of file MuonPRDSelectionTool.cxx.

19  {
20 
21  ATH_CHECK(m_idHelperSvc.retrieve());
22  ATH_CHECK(m_mdtCreator.retrieve());
23  ATH_CHECK(m_clusterCreator.retrieve());
24  return StatusCode::SUCCESS;
25  }

◆ inputHandles()

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

Return this algorithm's input handles.

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

◆ interfaceID()

const InterfaceID & Muon::IMuonPRDSelectionTool::interfaceID ( )
inlinestaticinherited

IAlgTool interface.

Definition at line 48 of file IMuonPRDSelectionTool.h.

48 { return IID_IMuonPRDSelectionTool; }

◆ intersectMDT()

Amg::Vector3D Muon::MuonPRDSelectionTool::intersectMDT ( const MdtPrepData mdt,
const Amg::Vector3D position,
const Amg::Vector3D direction,
bool  usePlane 
) const
private

intersect MDT surface or tube plane

Definition at line 170 of file MuonPRDSelectionTool.cxx.

170  {
171 
172  if( usePlane ){
173  const Identifier& id = mdt.identify();
174  const MuonGM::MdtReadoutElement* detEl = mdt.detectorElement();
175  const Amg::Vector3D& tubePos = mdt.globalPosition();
176  // if there is a phi measurement in the pattern use the global direction to calculate the intersect with the tube
177  // use the intersect to calculate the second coordinate
178  const Amg::Transform3D amdbToGlobal = detEl->AmdbLRSToGlobalTransform();
179 
180  // calculate intersect pattern measurement plane
181  const Amg::Vector3D& planeposition = tubePos;
182 
183  // always project on plane with normal in radial direction
184  Amg::Vector3D planenormal = !m_idHelperSvc->isEndcap(id) ? amdbToGlobal.linear()*Amg::Vector3D(0.,0.,1.) : amdbToGlobal.linear()*Amg::Vector3D(0.,1.,0.);
185 
186  double denom = direction.dot(planenormal);
187  double u = (planenormal.dot(planeposition - position))/denom;
188  Amg::Vector3D piOnPlane = ( position + u * direction);
189  return piOnPlane;
190  }
191  Trk::Intersection intersection = mdt.detectorElement()->surface(mdt.identify()).straightLineIntersection(position,direction,false,false);
192  return intersection.position;
193  }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::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< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

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

◆ outputHandles()

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

Return this algorithm's output handles.

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

◆ renounce()

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

Definition at line 380 of file AthCommonDataStore.h.

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

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

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

Perform system initialization for an algorithm.

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

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

◆ sysStart()

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

Handle START transition.

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

◆ updateVHKA()

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

Definition at line 308 of file AthCommonDataStore.h.

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

Member Data Documentation

◆ m_clusterCreator

ToolHandle<IMuonClusterOnTrackCreator> Muon::MuonPRDSelectionTool::m_clusterCreator {this,"MuonClusterOnTrackCreator","Muon::MuonClusterOnTrackCreator/MuonClusterOnTrackCreator"}
private

Definition at line 89 of file MuonPRDSelectionTool.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_distanceToTubeCut

double Muon::MuonPRDSelectionTool::m_distanceToTubeCut
private

cuts

Definition at line 92 of file MuonPRDSelectionTool.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> Muon::MuonPRDSelectionTool::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 87 of file MuonPRDSelectionTool.h.

◆ m_mdtCreator

ToolHandle<IMdtDriftCircleOnTrackCreator> Muon::MuonPRDSelectionTool::m_mdtCreator {this,"MdtDriftCircleOnTrackCreator","Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator"}
private

Definition at line 88 of file MuonPRDSelectionTool.h.

◆ m_secondCoordinateCut

double Muon::MuonPRDSelectionTool::m_secondCoordinateCut
private

Definition at line 93 of file MuonPRDSelectionTool.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
Muon::MuonPRDSelectionTool::calibrateAndSelectMdt
bool calibrateAndSelectMdt(const MuonSystemExtension::Intersection &intersection, const MdtPrepDataCollection &prds, std::vector< const MdtDriftCircleOnTrack * > &rots) const
calibrate and select MDTs in a collection
Definition: MuonPRDSelectionTool.h:39
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
Muon::MuonPRDSelectionTool::calibrateAndSelect
bool calibrateAndSelect(const MuonSystemExtension::Intersection &intersection, const MuonLayerPrepRawData &layerPrepRawData, MuonLayerROTs &layerROTs) const
IMuonPRDSelectionTool interface: calibrateAndSelect.
Definition: MuonPRDSelectionTool.cxx:27
MuonGM::MuonReadoutElement::AmdbLRSToGlobalTransform
virtual Amg::Transform3D AmdbLRSToGlobalTransform() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:145
Trk::Intersection
Definition: Intersection.h:24
Trk::locX
@ locX
Definition: ParamDefs.h:37
DataVector< PrepDataT >::const_iterator
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
Definition: DataVector.h:837
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
skel.it
it
Definition: skel.GENtoEVGEN.py:396
Muon::MuonPRDSelectionTool::m_secondCoordinateCut
double m_secondCoordinateCut
Definition: MuonPRDSelectionTool.h:93
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
Trk::loc2
@ loc2
generic first and second local coordinate
Definition: ParamDefs.h:35
Trk::locR
@ locR
Definition: ParamDefs.h:44
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
intersection
std::vector< std::string > intersection(std::vector< std::string > &v1, std::vector< std::string > &v2)
Definition: compareFlatTrees.cxx:25
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
Muon::MuonStationIndex::regionName
static const std::string & regionName(DetectorRegionIndex index)
convert DetectorRegionIndex into a string
Definition: MuonStationIndex.cxx:176
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Trk::locZ
@ locZ
local cylindrical
Definition: ParamDefs.h:42
MuonGM::MdtReadoutElement
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:51
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
MuonGM::MdtReadoutElement::getActiveTubeLength
double getActiveTubeLength(const int tubeLayer, const int tube) const
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
dumpNswErrorDb.linear
def linear
Definition: dumpNswErrorDb.py:23
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Muon::MuonPRDSelectionTool::m_distanceToTubeCut
double m_distanceToTubeCut
cuts
Definition: MuonPRDSelectionTool.h:92
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Muon::MuonStationIndex::layerName
static const std::string & layerName(LayerIndex index)
convert LayerIndex into a string
Definition: MuonStationIndex.cxx:192
Muon::MuonPRDSelectionTool::calibrateAndSelectCluster
bool calibrateAndSelectCluster(const MuonSystemExtension::Intersection &intersection, const COL &prds, std::vector< const MuonClusterOnTrack * > &rots) const
calibrate and select clusters in a collection
Definition: MuonPRDSelectionTool.h:49
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
MuonGM::MuonReadoutElement::globalPosition
const Amg::Vector3D globalPosition() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:47
Trk::Intersection::position
Amg::Vector3D position
Definition: Intersection.h:25
compute_lumi.denom
denom
Definition: compute_lumi.py:76
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
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
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Amg::error
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Definition: EventPrimitivesHelpers.h:40
Trk::Surface::insideBounds
virtual bool insideBounds(const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const =0
virtual methods to be overwritten by the inherited surfaces
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Muon::MuonPRDSelectionTool::m_mdtCreator
ToolHandle< IMdtDriftCircleOnTrackCreator > m_mdtCreator
Definition: MuonPRDSelectionTool.h:88
query_example.col
col
Definition: query_example.py:7
a
TList * a
Definition: liststreamerinfos.cxx:10
Muon::MuonPRDSelectionTool::intersectMDT
Amg::Vector3D intersectMDT(const MdtPrepData &mdt, const Amg::Vector3D &position, const Amg::Vector3D &direction, bool usePlane) const
intersect MDT surface or tube plane
Definition: MuonPRDSelectionTool.cxx:170
h
Trk::Surface::globalToLocal
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const =0
Specified by each surface type: GlobalToLocal method without dynamic memory allocation - boolean chec...
Amg::intersect
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point B' along the line B that's closest to a second line A.
Definition: GeoPrimitivesHelpers.h:347
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
Trk::loc1
@ loc1
Definition: ParamDefs.h:34
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Muon::MuonPRDSelectionTool::m_clusterCreator
ToolHandle< IMuonClusterOnTrackCreator > m_clusterCreator
Definition: MuonPRDSelectionTool.h:89
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
Muon::MuonPRDSelectionTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonPRDSelectionTool.h:87
Trk::Surface::localToGlobal
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const =0
Specified by each surface type: LocalToGlobal method without dynamic memory allocation.
fitman.k
k
Definition: fitman.py:528
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
Identifier
Definition: IdentifierFieldParser.cxx:14