20using namespace asg::msgUserCode;
40 return StatusCode::FAILURE;
61 ATH_MSG_INFO(
"FPGATrackSimEventSelectionSvc::initialize(): " <<
63 "min = {" <<
m_min <<
"}, " <<
64 "max = {" <<
m_max <<
"}, " <<
66 "withPU = " <<
static_cast<bool>(
m_withPU));
68 return StatusCode::SUCCESS;
74 ATH_MSG_INFO(
"FPGATrackSimEventSelectionSvc::finalize()");
76 return StatusCode::SUCCESS;
217 if (track.getBarcode() == 0 || track.getBarcode() == std::numeric_limits<HepMcParticleLink::barcode_type>::max())
return false;
218 if (track.getEventIndex() == std::numeric_limits<long>::max())
return false;
219 if (track.getQOverPt() == 0)
return false;
226 if (truthTrack.
getBarcode() == 0 || truthTrack.
getQ() == 0)
return false;
228 if (!
passCuts(truthTrack))
return false;
249 ATH_MSG_DEBUG(
"selectEvent(): Error with sampleType property");
272 ATH_MSG_DEBUG(
"selectEvent(): Error with sampleType property");
291 MsgStream cmsg(msgSvc(),
"FPGATrackSimRegionSlices");
292 cmsg.setLevel(
msg().level());
309 if (std::abs(track.getPDGCode()) !=
static_cast<int>(
m_st)) {
314 ATH_MSG_DEBUG(
"selectEvent(): found one truth track, in region "
315 <<
getRegionID() <<
"; track pars: "<< track.getPars());
320 ATH_MSG_DEBUG(
"selectEvent(): found one truth track over "<<truthTracks.size()<<
", out of region "
321 <<
getRegionID() <<
"; track pars: "<< track.getPars());
329 ATH_MSG_DEBUG(
"selectEvent(): Checking truth tracks with LRT requirements");
336 for (
const auto& truthtrack : truthTracks ) {
339 if (
passCuts(truthtrack))
ANA_MSG_DEBUG(
"Skipping an otherwise passing track due to wrong PDGID: " << truthtrack.getPDGCode());
342 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...