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

Public Member Functions

 velocity (fhicl::ParameterSet const &pset)
 
virtual ~velocity ()
 
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< int > > hit_channel0
 
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< int > > hit_channel1
 
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< int > > hit_channel2
 
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 > > trkhittruex0
 
std::vector< std::vector< float > > trkhittruey0
 
std::vector< std::vector< float > > trkhittruez0
 
std::vector< std::vector< float > > trkhittruex1
 
std::vector< std::vector< float > > trkhittruey1
 
std::vector< std::vector< float > > trkhittruez1
 
std::vector< std::vector< float > > trkhittruex2
 
std::vector< std::vector< float > > trkhittruey2
 
std::vector< std::vector< float > > trkhittruez2
 
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 velocity_module.cc.

Constructor & Destructor Documentation

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

Definition at line 177 of file velocity_module.cc.

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

Definition at line 191 of file velocity_module.cc.

191  {
192  }

Member Function Documentation

void protoana::velocity::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

Definition at line 275 of file velocity_module.cc.

275  {//analyze
276  reset();
277 
278  // art::ServiceHandle<cheat::ParticleInventoryService> pi_serv;
281 
282  std::vector<art::Ptr<recob::Track> > tracklist;
283  auto trackListHandle = evt.getHandle< std::vector<recob::Track> >("pandoraTrack");
284  if(trackListHandle){
285  art::fill_ptr_vector(tracklist, trackListHandle);
286  }
287  else return;
288 
289 
290  std::vector<art::Ptr<recob::PFParticle> > pfplist;
291  auto PFPListHandle = evt.getHandle< std::vector<recob::PFParticle> >("pandora");
292  if(PFPListHandle) art::fill_ptr_vector(pfplist, PFPListHandle);
293 
294 
295  // get information about the hits
296  std::vector<art::Ptr<recob::Hit>> hitlist;
297  auto hitListHandle = evt.getHandle< std::vector<recob::Hit> >(fHitsModuleLabel);
298  if(hitListHandle) art::fill_ptr_vector(hitlist, hitListHandle);
299  art::FindManyP<recob::Hit, recob::TrackHitMeta> fmthm(trackListHandle, evt, fTrackModuleLabel); // to associate tracks and hits
300  art::FindManyP<anab::T0> trk_t0_assn_v(PFPListHandle, evt ,"pandora");
301  art::FindManyP<recob::PFParticle> pfp_trk_assn(trackListHandle,evt,"pandoraTrack");
302  art::FindManyP<anab::T0> fmT0(trackListHandle, evt ,"pmtrack");
303 
304 
305  run = evt.run();
306  subrun = evt.subRun();
307  event = evt.id().event();
308  art::Timestamp ts = evt.time();
309  TTimeStamp tts(ts.timeHigh(), ts.timeLow());
310  evttime=tts.AsDouble();
311 
312 
313 
314  // Get number of active fembs
315  if(!evt.isRealData()){
316  for(int k=0; k < 6; k++)
317  fNactivefembs[k] = 20;
318  }
319  else{
320  for(int k=0; k < 6; k++)
322  }
323 
324 
325  //defining the 1D temporary storage vectors
326  std::vector< float> peakT_0; std::vector< float> peakT_1; std::vector< float> peakT_2;
327  std::vector< int > tpc_0; std::vector< int > tpc_1; std::vector<int> tpc_2;
328  std::vector< int > wire_0; std::vector< int > wire_1; std::vector<int> wire_2;
329  std::vector< float > int_0; std::vector< float > int_1; std::vector<float> int_2;
330  std::vector< float > amp_0; std::vector< float > amp_1; std::vector<float> amp_2;
331  std::vector<int> channel_0; std::vector<int> channel_1; std::vector<int> channel_2;
332  std::vector<float> hitx_0; std::vector<float> hitx_1; std::vector<float> hitx_2;
333  std::vector<float> hity_0; std::vector<float> hity_1; std::vector<float> hity_2;
334  std::vector<float> hitz_0; std::vector<float> hitz_1; std::vector<float> hitz_2;
335  std::vector<float> hittruex_0; std::vector<float> hittruex_1; std::vector<float> hittruex_2;
336  std::vector<float> hittruey_0; std::vector<float> hittruey_1; std::vector<float> hittruey_2;
337  std::vector<float> hittruez_0; std::vector<float> hittruez_1; std::vector<float> hittruez_2;
338  std::vector<float> hitz_wire2; std::vector<float> startcosxyz; std::vector<float> endcosxyz;
339 
340  auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService>()->DataFor(evt);
341 
342  float max_value;
343  float min_value;
344  int trks=0;
345  size_t NTracks = tracklist.size();
346  for(size_t i=0; i<NTracks;++i){
347 
348  //clearing the 1D temporary storage vectors
349  peakT_0.clear(); peakT_1.clear(); peakT_2.clear();
350  tpc_0.clear(); tpc_1.clear(); tpc_2.clear();
351  wire_0.clear(); wire_1.clear(); wire_2.clear();
352  int_0.clear(); int_1.clear() ; int_2.clear();
353  amp_0.clear(); amp_1.clear() ; amp_2.clear();
354  channel_0.clear(); channel_1.clear(); channel_2.clear();
355  hitx_0.clear(); hitx_1.clear(); hitx_2.clear();
356  hity_0.clear(); hity_1.clear(); hity_2.clear();
357  hitz_0.clear(); hitz_1.clear(); hitz_2.clear();
358  hittruex_0.clear(); hittruey_0.clear(); hittruez_0.clear();
359  hittruex_1.clear(); hittruey_1.clear(); hittruez_1.clear();
360  hittruex_2.clear(); hittruey_2.clear(); hittruez_2.clear();
361  hitz_wire2.clear(); startcosxyz.clear();endcosxyz.clear();
362 
363 
364 
365  art::Ptr<recob::Track> ptrack(trackListHandle, i);
366 
367  ///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
368  double t_zero=-999999;
369  max_value=0.0;
370  min_value=0.0;
371  if(fTrackModuleLabel=="pandoraTrack"){
372  std::vector<art::Ptr<recob::PFParticle>> pfps=pfp_trk_assn.at(i);
373  if(!pfps.size()) continue;
374  std::vector<art::Ptr<anab::T0>> t0s=trk_t0_assn_v.at(pfps[0].key());
375  // if(!t0s.size()) continue;
376  //auto t0 = t0s.at(0);
377  // double t_zero=t0->Time();
378  if(t0s.size()){
379  auto t0=t0s.at(0);
380  t_zero=t0->Time();
381  }
382  }
383 
384  /*
385  if(fTrackModuleLabel=="pmtrack"){
386  std::vector<art::Ptr<anab::T0>> T0s=fmT0.at(i);
387  if(T0s.size()==0)
388  continue;
389  }
390  */
391  // all_trks++;
392  const recob::Track& track = *ptrack;
393  auto pos = track.Vertex();
394  auto dir_start = track.VertexDirection();
395  auto dir_end = track.EndDirection();
396  auto end = track.End();
397  double theta_xz = std::atan2(dir_start.X(), dir_start.Z());
398  double theta_yz = std::atan2(dir_start.Y(), dir_start.Z());
399 
400  int planenum=999;
401  float xpos=-9999;
402  float ypos=-9999;
403  float zpos=-9999;
404 
405  //hits and calorimetry loop
406  if(fmthm.isValid()){
407  auto vhit=fmthm.at(i);
408  auto vmeta=fmthm.data(i);
409  for (size_t ii = 0; ii<vhit.size(); ++ii){ //loop over all meta data hit
410  bool fBadhit = false;
411  if (vmeta[ii]->Index() == static_cast<unsigned int>(std::numeric_limits<int>::max())){
412  fBadhit = true;
413  //cout<<"fBadHit"<<fBadhit<<endl;
414  continue;
415  }
416  if (vmeta[ii]->Index()>=tracklist[i]->NumberTrajectoryPoints()){
417  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!!";
418  }
419  if (!tracklist[i]->HasValidPoint(vmeta[ii]->Index())){
420  fBadhit = true;
421  // cout<<"had valid point "<<fBadhit<<endl;
422  continue;
423  }
424 
425  auto loc = tracklist[i]->LocationAtPoint(vmeta[ii]->Index());
426  xpos=loc.X();
427  ypos=loc.Y();
428  zpos=loc.Z();
429  // cout<<"x, y, z "<<xpos<<" "<<ypos<<" "<<zpos<<endl;
430  // cout<<"BadHit"<<fBadhit<<endl;
431  if (fBadhit) continue; //HY::If BAD hit, skip this hit and go next
432  if (zpos<-100) continue; //hit not on track
433 
434  float truexpos = -9999;
435  float trueypos = -9999;
436  float truezpos = -9999;
437 
438  if (!evt.isRealData()){
439  auto simides = bt_serv->HitToSimIDEs_Ps(clockData, vhit[ii]);
440  std::map<int, float> idemap;
441  for (auto const & ide: simides){
442  idemap[ide->trackID]+=ide->energy;
443  }
444  int trackid = 0;
445  float maxe = -1;
446  for (auto ii = idemap.begin(); ii!=idemap.end(); ++ii){
447  if ((ii->second)>maxe){
448  maxe = ii->second;
449  trackid = ii->first;
450  }
451  }
452  if (trackid){
453  float xavg = 0;
454  float yavg = 0;
455  float zavg = 0;
456  float tote = 0;
457  for (auto const & ide: simides){
458  if (ide->trackID != trackid) continue;
459  tote += ide->energy;
460  xavg += ide->x*ide->energy;
461  yavg += ide->y*ide->energy;
462  zavg += ide->z*ide->energy;
463  }
464  if (tote){
465  truexpos = xavg/tote;
466  trueypos = yavg/tote;
467  truezpos = zavg/tote;
468  }
469  }
470  }
471 
472  planenum=vhit[ii]->WireID().Plane;
473  if(planenum==0){
474  peakT_0.push_back(vhit[ii]->PeakTime());
475  tpc_0.push_back(vhit[ii]->WireID().TPC);
476  wire_0.push_back(vhit[ii]->WireID().Wire);
477  int_0.push_back(vhit[ii]->Integral());
478  amp_0.push_back(vhit[ii]->PeakAmplitude());
479  channel_0.push_back(vhit[ii]->Channel());
480  hitx_0.push_back(xpos);
481  hity_0.push_back(ypos);
482  hitz_0.push_back(zpos);
483  hittruex_0.push_back(truexpos);
484  hittruey_0.push_back(trueypos);
485  hittruez_0.push_back(truezpos);
486  }//planenum 0
487  if(planenum==1){
488  peakT_1.push_back(vhit[ii]->PeakTime());
489  tpc_1.push_back(vhit[ii]->WireID().TPC);
490  wire_1.push_back(vhit[ii]->WireID().Wire);
491  int_1.push_back(vhit[ii]->Integral());
492  amp_1.push_back(vhit[ii]->PeakAmplitude());
493  channel_1.push_back(vhit[ii]->Channel());
494  hitx_1.push_back(xpos);
495  hity_1.push_back(ypos);
496  hitz_1.push_back(zpos);
497  hittruex_1.push_back(truexpos);
498  hittruey_1.push_back(trueypos);
499  hittruez_1.push_back(truezpos);
500  }//planenum 1
501  if(planenum==2){
502  peakT_2.push_back(vhit[ii]->PeakTime());
503  tpc_2.push_back(vhit[ii]->WireID().TPC);
504  wire_2.push_back(vhit[ii]->WireID().Wire);
505  int_2.push_back(vhit[ii]->Integral());
506  amp_2.push_back(vhit[ii]->PeakAmplitude());
507  channel_2.push_back(vhit[ii]->Channel());
508  hitx_2.push_back(xpos);
509  hity_2.push_back(ypos);
510  hitz_2.push_back(zpos);
511  hittruex_2.push_back(truexpos);
512  hittruey_2.push_back(trueypos);
513  hittruez_2.push_back(truezpos);
514  double xyzStart[3];
515  double xyzEnd[3];
516  unsigned int wireno=vhit[ii]->WireID().Wire;
517  fGeometry->WireEndPoints(0,vhit[ii]->WireID().TPC,2,wireno, xyzStart, xyzEnd);
518  hitz_wire2.push_back(xyzStart[2]);
519  //std::cout<<xpos<<" "<<ypos<<" "<<zpos<<" "<<truexpos<<" "<<trueypos<<" "<<truezpos<<std::endl;
520  }//planenum 2
521  }//loop over vhit
522  }//fmthm valid
523  //hits and calorimetry loop
524  if(peakT_2.size()<20) continue;
525  max_value=*std::max_element(peakT_2.begin(),peakT_2.end());
526  min_value=*std::min_element(peakT_2.begin(),peakT_2.end());
527  if(max_value-min_value<4300) continue;
528  std::cout<<max_value<<" "<<min_value<<std::endl;
529  trks++;
530  hit_peakT0.push_back(peakT_0);
531  hit_tpc0.push_back(tpc_0);
532  hit_wire0.push_back(wire_0);
533  hit_channel0.push_back(channel_0);
534  trkhitx0.push_back(hitx_0);
535  trkhity0.push_back(hity_0);
536  trkhitz0.push_back(hitz_0);
537  trkhittruex0.push_back(hittruex_0);
538  trkhittruey0.push_back(hittruey_0);
539  trkhittruez0.push_back(hittruez_0);
540  trkdq_amp0.push_back(amp_0);
541  trkdq_int0.push_back(int_0);
542 
543  hit_peakT1.push_back(peakT_1);
544  hit_tpc1.push_back(tpc_1);
545  hit_wire1.push_back(wire_1);
546  hit_channel1.push_back(channel_1);
547  trkhitx1.push_back(hitx_1);
548  trkhity1.push_back(hity_1);
549  trkhitz1.push_back(hitz_1);
550  trkhittruex1.push_back(hittruex_1);
551  trkhittruey1.push_back(hittruey_1);
552  trkhittruez1.push_back(hittruez_1);
553  trkdq_amp1.push_back(amp_1);
554  trkdq_int1.push_back(int_1);
555 
556  hit_peakT2.push_back(peakT_2);
557  hit_tpc2.push_back(tpc_2);
558  hit_wire2.push_back(wire_2);
559  hit_channel2.push_back(channel_2);
560  trkhitx2.push_back(hitx_2);
561  trkhity2.push_back(hity_2);
562  trkhitz2.push_back(hitz_2);
563  trkhittruex2.push_back(hittruex_2);
564  trkhittruey2.push_back(hittruey_2);
565  trkhittruez2.push_back(hittruez_2);
566  trkhitz_wire2.push_back(hitz_wire2);
567  trkdq_amp2.push_back(amp_2);
568  trkdq_int2.push_back(int_2);
569 
570  xprojectedlen.push_back(TMath::Abs(end.X()-pos.X()));
571  trackthetaxz.push_back(theta_xz);
572  trackthetayz.push_back(theta_yz);
573  trkstartx.push_back(pos.X());
574  trkstarty.push_back(pos.Y());
575  trkstartz.push_back(pos.Z());
576  startcosxyz.push_back(dir_start.X());
577  startcosxyz.push_back(dir_start.Y());
578  startcosxyz.push_back(dir_start.Z());
579  endcosxyz.push_back(dir_end.X());
580  endcosxyz.push_back(dir_end.Y());
581  endcosxyz.push_back(dir_end.Z());
582 
583  trkstartcosxyz.push_back(startcosxyz);
584  trkendcosxyz.push_back(endcosxyz);
585  trkendx.push_back(end.X());
586  trkendy.push_back(end.Y());
587  trkendz.push_back(end.Z());
588  trklen.push_back(track.Length());
589  TrkID.push_back(track.ID());
590  T0_values.push_back(t_zero);
591  } // loop over trks...
592  tot_trks.push_back(trks);
593  fEventTree->Fill();
594  } // end of analyze function
std::vector< float > trkstartx
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
std::vector< std::vector< int > > hit_tpc1
code to link reconstructed objects back to the MC truth information
std::vector< std::vector< int > > hit_tpc2
constexpr std::uint32_t timeLow() const
Definition: Timestamp.h:29
std::vector< std::vector< int > > hit_channel0
std::vector< int > TrkID
std::vector< std::vector< float > > trkhitz0
std::vector< float > trackthetaxz
std::vector< std::vector< float > > trkhitx0
std::string fHitsModuleLabel
TH3F * xpos
Definition: doAna.cpp:29
Handle< PROD > getHandle(SelectorBase const &) const
Definition: DataViewImpl.h:382
std::vector< std::vector< float > > hit_peakT2
std::vector< std::vector< float > > trkhittruez1
ProtoDUNEDataUtils fDataUtils
constexpr std::uint32_t timeHigh() const
Definition: Timestamp.h:34
std::vector< std::vector< float > > trkhity0
std::vector< std::vector< int > > hit_wire0
Vector_t VertexDirection() const
Definition: Track.h:132
std::vector< std::vector< float > > trkhittruex0
std::vector< std::vector< int > > hit_wire2
std::vector< std::vector< int > > hit_tpc0
std::vector< std::vector< float > > trkhitz_wire2
std::vector< std::vector< float > > trkhitx1
unsigned int Index
std::string fTrackModuleLabel
std::vector< std::vector< float > > hit_peakT1
std::vector< std::vector< float > > trkhittruey0
TH3F * ypos
Definition: doAna.cpp:30
std::vector< std::vector< int > > hit_channel1
std::vector< std::vector< float > > trkhittruey1
std::vector< std::vector< float > > trkdq_amp0
bool isRealData() const
std::vector< int > tot_trks
std::vector< std::vector< float > > trkdq_int1
std::vector< std::vector< float > > trkhittruez2
TH3F * zpos
Definition: doAna.cpp:31
std::vector< float > trkendx
std::vector< float > xprojectedlen
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< float > trkstarty
def key(type, name=None)
Definition: graph.py:13
std::vector< std::vector< float > > trkhittruex2
std::vector< double > T0_values
std::vector< std::vector< float > > trkhitx2
Point_t const & Vertex() const
Definition: Track.h:124
std::vector< std::vector< float > > trkendcosxyz
SubRunNumber_t subRun() const
Definition: DataViewImpl.cc:78
std::vector< std::vector< float > > trkhittruez0
RunNumber_t run() const
Definition: DataViewImpl.cc:71
static int max(int a, int b)
std::vector< std::vector< float > > trkdq_amp2
std::vector< std::vector< float > > trkhittruex1
std::vector< std::vector< float > > trkdq_int2
std::vector< std::vector< float > > trkhity2
std::vector< float > trkendz
int ID() const
Definition: Track.h:198
std::vector< std::vector< float > > trkstartcosxyz
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< float > trackthetayz
std::vector< std::vector< float > > hit_peakT0
std::vector< std::vector< float > > trkhittruey2
void WireEndPoints(geo::WireID const &wireid, double *xyzStart, double *xyzEnd) const
Fills two arrays with the coordinates of the wire end points.
std::vector< float > trkstartz
EventNumber_t event() const
Definition: EventID.h:116
Point_t const & End() const
Definition: Track.h:125
std::vector< std::vector< float > > trkhitz1
std::vector< const sim::IDE * > HitToSimIDEs_Ps(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
std::vector< std::vector< float > > trkdq_int0
std::vector< std::vector< int > > hit_channel2
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Definition: Ptr.h:297
std::vector< std::vector< int > > hit_wire1
std::vector< float > trklen
std::vector< std::vector< float > > trkdq_amp1
std::vector< std::vector< float > > trkhity1
EventID id() const
Definition: Event.cc:34
std::vector< float > trkendy
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)
std::vector< std::vector< float > > trkhitz2
geo::GeometryCore const * fGeometry
void protoana::velocity::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 196 of file velocity_module.cc.

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

Definition at line 266 of file velocity_module.cc.

266  {
267  mf::LogInfo("velocity")<<"begin run..."<<std::endl;
268  }
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
QTextStream & endl(QTextStream &s)
void protoana::velocity::endJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 261 of file velocity_module.cc.

261  {
262 
263  }
void protoana::velocity::reset ( )

Definition at line 597 of file velocity_module.cc.

597  {
598  run = -9999;
599  subrun = -9999;
600  event = -9999;
601  evttime = -9999;
602  //all_trks = -9999;
603  for(int k=0; k < 6; k++)
604  fNactivefembs[k] = -9999;
605  trackthetaxz.clear();
606  trackthetayz.clear();
607  trkstartx.clear();
608  trkstarty.clear();
609  trkstartz.clear();
610  trkstartcosxyz.clear();
611  trkendcosxyz.clear();
612  trkendx.clear();
613  trkendy.clear();
614  trkendz.clear();
615  trklen.clear();
616  TrkID.clear();
617  tot_trks.clear();
618  T0_values.clear();
619  xprojectedlen.clear();
620  hit_peakT0.clear();
621  hit_tpc0.clear();
622  hit_wire0.clear();
623  trkhitx0.clear();
624  trkhity0.clear();
625  trkhitz0.clear();
626  trkdq_int0.clear();
627  trkdq_amp0.clear();
628  hit_channel0.clear();
629  hit_peakT1.clear();
630  hit_tpc1.clear();
631  hit_wire1.clear();
632  trkhitx1.clear();
633  trkhity1.clear();
634  trkhitz1.clear();
635  trkdq_int1.clear();
636  trkdq_amp1.clear();
637  hit_channel1.clear();
638  hit_peakT2.clear();
639  hit_tpc2.clear();
640  hit_wire2.clear();
641  trkhitx2.clear();
642  trkhity2.clear();
643  trkhitz2.clear();
644  trkhitz_wire2.clear();
645  trkdq_int2.clear();
646  trkdq_amp2.clear();
647  hit_channel2.clear();
648  trkhittruex0.clear();
649  trkhittruey0.clear();
650  trkhittruez0.clear();
651  trkhittruex1.clear();
652  trkhittruey1.clear();
653  trkhittruez1.clear();
654  trkhittruex2.clear();
655  trkhittruey2.clear();
656  trkhittruez2.clear();
657 
658  }
std::vector< float > trkstartx
std::vector< std::vector< int > > hit_tpc1
std::vector< std::vector< int > > hit_tpc2
std::vector< std::vector< int > > hit_channel0
std::vector< int > TrkID
std::vector< std::vector< float > > trkhitz0
std::vector< float > trackthetaxz
std::vector< std::vector< float > > trkhitx0
std::vector< std::vector< float > > hit_peakT2
std::vector< std::vector< float > > trkhittruez1
std::vector< std::vector< float > > trkhity0
std::vector< std::vector< int > > hit_wire0
std::vector< std::vector< float > > trkhittruex0
std::vector< std::vector< int > > hit_wire2
std::vector< std::vector< int > > hit_tpc0
std::vector< std::vector< float > > trkhitz_wire2
std::vector< std::vector< float > > trkhitx1
std::vector< std::vector< float > > hit_peakT1
std::vector< std::vector< float > > trkhittruey0
std::vector< std::vector< int > > hit_channel1
std::vector< std::vector< float > > trkhittruey1
std::vector< std::vector< float > > trkdq_amp0
std::vector< int > tot_trks
std::vector< std::vector< float > > trkdq_int1
std::vector< std::vector< float > > trkhittruez2
std::vector< float > trkendx
std::vector< float > xprojectedlen
std::vector< float > trkstarty
std::vector< std::vector< float > > trkhittruex2
std::vector< double > T0_values
std::vector< std::vector< float > > trkhitx2
std::vector< std::vector< float > > trkendcosxyz
std::vector< std::vector< float > > trkhittruez0
std::vector< std::vector< float > > trkdq_amp2
std::vector< std::vector< float > > trkhittruex1
std::vector< std::vector< float > > trkdq_int2
std::vector< std::vector< float > > trkhity2
std::vector< float > trkendz
std::vector< std::vector< float > > trkstartcosxyz
std::vector< float > trackthetayz
std::vector< std::vector< float > > hit_peakT0
std::vector< std::vector< float > > trkhittruey2
std::vector< float > trkstartz
std::vector< std::vector< float > > trkhitz1
std::vector< std::vector< float > > trkdq_int0
std::vector< std::vector< int > > hit_channel2
std::vector< std::vector< int > > hit_wire1
std::vector< float > trklen
std::vector< std::vector< float > > trkdq_amp1
std::vector< std::vector< float > > trkhity1
std::vector< float > trkendy
std::vector< std::vector< float > > trkhitz2

Member Data Documentation

Int_t protoana::velocity::event
private

Definition at line 114 of file velocity_module.cc.

Double_t protoana::velocity::evttime
private

Definition at line 115 of file velocity_module.cc.

std::string protoana::velocity::fCalorimetryModuleLabel
private

Definition at line 171 of file velocity_module.cc.

ProtoDUNEDataUtils protoana::velocity::fDataUtils
private

Definition at line 107 of file velocity_module.cc.

TTree* protoana::velocity::fEventTree
private

Definition at line 108 of file velocity_module.cc.

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

Definition at line 109 of file velocity_module.cc.

std::string protoana::velocity::fHitsModuleLabel
private

Definition at line 169 of file velocity_module.cc.

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

Definition at line 116 of file velocity_module.cc.

bool protoana::velocity::fSaveCaloInfo
private

Definition at line 173 of file velocity_module.cc.

bool protoana::velocity::fSaveTrackInfo
private

Definition at line 172 of file velocity_module.cc.

std::string protoana::velocity::fTrackModuleLabel
private

Definition at line 170 of file velocity_module.cc.

std::vector< std::vector<int> > protoana::velocity::hit_channel0
private

Definition at line 135 of file velocity_module.cc.

std::vector< std::vector<int> > protoana::velocity::hit_channel1
private

Definition at line 144 of file velocity_module.cc.

std::vector< std::vector<int> > protoana::velocity::hit_channel2
private

Definition at line 153 of file velocity_module.cc.

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

Definition at line 132 of file velocity_module.cc.

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

Definition at line 141 of file velocity_module.cc.

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

Definition at line 150 of file velocity_module.cc.

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

Definition at line 133 of file velocity_module.cc.

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

Definition at line 142 of file velocity_module.cc.

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

Definition at line 151 of file velocity_module.cc.

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

Definition at line 134 of file velocity_module.cc.

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

Definition at line 143 of file velocity_module.cc.

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

Definition at line 152 of file velocity_module.cc.

Int_t protoana::velocity::run
private

Definition at line 112 of file velocity_module.cc.

Int_t protoana::velocity::subrun
private

Definition at line 113 of file velocity_module.cc.

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

Definition at line 130 of file velocity_module.cc.

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

Definition at line 131 of file velocity_module.cc.

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

Definition at line 117 of file velocity_module.cc.

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

Definition at line 118 of file velocity_module.cc.

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

Definition at line 139 of file velocity_module.cc.

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

Definition at line 148 of file velocity_module.cc.

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

Definition at line 158 of file velocity_module.cc.

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

Definition at line 140 of file velocity_module.cc.

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

Definition at line 149 of file velocity_module.cc.

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

Definition at line 159 of file velocity_module.cc.

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

Definition at line 123 of file velocity_module.cc.

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

Definition at line 124 of file velocity_module.cc.

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

Definition at line 125 of file velocity_module.cc.

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

Definition at line 126 of file velocity_module.cc.

std::vector< std::vector<float> > protoana::velocity::trkhittruex0
private

Definition at line 160 of file velocity_module.cc.

std::vector< std::vector<float> > protoana::velocity::trkhittruex1
private

Definition at line 163 of file velocity_module.cc.

std::vector< std::vector<float> > protoana::velocity::trkhittruex2
private

Definition at line 166 of file velocity_module.cc.

std::vector< std::vector<float> > protoana::velocity::trkhittruey0
private

Definition at line 161 of file velocity_module.cc.

std::vector< std::vector<float> > protoana::velocity::trkhittruey1
private

Definition at line 164 of file velocity_module.cc.

std::vector< std::vector<float> > protoana::velocity::trkhittruey2
private

Definition at line 167 of file velocity_module.cc.

std::vector< std::vector<float> > protoana::velocity::trkhittruez0
private

Definition at line 162 of file velocity_module.cc.

std::vector< std::vector<float> > protoana::velocity::trkhittruez1
private

Definition at line 165 of file velocity_module.cc.

std::vector< std::vector<float> > protoana::velocity::trkhittruez2
private

Definition at line 168 of file velocity_module.cc.

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

Definition at line 136 of file velocity_module.cc.

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

Definition at line 145 of file velocity_module.cc.

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

Definition at line 154 of file velocity_module.cc.

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

Definition at line 137 of file velocity_module.cc.

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

Definition at line 146 of file velocity_module.cc.

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

Definition at line 155 of file velocity_module.cc.

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

Definition at line 138 of file velocity_module.cc.

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

Definition at line 147 of file velocity_module.cc.

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

Definition at line 156 of file velocity_module.cc.

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

Definition at line 157 of file velocity_module.cc.

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

Definition at line 128 of file velocity_module.cc.

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

Definition at line 127 of file velocity_module.cc.

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

Definition at line 122 of file velocity_module.cc.

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

Definition at line 119 of file velocity_module.cc.

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

Definition at line 120 of file velocity_module.cc.

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

Definition at line 121 of file velocity_module.cc.

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

Definition at line 129 of file velocity_module.cc.


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