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

Public Member Functions

 diffusioncathodet0 (fhicl::ParameterSet const &pset)
 
virtual ~diffusioncathodet0 ()
 
void beginJob ()
 
void endJob ()
 
void beginRun (const art::Run &run)
 
void analyze (const art::Event &evt)
 
void reset ()
 
- 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 Attributes

ProtoDUNEDataUtils fDataUtils
 
TTree * fEventTree
 
geo::GeometryCore const * fGeometry
 
Int_t run
 
Int_t subrun
 
Int_t event
 
Double_t evttime
 
int fNactivefembs [6]
 
std::vector< float > trackthetaxz
 
std::vector< float > trackthetayz
 
std::vector< float > trkstartx
 
std::vector< float > trkstarty
 
std::vector< float > trkstartz
 
std::vector< std::vector< float > > trkstartcosxyz
 
std::vector< std::vector< float > > trkendcosxyz
 
std::vector< float > trkendx
 
std::vector< float > trkendy
 
std::vector< float > trkendz
 
std::vector< float > trklen
 
std::vector< int > TrkID
 
std::vector< float > xprojectedlen
 
std::vector< double > T0_values
 
std::vector< int > tot_trks
 
std::vector< std::vector< float > > hit_peakT0
 
std::vector< std::vector< int > > hit_tpc0
 
std::vector< std::vector< int > > hit_wire0
 
std::vector< std::vector< float > > hit_rms0
 
std::vector< std::vector< float > > hit_deltaT
 
std::vector< std::vector< float > > trkhitx0
 
std::vector< std::vector< float > > trkhity0
 
std::vector< std::vector< float > > trkhitz0
 
std::vector< std::vector< float > > trkdq_amp0
 
std::vector< std::vector< float > > trkdq_int0
 
std::vector< std::vector< float > > hit_peakT1
 
std::vector< std::vector< int > > hit_tpc1
 
std::vector< std::vector< int > > hit_wire1
 
std::vector< std::vector< float > > hit_rms1
 
std::vector< std::vector< float > > trkhitx1
 
std::vector< std::vector< float > > trkhity1
 
std::vector< std::vector< float > > trkhitz1
 
std::vector< std::vector< float > > trkdq_amp1
 
std::vector< std::vector< float > > trkdq_int1
 
std::vector< std::vector< float > > hit_peakT2
 
std::vector< std::vector< int > > hit_tpc2
 
std::vector< std::vector< int > > hit_wire2
 
std::vector< std::vector< float > > hit_rms2
 
std::vector< std::vector< float > > hit_rms_true
 
std::vector< std::vector< float > > trkhitx2
 
std::vector< std::vector< float > > trkhity2
 
std::vector< std::vector< float > > trkhitz2
 
std::vector< std::vector< float > > trkhitz_wire2
 
std::vector< std::vector< float > > trkdq_amp2
 
std::vector< std::vector< float > > trkdq_int2
 
std::vector< std::vector< float > > multiplicity2
 
std::vector< std::vector< float > > goodnessoffit2
 
std::string fHitsModuleLabel
 
std::string fTrackModuleLabel
 
std::string fCalorimetryModuleLabel
 
bool fSaveTrackInfo
 
bool fSaveCaloInfo
 

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 95 of file diffusioncathodet0_module.cc.

Constructor & Destructor Documentation

protoana::diffusioncathodet0::diffusioncathodet0 ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 174 of file diffusioncathodet0_module.cc.

174  :
175  EDAnalyzer(pset),
176  fDataUtils (pset.get<fhicl::ParameterSet>("DataUtils")),
177  fHitsModuleLabel (pset.get< std::string >("HitsModuleLabel","") ),
178  fTrackModuleLabel (pset.get< std::string >("TrackModuleLabel","") ),
179  fCalorimetryModuleLabel (pset.get< std::string >("CalorimetryModuleLabel","") ),
180  fSaveTrackInfo (pset.get< bool>("SaveTrackInfo",false)),
181  fSaveCaloInfo (pset.get< bool>("SaveCaloInfo",false))
182 
183  {
184  if (fSaveTrackInfo == false) fSaveCaloInfo = false;
185  }
std::string string
Definition: nybbler.cc:12
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.h:25
protoana::diffusioncathodet0::~diffusioncathodet0 ( )
virtual

Definition at line 188 of file diffusioncathodet0_module.cc.

188  {
189  }

Member Function Documentation

void protoana::diffusioncathodet0::analyze ( const art::Event evt)

this block just saves the t0 values while I include entries with no T0s as well also this saves T0 coming from pandroaTrack alg only

evt.IsRealData

Definition at line 266 of file diffusioncathodet0_module.cc.

266  {//analyze
267  reset();
268 
269  // art::ServiceHandle<cheat::ParticleInventoryService> pi_serv;
271 
272  std::vector<art::Ptr<recob::Track> > tracklist;
273  auto trackListHandle = evt.getHandle< std::vector<recob::Track> >("pandoraTrack");
274  if(trackListHandle) {
275  art::fill_ptr_vector(tracklist, trackListHandle);
276  }
277  else return;
278 
279  std::vector<art::Ptr<recob::PFParticle> > pfplist;
280  auto PFPListHandle = evt.getHandle< std::vector<recob::PFParticle> >("pandora");
281  if (PFPListHandle) art::fill_ptr_vector(pfplist, PFPListHandle);
282 
283  // get information about the hits
284  std::vector<art::Ptr<recob::Hit>> hitlist;
285  auto hitListHandle = evt.getHandle< std::vector<recob::Hit> >(fHitsModuleLabel);
286  if (hitListHandle) art::fill_ptr_vector(hitlist, hitListHandle);
287  art::FindManyP<recob::Hit, recob::TrackHitMeta> fmthm(trackListHandle, evt, fTrackModuleLabel); // to associate tracks and hits
288  art::FindManyP<anab::T0> trk_t0_assn_v(PFPListHandle, evt ,"pandora");
289  art::FindManyP<recob::PFParticle> pfp_trk_assn(trackListHandle,evt,"pandoraTrack");
290  art::FindManyP<anab::T0> fmT0(trackListHandle, evt ,"pmtrack");
291  std::vector<const sim::SimChannel*> fSimChannels;
292  try{
293  evt.getView("largeant", fSimChannels);
294  }catch (art::Exception const&e){
295  }
296 
297 
298  run = evt.run();
299  subrun = evt.subRun();
300  event = evt.id().event();
301  art::Timestamp ts = evt.time();
302  TTimeStamp tts(ts.timeHigh(), ts.timeLow());
303  evttime=tts.AsDouble();
304 
305 
306 
307  // Get number of active fembs
308  if(!evt.isRealData()){
309  for(int k=0; k < 6; k++)
310  fNactivefembs[k] = 20;
311  }
312  else{
313  for(int k=0; k < 6; k++)
315  }
316 
317 
318  //defining the 1D temporary storage vectors
319  std::vector< float> peakT_0; std::vector< float> peakT_1; std::vector< float> peakT_2;
320  std::vector< int > tpc_0; std::vector< int > tpc_1; std::vector<int> tpc_2;
321  std::vector< int > wire_0; std::vector< int > wire_1; std::vector<int> wire_2;
322  std::vector< float > int_0; std::vector< float > int_1; std::vector<float> int_2;
323  std::vector< float > amp_0; std::vector< float > amp_1; std::vector<float> amp_2;
324  std::vector<float> rms_0; std::vector<float> rms_1; std::vector<float> rms_2;
325  std::vector<float> hitx_0; std::vector<float> hitx_1; std::vector<float> hitx_2;
326  std::vector<float> hity_0; std::vector<float> hity_1; std::vector<float> hity_2;
327  std::vector<float> hitz_0; std::vector<float> hitz_1; std::vector<float> hitz_2;
328  std::vector<float> hitz_wire2; std::vector<float> startcosxyz; std::vector<float> endcosxyz;
329  std::vector<float> dT_buffer; std::vector<float> gof, multi,truerms;
330 
331  float max_value;
332  float min_value;
333  int trks=0;
334  size_t NTracks = tracklist.size();
335  for(size_t i=0; i<NTracks;++i){
336 
337  //clearing the 1D temporary storage vectors
338  peakT_0.clear(); peakT_1.clear(); peakT_2.clear();
339  tpc_0.clear(); tpc_1.clear(); tpc_2.clear();
340  wire_0.clear(); wire_1.clear(); wire_2.clear();
341  int_0.clear(); int_1.clear() ; int_2.clear();
342  amp_0.clear(); amp_1.clear() ; amp_2.clear();
343  rms_0.clear(); rms_1.clear(); rms_2.clear();
344  hitx_0.clear(); hitx_1.clear(); hitx_2.clear();
345  hity_0.clear(); hity_1.clear(); hity_2.clear();
346  hitz_0.clear(); hitz_1.clear(); hitz_2.clear();
347  hitz_wire2.clear(); startcosxyz.clear();endcosxyz.clear();
348  dT_buffer.clear(); gof.clear(); multi.clear();
349  truerms.clear();
350 
351 
352  art::Ptr<recob::Track> ptrack(trackListHandle, i);
353 
354  ///this block just saves the t0 values while I include entries with no T0s as well also this saves T0 coming from pandroaTrack alg only
355  double t_zero=-999999;
356  max_value=0.0;
357  min_value=0.0;
358  if(fTrackModuleLabel=="pandoraTrack"){
359  std::vector<art::Ptr<recob::PFParticle>> pfps=pfp_trk_assn.at(i);
360  if(!pfps.size()) continue;
361  std::vector<art::Ptr<anab::T0>> t0s=trk_t0_assn_v.at(pfps[0].key());
362  // if(!t0s.size()) continue;
363  //auto t0 = t0s.at(0);
364  // double t_zero=t0->Time();
365  if(t0s.size()==0) continue;
366  if(t0s.size()){
367  auto t0=t0s.at(0);
368  t_zero=t0->Time();
369  }
370  }
371 
372  if(fTrackModuleLabel=="pmtrack"){
373  std::vector<art::Ptr<anab::T0>> T0s=fmT0.at(i);
374  if(T0s.size()==0)
375  continue;
376  }
377 
378  const recob::Track& track = *ptrack;
379  auto pos = track.Vertex();
380  auto dir_start = track.VertexDirection();
381  auto dir_end = track.EndDirection();
382  auto end = track.End();
383  double theta_xz = std::atan2(dir_start.X(), dir_start.Z());
384  double theta_yz = std::atan2(dir_start.Y(), dir_start.Z());
385 
386  int planenum=999;
387  float xpos=-9999;
388  float ypos=-9999;
389  float zpos=-9999;
390  auto allHits=fmthm.at(i);
391 
392  //hits and calorimetry loop
393  if(fmthm.isValid()){
394  auto vhit=fmthm.at(i);
395  auto vmeta=fmthm.data(i);
396  for (size_t ii = 0; ii<vhit.size(); ++ii){ //loop over all meta data hit
397  bool fBadhit = false;
398  if (vmeta[ii]->Index() == static_cast<unsigned int>(std::numeric_limits<int>::max())){
399  fBadhit = true;
400  //cout<<"fBadHit"<<fBadhit<<endl;
401  continue;
402  }
403  if (vmeta[ii]->Index()>=tracklist[i]->NumberTrajectoryPoints()){
404  throw cet::exception("Calorimetry_module.cc") << "Requested track trajectory index "<<vmeta[ii]->Index()<<" exceeds the total number of trajectory points "<<tracklist[i]->NumberTrajectoryPoints()<<" for track index "<<i<<". Something is wrong with the track reconstruction. Please contact tjyang@fnal.gov!!";
405  }
406  if (!tracklist[i]->HasValidPoint(vmeta[ii]->Index())){
407  fBadhit = true;
408  // cout<<"had valid point "<<fBadhit<<endl;
409  continue;
410  }
411 
412  auto loc = tracklist[i]->LocationAtPoint(vmeta[ii]->Index());
413  xpos=loc.X();
414  ypos=loc.Y();
415  zpos=loc.Z();
416  // cout<<"x, y, z "<<xpos<<" "<<ypos<<" "<<zpos<<endl;
417  // cout<<"BadHit"<<fBadhit<<endl;
418  if (fBadhit) continue; //HY::If BAD hit, skip this hit and go next
419  if (zpos<-100) continue; //hit not on track
420  planenum=vhit[ii]->WireID().Plane;
421  if(planenum==0){
422  peakT_0.push_back(vhit[ii]->PeakTime());
423  tpc_0.push_back(vhit[ii]->WireID().TPC);
424  wire_0.push_back(vhit[ii]->WireID().Wire);
425  int_0.push_back(vhit[ii]->Integral());
426  amp_0.push_back(vhit[ii]->PeakAmplitude());
427  rms_0.push_back(vhit[ii]->RMS());
428  hitx_0.push_back(xpos);
429  hity_0.push_back(ypos);
430  hitz_0.push_back(zpos);
431  }//planenum 0
432  if(planenum==1){
433  peakT_1.push_back(vhit[ii]->PeakTime());
434  tpc_1.push_back(vhit[ii]->WireID().TPC);
435  wire_1.push_back(vhit[ii]->WireID().Wire);
436  int_1.push_back(vhit[ii]->Integral());
437  amp_1.push_back(vhit[ii]->PeakAmplitude());
438  rms_1.push_back(vhit[ii]->RMS());
439  hitx_1.push_back(xpos);
440  hity_1.push_back(ypos);
441  hitz_1.push_back(zpos);
442  }//planenum 1
443  if(planenum==2){
444  peakT_2.push_back(vhit[ii]->PeakTime());
445  tpc_2.push_back(vhit[ii]->WireID().TPC);
446  wire_2.push_back(vhit[ii]->WireID().Wire);
447  int_2.push_back(vhit[ii]->Integral());
448  amp_2.push_back(vhit[ii]->PeakAmplitude());
449  rms_2.push_back(vhit[ii]->RMS());
450  dT_buffer.push_back(vhit[ii]->EndTick()-vhit[ii]->StartTick());
451  hitx_2.push_back(xpos);
452  hity_2.push_back(ypos);
453  hitz_2.push_back(zpos);
454  gof.push_back(vhit[ii]->GoodnessOfFit());
455  multi.push_back(vhit[ii]->Multiplicity());
456  double xyzStart[3];
457  double xyzEnd[3];
458  unsigned int wireno=vhit[ii]->WireID().Wire;
459  fGeometry->WireEndPoints(0,vhit[ii]->WireID().TPC,2,wireno, xyzStart, xyzEnd);
460  hitz_wire2.push_back(xyzStart[2]);
461  double truermsb=-1;
462 
463  //section for using tuth information
464  unsigned int t0=vhit[ii]->PeakTime()-3*(vhit[ii]->RMS());
465  if(t0<0) t0=0;
466  unsigned int t1=vhit[ii]->PeakTime()+3*(vhit[ii]->RMS());
467  if(t1>6000) t1=6000-1;
468 
469  if(!evt.isRealData()){
470  const sim::SimChannel* chan=0;
471  for(size_t sc=0;sc<fSimChannels.size();++sc){
472  if(fSimChannels[sc]->Channel()==vhit[ii]->Channel()) chan=fSimChannels[sc];
473  }
474  if(chan){
475  const auto &tdcidemap = chan->TDCIDEMap();
476  double hit_ch=0;
477  double mean_t=0;
478  double mean_t2=0;
479  double hit_rmsvalue=0;
480  for(auto mapitr = tdcidemap.begin(); mapitr != tdcidemap.end(); mapitr++){
481  if(!((*mapitr).first>t0 && (*mapitr).first<=t1)) continue;
482  // loop over the vector of IDE objects.
483  int hit_nelec=0;
484  const std::vector<sim::IDE> idevec = (*mapitr).second;
485  for(size_t iv = 0; iv < idevec.size(); ++iv){
486  hit_nelec+=idevec[iv].numElectrons;
487  }//iv loop
488  hit_ch+=hit_nelec;
489  // std::cout<<"hit_ch "<<hit_ch<<std::endl;
490  int j=(*mapitr).first;
491  mean_t+=double(j)*double(hit_nelec);
492  double jterm=double(j)*double(j)*double(hit_nelec);
493  mean_t2=mean_t2+jterm;
494  }//mapitr loop
495  mean_t/=hit_ch;
496  mean_t2/=hit_ch;
497  hit_rmsvalue=sqrt(mean_t2-mean_t*mean_t);
498  // std::cout<<"hit rms "<<hit_rmsvalue<<" reco rms "<<vhit[ii]->RMS()<<std::endl;
499  truermsb=hit_rmsvalue;
500  }//if(chan)
501  }//!evt.IsRealData
502  truerms.push_back(truermsb);
503 
504 
505  }//planenum 2
506  }//loop over vhit
507  }//fmthm valid
508  //hits and calorimetry loop
509  if(peakT_2.size()<10) continue;
510  max_value=*std::max_element(peakT_2.begin(),peakT_2.end());
511  min_value=*std::min_element(peakT_2.begin(),peakT_2.end());
512  // if(max_value-min_value<4300) continue;
513  std::cout<<max_value<<" "<<min_value<<std::endl;
514  trks++;
515  hit_peakT0.push_back(peakT_0);
516  hit_tpc0.push_back(tpc_0);
517  hit_wire0.push_back(wire_0);
518  hit_rms0.push_back(rms_0);
519  trkhitx0.push_back(hitx_0);
520  trkhity0.push_back(hity_0);
521  trkhitz0.push_back(hitz_0);
522  trkdq_amp0.push_back(amp_0);
523  trkdq_int0.push_back(int_0);
524 
525  hit_peakT1.push_back(peakT_1);
526  hit_tpc1.push_back(tpc_1);
527  hit_wire1.push_back(wire_1);
528  hit_rms1.push_back(rms_1);
529  trkhitx1.push_back(hitx_1);
530  trkhity1.push_back(hity_1);
531  trkhitz1.push_back(hitz_1);
532  trkdq_amp1.push_back(amp_1);
533  trkdq_int1.push_back(int_1);
534 
535  hit_peakT2.push_back(peakT_2);
536  hit_tpc2.push_back(tpc_2);
537  hit_wire2.push_back(wire_2);
538  hit_rms2.push_back(rms_2);
539  hit_rms_true.push_back(truerms);
540  trkhitx2.push_back(hitx_2);
541  trkhity2.push_back(hity_2);
542  trkhitz2.push_back(hitz_2);
543  trkhitz_wire2.push_back(hitz_wire2);
544  trkdq_amp2.push_back(amp_2);
545  trkdq_int2.push_back(int_2);
546  hit_deltaT.push_back(dT_buffer);
547  multiplicity2.push_back(multi);
548  goodnessoffit2.push_back(gof);
549 
550 
551 
552  xprojectedlen.push_back(TMath::Abs(end.X()-pos.X()));
553  trackthetaxz.push_back(theta_xz);
554  trackthetayz.push_back(theta_yz);
555  trkstartx.push_back(pos.X());
556  trkstarty.push_back(pos.Y());
557  trkstartz.push_back(pos.Z());
558  startcosxyz.push_back(dir_start.X());
559  startcosxyz.push_back(dir_start.Y());
560  startcosxyz.push_back(dir_start.Z());
561  endcosxyz.push_back(dir_end.X());
562  endcosxyz.push_back(dir_end.Y());
563  endcosxyz.push_back(dir_end.Z());
564 
565  trkstartcosxyz.push_back(startcosxyz);
566  trkendcosxyz.push_back(endcosxyz);
567  trkendx.push_back(end.X());
568 
569  trkendy.push_back(end.Y());
570  trkendz.push_back(end.Z());
571  trklen.push_back(track.Length());
572  TrkID.push_back(track.ID());
573  T0_values.push_back(t_zero);
574  } // loop over trks...
575  tot_trks.push_back(trks);
576  fEventTree->Fill();
577  } // end of analyze function
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
code to link reconstructed objects back to the MC truth information
std::vector< std::vector< float > > hit_rms0
constexpr std::uint32_t timeLow() const
Definition: Timestamp.h:29
std::vector< std::vector< int > > hit_tpc0
Energy deposited on a readout channel by simulated tracks.
Definition: SimChannel.h:140
TH3F * xpos
Definition: doAna.cpp:29
Handle< PROD > getHandle(SelectorBase const &) const
Definition: DataViewImpl.h:382
std::vector< std::vector< float > > trkhitz2
std::vector< std::vector< float > > multiplicity2
std::vector< std::vector< int > > hit_tpc2
std::vector< std::vector< int > > hit_wire0
constexpr std::uint32_t timeHigh() const
Definition: Timestamp.h:34
std::vector< std::vector< float > > hit_rms2
std::vector< std::vector< float > > trkdq_int2
std::vector< std::vector< float > > hit_peakT1
std::vector< std::vector< float > > trkhitx2
Vector_t VertexDirection() const
Definition: Track.h:132
unsigned int Index
std::vector< std::vector< float > > trkhity0
TH3F * ypos
Definition: doAna.cpp:30
std::vector< std::vector< float > > trkhitz1
std::vector< std::vector< float > > trkdq_amp0
bool isRealData() const
std::vector< std::vector< float > > hit_peakT0
TH3F * zpos
Definition: doAna.cpp:31
const double e
double Length(size_t p=0) const
Access to various track properties.
Definition: Track.h:167
Timestamp time() const
IDparameter< geo::WireID > WireID
Member type of validated geo::WireID parameter.
std::vector< std::vector< float > > trkhity2
def key(type, name=None)
Definition: graph.py:13
std::vector< std::vector< float > > trkdq_amp1
Point_t const & Vertex() const
Definition: Track.h:124
std::vector< std::vector< float > > trkdq_int0
std::vector< std::vector< float > > trkendcosxyz
SubRunNumber_t subRun() const
Definition: DataViewImpl.cc:78
std::vector< std::vector< float > > trkhity1
RunNumber_t run() const
Definition: DataViewImpl.cc:71
static int max(int a, int b)
std::vector< std::vector< float > > trkhitx0
std::vector< std::vector< float > > hit_peakT2
std::vector< std::vector< int > > hit_wire1
std::vector< std::vector< float > > trkhitz_wire2
std::vector< std::vector< float > > trkdq_int1
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
int ID() const
Definition: Track.h:198
std::vector< std::vector< float > > trkdq_amp2
std::vector< std::vector< float > > trkhitx1
std::vector< std::vector< int > > hit_wire2
int GetNActiveFembsForAPA(art::Event const &evt, int apa) const
Get number of active fembs in an APA.
Vector_t EndDirection() const
Definition: Track.h:133
std::vector< std::vector< int > > hit_tpc1
std::vector< std::vector< float > > trkhitz0
std::vector< std::vector< float > > hit_deltaT
void WireEndPoints(geo::WireID const &wireid, double *xyzStart, double *xyzEnd) const
Fills two arrays with the coordinates of the wire end points.
EventNumber_t event() const
Definition: EventID.h:116
Point_t const & End() const
Definition: Track.h:125
TDCIDEs_t const & TDCIDEMap() const
Returns all the deposited energy information as stored.
Definition: SimChannel.h:328
std::size_t getView(std::string const &moduleLabel, std::string const &productInstanceName, std::string const &processName, std::vector< ELEMENT const * > &result) const
Definition: DataViewImpl.h:500
std::vector< std::vector< float > > hit_rms1
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Definition: Ptr.h:297
std::vector< std::vector< float > > goodnessoffit2
std::vector< std::vector< float > > hit_rms_true
std::vector< std::vector< float > > trkstartcosxyz
EventID id() const
Definition: Event.cc:34
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
Definition: Track.h:49
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)
void protoana::diffusioncathodet0::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 193 of file diffusioncathodet0_module.cc.

193  {
194  std::cout<<"job begin..."<<std::endl;
196  fEventTree = tfs->make<TTree>("Event", "Event Tree from Reco");
197  fEventTree->Branch("event", &event,"event/I");
198  fEventTree->Branch("evttime",&evttime,"evttime/D");
199  fEventTree->Branch("run", &run,"run/I");
200  fEventTree->Branch("Nactivefembs",&fNactivefembs,"Nactivefembs[6]/I");
201  fEventTree->Branch("subrun", &subrun,"surbrun/I");
202  fEventTree->Branch("T0_values",&T0_values);
203  fEventTree->Branch("xprojectedlen",&xprojectedlen);
204  fEventTree->Branch("trackthetaxz",&trackthetaxz);
205  fEventTree->Branch("trackthetayz",&trackthetayz);
206  fEventTree->Branch("trkstartx",&trkstartx);
207  fEventTree->Branch("trkstarty",&trkstarty);
208  fEventTree->Branch("trkstartz",&trkstartz);
209  fEventTree->Branch("trkendx",&trkendx);
210  fEventTree->Branch("trkendy",&trkendy);
211  fEventTree->Branch("trkendz",&trkendz);
212  fEventTree->Branch("trklen",&trklen);
213  fEventTree->Branch("TrkID",&TrkID);
214  fEventTree->Branch("tot_trks",&tot_trks);
215  fEventTree->Branch("hit_peakT0",&hit_peakT0);
216  fEventTree->Branch("hit_tpc0",&hit_tpc0);
217  fEventTree->Branch("hit_wire0",&hit_wire0);
218  fEventTree->Branch("hit_rms0",&hit_rms0);
219  fEventTree->Branch("hit_deltaT",&hit_deltaT);
220  fEventTree->Branch("trkhitx0",&trkhitx0);
221  fEventTree->Branch("trkhity0",&trkhity0);
222  fEventTree->Branch("trkhitz0",&trkhitz0);
223  fEventTree->Branch("trkdq_int0",&trkdq_int0);
224  fEventTree->Branch("trkdq_amp0",&trkdq_amp0);
225  fEventTree->Branch("hit_peakT1",&hit_peakT1);
226  fEventTree->Branch("hit_tpc1",&hit_tpc1);
227  fEventTree->Branch("hit_wire1",&hit_wire1);
228  fEventTree->Branch("hit_rms1",&hit_rms1);
229  fEventTree->Branch("trkhitx1",&trkhitx1);
230  fEventTree->Branch("trkhity1",&trkhity1);
231  fEventTree->Branch("trkhitz1",&trkhitz1);
232  fEventTree->Branch("trkdq_int1",&trkdq_int1);
233  fEventTree->Branch("trkdq_amp1",&trkdq_amp1);
234  fEventTree->Branch("hit_peakT2",&hit_peakT2);
235  fEventTree->Branch("hit_tpc2",&hit_tpc2);
236  fEventTree->Branch("hit_wire2",&hit_wire2);
237  fEventTree->Branch("hit_rms2",&hit_rms2);
238  fEventTree->Branch("hit_rms_true",&hit_rms_true);
239  fEventTree->Branch("trkhitx2",&trkhitx2);
240  fEventTree->Branch("trkhity2",&trkhity2);
241  fEventTree->Branch("trkhitz2",&trkhitz2);
242  fEventTree->Branch("trkhitz_wire2",&trkhitz_wire2);
243  fEventTree->Branch("trkdq_int2",&trkdq_int2);
244  fEventTree->Branch("trkdq_amp2",&trkdq_amp2);
245  fEventTree->Branch("trkstartcosxyz",&trkstartcosxyz);
246  fEventTree->Branch("trkendcosxyz",&trkendcosxyz);
247  fEventTree->Branch("multiplicity2",&multiplicity2);
248  fEventTree->Branch("goodnessoffit2",&goodnessoffit2);
249  }
std::vector< std::vector< float > > hit_rms0
std::vector< std::vector< int > > hit_tpc0
std::vector< std::vector< float > > trkhitz2
std::vector< std::vector< float > > multiplicity2
std::vector< std::vector< int > > hit_tpc2
std::vector< std::vector< int > > hit_wire0
std::vector< std::vector< float > > hit_rms2
std::vector< std::vector< float > > trkdq_int2
std::vector< std::vector< float > > hit_peakT1
std::vector< std::vector< float > > trkhitx2
std::vector< std::vector< float > > trkhity0
std::vector< std::vector< float > > trkhitz1
std::vector< std::vector< float > > trkdq_amp0
std::vector< std::vector< float > > hit_peakT0
std::vector< std::vector< float > > trkhity2
std::vector< std::vector< float > > trkdq_amp1
std::vector< std::vector< float > > trkdq_int0
std::vector< std::vector< float > > trkendcosxyz
std::vector< std::vector< float > > trkhity1
std::vector< std::vector< float > > trkhitx0
std::vector< std::vector< float > > hit_peakT2
std::vector< std::vector< int > > hit_wire1
std::vector< std::vector< float > > trkhitz_wire2
std::vector< std::vector< float > > trkdq_int1
std::vector< std::vector< float > > trkdq_amp2
std::vector< std::vector< float > > trkhitx1
std::vector< std::vector< int > > hit_wire2
std::vector< std::vector< int > > hit_tpc1
std::vector< std::vector< float > > trkhitz0
std::vector< std::vector< float > > hit_deltaT
std::vector< std::vector< float > > hit_rms1
std::vector< std::vector< float > > goodnessoffit2
std::vector< std::vector< float > > hit_rms_true
std::vector< std::vector< float > > trkstartcosxyz
QTextStream & endl(QTextStream &s)
Event finding and building.
void protoana::diffusioncathodet0::beginRun ( const art::Run run)

Definition at line 257 of file diffusioncathodet0_module.cc.

257  {
258  mf::LogInfo("diffusioncathodet0")<<"begin run..."<<std::endl;
259  }
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
QTextStream & endl(QTextStream &s)
void protoana::diffusioncathodet0::endJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 252 of file diffusioncathodet0_module.cc.

252  {
253 
254  }
void protoana::diffusioncathodet0::reset ( )

Definition at line 580 of file diffusioncathodet0_module.cc.

580  {
581  run = -9999;
582  subrun = -9999;
583  event = -9999;
584  evttime = -9999;
585  //all_trks = -9999;
586  for(int k=0; k < 6; k++)
587  fNactivefembs[k] = -9999;
588  trackthetaxz.clear();
589  trackthetayz.clear();
590  trkstartx.clear();
591  trkstarty.clear();
592  trkstartz.clear();
593  trkstartcosxyz.clear();
594  trkendcosxyz.clear();
595  trkendx.clear();
596  trkendy.clear();
597  trkendz.clear();
598  trklen.clear();
599  TrkID.clear();
600  tot_trks.clear();
601  T0_values.clear();
602  xprojectedlen.clear();
603  hit_peakT0.clear();
604  hit_tpc0.clear();
605  hit_wire0.clear();
606  trkhitx0.clear();
607  trkhity0.clear();
608  trkhitz0.clear();
609  trkdq_int0.clear();
610  trkdq_amp0.clear();
611  hit_rms0.clear();
612  hit_peakT1.clear();
613  hit_tpc1.clear();
614  hit_wire1.clear();
615  trkhitx1.clear();
616  trkhity1.clear();
617  trkhitz1.clear();
618  trkdq_int1.clear();
619  trkdq_amp1.clear();
620  hit_rms1.clear();
621  hit_peakT2.clear();
622  hit_tpc2.clear();
623  hit_wire2.clear();
624  trkhitx2.clear();
625  trkhity2.clear();
626  trkhitz2.clear();
627  trkhitz_wire2.clear();
628  trkdq_int2.clear();
629  trkdq_amp2.clear();
630  hit_rms2.clear();
631  hit_deltaT.clear();
632  multiplicity2.clear();
633  goodnessoffit2.clear();
634  hit_rms_true.clear();
635  }
std::vector< std::vector< float > > hit_rms0
std::vector< std::vector< int > > hit_tpc0
std::vector< std::vector< float > > trkhitz2
std::vector< std::vector< float > > multiplicity2
std::vector< std::vector< int > > hit_tpc2
std::vector< std::vector< int > > hit_wire0
std::vector< std::vector< float > > hit_rms2
std::vector< std::vector< float > > trkdq_int2
std::vector< std::vector< float > > hit_peakT1
std::vector< std::vector< float > > trkhitx2
std::vector< std::vector< float > > trkhity0
std::vector< std::vector< float > > trkhitz1
std::vector< std::vector< float > > trkdq_amp0
std::vector< std::vector< float > > hit_peakT0
std::vector< std::vector< float > > trkhity2
std::vector< std::vector< float > > trkdq_amp1
std::vector< std::vector< float > > trkdq_int0
std::vector< std::vector< float > > trkendcosxyz
std::vector< std::vector< float > > trkhity1
std::vector< std::vector< float > > trkhitx0
std::vector< std::vector< float > > hit_peakT2
std::vector< std::vector< int > > hit_wire1
std::vector< std::vector< float > > trkhitz_wire2
std::vector< std::vector< float > > trkdq_int1
std::vector< std::vector< float > > trkdq_amp2
std::vector< std::vector< float > > trkhitx1
std::vector< std::vector< int > > hit_wire2
std::vector< std::vector< int > > hit_tpc1
std::vector< std::vector< float > > trkhitz0
std::vector< std::vector< float > > hit_deltaT
std::vector< std::vector< float > > hit_rms1
std::vector< std::vector< float > > goodnessoffit2
std::vector< std::vector< float > > hit_rms_true
std::vector< std::vector< float > > trkstartcosxyz

Member Data Documentation

Int_t protoana::diffusioncathodet0::event
private

Definition at line 114 of file diffusioncathodet0_module.cc.

Double_t protoana::diffusioncathodet0::evttime
private

Definition at line 115 of file diffusioncathodet0_module.cc.

std::string protoana::diffusioncathodet0::fCalorimetryModuleLabel
private

Definition at line 168 of file diffusioncathodet0_module.cc.

ProtoDUNEDataUtils protoana::diffusioncathodet0::fDataUtils
private

Definition at line 107 of file diffusioncathodet0_module.cc.

TTree* protoana::diffusioncathodet0::fEventTree
private

Definition at line 108 of file diffusioncathodet0_module.cc.

geo::GeometryCore const* protoana::diffusioncathodet0::fGeometry
private

Definition at line 109 of file diffusioncathodet0_module.cc.

std::string protoana::diffusioncathodet0::fHitsModuleLabel
private

Definition at line 166 of file diffusioncathodet0_module.cc.

int protoana::diffusioncathodet0::fNactivefembs[6]
private

Definition at line 116 of file diffusioncathodet0_module.cc.

bool protoana::diffusioncathodet0::fSaveCaloInfo
private

Definition at line 170 of file diffusioncathodet0_module.cc.

bool protoana::diffusioncathodet0::fSaveTrackInfo
private

Definition at line 169 of file diffusioncathodet0_module.cc.

std::string protoana::diffusioncathodet0::fTrackModuleLabel
private

Definition at line 167 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::goodnessoffit2
private

Definition at line 165 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::hit_deltaT
private

Definition at line 138 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::hit_peakT0
private

Definition at line 134 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::hit_peakT1
private

Definition at line 144 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::hit_peakT2
private

Definition at line 153 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::hit_rms0
private

Definition at line 137 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::hit_rms1
private

Definition at line 147 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::hit_rms2
private

Definition at line 156 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::hit_rms_true
private

Definition at line 157 of file diffusioncathodet0_module.cc.

std::vector< std::vector<int> > protoana::diffusioncathodet0::hit_tpc0
private

Definition at line 135 of file diffusioncathodet0_module.cc.

std::vector< std::vector<int> > protoana::diffusioncathodet0::hit_tpc1
private

Definition at line 145 of file diffusioncathodet0_module.cc.

std::vector< std::vector<int> > protoana::diffusioncathodet0::hit_tpc2
private

Definition at line 154 of file diffusioncathodet0_module.cc.

std::vector< std::vector<int> > protoana::diffusioncathodet0::hit_wire0
private

Definition at line 136 of file diffusioncathodet0_module.cc.

std::vector< std::vector<int> > protoana::diffusioncathodet0::hit_wire1
private

Definition at line 146 of file diffusioncathodet0_module.cc.

std::vector< std::vector<int> > protoana::diffusioncathodet0::hit_wire2
private

Definition at line 155 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::multiplicity2
private

Definition at line 164 of file diffusioncathodet0_module.cc.

Int_t protoana::diffusioncathodet0::run
private

Definition at line 112 of file diffusioncathodet0_module.cc.

Int_t protoana::diffusioncathodet0::subrun
private

Definition at line 113 of file diffusioncathodet0_module.cc.

std::vector<double> protoana::diffusioncathodet0::T0_values
private

Definition at line 132 of file diffusioncathodet0_module.cc.

std::vector<int> protoana::diffusioncathodet0::tot_trks
private

Definition at line 133 of file diffusioncathodet0_module.cc.

std::vector<float> protoana::diffusioncathodet0::trackthetaxz
private

Definition at line 117 of file diffusioncathodet0_module.cc.

std::vector<float> protoana::diffusioncathodet0::trackthetayz
private

Definition at line 118 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::trkdq_amp0
private

Definition at line 142 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::trkdq_amp1
private

Definition at line 151 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::trkdq_amp2
private

Definition at line 162 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::trkdq_int0
private

Definition at line 143 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::trkdq_int1
private

Definition at line 152 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::trkdq_int2
private

Definition at line 163 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::trkendcosxyz
private

Definition at line 123 of file diffusioncathodet0_module.cc.

std::vector<float> protoana::diffusioncathodet0::trkendx
private

Definition at line 124 of file diffusioncathodet0_module.cc.

std::vector<float> protoana::diffusioncathodet0::trkendy
private

Definition at line 125 of file diffusioncathodet0_module.cc.

std::vector<float> protoana::diffusioncathodet0::trkendz
private

Definition at line 126 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::trkhitx0
private

Definition at line 139 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::trkhitx1
private

Definition at line 148 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::trkhitx2
private

Definition at line 158 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::trkhity0
private

Definition at line 140 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::trkhity1
private

Definition at line 149 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::trkhity2
private

Definition at line 159 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::trkhitz0
private

Definition at line 141 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::trkhitz1
private

Definition at line 150 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::trkhitz2
private

Definition at line 160 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::trkhitz_wire2
private

Definition at line 161 of file diffusioncathodet0_module.cc.

std::vector<int> protoana::diffusioncathodet0::TrkID
private

Definition at line 130 of file diffusioncathodet0_module.cc.

std::vector<float> protoana::diffusioncathodet0::trklen
private

Definition at line 129 of file diffusioncathodet0_module.cc.

std::vector< std::vector<float> > protoana::diffusioncathodet0::trkstartcosxyz
private

Definition at line 122 of file diffusioncathodet0_module.cc.

std::vector<float> protoana::diffusioncathodet0::trkstartx
private

Definition at line 119 of file diffusioncathodet0_module.cc.

std::vector<float> protoana::diffusioncathodet0::trkstarty
private

Definition at line 120 of file diffusioncathodet0_module.cc.

std::vector<float> protoana::diffusioncathodet0::trkstartz
private

Definition at line 121 of file diffusioncathodet0_module.cc.

std::vector<float> protoana::diffusioncathodet0::xprojectedlen
private

Definition at line 131 of file diffusioncathodet0_module.cc.


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