|
| MCBTDemo (fhicl::ParameterSet const &p) |
|
| MCBTDemo (MCBTDemo const &)=delete |
|
| MCBTDemo (MCBTDemo &&)=delete |
|
MCBTDemo & | operator= (MCBTDemo const &)=delete |
|
MCBTDemo & | operator= (MCBTDemo &&)=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) |
|
ModuleDescription const & | moduleDescription () const |
|
void | setModuleDescription (ModuleDescription const &) |
|
std::array< std::vector< ProductInfo >, NumBranchTypes > const & | getConsumables () const |
|
void | sortConsumables (std::string const ¤t_process_name) |
|
std::unique_ptr< Worker > | makeWorker (WorkerParams const &wp) |
|
template<typename T , BranchType BT> |
ViewToken< T > | consumesView (InputTag const &tag) |
|
template<typename T , BranchType BT> |
ViewToken< T > | mayConsumeView (InputTag const &tag) |
|
|
std::string const & | processName () const |
|
bool | wantAllEvents () const noexcept |
|
bool | wantEvent (ScheduleID id, Event const &e) const |
|
Handle< TriggerResults > | getTriggerResults (Event const &e) const |
|
ConsumesCollector & | consumesCollector () |
|
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 () |
|
Definition at line 26 of file MCBTDemo_module.cc.
Implements art::EDAnalyzer.
Definition at line 43 of file MCBTDemo_module.cc.
References DEFINE_ART_MODULE, Get, art::ProductRetriever::getByLabel(), hits(), art::Handle< T >::isValid(), geo::kW, btutil::MCBTAlg::MCQ(), btutil::MCBTAlg::MCQFrac(), and btutil::MCBTAlg::MCQSum().
47 e.getByLabel(
"mcreco", mctHandle);
50 e.getByLabel(
"largeant", schHandle);
53 e.getByLabel(
"trackkalmanhit", trkHandle);
58 std::vector<unsigned int> g4_track_id;
59 for (
auto const& mct : *mctHandle) {
61 if (!mct.size())
continue;
63 double dE = (*mct.begin()).Momentum().E() - (*mct.rbegin()).Momentum().E();
64 if (dE > 100) g4_track_id.push_back(mct.TrackID());
67 if (g4_track_id.size()) {
72 auto sum_mcq_v = alg_mct.MCQSum(2);
73 std::cout <<
"Total charge contents on W plane:" << std::endl;
74 for (
size_t i = 0; i < sum_mcq_v.size() - 1; ++i)
75 std::cout <<
" MCTrack " << i <<
" => " << sum_mcq_v[i] << std::endl;
76 std::cout <<
" Others => " << (*sum_mcq_v.rbegin()) << std::endl;
82 for (
size_t i = 0; i < trkHandle->size(); ++i) {
84 const std::vector<art::Ptr<recob::Hit>> hit_coll = hit_coll_v.at(i);
86 std::vector<btutil::WireRange_t>
hits;
88 for (
auto const& h_ptr : hit_coll) {
90 if (wireReadoutGeom.ChannelToWire(h_ptr->Channel())[0].
Plane != ::
geo::kW)
continue;
92 hits.emplace_back(h_ptr->Channel(), h_ptr->StartTick(), h_ptr->EndTick());
95 auto mcq_v = alg_mct.MCQ(clockData, hits);
96 auto mcq_frac_v = alg_mct.MCQFrac(clockData, hits);
98 std::cout <<
"Track " << i <<
" " 99 <<
"Y plane Charge from first MCTrack: " << mcq_v[0]
100 <<
" ... Purity: " << mcq_frac_v[0]
101 <<
" ... Efficiency: " << mcq_v[0] / sum_mcq_v[0] << std::endl;
cout<< "Opened file "<< fin<< " ixs= "<< ixs<< endl;if(ixs==0) hhh=(TH1F *) fff-> Get("h1")
bool isValid() const noexcept
Planes which measure W (third view for Bo, MicroBooNE, etc).
recob::tracking::Plane Plane