152 std::unique_ptr< std::vector<ctp::CTPResult> > resultCol(
new std::vector<ctp::CTPResult>);
173 int thisTrackID = -999;
176 unsigned int nCaloPoints = 0;
183 thisTrackID = trk.
key();
184 nCaloPoints = calo->dEdx().size();
190 resultCol->push_back(thisPID);
202 if (!thisPID.IsValid())
continue;
207 std::cout <<
"Got a track PID for particle of type " << pdg <<
": " << thisPID.GetMuonScore() <<
", " << thisPID.GetPionScore() <<
", " << thisPID.GetProtonScore() <<
std::endl;
static art::Ptr< recob::Track > GetTrack(const art::Ptr< recob::PFParticle > &pParticle, const art::Event &evt, const std::string &pParticleLabel, const std::string &trackLabel)
Get the track associated to this particle. Should only be called if IsTrack method succeeds...
std::vector< float > fPionScoreVector
const int GetTruePDGCode(const art::Ptr< recob::PFParticle >, const art::Event &evt) const
std::string fParticleLabel
std::vector< unsigned int > fCaloPoints
std::vector< int > fPDGVector
static std::vector< art::Ptr< recob::Track > > GetTracks(const art::Event &evt, const std::string &label)
Get the tracks from the event. This function shouldn't be used as the basis of an analysis...
key_type key() const noexcept
T get(std::string const &key) const
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
bool CreateAssn(PRODUCER const &prod, art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t indx=UINT_MAX)
Creates a single one-to-one association.
std::vector< float > fProtonScoreVector
fhicl::ParameterSet fHelperPars
static art::Ptr< anab::Calorimetry > GetCalorimetry(const art::Ptr< recob::Track > &pTrack, const art::Event &evt, const std::string &trackLabel, const std::string &caloLabel)
Get the particle associated with the track.
static bool IsTrack(const art::Ptr< recob::PFParticle > &pParticle, const art::Event &evt, const std::string &pParticleLabel, const std::string &trackLabel)
Check if this particle has an associated track.
static std::vector< art::Ptr< recob::PFParticle > > GetPFParticles(const art::Event &evt, const std::string &label)
Get the particles from the event.
QTextStream & endl(QTextStream &s)
const ctp::CTPResult RunConvolutionalTrackPID(const art::Ptr< recob::PFParticle > particle, const art::Event &evt) const
std::vector< float > fMuonScoreVector