61 const unsigned int &trackNumber,
const unsigned int &nHits)
const;
79 #include "art_root_io/TFileService.h" 80 #include "art_root_io/TFileDirectory.h" 134 unsigned int nTracks = 0;
138 unsigned int nCaloPoints = 0;
146 nCaloPoints = calo->dEdx().size();
153 if(netInputs.empty())
continue;
157 this->
WriteTextFile(evt,netInputs,trueParticle,nTracks,nCaloPoints);
164 const unsigned int &trackNumber,
const unsigned int &nHits)
const{
168 filename <<
"tracks_" << evt.
id().
run() <<
"_" << evt.
id().
subRun() <<
"_" << evt.
id().
event() <<
"_" << trackNumber <<
"_" << std::floor(
inputs.at(1).at(3)*1000) <<
".dat";
171 for(
const float dedx :
inputs.at(0))
182 output_file << trueParticle.first->PdgCode() <<
"\n";
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...
Class containing some utility functions for all things CVN.
CTPTrackDump(fhicl::ParameterSet const &pset)
Constructor.
Utility containing helpful functions for end users to access information about Tracks.
const std::vector< std::vector< float > > GetNetworkInputs(const art::Ptr< recob::PFParticle >, const art::Event &evt) const
Functions to help use the convolutional track PID.
EDAnalyzer(fhicl::ParameterSet const &pset)
#define DEFINE_ART_MODULE(klass)
Utility containing helpful functions for end users to access information about Showers.
T get(std::string const &key) const
virtual ~CTPTrackDump()
Destructor.
void analyze(const art::Event &evt)
Utility containing helpful functions for end users to access information about PFParticles.
Utility containing helpful functions for end users to access products from events.
const std::pair< const simb::MCParticle *, float > GetTrueParticle(const art::Ptr< recob::PFParticle >, const art::Event &evt) const
void WriteTextFile(const art::Event &evt, const std::vector< std::vector< float >> &inputs, const std::pair< const simb::MCParticle *, float > &trueParticle, const unsigned int &trackNumber, const unsigned int &nHits) const
std::string fParticleLabel
Declaration of signal hit object.
Provides recob::Track data product.
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.
EventNumber_t event() const
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.
fhicl::ParameterSet fHelperPars
auto const & get(AssnsNode< L, R, D > const &r)
static std::vector< art::Ptr< recob::PFParticle > > GetPFParticles(const art::Event &evt, const std::string &label)
Get the particles from the event.
SubRunNumber_t subRun() const