21using namespace asg::msgUserCode;
41 return StatusCode::FAILURE;
62 ATH_MSG_INFO(
"FPGATrackSimEventSelectionSvc::initialize(): " <<
64 "min = {" <<
m_min <<
"}, " <<
65 "max = {" <<
m_max <<
"}, " <<
67 "withPU = " <<
static_cast<bool>(
m_withPU));
69 return StatusCode::SUCCESS;
75 ATH_MSG_INFO(
"FPGATrackSimEventSelectionSvc::finalize()");
77 return StatusCode::SUCCESS;
218 if (track.getBarcode() == 0 || track.getBarcode() == std::numeric_limits<HepMcParticleLink::barcode_type>::max())
return false;
219 if (track.getEventIndex() == std::numeric_limits<long>::max())
return false;
220 if (track.getQOverPt() == 0)
return false;
227 if (truthTrack.
getBarcode() == 0 || truthTrack.
getQ() == 0)
return false;
229 if (!
passCuts(truthTrack))
return false;
250 ATH_MSG_DEBUG(
"selectEvent(): Error with sampleType property");
273 ATH_MSG_DEBUG(
"selectEvent(): Error with sampleType property");
292 MsgStream cmsg(msgSvc(),
"FPGATrackSimRegionSlices");
293 cmsg.setLevel(
msg().level());
314 if (std::abs(track.getPDGCode()) !=
static_cast<int>(
m_st)) {
315 ATH_MSG_WARNING(
"checkTruthTracks(): TruthTrack PDGCode != sampleType");
319 ATH_MSG_DEBUG(
"checkTruthTracks(): found one truth track, in region "
320 <<
getRegionID() <<
"; track pars: "<< track.getPars());
325 ATH_MSG_DEBUG(
"checkTruthTracks(): found one truth track over "<<truthTracks.size()<<
", out of region "
326 <<
getRegionID() <<
"; track pars: "<< track.getPars());
334 ATH_MSG_DEBUG(
"selectEvent(): Checking truth tracks with LRT requirements");
341 for (
const auto& truthtrack : truthTracks ) {
344 if (
passCuts(truthtrack))
ANA_MSG_DEBUG(
"Skipping an otherwise passing track due to wrong PDGID: " << truthtrack.getPDGCode());
347 if (
passCuts(truthtrack))
return true;
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_MSG_WARNING(x)
: FPGATrackSim-specific class to represent an hit in the detector.
Stores slice definitions for FPGATrackSim regions.
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Gaudi::Property< std::string > m_sampleType
Gaudi::Property< int > m_LRT_pdgID
Gaudi::Property< bool > m_allowHighBarcode
virtual bool passCuts(const FPGATrackSimHit &) const override
virtual unsigned getRegionID() const override
Gaudi::Property< bool > m_LRT
Gaudi::Property< float > m_minqOverPt
virtual bool passMatching(FPGATrackSimTrack const &) const override
FPGATrackSimRegionSlices * m_regions
FPGATrackSimTrackPars m_trackmin
Gaudi::Property< bool > m_oldRegionDefs
Gaudi::Property< bool > m_withPU
virtual bool passQOverPt(const FPGATrackSimTrack &) const override
virtual bool passEta(const FPGATrackSimTrack &) const override
Gaudi::Property< std::string > m_regions_path
virtual bool passZ0(const FPGATrackSimTrack &) const override
virtual bool passPhi(const FPGATrackSimTrack &) const override
FPGATrackSimTrackPars m_max
Gaudi::Property< float > m_mind0
virtual const FPGATrackSimRegionSlices * getRegions() override
virtual bool selectEvent(const FPGATrackSimEventInputHeader *) override
virtual StatusCode finalize() override
Gaudi::Property< unsigned int > m_regionID
virtual bool passD0(const FPGATrackSimTrack &) const override
FPGATrackSimTrackPars m_trackmax
Gaudi::Property< float > m_maxz0
bool checkTruthTracksLRT(const std::vector< FPGATrackSimTruthTrack > &) const
Gaudi::Property< float > m_maxd0
Gaudi::Property< float > m_minLRTpT
FPGATrackSimTrackPars m_min
FPGATrackSimEventSelectionSvc(const std::string &name, ISvcLocator *svc)
bool checkTruthTracks(const std::vector< FPGATrackSimTruthTrack > &) const
Gaudi::Property< float > m_maxqOverPt
Gaudi::Property< unsigned int > m_skipRegionCheck
virtual StatusCode initialize() override
Gaudi::Property< float > m_minz0
float getGCotTheta() const
double getQOverPt() const
const std::vector< FPGATrackSimTruthTrack > & getTruthTracks() const
HepMcParticleLink::barcode_type getBarcode() const
FPGATrackSimTrackPars getPars() const
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...