Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
calib::CalibAna Class Reference
Inheritance diagram for calib::CalibAna:
art::EDAnalyzer art::EventObserverBase art::Consumer art::EngineCreator

Public Types

using Parameters = art::EDAnalyzer::Table< CalibAnaParams >
 
using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 CalibAna (const Parameters &params)
 
 CalibAna (CalibAna const &)=delete
 
 CalibAna (CalibAna &&)=delete
 
CalibAnaoperator= (CalibAna const &)=delete
 
CalibAnaoperator= (CalibAna &&)=delete
 
void analyze (art::Event const &e) override
 
void beginJob () override
 
void endJob () override
 
std::string workerType () const
 
bool modifiesEvent () const
 
void registerProducts (MasterProductRegistry &, ProductDescriptions &, ModuleDescription const &)
 
std::string const & processName () const
 
bool wantAllEvents () const
 
bool wantEvent (Event const &e)
 
fhicl::ParameterSetID selectorConfig () const
 
art::Handle< art::TriggerResultsgetTriggerResults (Event const &e) const
 
template<typename T , BranchType = InEvent>
ProductToken< Tconsumes (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< Tconsumes (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< TconsumesView (InputTag const &it)
 
template<typename T , BranchType = InEvent>
ProductToken< TmayConsume (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< TmayConsume (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< TmayConsumeView (InputTag const &it)
 
base_engine_tcreateEngine (seed_t seed)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label)
 
seed_t get_seed_value (fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1)
 

Static Public Member Functions

static cet::exempt_ptr< Consumernon_module_context ()
 

Protected Member Functions

CurrentProcessingContext const * currentContext () const
 
detail::CachedProducts & cachedProducts ()
 
void validateConsumedProduct (BranchType const bt, ProductInfo const &pi)
 
void prepareForJob (fhicl::ParameterSet const &pset)
 
void showMissingConsumes () const
 

Private Member Functions

void AddEventBranches (TTree *t)
 
void ResetEventBranches ()
 
void AddTrackBranches (TTree *t)
 
void ResetTrackBranches ()
 
void AddHitBranches (TTree *t, std::string type)
 
void ResetHitBranches ()
 
void FillWithPCHit (caldp::PCHit const &pchit, bool is_trajectory, bool is_tricell, bool is_avg, bool is_z, float trk_len)
 
void FillWithCellHit (art::Ptr< rb::CellHit > cellhit, bool is_trajectory, bool is_tricell, bool is_avg, bool is_z, float trk_len)
 
float GetPECorrToMeV (caldp::PCHit const &pchit)
 
float GetPECorr (caldp::PCHit const &pchit)
 
void PrintHit (caldp::PCHit const &hit)
 
bool HitInList (caldp::PCHit const &hit, std::vector< art::Ptr< caldp::PCHit > > list)
 
bool HitInList (art::Ptr< rb::CellHit > hit, std::vector< art::Ptr< caldp::PCHit > > list)
 
bool MatchHits (caldp::PCHit const &h1, caldp::PCHit const &h2)
 
bool MatchHits (art::Ptr< rb::CellHit > h1, caldp::PCHit const &h2)
 
void ApproximateHitPos (caldp::PCHit const &hit, float &x, float &y, float &z)
 
void ApproximateHitPos (art::Ptr< rb::CellHit > cellhit, float &x, float &y, float &z)
 

Private Attributes

CalibAnaParams fParams
 
TTree * fEventTree
 
bool fIsRealData
 
int et_run
 
int et_subrun
 
int et_event
 
uint32_t et_evttime
 
int et_ntracks
 
int et_ncellhits
 
int et_npchits_tricell
 
int et_npchits_traj
 
TTree * fTrackTree
 
float tt_dcosz
 
float tt_dcosy
 
float tt_dcosx
 
float tt_totlength
 
float tt_totdisplace
 
int tt_pdg
 
int tt_ncellhits
 
int tt_npchits_tricell
 
int tt_npchits_avg
 
int tt_npchits_z
 
int tt_npchits_traj
 
TVector3 tt_startpos
 
TVector3 tt_endpos
 
std::map< std::string, TTree * > fHitTree
 
bool ht_istricell
 
bool ht_istraj
 
bool ht_isavg
 
bool ht_isz
 
int ht_diblock
 
int ht_dcm
 
int ht_apd
 
int ht_pixel
 
int ht_plane
 
int ht_cell
 
int ht_view
 
float ht_w
 
float ht_readdist
 
float ht_xapprox
 
float ht_yapprox
 
float ht_zapprox
 
float ht_pe
 
float ht_pecorr
 
float ht_pecorrtomev
 
float ht_recoMeV
 
float ht_path
 
float ht_flightLen
 
float ht_cmFromEnd
 
float ht_tns
 
float ht_truepath
 
float ht_truepe
 
float ht_truew
 
float ht_trueMeV
 
float ht_poissonlambda
 
int ht_brightbin
 
int ht_tdc
 
int ht_adc
 

Detailed Description

Definition at line 64 of file CalibAna_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 66 of file CalibAna_module.cc.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

calib::CalibAna::CalibAna ( const Parameters params)
explicit

Definition at line 176 of file CalibAna_module.cc.

177  :
178  EDAnalyzer(params),
179  fParams(params())
180 {}
CalibAnaParams fParams
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
calib::CalibAna::CalibAna ( CalibAna const &  )
delete
calib::CalibAna::CalibAna ( CalibAna &&  )
delete

Member Function Documentation

void calib::CalibAna::AddEventBranches ( TTree *  t)
private

Definition at line 634 of file CalibAna_module.cc.

References et_event, et_evttime, et_ncellhits, et_npchits_traj, et_npchits_tricell, et_ntracks, et_run, and et_subrun.

Referenced by beginJob().

635 {
636  t->Branch("run",&et_run);
637  t->Branch("subrun",&et_subrun);
638  t->Branch("event",&et_event);
639  t->Branch("evt_ntracks",&et_ntracks);
640  t->Branch("evt_ncellhits",&et_ncellhits);
641  t->Branch("evt_nhits_tricell",&et_npchits_tricell);
642  t->Branch("evt_nhits_traj",&et_npchits_traj);
643  t->Branch("evt_time",&et_evttime);
644 }
void calib::CalibAna::AddHitBranches ( TTree *  t,
std::string  type 
)
private

Definition at line 690 of file CalibAna_module.cc.

References ht_adc, ht_apd, ht_brightbin, ht_cell, ht_cmFromEnd, ht_dcm, ht_diblock, ht_flightLen, ht_isavg, ht_istraj, ht_istricell, ht_isz, ht_path, ht_pe, ht_pecorr, ht_pecorrtomev, ht_pixel, ht_plane, ht_poissonlambda, ht_readdist, ht_recoMeV, ht_tdc, ht_tns, ht_trueMeV, ht_truepath, ht_truepe, ht_truew, ht_view, ht_w, ht_xapprox, ht_yapprox, and ht_zapprox.

Referenced by beginJob().

692 {
693  // Hit vars
694  t->Branch("istricell",&ht_istricell);
695  t->Branch("istraj",&ht_istraj);
696  t->Branch("isavg",&ht_isavg);
697  t->Branch("isz",&ht_isz);
698  t->Branch("diblock",&ht_diblock);
699  t->Branch("dcm",&ht_dcm);
700  t->Branch("apd",&ht_apd);
701  t->Branch("pixel",&ht_pixel);
702  t->Branch("plane",&ht_plane);
703  t->Branch("cell",&ht_cell);
704  t->Branch("w",&ht_w);
705  t->Branch("readdist",&ht_readdist);
706  t->Branch("xapprox",&ht_xapprox);
707  t->Branch("yapprox",&ht_yapprox);
708  t->Branch("zapprox",&ht_zapprox);
709  t->Branch("pe",&ht_pe);
710  t->Branch("pecorr",&ht_pecorr);
711  t->Branch("pecorrtomev",&ht_pecorrtomev);
712  t->Branch("recoMeV",&ht_recoMeV);
713  t->Branch("path",&ht_path);
714  t->Branch("cmFromStart",&ht_flightLen); // cm from track start
715  t->Branch("cmFromEnd",&ht_cmFromEnd); // cm from track endpt
716  t->Branch("view",&ht_view);
717  t->Branch("tns",&ht_tns);
718  t->Branch("truepath",&ht_truepath);
719  t->Branch("truepe",&ht_truepe);
720  t->Branch("truew",&ht_truew);
721  t->Branch("trueMeV",&ht_trueMeV);
722  t->Branch("poissonLambda",&ht_poissonlambda);
723  t->Branch("brightbin",&ht_brightbin);
724  //if(type=="cellhit"){
725  t->Branch("tdc",&ht_tdc); // time of last baseline sample
726  t->Branch("adc",&ht_adc); // best estimate of hit charge
727  //}
728 }
void calib::CalibAna::AddTrackBranches ( TTree *  t)
private

Definition at line 656 of file CalibAna_module.cc.

References tt_dcosx, tt_dcosy, tt_dcosz, tt_endpos, tt_ncellhits, tt_npchits_avg, tt_npchits_traj, tt_npchits_tricell, tt_npchits_z, tt_pdg, tt_startpos, and tt_totlength.

Referenced by beginJob().

657 {
658  t->Branch("trk_nhits_tricell",&tt_npchits_tricell);
659  t->Branch("trk_nhits_avg",&tt_npchits_avg);
660  t->Branch("trk_nhits_z",&tt_npchits_z);
661  t->Branch("trk_nhits_traj",&tt_npchits_traj);
662  t->Branch("trk_ncellhits",&tt_ncellhits);
663  //t->Branch("npts",&tt_npts);
664  t->Branch("trk_dcosx",&tt_dcosx);
665  t->Branch("trk_dcosy",&tt_dcosy);
666  t->Branch("trk_dcosz",&tt_dcosz);
667  t->Branch("trk_totlength",&tt_totlength);
668  t->Branch("trk_totdisplace",&tt_totlength);
669  t->Branch("trk_startpos",&tt_startpos);
670  t->Branch("trk_endpos",&tt_endpos);
671  t->Branch("trk_pdg",&tt_pdg);
672 }
void calib::CalibAna::analyze ( art::Event const &  e)
overridevirtual

Implements art::EDAnalyzer.

Definition at line 185 of file CalibAna_module.cc.

References plot_validation_datamc::c, rb::Cluster::Cell(), om::cout, rb::Prong::Dir(), allTimeWatchdog::endl, et_event, et_evttime, et_ncellhits, et_npchits_traj, et_npchits_tricell, et_ntracks, et_run, et_subrun, art::EventID::event(), fEventTree, fHitTree, FillWithCellHit(), FillWithPCHit(), fIsRealData, fParams, fTrackTree, art::DataViewImpl::getByLabel(), make_syst_table_plots::h, HitInList(), MECModelEnuComparisons::i, art::Event::id(), makeTrainCVSamples::int, art::Event::isRealData(), Mag(), rb::Cluster::NCell(), calib::CalibAnaParams::PCHitsLabel, PrintHit(), ResetEventBranches(), ResetTrackBranches(), art::Event::run(), rb::Prong::Start(), rb::Track::Stop(), art::Event::subRun(), art::Event::time(), art::Timestamp::timeHigh(), rb::Track::TotalLength(), calib::CalibAnaParams::TrackLabel, tt_dcosx, tt_dcosy, tt_dcosz, tt_endpos, tt_ncellhits, tt_npchits_avg, tt_npchits_traj, tt_npchits_tricell, tt_npchits_z, tt_startpos, tt_totdisplace, and tt_totlength.

186 {
187  fIsRealData = e.isRealData();
189  et_run = (int)(e.run());
190  et_subrun = (int)(e.subRun());
191  et_event = (int)(e.id().event());
192  et_evttime = e.time().timeHigh();
193 
195  e.getByLabel(fParams.TrackLabel(), tracks);
196  et_ntracks = tracks->size();
197 
198 
199  // Annoyingly need all since (XY + Z + Avg) = all hits in track
200  // FindTricellHits gets the main hits to be put in tree
201  art::FindManyP<caldp::PCHit> FindTricellHits(tracks, e,
203  "pathQualXY"));
204  art::FindManyP<caldp::PCHit> FindTrajHits(tracks, e,
206  "pathQualTraj"));
207  art::FindManyP<caldp::PCHit> FindAvgHits( tracks, e,
209  "pathQualAvg"));
210  art::FindManyP<caldp::PCHit> FindZHits( tracks, e,
212  "pathQualZ"));
213  if( !FindTricellHits.isValid() ){
214  mf::LogInfo("CalibAna") << "No pathQualXY hits."; return; }
215  if( !FindTrajHits.isValid() ){
216  mf::LogInfo("CalibAna") << "No pathQualTraj hits."; return; }
217  if( !FindAvgHits.isValid() ){
218  mf::LogInfo("CalibAna") << "No pathQualAvg hits."; return; }
219  if( !FindZHits.isValid() ){
220  mf::LogInfo("CalibAna") << "No pathQualZ hits."; return; }
221 
222 
223  for( unsigned int i=0; i<tracks->size(); ++i ){
225  rb::Track trk = (*tracks)[i];
226  tt_dcosx = trk.Dir().X()/trk.Dir().Mag();
227  tt_dcosy = trk.Dir().Y()/trk.Dir().Mag();
228  tt_dcosz = trk.Dir().Z()/trk.Dir().Mag();
229 
230  tt_startpos = trk.Start();
231  tt_endpos = trk.Stop();
232  tt_totdisplace = (tt_endpos-tt_startpos).Mag(); // displacement
233  tt_totlength = trk.TotalLength(); // vs. distance
234 
235  // xy and z conditions are mutually exclusive,
236  // avg hits are just the rest in the track
237  // so xy + z + avg is all the hits in the track
238  std::vector<art::Ptr<caldp::PCHit> > trihits = FindTricellHits.at(i);
239  std::vector<art::Ptr<caldp::PCHit> > trajhits = FindTrajHits.at(i);
240  std::vector<art::Ptr<caldp::PCHit> > avghits = FindAvgHits.at(i);
241  std::vector<art::Ptr<caldp::PCHit> > zhits = FindZHits.at(i);
242  //int npchits = trihits.size() + avghits.size() + zhits.size();
243  tt_ncellhits = trk.NCell();
244  //if(tt_ncellhits != npchits)
245  //mf::LogInfo("CalibAna") << tt_ncellhits << " CellHits, but " << npchits << " PCHits";
246  tt_npchits_tricell = trihits.size();
247  tt_npchits_avg = avghits.size();
248  tt_npchits_z = zhits.size();
249  tt_npchits_traj = trajhits.size();
250  //if(tt_ncellhits != tt_npchits_traj)
251  //mf::LogInfo("CalibAna") << tt_ncellhits << " CellHits, but " << tt_npchits_traj << " Trajectory PCHits";
255 
256  /*
257  std::cout << npchits << " PCHits ("
258  << tt_npchits_tricell << " Tricell, "
259  << tt_npchits_avg << " Avg, "
260  << zhits.size() << " Z), "
261  << tt_npchits_traj << " Trajectory. "
262  << trk.NCell() << " Cell Hits." << std::endl;
263  */
264 
265 
266  //daqchannelmap::DAQChannelMap* cmap = daqchannelmap::DAQChannelMap::getInstance(fDS->DetId());
267 
268  if(fHitTree.count("cellhit")==1){
269  for(size_t c = 0; c < trk.NCell(); ++c){
270  art::Ptr< rb::CellHit > cellhit = trk.Cell(c);
271 
272  // Check what hit qualities this cellhit has
273  bool is_avg = HitInList( cellhit, avghits );
274  bool is_z = HitInList( cellhit, zhits );
275  bool is_traj = HitInList( cellhit, trajhits );
276  bool is_tri = HitInList( cellhit, trihits );
277 
278  FillWithCellHit(cellhit,
279  is_traj, is_tri,
280  is_avg, is_z,
281  tt_totdisplace);
282  fHitTree["cellhit"]->Fill();
283  }
284  }
285 
286 
287  if(fHitTree.count("tricell")==1){
288  for(size_t h = 0; h < trihits.size(); ++h){
289  caldp::PCHit const & trihit = *trihits[h];
290 
291  // Check what other hit qualities this trajectory hit has
292  bool is_avg = HitInList( trihit, avghits );
293  bool is_z = HitInList( trihit, zhits );
294  bool is_traj = HitInList( trihit, trajhits );
295 
296  FillWithPCHit( trihit,
297  is_traj, true,
298  is_avg, is_z,
299  tt_totdisplace);
300  fHitTree["tricell"]->Fill();
301  }
302  }
303 
304  if(fHitTree.count("trajectory")==1){
305  size_t ntricell=0;
306  for(size_t h = 0; h < trajhits.size(); ++h){
307  caldp::PCHit const & trajhit = *trajhits[h];
308 
309  // Check what other hit qualities this trajectory hit has
310  bool is_avg = HitInList( trajhit, avghits );
311  bool is_z = HitInList( trajhit, zhits );
312  bool is_tri = HitInList( trajhit, trihits );
313  if( is_tri ) ntricell++;
314 
315  FillWithPCHit( trajhit,
316  true, is_tri,
317  is_avg, is_z,
318  tt_totdisplace);
319  fHitTree["trajectory"]->Fill();
320  }
321 
322  if(tt_dcosz > 0.95 && ntricell!=0 ){
323  std::cout << "^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^\n\n" << std::endl;
324  std::cout << " Forward Track with " << ntricell << " tricell hits.\n\n" << std::endl;
325  for(size_t h = 0; h < trajhits.size(); ++h){
326  caldp::PCHit const & thit = *trajhits[h];
327  if( HitInList( thit, trihits ) ) std::cout << "Tricell: " << std::endl;
328  PrintHit(thit);
329  }
330  }
331 
332  }
333 
334 
335  fTrackTree->Fill();
336  }
337 
338  fEventTree->Fill();
339 }
void FillWithPCHit(caldp::PCHit const &pchit, bool is_trajectory, bool is_tricell, bool is_avg, bool is_z, float trk_len)
unsigned int NCell(geo::View_t view) const
Number of cells in view view.
Definition: Cluster.cxx:134
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
A rb::Prong with full reconstructed trajectory.
Definition: Track.h:20
virtual TVector3 Start() const
Definition: Prong.h:73
"Pre-calibration hit". Common input to calibration procedures
Definition: PCHit.h:16
virtual double TotalLength() const
Length (cm) of all the track segments.
Definition: Track.cxx:213
CalibAnaParams fParams
Track finder for cosmic rays.
void FillWithCellHit(art::Ptr< rb::CellHit > cellhit, bool is_trajectory, bool is_tricell, bool is_avg, bool is_z, float trk_len)
Atom< std::string > PCHitsLabel
virtual TVector3 Dir() const
Unit vector describing prong direction.
Definition: Prong.h:77
void PrintHit(caldp::PCHit const &hit)
OStream cout
Definition: OStream.cxx:6
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
float Mag() const
std::map< std::string, TTree * > fHitTree
TVector3 Stop() const
Position of the final trajectory point.
Definition: Track.cxx:186
Float_t e
Definition: plot.C:35
bool HitInList(caldp::PCHit const &hit, std::vector< art::Ptr< caldp::PCHit > > list)
Atom< std::string > TrackLabel
void calib::CalibAna::ApproximateHitPos ( caldp::PCHit const &  hit,
float &  x,
float &  y,
float &  z 
)
private

Definition at line 539 of file CalibAna_module.cc.

References caldp::PCHit::Cell(), geo::PlaneGeo::Cell(), geo::CellGeo::GetCenter(), geo::kX, geo::kY, caldp::PCHit::Plane(), geo::GeometryBase::Plane(), caldp::PCHit::View(), and caldp::PCHit::W().

Referenced by FillWithCellHit(), and FillWithPCHit().

540  {
542  const geo::PlaneGeo* planeg = geo->Plane(hit.Plane());
543  const geo::CellGeo* cellg = planeg->Cell(hit.Cell());
544  double cell_center[3];
545  cellg->GetCenter(cell_center);
546 
547  z = cell_center[2];
548  if( hit.View()==geo::kX ){
549  x = cell_center[0];
550  y = hit.W();
551  }
552  else if( hit.View()==geo::kY ){
553  x = hit.W();
554  y = cell_center[1];
555  }
556  else{
557  mf::LogWarning("CalibAna") << "Bad hit.View()";
558  }
559 }
void GetCenter(double *xyz, double localz=0.0) const
Definition: CellGeo.cxx:159
const CellGeo * Cell(int icell) const
Definition: PlaneGeo.h:48
Vertical planes which measure X.
Definition: PlaneGeo.h:28
const PlaneGeo * Plane(unsigned int i) const
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
Geometry information for a single readout plane.
Definition: PlaneGeo.h:36
z
Definition: test.py:28
Definition: structs.h:12
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
Encapsulate the cell geometry.
Definition: CellGeo.h:25
Helper for AttenCurve.
Definition: Path.h:10
void calib::CalibAna::ApproximateHitPos ( art::Ptr< rb::CellHit cellhit,
float &  x,
float &  y,
float &  z 
)
private

Definition at line 560 of file CalibAna_module.cc.

References rb::CellHit::Cell(), geo::CellGeo::GetCenter(), geo::kX, geo::kY, rb::CellHit::Plane(), geo::GeometryBase::Plane(), and rb::CellHit::View().

561  {
563  const geo::CellGeo* cellg = geo->Plane(cellhit->Plane())->Cell(cellhit->Cell());
564  double cell_center[3];
565  cellg->GetCenter(cell_center);
566 
567  z = cell_center[2];
568  if( cellhit->View()==geo::kX ){
569  x = cell_center[0];
570  y = -999.; // estimate W?
571  }
572  else if( cellhit->View()==geo::kY ){
573  x = -999.; // estimate W?
574  y = cell_center[1];
575  }
576  else{
577  mf::LogWarning("CalibAna") << "Bad hit.View()";
578  }
579 }
void GetCenter(double *xyz, double localz=0.0) const
Definition: CellGeo.cxx:159
unsigned short Plane() const
Definition: CellHit.h:39
geo::View_t View() const
Definition: CellHit.h:41
Vertical planes which measure X.
Definition: PlaneGeo.h:28
const PlaneGeo * Plane(unsigned int i) const
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
unsigned short Cell() const
Definition: CellHit.h:40
z
Definition: test.py:28
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
Encapsulate the cell geometry.
Definition: CellGeo.h:25
Helper for AttenCurve.
Definition: Path.h:10
void calib::CalibAna::beginJob ( )
overridevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 388 of file CalibAna_module.cc.

References AddEventBranches(), AddHitBranches(), AddTrackBranches(), fEventTree, fHitTree, fParams, fTrackTree, art::TFileDirectory::make(), gen_hdf5record::types, and calib::CalibAnaParams::WhichHitTrees.

389 {
391  fEventTree = tfs->make<TTree>("event_tree","tree of variables per art event");
393 
394  fTrackTree = tfs->make<TTree>("track_tree","tree of variables per track");
397 
398  std::vector< std::string > types = {"tricell","trajectory","cellhit"};
399  for(auto& type: types){
400  if(fParams.WhichHitTrees().find(type)==std::string::npos) continue;
401 
402  fHitTree[type] = tfs->make<TTree>((type+"_tree").c_str(),
403  ("tree of variables per "+type+" hit").c_str());
407  }
408 
409 }
void AddHitBranches(TTree *t, std::string type)
void AddEventBranches(TTree *t)
CalibAnaParams fParams
void AddTrackBranches(TTree *t)
Atom< std::string > WhichHitTrees
T * make(ARGS...args) const
std::map< std::string, TTree * > fHitTree
detail::CachedProducts& art::EventObserverBase::cachedProducts ( )
inlineprotectedinherited

Definition at line 79 of file EventObserverBase.h.

References art::EventObserverBase::selectors_.

80  {
81  return selectors_;
82  }
detail::CachedProducts selectors_
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::consumes ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::consumes ( InputTag const &  it)
inherited

Definition at line 146 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

147 {
148  if (!moduleContext_)
149  return ProductToken<T>::invalid();
150 
151  consumables_[BT].emplace_back(ConsumableType::Product,
152  TypeID{typeid(T)},
153  it.label(),
154  it.instance(),
155  it.process());
156  return ProductToken<T>{it};
157 }
set< int >::iterator it
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename T , art::BranchType BT>
void art::Consumer::consumesMany ( )
inherited

Definition at line 161 of file Consumer.h.

References T.

162 {
163  if (!moduleContext_)
164  return;
165 
166  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
167 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::consumesView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::consumesView ( InputTag const &  it)
inherited

Definition at line 171 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

172 {
173  if (!moduleContext_)
174  return ViewToken<T>::invalid();
175 
176  consumables_[BT].emplace_back(ConsumableType::ViewElement,
177  TypeID{typeid(T)},
178  it.label(),
179  it.instance(),
180  it.process());
181  return ViewToken<T>{it};
182 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make 
)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make,
label_t const &  engine_label 
)
inherited
CurrentProcessingContext const* art::EDAnalyzer::currentContext ( ) const
protectedinherited
void calib::CalibAna::endJob ( )
overridevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 583 of file CalibAna_module.cc.

References calib::CalibratorParams::AbsEpochTag, calib::CalibratorParams::DriftCSV, calib::CalibratorParams::DriftEpochTag, calib::Calibrator::GetAbsConstsCSVPath(), calib::Calibrator::GetAttenCSVPath(), calib::Calibrator::GetCalibratorParams(), calib::Calibrator::GetDriftConstsCSVPath(), cet::getenv(), calib::Calibrator::GetTimingConstsCSVPath(), art::TFileDirectory::make(), string, calib::CalibratorParams::Tag, hadd_reco_validation::testrel, calib::CalibratorParams::TimingEpochTag, calib::CalibratorParams::TimingTag, calib::CalibratorParams::UseAbsEpochs, calib::CalibratorParams::UseDriftEpochs, and calib::CalibratorParams::UseTimingEpochs.

584 {
586  CalibratorParams cal_par = calibrator->GetCalibratorParams();
587 
588  std::string baserel = getenv("SRT_PUBLIC_CONTEXT");
589  std::string testrel = getenv("SRT_PRIVATE_CONTEXT");
590  std::string csvpath_atten = calibrator->GetAttenCSVPath();
591  std::string csvpath_abs = calibrator->GetAbsConstsCSVPath();
592  std::string csvpath_timing = calibrator->GetTimingConstsCSVPath();
593  std::string csvpath_drift = calibrator->GetDriftConstsCSVPath();
594  std::string calibtag = cal_par.Tag();
595  bool UseAbsEpochs = cal_par.UseAbsEpochs();
596  std::string AbsEpochTag = cal_par.AbsEpochTag();
597  std::string TimingTag = cal_par.TimingTag();
598  bool UseTimingEpochs = cal_par.UseTimingEpochs();
599  std::string TimingEpochTag = cal_par.TimingEpochTag();
600  std::string DriftCSV = cal_par.DriftCSV();
601  bool UseDriftEpochs = cal_par.UseDriftEpochs();
602  std::string DriftEpochTag = cal_par.DriftEpochTag();
603 
605  TTree* FileTree = tfs->make<TTree>("file_tree","tree of info per file");
606  FileTree->Branch( "baserel", &baserel ); // $SRT_PUBLIC_CONTEXT
607  FileTree->Branch( "testrel", &testrel ); // $SRT_PRIVATE_CONTEXT
608  FileTree->Branch( "csvpath_atten", &csvpath_atten ); // $CALIBCSVS_CSV_PATH or fcl provided
609  FileTree->Branch( "csvpath_abs", &csvpath_abs );
610  FileTree->Branch( "csvpath_timing", &csvpath_timing );
611  FileTree->Branch( "csvpath_drift", &csvpath_drift );
612  FileTree->Branch( "calibtag", &calibtag );
613 
614  // Other potentially important configurations
615  // TODO: Loop through parameter table and use key
616  // as branch name to do a full config dump.
617  FileTree->Branch( "UseAbsEpochs", &UseAbsEpochs );
618  FileTree->Branch( "AbsEpochTag", &AbsEpochTag );
619  FileTree->Branch( "TimingTag", &TimingTag );
620  FileTree->Branch( "UseTimingEpochs", &UseTimingEpochs );
621  FileTree->Branch( "TimingEpochTag", &TimingEpochTag );
622  FileTree->Branch( "DriftCSV", &DriftCSV );
623  FileTree->Branch( "UseDriftEpochs", &UseDriftEpochs );
624  FileTree->Branch( "DriftEpochTag", &DriftEpochTag );
625  //FileTree->Branch("brightnessmodel",&brightnessmodel); //
626 
627 
628  FileTree->Fill();
629 }
std::string getenv(std::string const &name)
std::string GetDriftConstsCSVPath()
Definition: Calibrator.h:388
std::string GetTimingConstsCSVPath()
Definition: Calibrator.h:387
std::string GetAbsConstsCSVPath()
Definition: Calibrator.h:386
T * make(ARGS...args) const
std::string GetAttenCSVPath()
Definition: Calibrator.h:385
CalibratorParams GetCalibratorParams()
Definition: Calibrator.h:389
enum BeamMode string
void calib::CalibAna::FillWithCellHit ( art::Ptr< rb::CellHit cellhit,
bool  is_trajectory,
bool  is_tricell,
bool  is_avg,
bool  is_z,
float  trk_len 
)
private

Definition at line 466 of file CalibAna_module.cc.

References rawdata::RawDigit::ADC(), ApproximateHitPos(), rb::CellHit::Cell(), fb, photrans::FiberBrightness::getBrightnessIndex(), ht_adc, ht_brightbin, ht_cell, ht_isavg, ht_istraj, ht_istricell, ht_isz, ht_pe, ht_plane, ht_tdc, ht_tns, ht_view, ht_xapprox, ht_yapprox, ht_zapprox, rb::CellHit::PE(), rb::CellHit::Plane(), ResetHitBranches(), rawdata::RawDigit::TDC(), rb::CellHit::TNS(), and rb::CellHit::View().

Referenced by analyze().

470 {
472  // straight from the hit
473 
474  ht_plane = ch->Plane();
475  ht_cell = ch->Cell();
476  /*
477  uint32_t lchan = cmap->encodeLChan(fGeom->DetId(), chit->Plane(), chit->Cell());
478  uint32_t dchan = cmap->encodeDChan(lchan);
479  uint32_t pixel = cmap->getPixel(dchan);
480  uint32_t apd = cmap->getFEB(dchan);
481  uint32_t dcm = cmap->getDCM(dchan);
482  uint32_t diblock = cmap->getDiBlock(dchan);
483  */
484  //ht_diblock = ch->Diblock();
485  //ht_dcm = ch->DCM();
486  //ht_apd = ch->APD();
487  //ht_pixel = ch->Pixel();
488 
489  ht_view = ch->View();
490  //ht_w = ch->W();
491  ht_pe = ch->PE();
492  //ht_path = ch->Path();
493  ht_tns = ch->TNS();
494  //ht_truepath = ch->TruePath();
495  //ht_truepe = ch->TruePE();
496  //ht_truew = ch->TrueW();
497  //ht_trueMeV = ch->TrueMeV();
498  //ht_x = trk_length - ch->FlightLen();
499  ht_tdc = ch->TDC();
500  ht_adc = ch->ADC();
501  // use calibrator service
502  //ht_pecorr = GetPECorr(ch); // need W from PCHits
503  //ht_pecorrtomev = GetPECorrToMeV(ch);
504  //ht_recoMeV = ht_pecorr * ht_pecorrtomev;
507 
508  ht_istraj = is_trajectory;
509  ht_istricell = is_tricell;
510  ht_isavg = is_avg;
511  ht_isz = is_z;
512 
514 }
unsigned int getBrightnessIndex(unsigned int plane, unsigned int cell) const
void ApproximateHitPos(caldp::PCHit const &hit, float &x, float &y, float &z)
void calib::CalibAna::FillWithPCHit ( caldp::PCHit const &  pchit,
bool  is_trajectory,
bool  is_tricell,
bool  is_avg,
bool  is_z,
float  trk_len 
)
private

Definition at line 413 of file CalibAna_module.cc.

References caldp::PCHit::APD(), ApproximateHitPos(), caldp::PCHit::Cell(), caldp::PCHit::DCM(), caldp::PCHit::Diblock(), fb, caldp::PCHit::FlightLen(), photrans::FiberBrightness::getBrightnessIndex(), GetPECorr(), GetPECorrToMeV(), ht_apd, ht_brightbin, ht_cell, ht_cmFromEnd, ht_dcm, ht_diblock, ht_flightLen, ht_isavg, ht_istraj, ht_istricell, ht_isz, ht_path, ht_pe, ht_pecorr, ht_pecorrtomev, ht_pixel, ht_plane, ht_poissonlambda, ht_readdist, ht_recoMeV, ht_tns, ht_trueMeV, ht_truepath, ht_truepe, ht_truew, ht_view, ht_w, ht_xapprox, ht_yapprox, ht_zapprox, caldp::PCHit::Path(), caldp::PCHit::PE(), caldp::PCHit::Pixel(), caldp::PCHit::Plane(), caldp::PCHit::PoissonLambda(), caldp::PCHit::ReadDist(), ResetHitBranches(), caldp::PCHit::TNS(), caldp::PCHit::TrueMeV(), caldp::PCHit::TruePath(), caldp::PCHit::TruePE(), caldp::PCHit::TrueW(), caldp::PCHit::View(), and caldp::PCHit::W().

Referenced by analyze().

417 {
419  // straight from the hit
420  ht_diblock = pc.Diblock();
421  ht_dcm = pc.DCM();
422  ht_apd = pc.APD();
423  ht_pixel = pc.Pixel();
424  ht_plane = pc.Plane();
425  ht_cell = pc.Cell();
426  ht_view = pc.View();
427  ht_w = pc.W();
428  ht_readdist = pc.ReadDist();
429  ht_pe = pc.PE();
430  ht_path = pc.Path();
431  ht_tns = pc.TNS();
432  ht_truepath = pc.TruePath();
433  ht_truepe = pc.TruePE();
434  ht_truew = pc.TrueW();
435  ht_trueMeV = pc.TrueMeV();
436  ht_flightLen = pc.FlightLen(); // comes from trk->DistanceFromStart( world coordinate );
437  ht_cmFromEnd = trk_length - pc.FlightLen();
438  ht_poissonlambda = pc.PoissonLambda();
439  // use calibrator service
445 
446  size_t ntypes = 0;
447  if( is_tricell ) ntypes++;
448  if( is_avg ) ntypes++;
449  if( is_z ) ntypes++;
450  if( ntypes > 1 )
451  mf::LogError("CalibAna")
452  << "Tricell, Avg, and Z selections should be mutually exclusive, "
453  << "but this hit is: "
454  << (is_tricell ? "Tricell, " : "")
455  << (is_avg ? "Avg, " : "")
456  << (is_z ? "Z. " : ".");
457 
458  ht_istraj = is_trajectory;
459  ht_istricell = is_tricell;
460  ht_isavg = is_avg;
461  ht_isz = is_z;
462 
464 }
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
float GetPECorr(caldp::PCHit const &pchit)
unsigned int getBrightnessIndex(unsigned int plane, unsigned int cell) const
float GetPECorrToMeV(caldp::PCHit const &pchit)
void ApproximateHitPos(caldp::PCHit const &hit, float &x, float &y, float &z)
seed_t art::EngineCreator::get_seed_value ( fhicl::ParameterSet const &  pset,
char const  key[] = "seed",
seed_t const  implicit_seed = -1 
)
inherited
float calib::CalibAna::GetPECorr ( caldp::PCHit const &  pchit)
private

Definition at line 518 of file CalibAna_module.cc.

References caldp::PCHit::Cell(), fIsRealData, calib::Calibrator::GetPECorr(), caldp::PCHit::GoodTime(), caldp::PCHit::PE(), caldp::PCHit::Plane(), rb::CellHit::SetCell(), rawdata::RawDigit::SetMC(), rb::CellHit::SetPE(), rb::CellHit::SetPlane(), rb::CellHit::SetTNS(), rb::CellHit::SetView(), caldp::PCHit::TNS(), caldp::PCHit::View(), and caldp::PCHit::W().

Referenced by FillWithPCHit().

518  {
519  //Make mock cellhit
520  rb::CellHit cellhit;
521  cellhit.SetPlane(pchit.Plane());
522  cellhit.SetCell(pchit.Cell());
523  cellhit.SetView(pchit.View());
524  cellhit.SetTNS(pchit.TNS(),pchit.GoodTime());
525  if(!fIsRealData) cellhit.SetMC();
526  cellhit.SetPE(pchit.PE());
528  return calibrator->GetPECorr(cellhit, pchit.W());
529 }
void SetTNS(float tns, bool good)
Definition: CellHit.h:56
void SetView(geo::View_t view)
Definition: CellHit.h:54
void SetPlane(unsigned short plane)
Definition: CellHit.h:53
void SetCell(unsigned short cell)
Definition: CellHit.h:52
void SetPE(float pe)
Definition: CellHit.h:55
void SetMC(bool isMC=true)
Definition: RawDigit.h:106
A rawdata::RawDigit with channel information decoded.
Definition: CellHit.h:27
double GetPECorr(rb::CellHit const &cellhit, double w)
float calib::CalibAna::GetPECorrToMeV ( caldp::PCHit const &  pchit)
private

Definition at line 530 of file CalibAna_module.cc.

References fIsRealData, calib::Calibrator::GetPECorrToGeVScale(), and rawdata::RawDigit::SetMC().

Referenced by FillWithPCHit().

530  {
531  rb::CellHit cellhit;
532  if(!fIsRealData) cellhit.SetMC();
534  return 1000.*calibrator->GetPECorrToGeVScale(cellhit);
535 }
double GetPECorrToGeVScale(rb::CellHit const &cellhit)
void SetMC(bool isMC=true)
Definition: RawDigit.h:106
A rawdata::RawDigit with channel information decoded.
Definition: CellHit.h:27
art::Handle<art::TriggerResults> art::EventObserverBase::getTriggerResults ( Event const &  e) const
inlineinherited

Definition at line 61 of file EventObserverBase.h.

References art::detail::CachedProducts::getOneTriggerResults(), and art::EventObserverBase::selectors_.

62  {
64  }
detail::CachedProducts selectors_
art::Handle< art::TriggerResults > getOneTriggerResults(Event const &) const
Float_t e
Definition: plot.C:35
bool calib::CalibAna::HitInList ( caldp::PCHit const &  hit,
std::vector< art::Ptr< caldp::PCHit > >  list 
)
private

Definition at line 355 of file CalibAna_module.cc.

References MECModelEnuComparisons::i, parse_dependency_file_t::list, and MatchHits().

Referenced by analyze().

357 {
358  for(size_t i = 0; i < list.size(); ++i)
359  if( MatchHits( hit, *list[i] ) )
360  return true;
361  return false;
362 }
Definition: structs.h:12
bool MatchHits(caldp::PCHit const &h1, caldp::PCHit const &h2)
bool calib::CalibAna::HitInList ( art::Ptr< rb::CellHit hit,
std::vector< art::Ptr< caldp::PCHit > >  list 
)
private

Definition at line 363 of file CalibAna_module.cc.

References MECModelEnuComparisons::i, parse_dependency_file_t::list, and MatchHits().

365 {
366  for(size_t i = 0; i < list.size(); ++i)
367  if( MatchHits( cellhit, *list[i] ) )
368  return true;
369  return false;
370 }
bool MatchHits(caldp::PCHit const &h1, caldp::PCHit const &h2)
bool calib::CalibAna::MatchHits ( caldp::PCHit const &  h1,
caldp::PCHit const &  h2 
)
private

Definition at line 371 of file CalibAna_module.cc.

References caldp::PCHit::Cell(), caldp::PCHit::Plane(), and caldp::PCHit::TNS().

Referenced by HitInList().

373 {
374  return (h1.Cell() == h2.Cell() &&
375  h1.Plane() == h2.Plane() &&
376  h1.TNS() == h2.TNS());
377 }
TH1F * h2
Definition: plot.C:45
TH1F * h1
bool calib::CalibAna::MatchHits ( art::Ptr< rb::CellHit h1,
caldp::PCHit const &  h2 
)
private

Definition at line 378 of file CalibAna_module.cc.

References caldp::PCHit::Cell(), rb::CellHit::Cell(), caldp::PCHit::Plane(), rb::CellHit::Plane(), rb::CellHit::TNS(), and caldp::PCHit::TNS().

380 {
381  return (h1->Cell() == h2.Cell() &&
382  h1->Plane() == h2.Plane() &&
383  h1->TNS() == h2.TNS());
384 }
float TNS() const
Definition: CellHit.h:46
unsigned short Plane() const
Definition: CellHit.h:39
unsigned short Cell() const
Definition: CellHit.h:40
TH1F * h2
Definition: plot.C:45
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::mayConsume ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::mayConsume ( InputTag const &  it)
inherited

Definition at line 189 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

190 {
191  if (!moduleContext_)
192  return ProductToken<T>::invalid();
193 
194  consumables_[BT].emplace_back(ConsumableType::Product,
195  TypeID{typeid(T)},
196  it.label(),
197  it.instance(),
198  it.process());
199  return ProductToken<T>{it};
200 }
set< int >::iterator it
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename T , art::BranchType BT>
void art::Consumer::mayConsumeMany ( )
inherited

Definition at line 204 of file Consumer.h.

References T.

205 {
206  if (!moduleContext_)
207  return;
208 
209  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
210 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::mayConsumeView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::mayConsumeView ( InputTag const &  it)
inherited

Definition at line 214 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

215 {
216  if (!moduleContext_)
217  return ViewToken<T>::invalid();
218 
219  consumables_[BT].emplace_back(ConsumableType::ViewElement,
220  TypeID{typeid(T)},
221  it.label(),
222  it.instance(),
223  it.process());
224  return ViewToken<T>{it};
225 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
bool art::EventObserverBase::modifiesEvent ( ) const
inlineinherited

Definition at line 25 of file EventObserverBase.h.

26  {
27  return false;
28  }
static cet::exempt_ptr<Consumer> art::Consumer::non_module_context ( )
staticinherited
CalibAna& calib::CalibAna::operator= ( CalibAna const &  )
delete
CalibAna& calib::CalibAna::operator= ( CalibAna &&  )
delete
void art::Consumer::prepareForJob ( fhicl::ParameterSet const &  pset)
protectedinherited
void calib::CalibAna::PrintHit ( caldp::PCHit const &  hit)
private

Definition at line 343 of file CalibAna_module.cc.

References caldp::PCHit::Cell(), om::cout, allTimeWatchdog::endl, caldp::PCHit::Plane(), art::right(), caldp::PCHit::TNS(), and caldp::PCHit::W().

Referenced by analyze().

343  {
344  std::cout << std::right << std::setw(6) << std::setfill(' ')
345  << "P:" << hit.Plane() << std::right << std::setw(6) << std::setfill(' ')
346  << "C:" << hit.Cell() << std::right << std::setw(6) << std::setfill(' ')
347  << "W:" << hit.W() << std::right << std::setw(6) << std::setfill(' ')
348  << "T:" << hit.TNS() << std::right << std::setw(6) << std::setfill(' ')
349  << std::endl;
350 }
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:112
OStream cout
Definition: OStream.cxx:6
Definition: structs.h:12
std::string const& art::EventObserverBase::processName ( ) const
inlineinherited
void art::EventObserverBase::registerProducts ( MasterProductRegistry ,
ProductDescriptions ,
ModuleDescription const &   
)
inlineinherited

Definition at line 33 of file EventObserverBase.h.

References string.

36  {}
void calib::CalibAna::ResetEventBranches ( )
private
void calib::CalibAna::ResetHitBranches ( )
private

Definition at line 729 of file CalibAna_module.cc.

References DEFINE_ART_MODULE(), ht_adc, ht_apd, ht_brightbin, ht_cell, ht_cmFromEnd, ht_dcm, ht_diblock, ht_flightLen, ht_isavg, ht_istraj, ht_istricell, ht_isz, ht_path, ht_pe, ht_pecorr, ht_pecorrtomev, ht_pixel, ht_plane, ht_poissonlambda, ht_readdist, ht_recoMeV, ht_tdc, ht_tns, ht_trueMeV, ht_truepath, ht_truepe, ht_truew, ht_view, ht_w, ht_xapprox, ht_yapprox, and ht_zapprox.

Referenced by FillWithCellHit(), and FillWithPCHit().

730 {
731  ht_istricell=false; ht_isz=false;
732  ht_istraj=false; ht_isavg=false;
733  ht_diblock=-5; ht_dcm=-5; ht_apd=-5;
734  ht_pixel=-5; ht_plane=-5; ht_cell=-5;
735  ht_w=-999; ht_pe=-5; ht_pecorr=-5;
736  ht_xapprox=-999; ht_yapprox=-999; ht_zapprox=-999;
738  ht_cmFromEnd=-5; ht_flightLen=-5;
739  ht_view=-5; ht_tns=-5;
740  ht_truepath=-5; ht_truepe=-5; ht_truew=-5;
741  ht_trueMeV=-5; ht_brightbin=-5;
743  ht_tdc=-5; ht_adc=-5;
744 }
void calib::CalibAna::ResetTrackBranches ( )
private

Definition at line 673 of file CalibAna_module.cc.

References tt_dcosx, tt_dcosy, tt_dcosz, tt_endpos, tt_ncellhits, tt_npchits_avg, tt_npchits_traj, tt_npchits_tricell, tt_npchits_z, tt_pdg, tt_startpos, tt_totdisplace, and tt_totlength.

Referenced by analyze().

674 {
676  tt_npchits_avg=0;
677  tt_npchits_z=0;
678  tt_npchits_traj=0;
679  tt_ncellhits=0;
680  //tt_npts=0;
681  tt_pdg=0;
682  tt_dcosx=-5; tt_dcosy=-5; tt_dcosz=-5;
684  tt_startpos.SetXYZ(0.,0.,0.);
685  tt_endpos.SetXYZ(0.,0.,0.);
686 }
fhicl::ParameterSetID art::EventObserverBase::selectorConfig ( ) const
inlineinherited

Definition at line 56 of file EventObserverBase.h.

References art::EventObserverBase::selector_config_id_.

57  {
58  return selector_config_id_;
59  }
fhicl::ParameterSetID selector_config_id_
void art::Consumer::showMissingConsumes ( ) const
protectedinherited

Referenced by art::RootOutput::endJob().

void art::Consumer::validateConsumedProduct ( BranchType const  bt,
ProductInfo const &  pi 
)
protectedinherited
bool art::EventObserverBase::wantAllEvents ( ) const
inlineinherited

Definition at line 46 of file EventObserverBase.h.

References art::EventObserverBase::wantAllEvents_.

Referenced by art::RootOutput::RootOutput().

47  {
48  return wantAllEvents_;
49  }
bool art::EventObserverBase::wantEvent ( Event const &  e)
inlineinherited

Definition at line 51 of file EventObserverBase.h.

References art::EventObserverBase::selectors_, and art::detail::CachedProducts::wantEvent().

52  {
53  return selectors_.wantEvent(e);
54  }
detail::CachedProducts selectors_
Float_t e
Definition: plot.C:35
bool wantEvent(Event const &)
std::string art::EDAnalyzer::workerType ( ) const
inlineinherited

Definition at line 109 of file EDAnalyzer.h.

References art::EDAnalyzer::currentContext().

110  {
111  return "WorkerT<EDAnalyzer>";
112  }

Member Data Documentation

int calib::CalibAna::et_event
private

Definition at line 92 of file CalibAna_module.cc.

Referenced by AddEventBranches(), analyze(), and ResetEventBranches().

uint32_t calib::CalibAna::et_evttime
private

Definition at line 93 of file CalibAna_module.cc.

Referenced by AddEventBranches(), analyze(), and ResetEventBranches().

int calib::CalibAna::et_ncellhits
private

Definition at line 95 of file CalibAna_module.cc.

Referenced by AddEventBranches(), analyze(), and ResetEventBranches().

int calib::CalibAna::et_npchits_traj
private

Definition at line 97 of file CalibAna_module.cc.

Referenced by AddEventBranches(), analyze(), and ResetEventBranches().

int calib::CalibAna::et_npchits_tricell
private

Definition at line 96 of file CalibAna_module.cc.

Referenced by AddEventBranches(), analyze(), and ResetEventBranches().

int calib::CalibAna::et_ntracks
private

Definition at line 94 of file CalibAna_module.cc.

Referenced by AddEventBranches(), analyze(), and ResetEventBranches().

int calib::CalibAna::et_run
private

Definition at line 92 of file CalibAna_module.cc.

Referenced by AddEventBranches(), analyze(), and ResetEventBranches().

int calib::CalibAna::et_subrun
private

Definition at line 92 of file CalibAna_module.cc.

Referenced by AddEventBranches(), analyze(), and ResetEventBranches().

TTree* calib::CalibAna::fEventTree
private

Definition at line 90 of file CalibAna_module.cc.

Referenced by analyze(), and beginJob().

std::map< std::string, TTree * > calib::CalibAna::fHitTree
private

Definition at line 116 of file CalibAna_module.cc.

Referenced by analyze(), and beginJob().

bool calib::CalibAna::fIsRealData
private

Definition at line 91 of file CalibAna_module.cc.

Referenced by analyze(), GetPECorr(), and GetPECorrToMeV().

CalibAnaParams calib::CalibAna::fParams
private

Definition at line 86 of file CalibAna_module.cc.

Referenced by analyze(), and beginJob().

TTree* calib::CalibAna::fTrackTree
private

Definition at line 101 of file CalibAna_module.cc.

Referenced by analyze(), and beginJob().

int calib::CalibAna::ht_adc
private

Definition at line 146 of file CalibAna_module.cc.

Referenced by AddHitBranches(), FillWithCellHit(), and ResetHitBranches().

int calib::CalibAna::ht_apd
private

Definition at line 123 of file CalibAna_module.cc.

Referenced by AddHitBranches(), FillWithPCHit(), and ResetHitBranches().

int calib::CalibAna::ht_brightbin
private
int calib::CalibAna::ht_cell
private
float calib::CalibAna::ht_cmFromEnd
private

Definition at line 137 of file CalibAna_module.cc.

Referenced by AddHitBranches(), FillWithPCHit(), and ResetHitBranches().

int calib::CalibAna::ht_dcm
private

Definition at line 122 of file CalibAna_module.cc.

Referenced by AddHitBranches(), FillWithPCHit(), and ResetHitBranches().

int calib::CalibAna::ht_diblock
private

Definition at line 121 of file CalibAna_module.cc.

Referenced by AddHitBranches(), FillWithPCHit(), and ResetHitBranches().

float calib::CalibAna::ht_flightLen
private

Definition at line 136 of file CalibAna_module.cc.

Referenced by AddHitBranches(), FillWithPCHit(), and ResetHitBranches().

bool calib::CalibAna::ht_isavg
private
bool calib::CalibAna::ht_istraj
private
bool calib::CalibAna::ht_istricell
private
bool calib::CalibAna::ht_isz
private
float calib::CalibAna::ht_path
private

Definition at line 135 of file CalibAna_module.cc.

Referenced by AddHitBranches(), FillWithPCHit(), and ResetHitBranches().

float calib::CalibAna::ht_pe
private
float calib::CalibAna::ht_pecorr
private

Definition at line 132 of file CalibAna_module.cc.

Referenced by AddHitBranches(), FillWithPCHit(), and ResetHitBranches().

float calib::CalibAna::ht_pecorrtomev
private

Definition at line 133 of file CalibAna_module.cc.

Referenced by AddHitBranches(), FillWithPCHit(), and ResetHitBranches().

int calib::CalibAna::ht_pixel
private

Definition at line 124 of file CalibAna_module.cc.

Referenced by AddHitBranches(), FillWithPCHit(), and ResetHitBranches().

int calib::CalibAna::ht_plane
private
float calib::CalibAna::ht_poissonlambda
private

Definition at line 143 of file CalibAna_module.cc.

Referenced by AddHitBranches(), FillWithPCHit(), and ResetHitBranches().

float calib::CalibAna::ht_readdist
private

Definition at line 129 of file CalibAna_module.cc.

Referenced by AddHitBranches(), FillWithPCHit(), and ResetHitBranches().

float calib::CalibAna::ht_recoMeV
private

Definition at line 134 of file CalibAna_module.cc.

Referenced by AddHitBranches(), FillWithPCHit(), and ResetHitBranches().

int calib::CalibAna::ht_tdc
private

Definition at line 145 of file CalibAna_module.cc.

Referenced by AddHitBranches(), FillWithCellHit(), and ResetHitBranches().

float calib::CalibAna::ht_tns
private
float calib::CalibAna::ht_trueMeV
private

Definition at line 142 of file CalibAna_module.cc.

Referenced by AddHitBranches(), FillWithPCHit(), and ResetHitBranches().

float calib::CalibAna::ht_truepath
private

Definition at line 139 of file CalibAna_module.cc.

Referenced by AddHitBranches(), FillWithPCHit(), and ResetHitBranches().

float calib::CalibAna::ht_truepe
private

Definition at line 140 of file CalibAna_module.cc.

Referenced by AddHitBranches(), FillWithPCHit(), and ResetHitBranches().

float calib::CalibAna::ht_truew
private

Definition at line 141 of file CalibAna_module.cc.

Referenced by AddHitBranches(), FillWithPCHit(), and ResetHitBranches().

int calib::CalibAna::ht_view
private
float calib::CalibAna::ht_w
private

Definition at line 128 of file CalibAna_module.cc.

Referenced by AddHitBranches(), FillWithPCHit(), and ResetHitBranches().

float calib::CalibAna::ht_xapprox
private
float calib::CalibAna::ht_yapprox
private
float calib::CalibAna::ht_zapprox
private
float calib::CalibAna::tt_dcosx
private

Definition at line 102 of file CalibAna_module.cc.

Referenced by AddTrackBranches(), analyze(), and ResetTrackBranches().

float calib::CalibAna::tt_dcosy
private

Definition at line 102 of file CalibAna_module.cc.

Referenced by AddTrackBranches(), analyze(), and ResetTrackBranches().

float calib::CalibAna::tt_dcosz
private

Definition at line 102 of file CalibAna_module.cc.

Referenced by AddTrackBranches(), analyze(), and ResetTrackBranches().

TVector3 calib::CalibAna::tt_endpos
private

Definition at line 112 of file CalibAna_module.cc.

Referenced by AddTrackBranches(), analyze(), and ResetTrackBranches().

int calib::CalibAna::tt_ncellhits
private

Definition at line 106 of file CalibAna_module.cc.

Referenced by AddTrackBranches(), analyze(), and ResetTrackBranches().

int calib::CalibAna::tt_npchits_avg
private

Definition at line 108 of file CalibAna_module.cc.

Referenced by AddTrackBranches(), analyze(), and ResetTrackBranches().

int calib::CalibAna::tt_npchits_traj
private

Definition at line 110 of file CalibAna_module.cc.

Referenced by AddTrackBranches(), analyze(), and ResetTrackBranches().

int calib::CalibAna::tt_npchits_tricell
private

Definition at line 107 of file CalibAna_module.cc.

Referenced by AddTrackBranches(), analyze(), and ResetTrackBranches().

int calib::CalibAna::tt_npchits_z
private

Definition at line 109 of file CalibAna_module.cc.

Referenced by AddTrackBranches(), analyze(), and ResetTrackBranches().

int calib::CalibAna::tt_pdg
private

Definition at line 105 of file CalibAna_module.cc.

Referenced by AddTrackBranches(), and ResetTrackBranches().

TVector3 calib::CalibAna::tt_startpos
private

Definition at line 111 of file CalibAna_module.cc.

Referenced by AddTrackBranches(), analyze(), and ResetTrackBranches().

float calib::CalibAna::tt_totdisplace
private

Definition at line 104 of file CalibAna_module.cc.

Referenced by analyze(), and ResetTrackBranches().

float calib::CalibAna::tt_totlength
private

Definition at line 103 of file CalibAna_module.cc.

Referenced by AddTrackBranches(), analyze(), and ResetTrackBranches().


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