|
ATLAS Offline Software
|
Go to the documentation of this file.
66 return StatusCode::SUCCESS;
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);
102 const Identifier rdoIDColl((*rdoCont_itr)->identify());
116 const Identifier rdoID((*rdo_itr)->identify());
127 float rdo_toa = (*rdo_itr)->getTOA();
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;
183 bool decision =
false;
186 particlePtr->momentum().perp() >= min_pt_cut and
187 particlePtr->momentum().eta() < 4. and
188 particlePtr->parent_event() == hardScatterGenEvent)
def retrieve(aClass, aKey=None)
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
ServiceHandle< ITHistSvc > m_thistSvc
Gaudi::Property< std::string > m_ntuplePath
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
Gaudi::Property< std::string > m_HGTD_Name
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< float > m_rdo_hit_sdo_toa
const_iterator end() const
return const_iterator for end of container
std::vector< float > m_rdo_module_x
const_iterator begin() const
return const_iterator for first entry
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 bool isValid() override final
Can the handle be successfully dereferenced?
SG::ReadHandleKey< McEventCollection > m_inputMcEventCollectionKey
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
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):
virtual StatusCode initialize() override final
Gaudi::Property< std::string > m_HGTDID_Name
std::vector< float > m_rdo_module_y
HGTD_RDOAnalysis(const std::string &name, ISvcLocator *pSvcLocator)
const T * at(size_type n) const
Access an element, as an rvalue.
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
size_type size() const noexcept
Returns the number of elements in the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.