Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
trkf::MCSFitProducer Class Reference

Producer for TrajectoryMCSFitter. More...

Inheritance diagram for trkf::MCSFitProducer:
art::EDProducer art::detail::Producer art::detail::LegacyModule art::Modifier art::ModuleBase art::ProductRegistryHelper

Classes

struct  Config
 
struct  Inputs
 

Public Types

using Parameters = art::EDProducer::Table< Config >
 
- Public Types inherited from art::EDProducer
using ModuleType = EDProducer
 
using WorkerType = WorkerT< EDProducer >
 
- Public Types inherited from art::detail::Producer
template<typename UserConfig , typename KeysToIgnore = void>
using Table = Modifier::Table< UserConfig, KeysToIgnore >
 
- Public Types inherited from art::Modifier
template<typename UserConfig , typename UserKeysToIgnore = void>
using Table = ProducerTable< UserConfig, detail::ModuleConfig, UserKeysToIgnore >
 

Public Member Functions

 MCSFitProducer (Parameters const &p)
 
 ~MCSFitProducer ()
 
 MCSFitProducer (MCSFitProducer const &)=delete
 
 MCSFitProducer (MCSFitProducer &&)=delete
 
MCSFitProduceroperator= (MCSFitProducer const &)=delete
 
MCSFitProduceroperator= (MCSFitProducer &&)=delete
 
- Public Member Functions inherited from art::EDProducer
 EDProducer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDProducer (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Producer
virtual ~Producer () noexcept
 
 Producer (fhicl::ParameterSet const &)
 
 Producer (Producer const &)=delete
 
 Producer (Producer &&)=delete
 
Produceroperator= (Producer const &)=delete
 
Produceroperator= (Producer &&)=delete
 
void doBeginJob (SharedResources const &resources)
 
void doEndJob ()
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenOutputFiles (FileBlock const &fb)
 
void doRespondToCloseOutputFiles (FileBlock const &fb)
 
bool doBeginRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doEndRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed)
 
- Public Member Functions inherited from art::Modifier
 ~Modifier () noexcept
 
 Modifier ()
 
 Modifier (Modifier const &)=delete
 
 Modifier (Modifier &&)=delete
 
Modifieroperator= (Modifier const &)=delete
 
Modifieroperator= (Modifier &&)=delete
 
- Public Member Functions inherited from art::ModuleBase
virtual ~ModuleBase () noexcept
 
 ModuleBase ()
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 

Private Member Functions

void produce (art::Event &e) override
 

Private Attributes

Parameters p_
 
art::InputTag inputTag
 
TrajectoryMCSFitter mcsfitter
 

Additional Inherited Members

- Static Public Member Functions inherited from art::EDProducer
static void commitEvent (EventPrincipal &ep, Event &e)
 
- Protected Member Functions inherited from art::ModuleBase
ConsumesCollectorconsumesCollector ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 

Detailed Description

Producer for TrajectoryMCSFitter.

Producer for TrajectoryMCSFitter, which performs a Maximum Likelihood fit of Multiple Coulomb Scattering angles between segments within a Track or Trajectory. It reads a recob::Track collection and produces a collection of recob::MCSFitResult where the elements are in the same order as the input collection (no explicit association is written).

For configuration options see MCSFitProducer::Inputs and MCSFitProducer::Config

Author
G. Cerati (FNAL, MicroBooNE), based on code from L. Kalousis and D. Kaleko
Date
2017
Version
1.0

Definition at line 33 of file MCSFitProducer_module.cc.

Member Typedef Documentation

Definition at line 54 of file MCSFitProducer_module.cc.

Constructor & Destructor Documentation

trkf::MCSFitProducer::MCSFitProducer ( Parameters const &  p)
explicit

Definition at line 74 of file MCSFitProducer_module.cc.

75  : EDProducer{p}, p_(p), mcsfitter(p_().fitter)
76 {
77  inputTag = art::InputTag(p_().inputs().inputLabel());
78  produces<std::vector<recob::MCSFitResult> >();
79 }
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.h:20
p
Definition: test.py:223
TrajectoryMCSFitter mcsfitter
trkf::MCSFitProducer::~MCSFitProducer ( )

Definition at line 81 of file MCSFitProducer_module.cc.

81 {}
trkf::MCSFitProducer::MCSFitProducer ( MCSFitProducer const &  )
delete
trkf::MCSFitProducer::MCSFitProducer ( MCSFitProducer &&  )
delete

Member Function Documentation

MCSFitProducer& trkf::MCSFitProducer::operator= ( MCSFitProducer const &  )
delete
MCSFitProducer& trkf::MCSFitProducer::operator= ( MCSFitProducer &&  )
delete
void trkf::MCSFitProducer::produce ( art::Event e)
overrideprivatevirtual

Implements art::EDProducer.

Definition at line 83 of file MCSFitProducer_module.cc.

84 {
85  //
86  auto output = std::make_unique<std::vector<recob::MCSFitResult> >();
87  //
89  bool ok = e.getByLabel(inputTag,inputH);
90  if (!ok) throw cet::exception("MCSFitProducer") << "Cannot find input art::Handle with inputTag " << inputTag;
91  const auto& inputVec = *(inputH.product());
92  for (const auto& element : inputVec) {
93  //fit
95  output->emplace_back(std::move(result));
96  }
97  e.put(std::move(output));
98 }
static QCString result
recob::MCSFitResult fitMcs(const recob::TrackTrajectory &traj) const
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
Definition: DataViewImpl.h:633
def move(depos, offset)
Definition: depos.py:107
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
Definition: DataViewImpl.h:686
Class storing the result of the Maximum Likelihood fit of Multiple Coulomb Scattering angles between ...
Definition: MCSFitResult.h:19
TrajectoryMCSFitter mcsfitter
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33

Member Data Documentation

art::InputTag trkf::MCSFitProducer::inputTag
private

Definition at line 69 of file MCSFitProducer_module.cc.

TrajectoryMCSFitter trkf::MCSFitProducer::mcsfitter
private

Definition at line 70 of file MCSFitProducer_module.cc.

Parameters trkf::MCSFitProducer::p_
private

Definition at line 68 of file MCSFitProducer_module.cc.


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