Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
srcs
sbnana
sbnanalysis
ana
SBNOscReco
Histograms
CosmicHisto.cc
Go to the documentation of this file.
1
#include "
CosmicHisto.h
"
2
3
#include "TH1D.h"
4
#include "TH2D.h"
5
6
namespace
ana
{
7
namespace
SBNOsc {
8
9
void
CosmicHistos::Initialize
(
const
std::string &postfix,
const
geo::BoxBoundedGeo
&detector_volume) {
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
}
21
22
void
CosmicHistos::Fill
(
const
std::map<size_t, numu::TrueParticle> &true_particles) {
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
}
36
37
}
// namespace SBNOsc
38
}
// namespace ana
39
numu::TrueParticle::start_momentum
TVector3 start_momentum
Particle directional momentum for first trajectory point inside TPC AV [GeV].
Definition:
TrueParticle.h:24
numu::TrueParticle
Definition:
TrueParticle.h:23
numu::TrueParticle::is_cosmic
bool is_cosmic
Whether this particle is of cosmic origin.
Definition:
TrueParticle.h:45
ana::SBNOsc::CosmicHistos::enter_time
TH1D * enter_time
Definition:
CosmicHisto.h:27
ana::SBNOsc::CosmicHistos::momentum
TH1D * momentum
Definition:
CosmicHisto.h:26
geo::BoxBoundedGeo::MinX
double MinX() const
Returns the world x coordinate of the start of the box.
Definition:
BoxBoundedGeo.h:88
geo::BoxBoundedGeo::MaxX
double MaxX() const
Returns the world x coordinate of the end of the box.
Definition:
BoxBoundedGeo.h:91
ana
process_name opflashCryoW ana
Definition:
stage0_icarus_light_only.fcl:60
numu::TrueParticle::start
TVector3 start
start position of track
Definition:
TrueParticle.h:30
ana::SBNOsc::CosmicHistos::enter_time_zoom
TH1D * enter_time_zoom
Definition:
CosmicHisto.h:28
abs
T abs(T value)
Definition:
sparse_vector_test.cc:30
CosmicHisto.h
ana::SBNOsc::CosmicHistos::enter_z
TH1D * enter_z
Definition:
CosmicHisto.h:31
geo::BoxBoundedGeo::MinZ
double MinZ() const
Returns the world z coordinate of the start of the box.
Definition:
BoxBoundedGeo.h:118
ana::SBNOsc::CosmicHistos::Fill
void Fill(const std::map< size_t, numu::TrueParticle > &true_particles)
Definition:
CosmicHisto.cc:22
geo::BoxBoundedGeo::MaxY
double MaxY() const
Returns the world y coordinate of the end of the box.
Definition:
BoxBoundedGeo.h:106
ana::SBNOsc::CosmicHistos::Initialize
void Initialize(const std::string &prefix, const geo::BoxBoundedGeo &detector_volume)
Definition:
CosmicHisto.cc:9
geo::BoxBoundedGeo
A base class aware of world box coordinatesAn object describing a simple shape can inherit from this ...
Definition:
BoxBoundedGeo.h:33
numu::TrueParticle::pdgid
int pdgid
Particle ID code.
Definition:
TrueParticle.h:43
geo::BoxBoundedGeo::MaxZ
double MaxZ() const
Returns the world z coordinate of the end of the box.
Definition:
BoxBoundedGeo.h:121
ana::SBNOsc::CosmicHistos::enter_y
TH1D * enter_y
Definition:
CosmicHisto.h:29
ana::SBNOsc::CosmicHistos::enter_x
TH1D * enter_x
Definition:
CosmicHisto.h:30
COSMIC_HISTO
#define COSMIC_HISTO(name, n_bins, lo, hi)
geo::BoxBoundedGeo::MinY
double MinY() const
Returns the world y coordinate of the start of the box.
Definition:
BoxBoundedGeo.h:103
numu::TrueParticle::start_time
float start_time
start time of track
Definition:
TrueParticle.h:32
Generated by
1.8.5