|
ATLAS Offline Software
|
#include <HGTD_RDOAnalysis.h>
|
| HGTD_RDOAnalysis (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual StatusCode | initialize () override final |
|
virtual StatusCode | execute () override final |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | 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 |
|
|
SG::ReadHandleKey< HGTD_RDO_Container > | m_inputKey {this, "CollectionName", "HGTD_RDOs", "Input HGTD RDO collection name"} |
|
SG::ReadHandleKey< InDetSimDataCollection > | m_inputTruthKey {this, "SDOCollectionName", "HGTD_SDO_Map", "Input HGTD SDO collection name"} |
|
SG::ReadHandleKey< McEventCollection > | m_inputMcEventCollectionKey {this, "McEventCollectionName", "TruthEvent", "Input McEventCollection name"} |
|
const HGTD_DetectorManager * | m_HGTD_Manager {} |
|
Gaudi::Property< std::string > | m_HGTD_Name {this, "DetectorName", "HGTD", "HGTD detector name"} |
|
const HGTD_ID * | m_HGTD_ID {} |
|
Gaudi::Property< std::string > | m_HGTDID_Name {this, "PixelIDName", "HGTD_ID", "HGTD ID name"} |
|
Gaudi::Property< std::string > | m_histPath {this, "HistPath", "/RDOAnalysis/HGTD/", ""} |
|
Gaudi::Property< std::string > | m_sharedHistPath {this, "SharedHistPath", "/RDOAnalysis/histos/", ""} |
|
Gaudi::Property< std::string > | m_ntuplePath {this, "NtuplePath", "/RDOAnalysis/ntuples/", ""} |
|
Gaudi::Property< std::string > | m_ntupleName {this, "NtupleName", "HGTD", ""} |
|
Gaudi::Property< bool > | m_doPosition {this, "DoPosition", true, ""} |
|
ServiceHandle< ITHistSvc > | m_thistSvc {this, "HistSvc", "THistSvc", ""} |
|
TTree * | m_tree {} |
|
std::vector< int > | m_rdo_module_layer |
|
std::vector< float > | m_rdo_module_x |
|
std::vector< float > | m_rdo_module_y |
|
std::vector< float > | m_rdo_module_z |
|
std::vector< float > | m_rdo_hit_x |
|
std::vector< float > | m_rdo_hit_y |
|
std::vector< float > | m_rdo_hit_z |
|
std::vector< float > | m_rdo_hit_toa |
|
std::vector< float > | m_rdo_hit_sdo_toa |
|
std::vector< int > | m_rdo_hit_sdo_truth_category |
|
DataObjIDColl | m_extendedExtraObjects |
|
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 |
|
Definition at line 30 of file HGTD_RDOAnalysis.h.
◆ StoreGateSvc_t
◆ HGTD_RDOAnalysis()
HGTD_RDOAnalysis::HGTD_RDOAnalysis |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode HGTD_RDOAnalysis::execute |
( |
| ) |
|
|
finaloverridevirtual |
Definition at line 69 of file HGTD_RDOAnalysis.cxx.
88 bool doTruthMatching =
true;
89 const HepMC::GenEvent* hardScatterEvent(
nullptr);
91 if (mcEventCollection->size()==0){
92 ATH_MSG_WARNING(
"Failed to retrieve a nonzero sized truth event collection, disabling truthMatching");
93 doTruthMatching =
false;
95 if(doTruthMatching) hardScatterEvent = mcEventCollection->at(0);
97 if(p_RDO_cont.isValid()) {
102 const Identifier rdoIDColl((*rdoCont_itr)->identify());
116 const Identifier rdoID((*rdo_itr)->identify());
127 float rdo_toa = (*rdo_itr)->getTOA();
133 if(simDataMap.isValid()){
134 InDetSimDataCollection::const_iterator iter = (*simDataMap).find((*rdo_itr)->identify());
135 std::vector<SdoInfo> sdo_info;
136 if ( iter != (*simDataMap).end() ) {
138 const std::vector< InDetSimData::Deposit >& deposits = sdo.
getdeposits();
139 for( std::vector< InDetSimData::Deposit >::const_iterator nextdeposit = deposits.begin() ; nextdeposit!=deposits.end(); ++nextdeposit) {
142 sdoi.time = nextdeposit->second;
149 sdo_info.push_back(sdoi);
156 sdo_info.push_back(sdoi);
160 std::sort(sdo_info.begin(), sdo_info.end());
161 if (sdo_info.size() > 0) {
179 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ initialize()
StatusCode HGTD_RDOAnalysis::initialize |
( |
| ) |
|
|
finaloverridevirtual |
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ isHSGoodParticle()
Definition at line 182 of file HGTD_RDOAnalysis.cxx.
183 bool decision =
false;
186 particlePtr->momentum().perp() >= min_pt_cut and
187 particlePtr->momentum().eta() < 4. and
188 particlePtr->parent_event() == hardScatterGenEvent)
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_detStore
◆ m_doPosition
Gaudi::Property<bool> HGTD_RDOAnalysis::m_doPosition {this, "DoPosition", true, ""} |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_HGTD_ID
◆ m_HGTD_Manager
◆ m_HGTD_Name
Gaudi::Property<std::string> HGTD_RDOAnalysis::m_HGTD_Name {this, "DetectorName", "HGTD", "HGTD detector name"} |
|
private |
◆ m_HGTDID_Name
Gaudi::Property<std::string> HGTD_RDOAnalysis::m_HGTDID_Name {this, "PixelIDName", "HGTD_ID", "HGTD ID name"} |
|
private |
◆ m_histPath
Gaudi::Property<std::string> HGTD_RDOAnalysis::m_histPath {this, "HistPath", "/RDOAnalysis/HGTD/", ""} |
|
private |
◆ m_inputKey
◆ m_inputMcEventCollectionKey
◆ m_inputTruthKey
◆ m_ntupleName
Gaudi::Property<std::string> HGTD_RDOAnalysis::m_ntupleName {this, "NtupleName", "HGTD", ""} |
|
private |
◆ m_ntuplePath
Gaudi::Property<std::string> HGTD_RDOAnalysis::m_ntuplePath {this, "NtuplePath", "/RDOAnalysis/ntuples/", ""} |
|
private |
◆ m_rdo_hit_sdo_toa
std::vector<float> HGTD_RDOAnalysis::m_rdo_hit_sdo_toa |
|
private |
◆ m_rdo_hit_sdo_truth_category
std::vector<int> HGTD_RDOAnalysis::m_rdo_hit_sdo_truth_category |
|
private |
◆ m_rdo_hit_toa
std::vector<float> HGTD_RDOAnalysis::m_rdo_hit_toa |
|
private |
◆ m_rdo_hit_x
std::vector<float> HGTD_RDOAnalysis::m_rdo_hit_x |
|
private |
◆ m_rdo_hit_y
std::vector<float> HGTD_RDOAnalysis::m_rdo_hit_y |
|
private |
◆ m_rdo_hit_z
std::vector<float> HGTD_RDOAnalysis::m_rdo_hit_z |
|
private |
◆ m_rdo_module_layer
std::vector<int> HGTD_RDOAnalysis::m_rdo_module_layer |
|
private |
◆ m_rdo_module_x
std::vector<float> HGTD_RDOAnalysis::m_rdo_module_x |
|
private |
◆ m_rdo_module_y
std::vector<float> HGTD_RDOAnalysis::m_rdo_module_y |
|
private |
◆ m_rdo_module_z
std::vector<float> HGTD_RDOAnalysis::m_rdo_module_z |
|
private |
◆ m_sharedHistPath
Gaudi::Property<std::string> HGTD_RDOAnalysis::m_sharedHistPath {this, "SharedHistPath", "/RDOAnalysis/histos/", ""} |
|
private |
◆ m_thistSvc
ServiceHandle<ITHistSvc> HGTD_RDOAnalysis::m_thistSvc {this, "HistSvc", "THistSvc", ""} |
|
private |
◆ m_tree
TTree* HGTD_RDOAnalysis::m_tree {} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
Const iterator class for DataVector/DataList.
std::vector< float > m_rdo_hit_x
std::vector< float > m_rdo_hit_y
const std::vector< Deposit > & getdeposits() const
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
ServiceHandle< ITHistSvc > m_thistSvc
Gaudi::Property< std::string > m_ntuplePath
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
SG::ReadHandleKey< InDetSimDataCollection > m_inputTruthKey
Gaudi::Property< std::string > m_ntupleName
int layer(const Identifier &id) const
bool isGenStable(const T &p)
Determine if the particle is stable at the generator (not det-sim) level,.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
HepMC::ConstGenParticlePtr cptr() const
Dereference.
const HGTD_DetectorManager * m_HGTD_Manager
std::vector< float > m_rdo_hit_toa
std::vector< float > m_rdo_module_z
a link optimized in size for a GenParticle in a McEventCollection
virtual StatusCode sysInitialize() override
Override sysInitialize.
Gaudi::Property< std::string > m_HGTD_Name
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< float > m_rdo_hit_sdo_toa
std::vector< float > m_rdo_module_x
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
bool isValid() const
Validity check.
bool isHSGoodParticle(HepMC::ConstGenParticlePtr particlePtr, const HepMC::GenEvent *hardScatterEvent, float min_pt_cut=1000.)
std::vector< int > m_rdo_module_layer
virtual void renounce()=0
SG::ReadHandleKey< McEventCollection > m_inputMcEventCollectionKey
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
const GenParticle * ConstGenParticlePtr
std::vector< float > m_rdo_hit_z
Eigen::Matrix< double, 3, 1 > Vector3D
InDetDD::HGTD_DetectorElement * getDetectorElement(const Identifier &id) const
access to individual elements : via Identifier
DataObjIDColl m_extendedExtraObjects
Amg::Vector2D rawLocalPositionOfCell(const SiCellId &cellId) const
Returns position (center) of cell.
bool isCharged(const T &p)
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
#define ATH_MSG_WARNING(x)
HepGeom::Point3D< double > globalPosition(const HepGeom::Point3D< double > &localPos) const
transform a reconstruction local position into a global position (inline):
Gaudi::Property< std::string > m_HGTDID_Name
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
std::vector< float > m_rdo_module_y
AthAlgorithm()
Default constructor:
const HGTD_ID * m_HGTD_ID
SG::ReadHandleKey< HGTD_RDO_Container > m_inputKey
std::vector< int > m_rdo_hit_sdo_truth_category
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>