All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
ana::SBNOsc::CosmicHistos Struct Reference

#include <CosmicHisto.h>

Inheritance diagram for ana::SBNOsc::CosmicHistos:
ana::SBNOsc::HistoList

Public Member Functions

void Initialize (const std::string &prefix, const geo::BoxBoundedGeo &detector_volume)
 
void Fill (const std::map< size_t, numu::TrueParticle > &true_particles)
 
- Public Member Functions inherited from ana::SBNOsc::HistoList
void Scale (double scale)
 
void Add (const HistoList &other)
 
void Write ()
 
void StoreHisto (TH1 *histo)
 
void Merge (const HistoList &merge)
 

Public Attributes

TH1D * momentum
 
TH1D * enter_time
 
TH1D * enter_time_zoom
 
TH1D * enter_y
 
TH1D * enter_x
 
TH1D * enter_z
 
- Public Attributes inherited from ana::SBNOsc::HistoList
std::vector< TH1 * > fAllHistos
 
std::vector< TDirectory * > fLocations
 

Detailed Description

Histograms associated with neutrino interactions. Filled for the list of all true and reco vertices. These histograms are constructed per interaction mode per cut.

Definition at line 24 of file CosmicHisto.h.

Member Function Documentation

void ana::SBNOsc::CosmicHistos::Fill ( const std::map< size_t, numu::TrueParticle > &  true_particles)

Fill the histograms with all cosmic muons in a single event

Parameters
true_particlesThe map of true particles in the event

Definition at line 22 of file CosmicHisto.cc.

22  {
23  for (const auto &pair: true_particles) {
24  const numu::TrueParticle &particle = pair.second;
25  // only plot cosmic muons
26  if (particle.is_cosmic && abs(particle.pdgid) == 13) {
27  enter_time->Fill(particle.start_time);
28  enter_time_zoom->Fill(particle.start_time);
29  enter_x->Fill(particle.start.X());
30  enter_y->Fill(particle.start.Y());
31  enter_z->Fill(particle.start.Z());
32  momentum->Fill(particle.start_momentum.Mag());
33  }
34  }
35 }
TVector3 start_momentum
Particle directional momentum for first trajectory point inside TPC AV [GeV].
Definition: TrueParticle.h:24
bool is_cosmic
Whether this particle is of cosmic origin.
Definition: TrueParticle.h:45
TVector3 start
start position of track
Definition: TrueParticle.h:30
T abs(T value)
int pdgid
Particle ID code.
Definition: TrueParticle.h:43
float start_time
start time of track
Definition: TrueParticle.h:32
void ana::SBNOsc::CosmicHistos::Initialize ( const std::string &  prefix,
const geo::BoxBoundedGeo detector_volume 
)

Intialize the histograms

Parameters
prefixA prefix to be added to each histogram name

Definition at line 9 of file CosmicHisto.cc.

9  {
10 #define COSMIC_HISTO(name, n_bins, lo, hi) name = new TH1D((#name + postfix).c_str(), #name, n_bins, lo, hi); StoreHisto(name)
11 
12  COSMIC_HISTO(enter_time, 600, -3000., 3000.);
13  COSMIC_HISTO(enter_time_zoom, 300, -20., 10.);
14  COSMIC_HISTO(enter_x, 400, detector_volume.MinX(), detector_volume.MaxX());
15  COSMIC_HISTO(enter_y, 400, detector_volume.MinY(), detector_volume.MaxY());
16  COSMIC_HISTO(enter_z, 500, detector_volume.MinZ(), detector_volume.MaxZ());
17  COSMIC_HISTO(momentum, 100, 0., 5.);
18 
19 #undef COSMIC_HISTO
20 }
double MinX() const
Returns the world x coordinate of the start of the box.
Definition: BoxBoundedGeo.h:88
double MaxX() const
Returns the world x coordinate of the end of the box.
Definition: BoxBoundedGeo.h:91
double MinZ() const
Returns the world z coordinate of the start of the box.
double MaxY() const
Returns the world y coordinate of the end of the box.
double MaxZ() const
Returns the world z coordinate of the end of the box.
#define COSMIC_HISTO(name, n_bins, lo, hi)
double MinY() const
Returns the world y coordinate of the start of the box.

Member Data Documentation

TH1D* ana::SBNOsc::CosmicHistos::enter_time

Definition at line 27 of file CosmicHisto.h.

TH1D* ana::SBNOsc::CosmicHistos::enter_time_zoom

Definition at line 28 of file CosmicHisto.h.

TH1D* ana::SBNOsc::CosmicHistos::enter_x

Definition at line 30 of file CosmicHisto.h.

TH1D* ana::SBNOsc::CosmicHistos::enter_y

Definition at line 29 of file CosmicHisto.h.

TH1D* ana::SBNOsc::CosmicHistos::enter_z

Definition at line 31 of file CosmicHisto.h.

TH1D* ana::SBNOsc::CosmicHistos::momentum

Definition at line 26 of file CosmicHisto.h.


The documentation for this struct was generated from the following files: