Public Member Functions | Private Member Functions | Private Attributes | List of all members
dune::CheckAuxDet Class Reference
Inheritance diagram for dune::CheckAuxDet:
art::EDAnalyzer art::detail::Analyzer art::detail::LegacyModule art::Observer art::ModuleBase

Public Member Functions

 CheckAuxDet (fhicl::ParameterSet const &p)
 
 CheckAuxDet (CheckAuxDet const &)=delete
 
 CheckAuxDet (CheckAuxDet &&)=delete
 
CheckAuxDetoperator= (CheckAuxDet const &)=delete
 
CheckAuxDetoperator= (CheckAuxDet &&)=delete
 
void analyze (art::Event const &e) override
 
void beginJob () override
 
void reconfigure (fhicl::ParameterSet const &p)
 
- Public Member Functions inherited from art::EDAnalyzer
 EDAnalyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDAnalyzer (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Analyzer
virtual ~Analyzer () noexcept
 
 Analyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 Analyzer (Table< Config > const &config)
 
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::Observer
 ~Observer () noexcept
 
 Observer (Observer const &)=delete
 
 Observer (Observer &&)=delete
 
Observeroperator= (Observer const &)=delete
 
Observeroperator= (Observer &&)=delete
 
void registerProducts (ProductDescriptions &, ModuleDescription const &)
 
void fillDescriptions (ModuleDescription const &)
 
fhicl::ParameterSetID selectorConfig () const
 
- 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 ResetVars ()
 

Private Attributes

std::string fLArG4ModuleLabel
 
TTree * fTree
 
int run
 
int subrun
 
int event
 
int nauxdets
 
int auxdetid [kMaxAuxDets]
 
int ntrkids [kMaxAuxDets]
 
float entryx [kMaxAuxDets][kMaxTkIDs]
 
float entryy [kMaxAuxDets][kMaxTkIDs]
 
float entryz [kMaxAuxDets][kMaxTkIDs]
 
float entryt [kMaxAuxDets][kMaxTkIDs]
 
float exitx [kMaxAuxDets][kMaxTkIDs]
 
float exity [kMaxAuxDets][kMaxTkIDs]
 
float exitz [kMaxAuxDets][kMaxTkIDs]
 
float exitt [kMaxAuxDets][kMaxTkIDs]
 
float exitpx [kMaxAuxDets][kMaxTkIDs]
 
float exitpy [kMaxAuxDets][kMaxTkIDs]
 
float exitpz [kMaxAuxDets][kMaxTkIDs]
 
int trackid [kMaxAuxDets][kMaxTkIDs]
 
float energy [kMaxAuxDets][kMaxTkIDs]
 

Additional Inherited Members

- Public Types inherited from art::EDAnalyzer
using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 
- Protected Member Functions inherited from art::Observer
std::string const & processName () const
 
bool wantAllEvents () const noexcept
 
bool wantEvent (ScheduleID id, Event const &e) const
 
Handle< TriggerResultsgetTriggerResults (Event const &e) const
 
 Observer (fhicl::ParameterSet const &config)
 
 Observer (std::vector< std::string > const &select_paths, std::vector< std::string > const &reject_paths, fhicl::ParameterSet const &config)
 
- 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

Definition at line 31 of file CheckAuxDet_module.cc.

Constructor & Destructor Documentation

dune::CheckAuxDet::CheckAuxDet ( fhicl::ParameterSet const &  p)
explicit

Definition at line 81 of file CheckAuxDet_module.cc.

82  :
83  EDAnalyzer(p),
84  fLArG4ModuleLabel(p.get< std::string >("LArGeantModuleLabel", "largeant"))
85 {}
std::string string
Definition: nybbler.cc:12
std::string fLArG4ModuleLabel
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.h:25
p
Definition: test.py:223
dune::CheckAuxDet::CheckAuxDet ( CheckAuxDet const &  )
delete
dune::CheckAuxDet::CheckAuxDet ( CheckAuxDet &&  )
delete

Member Function Documentation

void dune::CheckAuxDet::analyze ( art::Event const &  e)
overridevirtual

Implements art::EDAnalyzer.

Definition at line 87 of file CheckAuxDet_module.cc.

88 {
89  ResetVars();
90 
91  run = evt.run();
92  subrun = evt.subRun();
93  event = evt.id().event();
94 
95  std::vector<const sim::AuxDetSimChannel*> fAuxDetSimChannels;
96  evt.getView(fLArG4ModuleLabel, fAuxDetSimChannels);
97 
98  nauxdets = fAuxDetSimChannels.size();
99 
100  for (size_t i = 0; i<fAuxDetSimChannels.size(); ++i){
101  const sim::AuxDetSimChannel* c = fAuxDetSimChannels[i];
102  auxdetid[i] = c->AuxDetID();
103 
104  const std::vector<sim::AuxDetIDE>& setOfIDEs = c->AuxDetIDEs();
105  ntrkids[i] = setOfIDEs.size();
106 
107  for (size_t j = 0; j<setOfIDEs.size(); ++j){
108  entryx[i][j] = setOfIDEs[j].entryX;
109  entryy[i][j] = setOfIDEs[j].entryY;
110  entryz[i][j] = setOfIDEs[j].entryZ;
111  entryt[i][j] = setOfIDEs[j].entryT;
112  exitx[i][j] = setOfIDEs[j].exitX;
113  exity[i][j] = setOfIDEs[j].exitY;
114  exitz[i][j] = setOfIDEs[j].exitZ;
115  exitt[i][j] = setOfIDEs[j].exitT;
116  exitpx[i][j] = setOfIDEs[j].exitMomentumX;
117  exitpy[i][j] = setOfIDEs[j].exitMomentumY;
118  exitpz[i][j] = setOfIDEs[j].exitMomentumZ;
119  energy[i][j] = setOfIDEs[j].energyDeposited;
120  trackid[i][j] = setOfIDEs[j].trackID;
121  }
122  }
123  fTree->Fill();
124 }
float exitt[kMaxAuxDets][kMaxTkIDs]
unsigned int event
Definition: DataStructs.h:636
unsigned int run
Definition: DataStructs.h:637
float entryt[kMaxAuxDets][kMaxTkIDs]
float entryx[kMaxAuxDets][kMaxTkIDs]
std::string fLArG4ModuleLabel
float entryz[kMaxAuxDets][kMaxTkIDs]
float exity[kMaxAuxDets][kMaxTkIDs]
float entryy[kMaxAuxDets][kMaxTkIDs]
float exitpy[kMaxAuxDets][kMaxTkIDs]
Collection of particles crossing one auxiliary detector cell.
uint32_t AuxDetID() const
int auxdetid[kMaxAuxDets]
std::vector< sim::AuxDetIDE > const & AuxDetIDEs() const
float exitpz[kMaxAuxDets][kMaxTkIDs]
float exitpx[kMaxAuxDets][kMaxTkIDs]
int trackid[kMaxAuxDets][kMaxTkIDs]
unsigned int subRun
Definition: DataStructs.h:638
float energy[kMaxAuxDets][kMaxTkIDs]
TCEvent evt
Definition: DataStructs.cxx:7
float exitx[kMaxAuxDets][kMaxTkIDs]
float exitz[kMaxAuxDets][kMaxTkIDs]
int ntrkids[kMaxAuxDets]
void dune::CheckAuxDet::beginJob ( )
overridevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 126 of file CheckAuxDet_module.cc.

127 {
129  fTree = tfs->make<TTree>("anatree","analysis tree");
130  fTree->Branch("run",&run,"run/I");
131  fTree->Branch("subrun",&subrun,"subrun/I");
132  fTree->Branch("event",&event,"event/I");
133  fTree->Branch("nauxdets",&nauxdets,"nauxdets/I");
134  fTree->Branch("auxdetid",auxdetid,"auxdetid[nauxdets]/I");
135  fTree->Branch("ntrkids",ntrkids,"ntrkids[nauxdets]/I");
136  fTree->Branch("entryx",entryx,"entryx[nauxdets][100]/F");
137  fTree->Branch("entryy",entryy,"entryy[nauxdets][100]/F");
138  fTree->Branch("entryz",entryz,"entryz[nauxdets][100]/F");
139  fTree->Branch("entryt",entryt,"entryt[nauxdets][100]/F");
140  fTree->Branch("exitx",exitx,"exitx[nauxdets][100]/F");
141  fTree->Branch("exity",exity,"exity[nauxdets][100]/F");
142  fTree->Branch("exitz",exitz,"exitz[nauxdets][100]/F");
143  fTree->Branch("exitt",exitt,"exitt[nauxdets][100]/F");
144  fTree->Branch("trackid",trackid,"trackid[nauxdets][100]/I");
145  fTree->Branch("energy",energy,"energy[nauxdets][100]/F");
146 
147 }
float exitt[kMaxAuxDets][kMaxTkIDs]
float entryt[kMaxAuxDets][kMaxTkIDs]
float entryx[kMaxAuxDets][kMaxTkIDs]
float entryz[kMaxAuxDets][kMaxTkIDs]
float exity[kMaxAuxDets][kMaxTkIDs]
float entryy[kMaxAuxDets][kMaxTkIDs]
int auxdetid[kMaxAuxDets]
int trackid[kMaxAuxDets][kMaxTkIDs]
float energy[kMaxAuxDets][kMaxTkIDs]
float exitx[kMaxAuxDets][kMaxTkIDs]
float exitz[kMaxAuxDets][kMaxTkIDs]
int ntrkids[kMaxAuxDets]
Event finding and building.
CheckAuxDet& dune::CheckAuxDet::operator= ( CheckAuxDet const &  )
delete
CheckAuxDet& dune::CheckAuxDet::operator= ( CheckAuxDet &&  )
delete
void dune::CheckAuxDet::reconfigure ( fhicl::ParameterSet const &  p)

Definition at line 149 of file CheckAuxDet_module.cc.

150 {
151  // Implementation of optional member function here.
152 }
void dune::CheckAuxDet::ResetVars ( void  )
private

Definition at line 154 of file CheckAuxDet_module.cc.

154  {
155 
156  run = -99999;
157  subrun = -99999;
158  event = -99999;
159  for (size_t i = 0; i<kMaxAuxDets; ++i){
160  auxdetid[i] = -99999;
161  ntrkids[i] = -99999;
162  for (size_t j = 0; j<kMaxTkIDs; ++j){
163  entryx[i][j] = -99999;
164  entryy[i][j] = -99999;
165  entryz[i][j] = -99999;
166  entryt[i][j] = -99999;
167  exitx[i][j] = -99999;
168  exity[i][j] = -99999;
169  exitz[i][j] = -99999;
170  exitt[i][j] = -99999;
171  exitpx[i][j] = -99999;
172  exitpy[i][j] = -99999;
173  exitpz[i][j] = -99999;
174  trackid[i][j] = -99999;
175  energy[i][j] = -99999;
176  }
177  }
178 }
constexpr unsigned short kMaxTkIDs
float exitt[kMaxAuxDets][kMaxTkIDs]
float entryt[kMaxAuxDets][kMaxTkIDs]
float entryx[kMaxAuxDets][kMaxTkIDs]
float entryz[kMaxAuxDets][kMaxTkIDs]
float exity[kMaxAuxDets][kMaxTkIDs]
float entryy[kMaxAuxDets][kMaxTkIDs]
float exitpy[kMaxAuxDets][kMaxTkIDs]
int auxdetid[kMaxAuxDets]
float exitpz[kMaxAuxDets][kMaxTkIDs]
float exitpx[kMaxAuxDets][kMaxTkIDs]
int trackid[kMaxAuxDets][kMaxTkIDs]
float energy[kMaxAuxDets][kMaxTkIDs]
float exitx[kMaxAuxDets][kMaxTkIDs]
float exitz[kMaxAuxDets][kMaxTkIDs]
int ntrkids[kMaxAuxDets]
constexpr unsigned short kMaxAuxDets

Member Data Documentation

int dune::CheckAuxDet::auxdetid[kMaxAuxDets]
private

Definition at line 60 of file CheckAuxDet_module.cc.

float dune::CheckAuxDet::energy[kMaxAuxDets][kMaxTkIDs]
private

Definition at line 74 of file CheckAuxDet_module.cc.

float dune::CheckAuxDet::entryt[kMaxAuxDets][kMaxTkIDs]
private

Definition at line 65 of file CheckAuxDet_module.cc.

float dune::CheckAuxDet::entryx[kMaxAuxDets][kMaxTkIDs]
private

Definition at line 62 of file CheckAuxDet_module.cc.

float dune::CheckAuxDet::entryy[kMaxAuxDets][kMaxTkIDs]
private

Definition at line 63 of file CheckAuxDet_module.cc.

float dune::CheckAuxDet::entryz[kMaxAuxDets][kMaxTkIDs]
private

Definition at line 64 of file CheckAuxDet_module.cc.

int dune::CheckAuxDet::event
private

Definition at line 58 of file CheckAuxDet_module.cc.

float dune::CheckAuxDet::exitpx[kMaxAuxDets][kMaxTkIDs]
private

Definition at line 70 of file CheckAuxDet_module.cc.

float dune::CheckAuxDet::exitpy[kMaxAuxDets][kMaxTkIDs]
private

Definition at line 71 of file CheckAuxDet_module.cc.

float dune::CheckAuxDet::exitpz[kMaxAuxDets][kMaxTkIDs]
private

Definition at line 72 of file CheckAuxDet_module.cc.

float dune::CheckAuxDet::exitt[kMaxAuxDets][kMaxTkIDs]
private

Definition at line 69 of file CheckAuxDet_module.cc.

float dune::CheckAuxDet::exitx[kMaxAuxDets][kMaxTkIDs]
private

Definition at line 66 of file CheckAuxDet_module.cc.

float dune::CheckAuxDet::exity[kMaxAuxDets][kMaxTkIDs]
private

Definition at line 67 of file CheckAuxDet_module.cc.

float dune::CheckAuxDet::exitz[kMaxAuxDets][kMaxTkIDs]
private

Definition at line 68 of file CheckAuxDet_module.cc.

std::string dune::CheckAuxDet::fLArG4ModuleLabel
private

Definition at line 53 of file CheckAuxDet_module.cc.

TTree* dune::CheckAuxDet::fTree
private

Definition at line 54 of file CheckAuxDet_module.cc.

int dune::CheckAuxDet::nauxdets
private

Definition at line 59 of file CheckAuxDet_module.cc.

int dune::CheckAuxDet::ntrkids[kMaxAuxDets]
private

Definition at line 61 of file CheckAuxDet_module.cc.

int dune::CheckAuxDet::run
private

Definition at line 56 of file CheckAuxDet_module.cc.

int dune::CheckAuxDet::subrun
private

Definition at line 57 of file CheckAuxDet_module.cc.

int dune::CheckAuxDet::trackid[kMaxAuxDets][kMaxTkIDs]
private

Definition at line 73 of file CheckAuxDet_module.cc.


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