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

#include <CRTHisto.h>

Inheritance diagram for ana::SBNOsc::CRTHistos:
ana::SBNOsc::HistoList

Public Member Functions

void Initialize (const std::string &postfix, const std::vector< double > &tagger_volume)
 
void Fill (const numu::CRTHit &hit)
 
void Fill (const sbn::crt::CRTHit &hit)
 
void Get (TFile &f, const std::string &postfix)
 
- 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

TH2D * crt_hits_xy
 
TH2D * crt_hits_xz
 
TH2D * crt_hits_yz
 
- Public Attributes inherited from ana::SBNOsc::HistoList
std::vector< TH1 * > fAllHistos
 
std::vector< TDirectory * > fLocations
 

Detailed Description

Histograms to be filled per track

Definition at line 23 of file CRTHisto.h.

Member Function Documentation

void ana::SBNOsc::CRTHistos::Fill ( const numu::CRTHit hit)

Fill all of the histograms in this class with a track

Parameters
trackThe track to fill
true_tracksThe list of true particles in this event

Definition at line 24 of file CRTHisto.cc.

24  {
25  crt_hits_xy->Fill(hit.location.X(), hit.location.Y());
26  crt_hits_xz->Fill(hit.location.X(), hit.location.Z());
27  crt_hits_yz->Fill(hit.location.Y(), hit.location.Z());
28 }
TVector3 location
Location of the hit.
Definition: DetInfo.h:16
void ana::SBNOsc::CRTHistos::Fill ( const sbn::crt::CRTHit hit)

Definition at line 31 of file CRTHisto.cc.

31  {
32  crt_hits_xy->Fill(hit.x_pos, hit.y_pos);
33  crt_hits_xz->Fill(hit.x_pos, hit.z_pos);
34  crt_hits_yz->Fill(hit.y_pos, hit.z_pos);
35 }
float z_pos
position in z-direction (cm).
Definition: CRTHit.hh:42
float y_pos
position in y-direction (cm).
Definition: CRTHit.hh:40
float x_pos
position in x-direction (cm).
Definition: CRTHit.hh:38
void ana::SBNOsc::CRTHistos::Get ( TFile &  f,
const std::string &  postfix 
)

Definition at line 16 of file CRTHisto.cc.

16  {
17 #define GET_CRT_HISTO2D(name, postfix) name = (TH2D *) f.Get((#name + postfix).c_str()); StoreHisto(name);
18  GET_CRT_HISTO2D(crt_hits_xy, postfix);
19  GET_CRT_HISTO2D(crt_hits_xz, postfix);
20  GET_CRT_HISTO2D(crt_hits_yz, postfix);
21 #undef GET_CRT_HISTO2D
22 }
#define GET_CRT_HISTO2D(name, postfix)
void ana::SBNOsc::CRTHistos::Initialize ( const std::string &  postfix,
const std::vector< double > &  tagger_volume 
)

Initialize this set of histograms

Parameters
postfixThe postfix to add to all histogram names

Definition at line 6 of file CRTHisto.cc.

6  {
7 #define CRT_HISTO2D(name, binx, lo_x, hi_x, biny, lo_y, hi_y) name = new TH2D((#name + postfix).c_str(), #name, binx, lo_x, hi_x, biny, lo_y, hi_y); StoreHisto(name)
8 
9  unsigned n_bins = 200;
10  CRT_HISTO2D(crt_hits_xy, n_bins, tagger_volume[0], tagger_volume[3], n_bins, tagger_volume[1], tagger_volume[4]);
11  CRT_HISTO2D(crt_hits_xz, n_bins, tagger_volume[0], tagger_volume[3], n_bins, tagger_volume[2], tagger_volume[5]);
12  CRT_HISTO2D(crt_hits_yz, n_bins, tagger_volume[1], tagger_volume[4], n_bins, tagger_volume[2], tagger_volume[5]);
13 #undef CRT_HISTO2D
14 }
#define CRT_HISTO2D(name, binx, lo_x, hi_x, biny, lo_y, hi_y)

Member Data Documentation

TH2D* ana::SBNOsc::CRTHistos::crt_hits_xy

Definition at line 42 of file CRTHisto.h.

TH2D* ana::SBNOsc::CRTHistos::crt_hits_xz

Definition at line 43 of file CRTHisto.h.

TH2D* ana::SBNOsc::CRTHistos::crt_hits_yz

Definition at line 44 of file CRTHisto.h.


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