 |
ATLAS Offline Software
|
Go to the documentation of this file.
58 return StatusCode::SUCCESS;
75 const EventContext& ctx{Gaudi::Hive::currentContext()};
87 bool doTruthMatching =
true;
88 const HepMC::GenEvent* hardScatterEvent(
nullptr);
90 if (mcEventCollection->size()==0){
91 ATH_MSG_WARNING(
"Failed to retrieve a nonzero sized truth event collection, disabling truthMatching");
92 doTruthMatching =
false;
94 if(doTruthMatching) hardScatterEvent = mcEventCollection->at(0);
100 const Identifier rdoIDColl((*rdoCont_itr)->identify());
109 const Identifier rdoID((*rdo_itr)->identify());
128 float rdo_toa = (*rdo_itr)->getTOA();
135 InDetSimDataCollection::const_iterator
iter = (*simDataMap).find((*rdo_itr)->identify());
136 std::vector<SdoInfo> sdo_info;
137 if (
iter != (*simDataMap).end() ) {
139 const std::vector< InDetSimData::Deposit >& deposits = sdo.
getdeposits();
140 for( std::vector< InDetSimData::Deposit >::const_iterator nextdeposit = deposits.begin() ; nextdeposit!=deposits.end(); ++nextdeposit) {
143 sdoi.
time = nextdeposit->second;
150 sdo_info.push_back(sdoi);
157 sdo_info.push_back(sdoi);
161 std::sort(sdo_info.begin(), sdo_info.end());
162 if (sdo_info.size() > 0) {
177 return StatusCode::SUCCESS;
181 bool decision =
false;
184 particlePtr->momentum().perp() >= min_pt_cut and
185 particlePtr->momentum().eta() < 4. and
186 particlePtr->parent_event() == hardScatterGenEvent)
def retrieve(aClass, aKey=None)
const ServiceHandle< ITHistSvc > & histSvc() const
The standard THistSvc (for writing histograms and TTrees and more to a root file) Returns (kind of) a...
Const iterator class for DataVector/DataList.
virtual StatusCode execute() override final
std::vector< float > m_rdo_hit_x
std::vector< float > m_rdo_hit_y
const std::vector< Deposit > & getdeposits() const
Gaudi::Property< std::string > m_ntuplePath
value_type get_compact() const
Get the compact id.
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.
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
const InDetDD::HGTD_DetectorElement * getDetectorElement(const Identifier &id) const
access to individual elements : via Identifier
Gaudi::Property< std::string > m_HGTD_Name
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< float > m_rdo_hit_sdo_toa
std::vector< float > m_rdo_module_x
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
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
SG::ReadHandleKey< McEventCollection > m_inputMcEventCollectionKey
const GenParticle * ConstGenParticlePtr
std::vector< float > m_rdo_hit_z
Eigen::Matrix< double, 3, 1 > Vector3D
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Amg::Vector2D rawLocalPositionOfCell(const SiCellId &cellId) const
Returns position (center) of cell.
bool isCharged(const T &p)
#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):
std::vector< unsigned long long > m_rdo_module_ID
virtual StatusCode initialize() override final
Gaudi::Property< std::string > m_HGTDID_Name
std::vector< float > m_rdo_module_y
Handle class for reading from StoreGate.
const HGTD_ID * m_HGTD_ID
SG::ReadHandleKey< HGTD_RDO_Container > m_inputKey
std::vector< int > m_rdo_hit_sdo_truth_category
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.