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

Classes

struct  Counts
 

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 KalmanTrackAna (fhicl::ParameterSet const &pset)
 
virtual ~KalmanTrackAna ()
 
void reconfigure (const fhicl::ParameterSet &pset)
 
void beginJob ()
 
void analyze (art::Event const &evt)
 
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 CheckRecoTracks (std::vector< art::Ptr< rb::Track > > const &trkcol, art::PtrVector< rb::CellHit > const &allhits)
 
std::set< intFindVisibleProngs (const art::PtrVector< rb::CellHit > &allhits, std::set< int > ids) const
 
double TotalLengthInDetector (const sim::Particle *p, geo::View_t view) const
 
double Containment (TVector3 start) const
 
void CheckAssociations (art::Ptr< rb::Cluster > slice, std::vector< art::Ptr< rb::Track > > tracks, bool filtered)
 

Private Attributes

std::string fSliceLabel
 Where to find Slices to reconstruct. More...
 
std::string fTrackLabel
 Where to find Tracks to reconstruct. More...
 
std::string fCAFLabel
 label for the process that made the standard records More...
 
bool fApplyCAFCuts
 should we apply the CAF cuts? More...
 
int fCutType
 what cuts to apply (see CAFCutter.h) More...
 
recovalid::CAFCutter fCAFCutter
 the CAFCutter helper class More...
 
TH1D * fTrackLength
 Length of reconstructed 3d tracks. More...
 
TH1D * fHitsPerTrack
 Number of hits in each reconstructed 3d track. More...
 
TH1D * fTrackLength2d
 Length of reconstructed 3d tracks. More...
 
TH1D * fHitsPerTrack2d
 Number of hits in each reconstructed 3d track. More...
 
TH1D * fCosX
 Cosine theta of 3d tracks with respect to the X axis. More...
 
TH1D * fCosY
 Cosine theta of 3D tracks with respect ot the Y axis. More...
 
TH1D * fCosZ
 Cosine theta of 3d tracks with respect to the Z axis. More...
 
TH1D * fCosX2d
 Cosine theta of 2d tracks with respect to the X axis. More...
 
TH1D * fCosY2d
 Cosine theta of 2D tracks with respect ot the Y axis. More...
 
TH1D * fCosZ2d
 Cosine theta of 2d tracks with respect to the Z axis. More...
 
TH1D * fXPosStart
 x start position of tracks More...
 
TH1D * fYPosStart
 y start position of tracks More...
 
TH1D * fZPosStart
 z start position of tracks More...
 
TH1D * fXPosEnd
 x end position of tracks More...
 
TH1D * fYPosEnd
 y end position of tracks More...
 
TH1D * fZPosEnd
 z end position of tracks More...
 
TH1D * fXPos
 position of x track hits More...
 
TH1D * fYPos
 position of y track hits More...
 
TH1D * fXRecoPos
 reconstructed x position from yz track hit More...
 
TH1D * fYRecoPos
 reconstructed y position from xz track hit More...
 
TH2D * fXvYStart
 Position map for track start position. More...
 
TH2D * fXvYEnd
 Position map for track end position. More...
 
TH2D * fXvYReco
 X vs Y positions of track hits. More...
 
TH2D * fZvXReco
 Z vs X of reconstructed track hit positions. More...
 
TH2D * fZvYReco
 Z vs Y of reconstructed track hit positions. More...
 
TH2D * fZvX
 Z vs X of track hit positions. More...
 
TH2D * fZvY
 Z vs Y of track hit positions. More...
 
TH1D * fCosXCAF
 Cosine theta of tracks with respect to the X axis for CAF comparison. More...
 
TH1D * fCosYCAF
 Cosine theta of tracks with respect ot the Y axis for CAF comparison. More...
 
TH1D * fCosZCAF
 Cosine theta of tracks with respect to the Z axis for CAF comparison. More...
 
TH1D * fViewCAF
 View stored in CAF. More...
 
TH1D * fLengthCAF
 Length of reconstructed tracks stored in CAF. More...
 
TH1D * fHitsCAF
 Number of hits in each track stored in CAF. More...
 
TH1D * fXPosStartCAF
 x start position of tracks in CAF More...
 
TH1D * fYPosStartCAF
 y start position of tracks in CAF More...
 
TH1D * fZPosStartCAF
 z start position of tracks in CAF More...
 
TH1D * fXPosEndCAF
 x end position of tracks in CAF More...
 
TH1D * fYPosEndCAF
 y end position of tracks in CAF More...
 
TH1D * fZPosEndCAF
 z end position of tracks in CAF More...
 
TH1D * fTracksPerEvent
 number of 3d tracks found per event More...
 
TH1D * f2DTracksPerEvent
 number of 2d tracks per event More...
 
TH1D * fTracksPerSlice
 number of 3d tracks found per non noise slice More...
 
TH1D * f2DTracksPerSlice
 number of 2d tracks per non noise slice More...
 
TH1D * fXHitsPerPlane
 number of hits found in each x plane More...
 
TH1D * fYHitsPerPlane
 number of hits found in each y plane More...
 
TH1D * fHitsPerPlane
 number of hits found in each plane More...
 
TH1D * fXHitsPerCell
 number of hits found in each x cell More...
 
TH1D * fYHitsPerCell
 number of hits found in each y cell More...
 
TH2D * fXPlaneVCell
 Plane vs Cell detector map for x view. More...
 
TH2D * fYPlaneVCell
 Plane vs Cell detector map for y view. More...
 
TH2D * fPlaneVCell
 Plane vs Cell map for whole detector. More...
 
TTree * fTruthTree
 
int fpdg
 
float fE
 
float fp
 
float fvtxdst
 
float feff
 
float fpur
 
float flen
 
float fx
 
float fy
 
float fz
 
float fdx
 
float fdy
 
float fdz
 
float fenu
 
int fmode
 
int fccnc
 
float fweight
 
int fevent
 
int fpassMuon
 
int fnhits
 
int fview
 
float frecolen
 

Detailed Description

Definition at line 50 of file KalmanTrackAna_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

trk::KalmanTrackAna::KalmanTrackAna ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 171 of file KalmanTrackAna_module.cc.

References reconfigure().

171  :
172  EDAnalyzer(pset)
173  {
174  reconfigure(pset);
175  }
void reconfigure(const fhicl::ParameterSet &pset)
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
trk::KalmanTrackAna::~KalmanTrackAna ( )
virtual

Definition at line 179 of file KalmanTrackAna_module.cc.

180  {
181  }

Member Function Documentation

void trk::KalmanTrackAna::analyze ( art::Event const &  evt)
virtual

The analysis method is intended to perform checks of the performance of the reconstruction for the purposes of optimization, testing, and validation.

Parameters
evt- Read-only access to the event data

Implements art::EDAnalyzer.

Definition at line 328 of file KalmanTrackAna_module.cc.

References getBrightness::cell, rb::CellHit::Cell(), geo::PlaneGeo::Cell(), CheckAssociations(), CheckRecoTracks(), rb::Prong::Dir(), febshutoff_auto::end, f2DTracksPerEvent, f2DTracksPerSlice, fApplyCAFCuts, fCAFCutter, fCAFLabel, fCosX, fCosX2d, fCosXCAF, fCosY, fCosY2d, fCosYCAF, fCosZ, fCosZ2d, fCosZCAF, fCutType, fHitsCAF, fHitsPerPlane, fHitsPerTrack, fHitsPerTrack2d, fLengthCAF, fPlaneVCell, fSliceLabel, fTrackLabel, fTrackLength, fTrackLength2d, fTracksPerEvent, fTracksPerSlice, fViewCAF, fXHitsPerCell, fXHitsPerPlane, fXPlaneVCell, fXPos, fXPosEnd, fXPosEndCAF, fXPosStart, fXPosStartCAF, fXRecoPos, fXvYEnd, fXvYReco, fXvYStart, fYHitsPerCell, fYHitsPerPlane, fYPlaneVCell, fYPos, fYPosEnd, fYPosEndCAF, fYPosStart, fYPosStartCAF, fYRecoPos, fZPosEnd, fZPosEndCAF, fZPosStart, fZPosStartCAF, fZvX, fZvXReco, fZvY, fZvYReco, geom(), art::DataViewImpl::getByLabel(), geo::CellGeo::GetCenter(), cheat::BackTracker::HaveTruthInfo(), MECModelEnuComparisons::i, rb::Prong::Is3D(), rb::IsFiltered(), geo::kX, geo::kY, demo0::length, rb::Cluster::NCell(), rb::Cluster::NXCell(), rb::Cluster::NYCell(), recovalid::CAFCutter::passCuts(), rb::CellHit::Plane(), geo::GeometryBase::Plane(), NDAPDHVSetting::plane, art::PtrVector< T >::push_back(), rb::Cluster::RecoHit(), art::PtrVector< T >::size(), febshutoff_auto::start, rb::Prong::Start(), rb::Track::Stop(), rb::Track::TotalLength(), rb::Track::TrajectoryPoint(), rb::Cluster::View(), rb::RecoHit::X(), rb::Cluster::XCell(), rb::RecoHit::Y(), rb::Cluster::YCell(), and rb::RecoHit::Z().

329  {
330 
331  //get some information about the cell locations from the Geometry object.
333 
334  // get a backtracker service handle
336 
337  // get all the slices
339  evt.getByLabel(fSliceLabel,slicecol);
340 
341  art::PtrVector<rb::Cluster> slicelist;
342  for(unsigned int i = 0; i<slicecol->size();++i){
343  art::Ptr<rb::Cluster>slice(slicecol,i);
344  slicelist.push_back(slice);
345  }
346 
347  // setup the associations between tracks and slices
348  art::FindManyP<rb::Track> fmtrack(slicecol,evt,fTrackLabel);
349 
350  // Get the FMP for the Standard Records
351  art::FindManyP<caf::StandardRecord> recordFMP(slicecol, evt, fCAFLabel);
352 
353  double n3dTracksPerEvt = 0;
354  double n2dTracksPerEvt = 0;
355 
356  // loop over slices
357  for(unsigned int islice = 0; islice < slicelist.size(); ++islice){
358 
359  // Apply the CAF-level cuts
360  bool pass = true;
361  if( fApplyCAFCuts ) {
362  // get record associated with the slice
363  std::vector< art::Ptr<caf::StandardRecord> > records = recordFMP.at(islice);
364  if(records.size() > 0 && recordFMP.isValid()) {
365  pass = fCAFCutter.passCuts(fCutType, records[0].get());
366  }
367  else { pass = false; }
368  }
369 
370  if(!pass) continue;
371 
372  std::vector<art::Ptr<rb::Track> > tracks;
373  if(fmtrack.isValid()){
374  tracks = fmtrack.at(islice);
375  }
376 
377  bool filtered = rb::IsFiltered(evt,slicelist[islice]);
378 
379  CheckAssociations(slicelist[islice],tracks,filtered);
380 
381  if(slicelist[islice]->IsNoise()){ continue; }
382 
383  double n3dTracksPerSlice = 0;
384  double n2dTracksPerSlice = 0;
385 
386  // get truth info for plots
387  if(bt->HaveTruthInfo()){
388  CheckRecoTracks(tracks,slicelist[islice]->AllCells());
389  }
390 
391  //loop over tracks and make reco track histograms
392  for(unsigned int i=0;i<tracks.size();i++){
393  art::Ptr<rb::Track> track = tracks[i];
394  // check if the track is 2d or 3d
395  fViewCAF->Fill(track->View());
396  fCosXCAF->Fill(track->Dir().X());
397  fCosYCAF->Fill(track->Dir().Y());
398  fCosZCAF->Fill(track->Dir().Z());
399  fXPosStartCAF->Fill(track->Start().X());
400  fYPosStartCAF->Fill(track->Start().Y());
401  fZPosStartCAF ->Fill(track->Start().Z());
402  fXPosEndCAF->Fill(track->Stop().X());
403  fYPosEndCAF->Fill(track->Stop().Y());
404  fZPosEndCAF->Fill(track->Stop().Z());
405  fLengthCAF->Fill(track->TotalLength());
406  fHitsCAF->Fill(track->NCell());
407  if(track->Is3D()){
408  ++n3dTracksPerEvt;
409  ++n3dTracksPerSlice;
410  TVector3 start(track->TrajectoryPoint(0));
411  fXPosStart->Fill(start.X());
412  fYPosStart->Fill(start.Y());
413  fZPosStart->Fill(start.Z());
414  fXvYStart->Fill(start.X(),start.Y());
415  TVector3 end(track->Stop());
416  fXPosEnd->Fill(end.X());
417  fYPosEnd->Fill(end.Y());
418  fZPosEnd->Fill(end.Z());
419  fXvYEnd->Fill(end.X(),end.Y());
420  TVector3 length = end-start;
421  fHitsPerTrack->Fill(track->NCell());
422  fTrackLength->Fill(track->TotalLength());
423  double cosX = (end.X()-start.X())/length.Mag();
424  fCosX->Fill(cosX);
425  double cosY = (end.Y()-start.Y())/length.Mag();
426  fCosY->Fill(cosY);
427  double cosZ = (end.Z()-start.Z())/length.Mag();
428  fCosZ->Fill(cosZ);
429  for(unsigned int nx = 0; nx<track->NXCell();++nx){
430  art::Ptr<rb::CellHit> xcellhit = track->XCell(nx);
431  int cell = xcellhit->Cell();
432  int plane = xcellhit->Plane();
433  double xyz[3];
434  geom->Plane(plane)->Cell(cell)->GetCenter(xyz);
435  fZvX->Fill(xyz[2],xyz[0]);
436  fXPos->Fill(xyz[0]);
437  fXPlaneVCell->Fill(plane,cell);
438  fPlaneVCell->Fill(plane,cell);
439  fXHitsPerPlane->Fill(plane);
440  fHitsPerPlane->Fill(plane);
441  fXHitsPerCell->Fill(cell);
442 
443  //Get the recohit from this track cell hit
444  rb::RecoHit xReco = track->RecoHit(xcellhit);
445  fYRecoPos->Fill(xReco.Y());
446  fXvYReco->Fill(xReco.X(),xReco.Y());
447  fZvYReco->Fill(xReco.Z(),xReco.Y());
448  }
449 
450  for(unsigned int ny = 0; ny<track->NYCell();++ny){
451  art::Ptr<rb::CellHit> ycellhit = track->YCell(ny);
452  int cell = ycellhit->Cell();
453  int plane = ycellhit->Plane();
454  double xyz[3];
455  geom->Plane(plane)->Cell(cell)->GetCenter(xyz);
456  fZvY->Fill(xyz[2],xyz[1]);
457  fYPos->Fill(xyz[1]);
458  fYPlaneVCell->Fill(plane,cell);
459  fPlaneVCell->Fill(plane,cell);
460  fYHitsPerPlane->Fill(plane);
461  fHitsPerPlane->Fill(plane);
462  fYHitsPerCell->Fill(cell);
463 
464  //Get the recohit from this track cell hit
465  rb::RecoHit yReco = track->RecoHit(ycellhit);
466  fXRecoPos->Fill(yReco.X());
467  fXvYReco->Fill(yReco.X(),yReco.Y());
468  fZvXReco->Fill(yReco.Z(),yReco.X());
469  }
470 
471  }
472  else{
473  ++n2dTracksPerEvt;
474  ++n2dTracksPerSlice;
475  if(track->View() == geo::kX){
476  TVector3 start(track->TrajectoryPoint(0));
477  fXPosStart->Fill(start.X());
478  fZPosStart->Fill(start.Z());
479  TVector3 end(track->Stop());
480  fXPosEnd->Fill(end.X());
481  fZPosEnd->Fill(end.Z());
482  TVector3 length = end-start;
483  fHitsPerTrack2d->Fill(track->NCell());
484  fTrackLength2d->Fill(track->TotalLength());
485  double cosX2d = (end.X()-start.X())/length.Mag();
486  fCosX2d->Fill(cosX2d);
487  double cosZ2d = (end.Z()-start.Z())/length.Mag();
488  fCosZ2d->Fill(cosZ2d);
489  }
490  else if(track->View() == geo::kY){
491  TVector3 start(track->TrajectoryPoint(0));
492  fYPosStart->Fill(start.Y());
493  fZPosStart->Fill(start.Z());
494  TVector3 end(track->Stop());
495  fYPosEnd->Fill(end.Y());
496  fZPosEnd->Fill(end.Z());
497  TVector3 length = end-start;
498  fHitsPerTrack2d->Fill(track->NCell());
499  fTrackLength2d->Fill(track->TotalLength());
500  double cosY2d = (end.Y()-start.Y())/length.Mag();
501  fCosY2d->Fill(cosY2d);
502  double cosZ2d = (end.Z()-start.Z())/length.Mag();
503  fCosZ2d->Fill(cosZ2d);
504  }
505  }
506  }
507  fTracksPerSlice->Fill(n3dTracksPerSlice);
508  f2DTracksPerSlice->Fill(n2dTracksPerSlice);
509  }
510 
511  fTracksPerEvent->Fill(n3dTracksPerEvt);
512  f2DTracksPerEvent->Fill(n2dTracksPerEvt);
513 
514  }
virtual geo::View_t View() const
kXorY for 3D clusters.
Definition: Cluster.h:99
TH2D * fXPlaneVCell
Plane vs Cell detector map for x view.
TH1D * fXPosEndCAF
x end position of tracks in CAF
TH1D * fYHitsPerCell
number of hits found in each y cell
TH1D * fYPosEnd
y end position of tracks
TH1D * fXRecoPos
reconstructed x position from yz track hit
unsigned int NCell(geo::View_t view) const
Number of cells in view view.
Definition: Cluster.cxx:134
void GetCenter(double *xyz, double localz=0.0) const
Definition: CellGeo.cxx:159
TVector3 TrajectoryPoint(unsigned int i) const
The ith point on the trajectory, a 3-vector in cm.
Definition: Track.cxx:158
art::Ptr< rb::CellHit > XCell(unsigned int xIdx) const
Get the ith cell in the x-view.
Definition: Cluster.cxx:157
TH2D * fXvYEnd
Position map for track end position.
TH2D * fYPlaneVCell
Plane vs Cell detector map for y view.
recovalid::CAFCutter fCAFCutter
the CAFCutter helper class
TH1D * fTrackLength
Length of reconstructed 3d tracks.
TH1D * fLengthCAF
Length of reconstructed tracks stored in CAF.
unsigned short Plane() const
Definition: CellHit.h:39
TH1D * fZPosStartCAF
z start position of tracks in CAF
const CellGeo * Cell(int icell) const
Definition: PlaneGeo.h:48
TH1D * fCosZ
Cosine theta of 3d tracks with respect to the Z axis.
TH1D * fTracksPerEvent
number of 3d tracks found per event
TH2D * fPlaneVCell
Plane vs Cell map for whole detector.
Vertical planes which measure X.
Definition: PlaneGeo.h:28
float Z() const
Definition: RecoHit.h:38
Definition: event.h:19
std::string fSliceLabel
Where to find Slices to reconstruct.
TH1D * f2DTracksPerSlice
number of 2d tracks per non noise slice
TH1D * fCosY2d
Cosine theta of 2D tracks with respect ot the Y axis.
TH1D * fYPosStart
y start position of tracks
const PlaneGeo * Plane(unsigned int i) const
TH1D * fXHitsPerCell
number of hits found in each x cell
TH1D * fCosZ2d
Cosine theta of 2d tracks with respect to the Z axis.
virtual TVector3 Start() const
Definition: Prong.h:73
TH1D * fXPosStart
x start position of tracks
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
TH1D * fXPosStartCAF
x start position of tracks in CAF
Calibrated quantities relying on position in the orthogonal view. To generate a rb::CellHit from a rb...
Definition: RecoHit.h:19
TH1D * fYRecoPos
reconstructed y position from xz track hit
TH1D * f2DTracksPerEvent
number of 2d tracks per event
TH1D * fHitsCAF
Number of hits in each track stored in CAF.
virtual double TotalLength() const
Length (cm) of all the track segments.
Definition: Track.cxx:213
unsigned short Cell() const
Definition: CellHit.h:40
TH1D * fZPosStart
z start position of tracks
TH1D * fXPos
position of x track hits
TH1D * fYPosStartCAF
y start position of tracks in CAF
bool passCuts(int cut, const caf::StandardRecord *sr)
Definition: CAFCutter.cxx:37
length
Definition: demo0.py:21
TH1D * fCosY
Cosine theta of 3D tracks with respect ot the Y axis.
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:441
TH1D * fCosX
Cosine theta of 3d tracks with respect to the X axis.
void CheckAssociations(art::Ptr< rb::Cluster > slice, std::vector< art::Ptr< rb::Track > > tracks, bool filtered)
art::Ptr< rb::CellHit > YCell(unsigned int yIdx) const
Get the ith cell in the y-view.
Definition: Cluster.cxx:165
TH1D * fXPosEnd
x end position of tracks
int fCutType
what cuts to apply (see CAFCutter.h)
TH1D * fZPosEndCAF
z end position of tracks in CAF
TH1D * fCosX2d
Cosine theta of 2d tracks with respect to the X axis.
virtual TVector3 Dir() const
Unit vector describing prong direction.
Definition: Prong.h:77
int evt
std::string fTrackLabel
Where to find Tracks to reconstruct.
rb::RecoHit RecoHit(const art::Ptr< rb::CellHit > &chit) const
Return calibrated hit based on assumed W coordinate.
Definition: Cluster.cxx:259
TH1D * fTrackLength2d
Length of reconstructed 3d tracks.
TH1D * fHitsPerPlane
number of hits found in each plane
TH1D * fHitsPerTrack2d
Number of hits in each reconstructed 3d track.
TH1D * fCosYCAF
Cosine theta of tracks with respect ot the Y axis for CAF comparison.
TH2D * fZvX
Z vs X of track hit positions.
bool IsFiltered(const art::Event &evt, art::Ptr< T > x, const std::vector< std::string > &labels)
Is this Ptr marked "filtered out"?
Definition: FilterList.h:96
TH2D * fXvYReco
X vs Y positions of track hits.
TH1D * fYPosEndCAF
y end position of tracks in CAF
TH2D * fZvXReco
Z vs X of reconstructed track hit positions.
bool fApplyCAFCuts
should we apply the CAF cuts?
size_type size() const
Definition: PtrVector.h:308
unsigned int NYCell() const
Number of cells in the y-view.
Definition: Cluster.h:108
std::string fCAFLabel
label for the process that made the standard records
TH1D * fZPosEnd
z end position of tracks
TH1D * fViewCAF
View stored in CAF.
TH1D * fYHitsPerPlane
number of hits found in each y plane
void CheckRecoTracks(std::vector< art::Ptr< rb::Track > > const &trkcol, art::PtrVector< rb::CellHit > const &allhits)
float X() const
Definition: RecoHit.h:36
TH1D * fXHitsPerPlane
number of hits found in each x plane
unsigned int NXCell() const
Number of cells in the x-view.
Definition: Cluster.h:106
void geom(int which=0)
Definition: geom.C:163
bool HaveTruthInfo() const
Is this a file with truth info in? (Is BackTracker going to be any use to you?)
Definition: BackTracker.h:133
TH2D * fXvYStart
Position map for track start position.
TH2D * fZvY
Z vs Y of track hit positions.
float Y() const
Definition: RecoHit.h:37
TVector3 Stop() const
Position of the final trajectory point.
Definition: Track.cxx:186
TH1D * fHitsPerTrack
Number of hits in each reconstructed 3d track.
TH2D * fZvYReco
Z vs Y of reconstructed track hit positions.
virtual bool Is3D() const
Definition: Prong.h:71
TH1D * fCosXCAF
Cosine theta of tracks with respect to the X axis for CAF comparison.
TH1D * fTracksPerSlice
number of 3d tracks found per non noise slice
TH1D * fYPos
position of y track hits
TH1D * fCosZCAF
Cosine theta of tracks with respect to the Z axis for CAF comparison.
void trk::KalmanTrackAna::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 194 of file KalmanTrackAna_module.cc.

References f2DTracksPerEvent, f2DTracksPerSlice, fccnc, fCosX, fCosX2d, fCosXCAF, fCosY, fCosY2d, fCosYCAF, fCosZ, fCosZ2d, fCosZCAF, fdx, fdy, fdz, fE, feff, fenu, fevent, fHitsCAF, fHitsPerPlane, fHitsPerTrack, fHitsPerTrack2d, flen, fLengthCAF, fmode, fnhits, fp, fpassMuon, fpdg, fPlaneVCell, fpur, frecolen, fTrackLength, fTrackLength2d, fTracksPerEvent, fTracksPerSlice, fTruthTree, fview, fViewCAF, fvtxdst, fweight, fx, fXHitsPerCell, fXHitsPerPlane, fXPlaneVCell, fXPos, fXPosEnd, fXPosEndCAF, fXPosStart, fXPosStartCAF, fXRecoPos, fXvYEnd, fXvYReco, fXvYStart, fy, fYHitsPerCell, fYHitsPerPlane, fYPlaneVCell, fYPos, fYPosEnd, fYPosEndCAF, fYPosStart, fYPosStartCAF, fYRecoPos, fz, fZPosEnd, fZPosEndCAF, fZPosStart, fZPosStartCAF, fZvX, fZvXReco, fZvY, fZvYReco, art::TFileDirectory::make(), xbins, ybins, and zbins.

195  {
196 
197  double maxLength = 3000.0;
198  int maxHits = 500;
199  double xMax = 1200.0;
200  double yMax = 1200.0;
201  double zMax = 6500.0;
202  double nCell = 384;
203  double nPlane = 960;
204  int xbins = 480;
205  int ybins = 480;
206  int zbins = 1300;
207 
209  // Individual Track Level Histograms
210  fTrackLength = tfs->make<TH1D>("trackLength",";Track length (cm);Number of tracks",600,0.0,maxLength);
211  fHitsPerTrack = tfs->make<TH1D>("hitsPerTrack",";Number of hits;Number of tracks", maxHits+1,-0.5,(double)maxHits+0.5);
212  fTrackLength2d = tfs->make<TH1D>("trackLength2d",";Track length (cm);Number of 2D tracks",600,0.0,maxLength);
213  fHitsPerTrack2d = tfs->make<TH1D>("hitsPerTrack2d",";Number of hits;Number of 2D tracks", maxHits+1,-0.5,(double)maxHits+0.5);
214  fCosX = tfs->make<TH1D>("dirCosX",";Track direction cos(#theta_{x});Number of tracks", 101,-1.0,1.0);
215  fCosY = tfs->make<TH1D>("dirCosY",";Track direction cos(#theta_{y});Number of tracks", 101,-1.0,1.0);
216  fCosZ = tfs->make<TH1D>("dirCosZ",";Track direction cos(#theta_{z});Number of tracks",100,-1.0,1.0);
217  fCosX2d = tfs->make<TH1D>("dirCosX2d",";Track direction cos(#theta_{x});Number of 2D tracks", 101,-1.0,1.0);
218  fCosY2d = tfs->make<TH1D>("dirCosY2d",";Track direction cos(#theta_{y});Number of tracks", 101,-1.0,1.0);
219  fCosZ2d = tfs->make<TH1D>("dirCosZ2d",";Track direction cos(#theta_{z});Number of tracks",100,-1.0,1.0);
220 
221  fXPosStart = tfs->make<TH1D>("xPosStart",";X start position (cm);Number of tracks",xbins,-xMax,xMax);
222  fYPosStart = tfs->make<TH1D>("yPosStart",";Y start position (cm);Number of tracks",ybins,-yMax,yMax);
223  fZPosStart = tfs->make<TH1D>("zPosStart",";Z start position (cm);Number of tracks",zbins,0.0,zMax);
224  fXPosEnd = tfs->make<TH1D>("xPosEnd",";X end position (cm);Number of tracks",xbins,-xMax,xMax);
225  fYPosEnd = tfs->make<TH1D>("yPosEnd",";y end position (cm);Number of tracks",ybins,-yMax,yMax);
226  fZPosEnd = tfs->make<TH1D>("zPosEnd",";Z end position (cm);Number of tracks",zbins,0.0,zMax);
227  fXvYStart = tfs->make<TH2D>("xyPosStart",";X start position (cm);Y start position (cm)",xbins,-xMax,xMax,ybins,-yMax,yMax );
228  fXvYEnd = tfs->make<TH2D>("xyPosEnd",";X end position (cm);Y end position (cm)",xbins,-xMax,xMax,ybins,-yMax ,yMax);
229  fXvYReco = tfs->make<TH2D>("xyRecoHits",";X position (cm);Y position (cm);Number of hits",xbins,-xMax,xMax,ybins,-yMax,yMax);
230  fZvXReco = tfs->make<TH2D>("zxRecoHits",";Z position (cm);X position (cm);Number of hits",zbins,-200.0,zMax,xbins,-xMax,xMax);
231  fZvYReco = tfs->make<TH2D>("zyRecoHits",";Z position (cm);Y position (cm);Number of hits",zbins,-200.0,zMax,ybins,-yMax,yMax);
232  fZvX = tfs->make<TH2D>("zxCellHits",";Z position (cm);X position (cm);Number of hits",zbins,-200.0,zMax,xbins,-xMax,xMax);
233  fZvY = tfs->make<TH2D>("zyCellHits",";Z position (cm);Y position (cm);Number of hits",zbins,-200.0,zMax,ybins,-yMax,yMax);
234 
235 
236  int ndirbins = 100;
237  double dirmin = -1.1;
238  double dirmax = 1.1;
239  int xbinscaf = 100;
240  int ybinscaf = 100;
241  int zbinscaf = 100;
242  double xmaxcaf = 1000.0;
243  double ymaxcaf = 1000.0;
244  double zmaxcaf = 6000.0;
245  int nlenbins = 100;
246  double nlenmin = -0.5;
247  double nlenmax = 5500;
248  int nhitsbins = 100;
249  double nhitmin = -0.5;
250  double nhitmax = 800.0;
251 
252  fCosXCAF = tfs->make<TH1D>("dirXCAF",";Cos #theta_{X}", ndirbins,dirmin,dirmax);
253  fCosYCAF = tfs->make<TH1D>("dirYCAF",";Cos #theta_{Y}", ndirbins,dirmin,dirmax);
254  fCosZCAF = tfs->make<TH1D>("dirZCAF",";Cos #theta_{Z}",ndirbins,dirmin,dirmax);
255  fViewCAF = tfs->make<TH1D>("viewCAF",";view;",3,-0.5,2.5);
256  fXPosStartCAF = tfs->make<TH1D>("startXCAF",";X Start Position (cm);Number of tracks",xbinscaf,-xmaxcaf,xmaxcaf);
257  fYPosStartCAF = tfs->make<TH1D>("startYCAF",";Y Start Position (cm);Number of tracks",ybinscaf,-ymaxcaf,ymaxcaf);
258  fZPosStartCAF = tfs->make<TH1D>("startZCAF",";Z Start Position (cm);Number of tracks",zbinscaf,0.0,zmaxcaf);
259  fXPosEndCAF = tfs->make<TH1D>("stopXCAF",";X End Position (cm);Number of tracks",xbinscaf,-xmaxcaf,xmaxcaf);
260  fYPosEndCAF = tfs->make<TH1D>("stopYCAF",";Y End Position (cm);Number of tracks",ybinscaf,-ymaxcaf,ymaxcaf);
261  fZPosEndCAF = tfs->make<TH1D>("stopZCAF",";Z End Position (cm);Number of tracks",zbinscaf,0.0,zmaxcaf);
262  fLengthCAF = tfs->make<TH1D>("lenCAF",";Track Length (cm);Number of tracks",nlenbins,nlenmin,nlenmax);
263  fHitsCAF = tfs->make<TH1D>("nhitCAF",";NHits;Number of tracks",nhitsbins,nhitmin,nhitmax);
264 
265  // Event Level Histograms
266  fTracksPerEvent = tfs->make<TH1D>("3dtracksPerEvent",";3D Tracks Per Event;Number of events",101,-0.5,100.5);
267  f2DTracksPerEvent = tfs->make<TH1D>("2dTracksPerEvent",";2D Tracks Per Event;Number of events",101,-0.5,100.5);
268  fTracksPerSlice = tfs->make<TH1D>("3dtracksPerSlice",";3D Tracks Per Event;Number of events",51,-0.5,50.5);
269  f2DTracksPerSlice = tfs->make<TH1D>("2dTracksPerSlice",";2D Tracks Per Event;Number of events",51,-0.5,50.5);
270 
271  //Hit Level Histograms
272  fXHitsPerPlane = tfs->make<TH1D>("xHitsPerPlane",";Plane Number;Number of hits",nPlane,-0.5,nPlane-0.5);
273  fYHitsPerPlane = tfs->make<TH1D>("yHitsPerPlane",";Plane Number;Number of hits",nPlane,-0.5,nPlane-0.5);
274  fHitsPerPlane = tfs->make<TH1D>("hitsPerPlane",";Plane Number;Number of hits",nPlane,-0.5,nPlane-0.5);
275  fXHitsPerCell = tfs->make<TH1D>("xHitsPerCell",";Cell Number;Number of hits",nCell,-0.5,nCell-0.5);
276  fYHitsPerCell = tfs->make<TH1D>("yHitsPerCell",";Cell Number;Number of hits",nCell,-0.5,nCell-0.5);
277  fXPos = tfs->make<TH1D>("xPos",";X Position (cm);Number of track hits", xbins, -xMax, xMax);
278  fYPos = tfs->make<TH1D>("yPos",";Y Position (cm);Number of track hits", ybins, -yMax, yMax);
279  fXRecoPos = tfs->make<TH1D>("xRecoPos",";X Position (cm);Number of track hits", xbins, -xMax, xMax);
280  fYRecoPos = tfs->make<TH1D>("yRecoPos",";Y Position (cm);Number of track hits", ybins, -yMax, yMax);
281  fXPlaneVCell = tfs->make<TH2D>("xPlaneVCell",";Plane number;Cell number",nPlane,-0.5,nPlane-0.5,nCell,-0.5,nCell-0.5);
282  fYPlaneVCell = tfs->make<TH2D>("yPlaneVCell",";Plane number;Cell number",nPlane,-0.5,nPlane-0.5,nCell,-0.5,nCell-0.5);
283  fPlaneVCell = tfs->make<TH2D>("planeVCell",";Plane number;Cell number", nPlane,-0.5,nPlane-0.5,nCell,-0.5,nCell-0.5);
284 
285 
286  // Truth Info
287  fTruthTree = tfs->make<TTree>("truthtree","");
288  fTruthTree->Branch("pdg",&fpdg,"pdg/I");
289  fTruthTree->Branch("E",&fE,"E/F");
290  fTruthTree->Branch("p",&fp,"P/F");
291  fTruthTree->Branch("vtxdst",&fvtxdst,"vtxdst/F");
292  fTruthTree->Branch("eff",&feff,"eff/F");
293  fTruthTree->Branch("pur",&fpur,"pur/F");
294  fTruthTree->Branch("len",&flen,"len/F");
295  fTruthTree->Branch("x",&fx,"x/F");
296  fTruthTree->Branch("y",&fy,"y/F");
297  fTruthTree->Branch("z",&fz,"z/F");
298  fTruthTree->Branch("dx",&fdx,"dx/F");
299  fTruthTree->Branch("dy",&fdy,"dy/F");
300  fTruthTree->Branch("dz",&fdz,"dz/F");
301  fTruthTree->Branch("Enu",&fenu,"Enu/F");
302  fTruthTree->Branch("Mode",&fmode,"Mode/I");
303  fTruthTree->Branch("weight",&fweight,"weight/F");
304  fTruthTree->Branch("event",&fevent,"event/I");
305  fTruthTree->Branch("passMuon",&fpassMuon,"passMuon/I");
306  fTruthTree->Branch("nhits",&fnhits,"nhits/I");
307  fTruthTree->Branch("view",&fview,"view/I");
308  fTruthTree->Branch("recolen",&frecolen,"recolen/F");
309  fTruthTree->Branch("ccnc",&fccnc,"ccnc/I");
310 
311  }
TH2D * fXPlaneVCell
Plane vs Cell detector map for x view.
TH1D * fXPosEndCAF
x end position of tracks in CAF
TH1D * fYHitsPerCell
number of hits found in each y cell
TH1D * fYPosEnd
y end position of tracks
TH1D * fXRecoPos
reconstructed x position from yz track hit
TH2D * fXvYEnd
Position map for track end position.
TH2D * fYPlaneVCell
Plane vs Cell detector map for y view.
TH1D * fTrackLength
Length of reconstructed 3d tracks.
TH1D * fLengthCAF
Length of reconstructed tracks stored in CAF.
TH1D * fZPosStartCAF
z start position of tracks in CAF
TH1D * fCosZ
Cosine theta of 3d tracks with respect to the Z axis.
TH1D * fTracksPerEvent
number of 3d tracks found per event
TH2D * fPlaneVCell
Plane vs Cell map for whole detector.
TH1D * f2DTracksPerSlice
number of 2d tracks per non noise slice
TH1D * fCosY2d
Cosine theta of 2D tracks with respect ot the Y axis.
TH1D * fYPosStart
y start position of tracks
TH1D * fXHitsPerCell
number of hits found in each x cell
TH1D * fCosZ2d
Cosine theta of 2d tracks with respect to the Z axis.
TH1D * fXPosStart
x start position of tracks
TH1D * fXPosStartCAF
x start position of tracks in CAF
TH1D * fYRecoPos
reconstructed y position from xz track hit
TH1D * f2DTracksPerEvent
number of 2d tracks per event
TH1D * fHitsCAF
Number of hits in each track stored in CAF.
TH1D * fZPosStart
z start position of tracks
TH1D * fXPos
position of x track hits
TH1D * fYPosStartCAF
y start position of tracks in CAF
TH1D * fCosY
Cosine theta of 3D tracks with respect ot the Y axis.
const int xbins
Definition: MakePlots.C:82
TH1D * fCosX
Cosine theta of 3d tracks with respect to the X axis.
TH1D * fXPosEnd
x end position of tracks
TH1D * fZPosEndCAF
z end position of tracks in CAF
TH1D * fCosX2d
Cosine theta of 2d tracks with respect to the X axis.
TH1D * fTrackLength2d
Length of reconstructed 3d tracks.
TH1D * fHitsPerPlane
number of hits found in each plane
TH1D * fHitsPerTrack2d
Number of hits in each reconstructed 3d track.
TH1D * fCosYCAF
Cosine theta of tracks with respect ot the Y axis for CAF comparison.
TH2D * fZvX
Z vs X of track hit positions.
TH2D * fXvYReco
X vs Y positions of track hits.
TH1D * fYPosEndCAF
y end position of tracks in CAF
TH2D * fZvXReco
Z vs X of reconstructed track hit positions.
const int ybins
TH1D * fZPosEnd
z end position of tracks
T * make(ARGS...args) const
TH1D * fViewCAF
View stored in CAF.
TH1D * fYHitsPerPlane
number of hits found in each y plane
TH1D * fXHitsPerPlane
number of hits found in each x plane
TH2D * fXvYStart
Position map for track start position.
TH2D * fZvY
Z vs Y of track hit positions.
TH1D * fHitsPerTrack
Number of hits in each reconstructed 3d track.
TH2D * fZvYReco
Z vs Y of reconstructed track hit positions.
TH1D * fCosXCAF
Cosine theta of tracks with respect to the X axis for CAF comparison.
TH1D * fTracksPerSlice
number of 3d tracks found per non noise slice
const Binning zbins
TH1D * fYPos
position of y track hits
TH1D * fCosZCAF
Cosine theta of tracks with respect to the Z axis for CAF comparison.
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_
void trk::KalmanTrackAna::CheckAssociations ( art::Ptr< rb::Cluster slice,
std::vector< art::Ptr< rb::Track > >  tracks,
bool  filtered 
)
private

Definition at line 775 of file KalmanTrackAna_module.cc.

References rb::Cluster::AllCells(), DEFINE_ART_MODULE(), rb::Cluster::IsNoise(), and art::PtrVector< T >::size().

Referenced by analyze().

776  {
777  if(filtered && tracks.size() > 0){
778  // mf::LogVerbatim("KalmanTrackAna")<<"Filtered slice has non-zero number of reconstructed tracks. This should never happen.";
779  // Should never create tracks on slices that have been filtered
780  // abort();
781  }
782  if(slice->IsNoise() && tracks.size() > 0){
783  mf::LogVerbatim("KalmanTrackAna")<<"Noise slice has non-zero number of reconstructed tracks. This should never happen.";
784  // Should never create tracks on slices that have been filtered
785  abort();
786  }
787 
788  // check that reco'd track hits all belong to the slice hits
789  art::PtrVector<rb::CellHit> slicehits = slice->AllCells();
790  for(unsigned int itrack = 0; itrack < tracks.size(); ++itrack){
791  // get all of the track hits for this track
792  art::PtrVector<rb::CellHit> trackhits = tracks[itrack]->AllCells();
793  // loop over the track hits
794  for(unsigned int itrhit = 0; itrhit < trackhits.size(); ++itrhit){
795  bool foundhit = false;
796  // loop over all the slice hits
797  for(unsigned int islhit = 0; islhit < slicehits.size(); ++islhit){
798  if(trackhits[itrhit] == slicehits[islhit]){
799  foundhit = true;
800  break;
801  }
802  }
803  // after looking at all the slice hits, did we find this track hit. If not, yell.
804  if(!foundhit){
805  mf::LogVerbatim("KalmanTrackAna")<<"Track made from hits on a slice other than the slice the track is associated to. This should never happen.";
806  // Should never create tracks from hits on slices other than the slice its associated with
807  abort();
808  }
809  }
810  }
811 
812  }
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
art::PtrVector< rb::CellHit > AllCells() const
Get all cells from both views.
Definition: Cluster.cxx:180
size_type size() const
Definition: PtrVector.h:308
bool IsNoise() const
Is the noise flag set?
Definition: Cluster.h:163
void trk::KalmanTrackAna::CheckRecoTracks ( std::vector< art::Ptr< rb::Track > > const &  trkcol,
art::PtrVector< rb::CellHit > const &  allhits 
)
private

Definition at line 517 of file KalmanTrackAna_module.cc.

References abs(), rb::Cluster::AllCells(), ana::assert(), plot_validation_datamc::c, simb::MCNeutrino::CCNC(), Containment(), simb::MCParticle::Daughter(), e, simb::MCParticle::E(), febshutoff_auto::end, fccnc, fdx, fdy, fdz, fE, feff, fenu, FindVisibleProngs(), flen, fmode, fnhits, fp, fpassMuon, fpdg, fpur, frecolen, fTruthTree, fview, fvtxdst, fweight, fx, fy, fz, simb::MCTruth::GetNeutrino(), cheat::BackTracker::GetTrackIDList(), cheat::BackTracker::HitCollectionEfficiency(), cheat::BackTracker::HitCollectionPurity(), hits(), MECModelEnuComparisons::i, it, geo::kX, geo::kXorY, simb::MCNeutrino::Mode(), rb::Cluster::NCell(), simb::MCTruth::NeutrinoSet(), simb::MCNeutrino::Nu(), simb::MCParticle::NumberDaughters(), part, cheat::BackTracker::ParticleToMCTruth(), cheat::BackTracker::PassMuonCuts(), make_root_from_grid_output::pdg, simb::MCParticle::PdgCode(), rb::Track::TotalLength(), TotalLengthInDetector(), simb::MCParticle::TrackId(), cheat::BackTracker::TrackIDToMotherParticle(), cheat::BackTracker::TrackIDToParticle(), POTSpillRate::view, rb::Cluster::View(), and ana::weight.

Referenced by analyze().

519  {
520 
521  // grab the set of eve IDs for this plist
523  std::set<int> trackIDs = bt->GetTrackIDList();
524 
525  // Only keep the ones associated with not completely unreasonable tracks
526  // remove for now, take care of this with PassMuonCuts function
527  trackIDs = FindVisibleProngs(allhits, trackIDs);
528 
529  // Empty set means accept all PDGs. Otherwise, filter out the unwanted ones
530  std::set<int> newTrackIDs;
531  for(std::set<int>::iterator it = trackIDs.begin(); it != trackIDs.end(); ++it){
532  const int pdg = bt->TrackIDToParticle(*it)->PdgCode();
533  if(abs(pdg) != 13){ continue; }
534  // make sure this is a primary particle
535  if(bt->TrackIDToMotherParticle(*it)->TrackId() != *it){continue;}
536  // check that its a particle we care about
537  newTrackIDs.insert(*it);
538  } // end for it
539  trackIDs = newTrackIDs;
540 
541  std::map<int, int> parents;
542  for(std::set<int>::iterator it = trackIDs.begin(); it != trackIDs.end(); ++it){
543  const sim::Particle* mother = bt->TrackIDToParticle(*it);
544  if(!mother) continue; // Can this happen?
545  for(int i = 0; i < mother->NumberDaughters(); ++i){
546  const int id = mother->Daughter(i);
547  assert(bt->TrackIDToParticle(id));
548  if(abs(bt->TrackIDToParticle(id)->PdgCode()) == 11){ parents[id] = *it; }
549  } // end for i
550  } // end for it
551 
552  // Indexed by what view they're in. X, Y, or 3D
553  assert(geo::kXorY == 2); // Ensure enum still works how we think
554  std::map<int, double> bestPur[3], bestEff[3], bestLength[3], bestHits[3];
555 
556  // Go through each reconstructed object, accumulating the best scores seen
557  // for each trackID we're interested in.
558  for(size_t c = 0; c < trkcol.size(); ++c){
559  const rb::Track* trk = trkcol[c].get();
560  const geo::View_t view = trk->View();
561 
562  // get the hits associated with this object
564 
565  // use the cheat::BackTracker to find purity and efficiency for these
566  // hits for each particle ID
567  std::map<int, double> purMap, effMap;
568  bt->HitCollectionPurity(trackIDs, hits, &purMap, &parents);
569  bt->HitCollectionEfficiency(trackIDs, hits, allhits, view, &effMap);
570 
571  for(std::set<int>::iterator it = trackIDs.begin(); it != trackIDs.end(); ++it){
572  const double p = purMap[*it];
573  const double e = effMap[*it];
574 
575  if(e > bestEff[view][*it]) {
576  bestEff[view][*it] = e;
577  bestPur[view][*it] = p;
578 
579  // If we were told to fill a track length histogram then downcast
580  // should be safe.
581  bestLength[view][*it] = trk->TotalLength();
582  bestHits[view][*it] = trk->NCell();
583  }
584  } // end for it
585  } // end for c
586 
587  // For every track. If it was matched in 3D, fill the histograms.
588  // If there is no 3D match look for 2 2D matches and fill with weight 0.5
589  // If required we can add a flag to only try 3D or only try 2D.
590  for(std::set<int>::iterator it = trackIDs.begin(); it != trackIDs.end(); ++it){
591  // Try 3D first
592  for(int view = geo::kXorY; view >= geo::kX; --view){
593  // If no 3D match, continue to two 2D options
594  if(view == geo::kXorY && bestEff[view].find(*it) == bestEff[view].end()) continue;
595 
596  const double weight = (view == geo::kXorY) ? 1 : 0.5;
597 
598  const double trueLength = TotalLengthInDetector(bt->TrackIDToParticle(*it), geo::View_t(view));
599 
600  const sim::Particle* part = bt->TrackIDToParticle(*it);
601  fE = part->E();
602  fp = part->P();
603  TVector3 truestart;
604  truestart.SetXYZ(part->Vx(),part->Vy(),part->Vz());
605  fx = part->Vx();
606  fy = part->Vy();
607  fz = part->Vz();
608  fvtxdst = Containment(truestart);
609  fpdg = part->PdgCode();
610  fdx = part->Px()/part->P();
611  fdy = part->Py()/part->P();
612  fdz = part->Pz()/part->P();
613  fnhits = bestHits[view][*it];
614  feff = bestEff[view][*it];
615  fpur = bestPur[view][*it];
616  frecolen = bestLength[view][*it];
617  flen = trueLength;
618  fweight = weight;
619  fpassMuon = bt->PassMuonCuts(*it,allhits);
620  fview = view;
621  fmode = -1;
622  fenu = -1;
623 
624  // check if this is coming from a neutrino
625  const art::Ptr<simb::MCTruth> mctruth = bt->ParticleToMCTruth(part);
626  if(mctruth->NeutrinoSet()){
627  // get the neutrino if it exists
628  const simb::MCNeutrino neutrino = mctruth->GetNeutrino();
629  fmode = neutrino.Mode();
630  fenu = neutrino.Nu().E();
631  fccnc = neutrino.CCNC();
632  }
633 
634  fTruthTree->Fill();
635 
636  // If we did find a 3D match, don't try 2D
637  if(bestEff[geo::kXorY].find(*it) != bestEff[geo::kXorY].end()) break;
638  } // end for view
639  } // end for it
640  }
double E(const int i=0) const
Definition: MCParticle.h:232
::xsd::cxx::tree::id< char, ncname > id
Definition: Database.h:165
virtual geo::View_t View() const
kXorY for 3D clusters.
Definition: Cluster.h:99
double Containment(TVector3 start) const
int PdgCode() const
Definition: MCParticle.h:211
int CCNC() const
Definition: MCNeutrino.h:148
unsigned int NCell(geo::View_t view) const
Number of cells in view view.
Definition: Cluster.cxx:134
const simb::MCNeutrino & GetNeutrino() const
Definition: MCTruth.h:76
set< int >::iterator it
const sim::Particle * TrackIDToMotherParticle(int const &id) const
std::set< int > FindVisibleProngs(const art::PtrVector< rb::CellHit > &allhits, std::set< int > ids) const
const Var weight
X or Y views.
Definition: PlaneGeo.h:30
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
const char * p
Definition: xmltok.h:285
const simb::MCParticle & Nu() const
Definition: MCNeutrino.h:146
Vertical planes which measure X.
Definition: PlaneGeo.h:28
void abs(TH1 *hist)
A rb::Prong with full reconstructed trajectory.
Definition: Track.h:20
int NumberDaughters() const
Definition: MCParticle.h:216
art::PtrVector< rb::CellHit > AllCells() const
Get all cells from both views.
Definition: Cluster.cxx:180
double HitCollectionEfficiency(const std::set< int > &trackIDs, const std::vector< rb::WeightedHit > &whits, const std::vector< const rb::CellHit * > &allhits, const geo::View_t &view, std::map< int, double > *effMap=0, bool energyEff=false, double *desiredEnergy=0, double *totalEnergy=0, int *desiredHits=0, int *totalHits=0) const
Returns the fraction of all energy in an event from a specific set of Geant4 track IDs that are repre...
int TrackId() const
Definition: MCParticle.h:209
int Daughter(const int i) const
Definition: MCParticle.cxx:112
virtual double TotalLength() const
Length (cm) of all the track segments.
Definition: Track.cxx:213
Track finder for cosmic rays.
TString part[npart]
Definition: Style.C:32
void hits()
Definition: readHits.C:15
const art::Ptr< simb::MCTruth > & ParticleToMCTruth(const sim::Particle *p) const
double HitCollectionPurity(const std::set< int > &trackIDs, const std::vector< rb::WeightedHit > &whits, std::map< int, double > *purMap=0, std::map< int, int > *parents=0, bool energyPur=false) const
Returns the fraction of hits in a collection that come from the specified Geant4 track ids...
const sim::Particle * TrackIDToParticle(int const &id) const
Returns a pointer to the sim::Particle object corresponding to the given TrackID. ...
const std::set< int > GetTrackIDList() const
Get all G4 track ids present in the event.
Definition: BackTracker.h:750
assert(nhit_max >=nhit_nbins)
double TotalLengthInDetector(const sim::Particle *p, geo::View_t view) const
bool PassMuonCuts(int trackID, art::PtrVector< rb::CellHit > const &hits) const
Tool for NumuEAna that allows one to see if primary muon (or any track ID you feed the function) cont...
bool NeutrinoSet() const
Definition: MCTruth.h:77
Float_t e
Definition: plot.C:35
Event generator information.
Definition: MCNeutrino.h:18
int Mode() const
Definition: MCNeutrino.h:149
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
double trk::KalmanTrackAna::Containment ( TVector3  start) const
private

Definition at line 730 of file KalmanTrackAna_module.cc.

References geo::GeometryBase::DetHalfHeight(), geo::GeometryBase::DetHalfWidth(), geo::GeometryBase::DetLength(), dist, geom(), febshutoff_auto::start, xmax, make_mec_shifts_plots::xmin, ymax, ymin, and make_true_q0q3_plots::zmax.

Referenced by CheckRecoTracks().

731  {
732  double dist = 0;
733  double xmin,xmax,ymin,ymax,zmin,zmax;
734 
735  // define the boundaries of containment
737 
738  double detHalfWidth = geom->DetHalfWidth();
739  double detHalfHeight = geom->DetHalfHeight();
740  double detLength = geom->DetLength();
741 
742  // fd detector edges determined from event display for 28 block detector
743  // get rid of offset between geom->DetHalfWidth()(Height()) and actual detector edges
744  double voffset = 15.0;
745  xmin = -detHalfWidth+voffset;
746  xmax = detHalfWidth-voffset;
747  ymin = -detHalfHeight+voffset;
748  ymax = detHalfHeight-voffset;
749  zmin = 0;
750  zmax = detLength;
751 
752  TVector3 mins(xmin,ymin,zmin);
753  TVector3 maxs(xmax,ymax,zmax);
754 
755  float mindist = 1e10;
756 
757  if(start.X() > xmin && start.X() < xmax &&
758  start.Y() > ymin && start.Y() < ymax &&
759  start.Z() > zmin && start.Z() < zmax){
760  TVector3 mindiffs = mins - start;
761  TVector3 maxdiffs = maxs - start;
762  if(TMath::Abs(mindiffs.X()) < mindist){ mindist = TMath::Abs(mindiffs.X()); }
763  if(TMath::Abs(mindiffs.Y()) < mindist){ mindist = TMath::Abs(mindiffs.Y()); }
764  if(TMath::Abs(mindiffs.Z()) < mindist){ mindist = TMath::Abs(mindiffs.Z()); }
765  if(TMath::Abs(maxdiffs.X()) < mindist){ mindist = TMath::Abs(maxdiffs.X()); }
766  if(TMath::Abs(maxdiffs.Y()) < mindist){ mindist = TMath::Abs(maxdiffs.Y()); }
767  if(TMath::Abs(maxdiffs.Z()) < mindist){ mindist = TMath::Abs(maxdiffs.Z()); }
768  dist = mindist;
769  }
770 
771  return dist;
772  }
std::map< std::string, double > xmax
double DetLength() const
double dist
Definition: runWimpSim.h:113
Double_t ymax
Definition: plot.C:25
double DetHalfHeight() const
double DetHalfWidth() const
void geom(int which=0)
Definition: geom.C:163
Double_t ymin
Definition: plot.C:24
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
std::set< int > trk::KalmanTrackAna::FindVisibleProngs ( const art::PtrVector< rb::CellHit > &  allhits,
std::set< int ids 
) const
private

Definition at line 643 of file KalmanTrackAna_module.cc.

References plot_validation_datamc::c, cheat::BackTracker::HitToTrackIDE(), MECModelEnuComparisons::i, it, calib::j, sim::kNoiseId, geo::kX, geo::kY, trk::KalmanTrackAna::Counts::nHits, trk::KalmanTrackAna::Counts::nOnlyHits, runNovaSAM::ret, art::PtrVector< T >::size(), trackID, and rb::CellHit::View().

Referenced by CheckRecoTracks().

645  {
646  std::map<int, Counts> counts;
647 
649 
650  // loop over all hits and check if this track id contributed to them
651  for(unsigned int i = 0; i < allhits.size(); ++i){
652  //get vector of track id's that contribute to this hit
653  const art::Ptr<rb::CellHit> hit = allhits[i];
654  const std::vector<cheat::TrackIDE> trackIDs = bt->HitToTrackIDE(hit);
655  // loop over all the returned track ids
656  int nTracks = 0; // number of tracks that contributed energy to the hit
657  int loneID = -1; // Which ID it was if there was only one
658  for(unsigned int j = 0; j < trackIDs.size(); ++j){
659  const int trackID = trackIDs[j].trackID;
660  if(trackID != sim::kNoiseId){
661  ++nTracks;
662  loneID = trackID;
663  }
664 
665  // check if the current id matches the input track id
666  if(ids.find(trackID) != ids.end()){
667  ++counts[trackID].nHits[hit->View()];
668  }
669  } // end for j
670  if(nTracks == 1){
671  ++counts[loneID].nOnlyHits[hit->View()];
672  }
673  } // end for i
674 
675  const int kMinHits = 2; // minimum number of hits to be considered visible
676  const int kMinOnlyHit = 1; // minimum number of hits in which it is only particle contributing energy to be visible
677 
678  std::set<int> ret;
679  for(std::set<int>::iterator it = ids.begin(); it != ids.end(); ++it){
680  const Counts c = counts[*it];
681  // Check if this track passes the visible prong requirements
682  if(c.nOnlyHits[geo::kX] >= kMinOnlyHit &&
683  c.nOnlyHits[geo::kY] >= kMinOnlyHit){
684 
685  if(c.nHits[geo::kX] >= kMinHits && c.nHits[geo::kY] >= kMinHits)
686  ret.insert(*it);
687  }
688  }
689  return ret;
690  }
set< int >::iterator it
std::vector< TrackIDE > HitToTrackIDE(const rb::CellHit &hit, bool useBirksE=false) const
Convenience function. HitsToTrackIDE but for a single hit.
static const int kNoiseId
flag for noise id
Definition: Simulation.h:13
geo::View_t View() const
Definition: CellHit.h:41
Vertical planes which measure X.
Definition: PlaneGeo.h:28
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
const double j
Definition: BetheBloch.cxx:29
size_type size() const
Definition: PtrVector.h:308
Definition: structs.h:12
Int_t trackID
Definition: plot.C:84
seed_t art::EngineCreator::get_seed_value ( fhicl::ParameterSet const &  pset,
char const  key[] = "seed",
seed_t const  implicit_seed = -1 
)
inherited
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
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
void art::Consumer::prepareForJob ( fhicl::ParameterSet const &  pset)
protectedinherited
std::string const& art::EventObserverBase::processName ( ) const
inlineinherited
void trk::KalmanTrackAna::reconfigure ( const fhicl::ParameterSet pset)

Definition at line 184 of file KalmanTrackAna_module.cc.

References fApplyCAFCuts, fCAFLabel, fCutType, fSliceLabel, fTrackLabel, fhicl::ParameterSet::get(), and string.

Referenced by KalmanTrackAna().

184  {
185  fSliceLabel = (pset.get< std::string >("SliceLabel") );
186  fTrackLabel = (pset.get< std::string >("TrackLabel") );
187  fCAFLabel = (pset.get< std::string >("CAFLabel") );
188  fApplyCAFCuts = (pset.get< bool > ("ApplyCAFCuts") );
189  fCutType = (pset.get< int > ("CutType") );
190  }
std::string fSliceLabel
Where to find Slices to reconstruct.
int fCutType
what cuts to apply (see CAFCutter.h)
T get(std::string const &key) const
Definition: ParameterSet.h:231
std::string fTrackLabel
Where to find Tracks to reconstruct.
bool fApplyCAFCuts
should we apply the CAF cuts?
std::string fCAFLabel
label for the process that made the standard records
enum BeamMode string
void art::EventObserverBase::registerProducts ( MasterProductRegistry ,
ProductDescriptions ,
ModuleDescription const &   
)
inlineinherited

Definition at line 33 of file EventObserverBase.h.

References string.

36  {}
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().

double trk::KalmanTrackAna::TotalLengthInDetector ( const sim::Particle p,
geo::View_t  view 
) const
private

Definition at line 693 of file KalmanTrackAna_module.cc.

References geo::GeometryBase::DetHalfHeight(), geo::GeometryBase::DetHalfWidth(), geo::GeometryBase::DetLength(), dist, stan::math::fabs(), geom(), geo::kX, geo::kY, Mag(), getGoodRuns4SAM::n, simb::MCParticle::NumberTrajectoryPoints(), PandAna.Demos.pi0_spectra::p0, plot_validation_datamc::p1, and simb::MCParticle::Position().

Referenced by CheckRecoTracks().

695  {
696  const unsigned int N = p->NumberTrajectoryPoints();
697 
698  if(N < 2){
699  mf::LogWarning("RecoCheckAna") << "Particle has no trajectory points";
700  return 0;
701  }
702 
704 
705  double dist = 0;
706 
707  for(unsigned int n = 0; n < N-1; ++n){
708  TVector3 p0 = p->Position(n).Vect();
709  TVector3 p1 = p->Position(n+1).Vect();
710  if(p0.Z() < 0 || p1.Z() < 0 ||
711  p0.Z() > geom->DetLength() || p1.Z() > geom->DetLength() ||
712  fabs(p0.X()) > geom->DetHalfWidth() || fabs(p1.X()) > geom->DetHalfWidth() ||
713  fabs(p0.Y()) > geom->DetHalfHeight() || fabs(p1.Y()) > geom->DetHalfHeight()) continue;
714 
715  if(view == geo::kX){
716  p0.SetY(0);
717  p1.SetY(0);
718  }
719  if(view == geo::kY){
720  p0.SetX(0);
721  p1.SetX(0);
722  }
723  dist += (p1-p0).Mag();
724  }
725 
726  return dist;
727  }
unsigned int NumberTrajectoryPoints() const
Definition: MCParticle.h:217
const TLorentzVector & Position(const int i=0) const
Definition: MCParticle.h:218
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
Vertical planes which measure X.
Definition: PlaneGeo.h:28
double DetLength() const
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
double dist
Definition: runWimpSim.h:113
double DetHalfHeight() const
double DetHalfWidth() const
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
void geom(int which=0)
Definition: geom.C:163
float Mag() const
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

TH1D* trk::KalmanTrackAna::f2DTracksPerEvent
private

number of 2d tracks per event

Definition at line 126 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::f2DTracksPerSlice
private

number of 2d tracks per non noise slice

Definition at line 128 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

bool trk::KalmanTrackAna::fApplyCAFCuts
private

should we apply the CAF cuts?

Definition at line 76 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and reconfigure().

recovalid::CAFCutter trk::KalmanTrackAna::fCAFCutter
private

the CAFCutter helper class

Definition at line 79 of file KalmanTrackAna_module.cc.

Referenced by analyze().

std::string trk::KalmanTrackAna::fCAFLabel
private

label for the process that made the standard records

Definition at line 75 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and reconfigure().

int trk::KalmanTrackAna::fccnc
private

Definition at line 147 of file KalmanTrackAna_module.cc.

Referenced by beginJob(), and CheckRecoTracks().

TH1D* trk::KalmanTrackAna::fCosX
private

Cosine theta of 3d tracks with respect to the X axis.

Definition at line 86 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fCosX2d
private

Cosine theta of 2d tracks with respect to the X axis.

Definition at line 89 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fCosXCAF
private

Cosine theta of tracks with respect to the X axis for CAF comparison.

Definition at line 111 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fCosY
private

Cosine theta of 3D tracks with respect ot the Y axis.

Definition at line 87 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fCosY2d
private

Cosine theta of 2D tracks with respect ot the Y axis.

Definition at line 90 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fCosYCAF
private

Cosine theta of tracks with respect ot the Y axis for CAF comparison.

Definition at line 112 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fCosZ
private

Cosine theta of 3d tracks with respect to the Z axis.

Definition at line 88 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fCosZ2d
private

Cosine theta of 2d tracks with respect to the Z axis.

Definition at line 91 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fCosZCAF
private

Cosine theta of tracks with respect to the Z axis for CAF comparison.

Definition at line 113 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

int trk::KalmanTrackAna::fCutType
private

what cuts to apply (see CAFCutter.h)

Definition at line 77 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and reconfigure().

float trk::KalmanTrackAna::fdx
private

Definition at line 145 of file KalmanTrackAna_module.cc.

Referenced by beginJob(), and CheckRecoTracks().

float trk::KalmanTrackAna::fdy
private

Definition at line 145 of file KalmanTrackAna_module.cc.

Referenced by beginJob(), and CheckRecoTracks().

float trk::KalmanTrackAna::fdz
private

Definition at line 145 of file KalmanTrackAna_module.cc.

Referenced by beginJob(), and CheckRecoTracks().

float trk::KalmanTrackAna::fE
private

Definition at line 145 of file KalmanTrackAna_module.cc.

Referenced by beginJob(), and CheckRecoTracks().

float trk::KalmanTrackAna::feff
private

Definition at line 145 of file KalmanTrackAna_module.cc.

Referenced by beginJob(), and CheckRecoTracks().

float trk::KalmanTrackAna::fenu
private

Definition at line 145 of file KalmanTrackAna_module.cc.

Referenced by beginJob(), and CheckRecoTracks().

int trk::KalmanTrackAna::fevent
private

Definition at line 149 of file KalmanTrackAna_module.cc.

Referenced by beginJob().

TH1D* trk::KalmanTrackAna::fHitsCAF
private

Number of hits in each track stored in CAF.

Definition at line 116 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fHitsPerPlane
private

number of hits found in each plane

Definition at line 134 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fHitsPerTrack
private

Number of hits in each reconstructed 3d track.

Definition at line 83 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fHitsPerTrack2d
private

Number of hits in each reconstructed 3d track.

Definition at line 85 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

float trk::KalmanTrackAna::flen
private

Definition at line 145 of file KalmanTrackAna_module.cc.

Referenced by beginJob(), and CheckRecoTracks().

TH1D* trk::KalmanTrackAna::fLengthCAF
private

Length of reconstructed tracks stored in CAF.

Definition at line 115 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

int trk::KalmanTrackAna::fmode
private

Definition at line 146 of file KalmanTrackAna_module.cc.

Referenced by beginJob(), and CheckRecoTracks().

int trk::KalmanTrackAna::fnhits
private

Definition at line 151 of file KalmanTrackAna_module.cc.

Referenced by beginJob(), and CheckRecoTracks().

float trk::KalmanTrackAna::fp
private

Definition at line 145 of file KalmanTrackAna_module.cc.

Referenced by beginJob(), and CheckRecoTracks().

int trk::KalmanTrackAna::fpassMuon
private

Definition at line 150 of file KalmanTrackAna_module.cc.

Referenced by beginJob(), and CheckRecoTracks().

int trk::KalmanTrackAna::fpdg
private

Definition at line 144 of file KalmanTrackAna_module.cc.

Referenced by beginJob(), and CheckRecoTracks().

TH2D* trk::KalmanTrackAna::fPlaneVCell
private

Plane vs Cell map for whole detector.

Definition at line 139 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

float trk::KalmanTrackAna::fpur
private

Definition at line 145 of file KalmanTrackAna_module.cc.

Referenced by beginJob(), and CheckRecoTracks().

float trk::KalmanTrackAna::frecolen
private

Definition at line 153 of file KalmanTrackAna_module.cc.

Referenced by beginJob(), and CheckRecoTracks().

std::string trk::KalmanTrackAna::fSliceLabel
private

Where to find Slices to reconstruct.

Definition at line 72 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and reconfigure().

std::string trk::KalmanTrackAna::fTrackLabel
private

Where to find Tracks to reconstruct.

Definition at line 73 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and reconfigure().

TH1D* trk::KalmanTrackAna::fTrackLength
private

Length of reconstructed 3d tracks.

Definition at line 82 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fTrackLength2d
private

Length of reconstructed 3d tracks.

Definition at line 84 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fTracksPerEvent
private

number of 3d tracks found per event

Definition at line 125 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fTracksPerSlice
private

number of 3d tracks found per non noise slice

Definition at line 127 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TTree* trk::KalmanTrackAna::fTruthTree
private

Definition at line 142 of file KalmanTrackAna_module.cc.

Referenced by beginJob(), and CheckRecoTracks().

int trk::KalmanTrackAna::fview
private

Definition at line 152 of file KalmanTrackAna_module.cc.

Referenced by beginJob(), and CheckRecoTracks().

TH1D* trk::KalmanTrackAna::fViewCAF
private

View stored in CAF.

Definition at line 114 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

float trk::KalmanTrackAna::fvtxdst
private

Definition at line 145 of file KalmanTrackAna_module.cc.

Referenced by beginJob(), and CheckRecoTracks().

float trk::KalmanTrackAna::fweight
private

Definition at line 148 of file KalmanTrackAna_module.cc.

Referenced by beginJob(), and CheckRecoTracks().

float trk::KalmanTrackAna::fx
private

Definition at line 145 of file KalmanTrackAna_module.cc.

Referenced by beginJob(), and CheckRecoTracks().

TH1D* trk::KalmanTrackAna::fXHitsPerCell
private

number of hits found in each x cell

Definition at line 135 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fXHitsPerPlane
private

number of hits found in each x plane

Definition at line 132 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH2D* trk::KalmanTrackAna::fXPlaneVCell
private

Plane vs Cell detector map for x view.

Definition at line 137 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fXPos
private

position of x track hits

Definition at line 98 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fXPosEnd
private

x end position of tracks

Definition at line 95 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fXPosEndCAF
private

x end position of tracks in CAF

Definition at line 120 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fXPosStart
private

x start position of tracks

Definition at line 92 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fXPosStartCAF
private

x start position of tracks in CAF

Definition at line 117 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fXRecoPos
private

reconstructed x position from yz track hit

Definition at line 100 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH2D* trk::KalmanTrackAna::fXvYEnd
private

Position map for track end position.

Definition at line 103 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH2D* trk::KalmanTrackAna::fXvYReco
private

X vs Y positions of track hits.

Definition at line 104 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH2D* trk::KalmanTrackAna::fXvYStart
private

Position map for track start position.

Definition at line 102 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

float trk::KalmanTrackAna::fy
private

Definition at line 145 of file KalmanTrackAna_module.cc.

Referenced by beginJob(), and CheckRecoTracks().

TH1D* trk::KalmanTrackAna::fYHitsPerCell
private

number of hits found in each y cell

Definition at line 136 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fYHitsPerPlane
private

number of hits found in each y plane

Definition at line 133 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH2D* trk::KalmanTrackAna::fYPlaneVCell
private

Plane vs Cell detector map for y view.

Definition at line 138 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fYPos
private

position of y track hits

Definition at line 99 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fYPosEnd
private

y end position of tracks

Definition at line 96 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fYPosEndCAF
private

y end position of tracks in CAF

Definition at line 121 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fYPosStart
private

y start position of tracks

Definition at line 93 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fYPosStartCAF
private

y start position of tracks in CAF

Definition at line 118 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fYRecoPos
private

reconstructed y position from xz track hit

Definition at line 101 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

float trk::KalmanTrackAna::fz
private

Definition at line 145 of file KalmanTrackAna_module.cc.

Referenced by beginJob(), and CheckRecoTracks().

TH1D* trk::KalmanTrackAna::fZPosEnd
private

z end position of tracks

Definition at line 97 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fZPosEndCAF
private

z end position of tracks in CAF

Definition at line 122 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fZPosStart
private

z start position of tracks

Definition at line 94 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH1D* trk::KalmanTrackAna::fZPosStartCAF
private

z start position of tracks in CAF

Definition at line 119 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH2D* trk::KalmanTrackAna::fZvX
private

Z vs X of track hit positions.

Definition at line 107 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH2D* trk::KalmanTrackAna::fZvXReco
private

Z vs X of reconstructed track hit positions.

Definition at line 105 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH2D* trk::KalmanTrackAna::fZvY
private

Z vs Y of track hit positions.

Definition at line 108 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().

TH2D* trk::KalmanTrackAna::fZvYReco
private

Z vs Y of reconstructed track hit positions.

Definition at line 106 of file KalmanTrackAna_module.cc.

Referenced by analyze(), and beginJob().


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