All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
sbn::MCSFitAllPID Class Reference
Inheritance diagram for sbn::MCSFitAllPID:

Public Member Functions

 MCSFitAllPID (fhicl::ParameterSet const &p)
 
 MCSFitAllPID (MCSFitAllPID const &)=delete
 
 MCSFitAllPID (MCSFitAllPID &&)=delete
 
MCSFitAllPIDoperator= (MCSFitAllPID const &)=delete
 
MCSFitAllPIDoperator= (MCSFitAllPID &&)=delete
 
void produce (art::Event &e) override
 

Private Attributes

trkf::sbn::TrajectoryMCSFitter fMCSCalculator
 
art::InputTag fTrackLabel
 
float fMinTrackLength
 

Detailed Description

Definition at line 30 of file MCSFitAllPID_module.cc.

Constructor & Destructor Documentation

sbn::MCSFitAllPID::MCSFitAllPID ( fhicl::ParameterSet const &  p)
explicit

Definition at line 55 of file MCSFitAllPID_module.cc.

56  : EDProducer{p},
57  // fMCSCalculator(p.get<fhicl::Table<trkf::TrajectoryMCSFitter::Config>>("MCS")),
58  fMCSCalculator(p.get<fhicl::ParameterSet>("MCS")),
59  fTrackLabel(p.get<art::InputTag>("TrackLabel", "pandoraTrack")),
60  fMinTrackLength(p.get<float>("MinTrackLength", 10.))
61 {
62  for (unsigned i = 0; i < names.size(); i++) {
63  produces<std::vector<recob::MCSFitResult>>(names[i]);
64  produces<art::Assns<recob::Track, recob::MCSFitResult>>(names[i]);
65  }
66 }
pdgs p
Definition: selectors.fcl:22
trkf::sbn::TrajectoryMCSFitter fMCSCalculator
static const std::vector< std::string > names
art::InputTag fTrackLabel
sbn::MCSFitAllPID::MCSFitAllPID ( MCSFitAllPID const &  )
delete
sbn::MCSFitAllPID::MCSFitAllPID ( MCSFitAllPID &&  )
delete

Member Function Documentation

MCSFitAllPID& sbn::MCSFitAllPID::operator= ( MCSFitAllPID const &  )
delete
MCSFitAllPID& sbn::MCSFitAllPID::operator= ( MCSFitAllPID &&  )
delete
void sbn::MCSFitAllPID::produce ( art::Event &  e)
override

Definition at line 68 of file MCSFitAllPID_module.cc.

69 {
70 
71  // Implementation of required member function here.
72  art::Handle<std::vector<recob::Track>> track_handle;
73  e.getByLabel(fTrackLabel, track_handle);
74 
75  std::vector<art::Ptr<recob::Track>> tracks;
76  art::fill_ptr_vector(tracks, track_handle);
77 
78  for (unsigned i = 0; i < PIDs.size(); i++) {
79  std::unique_ptr<std::vector<recob::MCSFitResult>> mcscol(new std::vector<recob::MCSFitResult>);
80  std::unique_ptr<art::Assns<recob::Track, recob::MCSFitResult>> assn(new art::Assns<recob::Track, recob::MCSFitResult>);
81 
82  for (const art::Ptr<recob::Track> track: tracks) {
83  if (fMinTrackLength > 0. && track->Length() < fMinTrackLength) continue;
84 
85  mcscol->push_back(fMCSCalculator.fitMcs(*track, PIDs[i]));
86  util::CreateAssn(*this, e, *mcscol, track, *assn, names[i]);
87  }
88 
89  e.put(std::move(mcscol), names[i]);
90  e.put(std::move(assn), names[i]);
91  }
92 
93 }
ClusterModuleLabel join with tracks
trkf::sbn::TrajectoryMCSFitter fMCSCalculator
process_name use argoneut_mc_hitfinder track
static const std::vector< int > PIDs
bool CreateAssn(art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t index=UINT_MAX)
Creates a single one-to-one association.
static const std::vector< std::string > names
art::InputTag fTrackLabel
recob::MCSFitResult fitMcs(const recob::TrackTrajectory &traj, bool momDepConst=true) const
do i e

Member Data Documentation

trkf::sbn::TrajectoryMCSFitter sbn::MCSFitAllPID::fMCSCalculator
private

Definition at line 47 of file MCSFitAllPID_module.cc.

float sbn::MCSFitAllPID::fMinTrackLength
private

Definition at line 49 of file MCSFitAllPID_module.cc.

art::InputTag sbn::MCSFitAllPID::fTrackLabel
private

Definition at line 48 of file MCSFitAllPID_module.cc.


The documentation for this class was generated from the following file: