Public Member Functions | Protected Attributes | List of all members
flat::FlatCosmic Class Reference

Flat encoding of SRCosmic. More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-28/FlatMaker/FlatCosmic.h"

Public Member Functions

 FlatCosmic (const std::string &prefix, TTree *tr, const IBranchPolicy *policy)
 
 ~FlatCosmic ()
 
void Fill (const caf::SRCosmic &sr)
 

Protected Attributes

short int pdg
 
float E
 
float visE
 
float visEinslc
 
float eff
 
float pur
 
unsigned int nhitslc
 
unsigned int nhittot
 
float time
 
float azimuth
 
float zenith
 
FlatLorentzVector p
 
FlatLorentzVector penter
 
FlatVector3D vtx
 
FlatVector3D enter
 
FlatVector3D exit
 
FlatVector3D stop
 
TTree * michel_tree
 
FlatTrueMichelE michel
 
long michel_idx
 
int michel_length
 

Detailed Description

Flat encoding of SRCosmic.

Definition at line 23 of file FlatCosmic.h.

Constructor & Destructor Documentation

flat::FlatCosmic::FlatCosmic ( const std::string prefix,
TTree *  tr,
const IBranchPolicy policy 
)

Definition at line 1564 of file FlatRecord.cxx.

References azimuth, compare_h5_caf::branch, E, eff, michel_idx, michel_length, michel_tree, nhitslc, nhittot, pdg, pur, visE, visEinslc, and zenith.

1565  : p(prefix+"p.", tr, policy),
1566  penter(prefix+"penter.", tr, policy),
1567  vtx(prefix+"vtx.", tr, policy),
1568  enter(prefix+"enter.", tr, policy),
1569  exit(prefix+"exit.", tr, policy),
1570  stop(prefix+"stop.", tr, policy),
1571  michel_tree(make_tree(prefix+"michel", "michel", tr)),
1572  michel((prefix+"michel."), michel_tree, policy),
1573  michel_idx(0), michel_length(0)
1574 {
1575  branch(tr, prefix+"pdg", &pdg, policy);
1576  branch(tr, prefix+"E", &E, policy);
1577  branch(tr, prefix+"visE", &visE, policy);
1578  branch(tr, prefix+"visEinslc", &visEinslc, policy);
1579  branch(tr, prefix+"eff", &eff, policy);
1580  branch(tr, prefix+"pur", &pur, policy);
1581  branch(tr, prefix+"nhitslc", &nhitslc, policy);
1582  branch(tr, prefix+"nhittot", &nhittot, policy);
1583  branch(tr, prefix+"time", &time, policy);
1584  branch(tr, prefix+"azimuth", &azimuth, policy);
1585  branch(tr, prefix+"zenith", &zenith, policy);
1586  if(michel_tree->GetNbranches() > 0){
1587  branch(tr, prefix+"michel_idx", &michel_idx, 0);
1588  branch(tr, prefix+"michel_length", &michel_length, 0);
1589  }
1590 }
FlatVector3D vtx
Definition: FlatCosmic.h:46
short int pdg
Definition: FlatCosmic.h:32
FlatLorentzVector penter
Definition: FlatCosmic.h:45
TTree * michel_tree
Definition: FlatCosmic.h:51
FlatTrueMichelE michel
Definition: FlatCosmic.h:52
FlatLorentzVector p
Definition: FlatCosmic.h:44
const XML_Char * prefix
Definition: expat.h:380
unsigned int nhittot
Definition: FlatCosmic.h:39
FlatVector3D enter
Definition: FlatCosmic.h:47
unsigned int nhitslc
Definition: FlatCosmic.h:38
FlatVector3D exit
Definition: FlatCosmic.h:48
FlatVector3D stop
Definition: FlatCosmic.h:49
flat::FlatCosmic::~FlatCosmic ( )

Definition at line 1592 of file FlatRecord.cxx.

References michel_tree.

1593 {
1594  if(michel_tree->GetNbranches() > 0) michel_tree->Write();
1595  delete michel_tree;
1596 }
TTree * michel_tree
Definition: FlatCosmic.h:51

Member Function Documentation

void flat::FlatCosmic::Fill ( const caf::SRCosmic sr)

Definition at line 1598 of file FlatRecord.cxx.

References caf::SRCosmic::azimuth, azimuth, caf::SRCosmic::E, E, caf::SRCosmic::eff, eff, caf::SRCosmic::enter, enter, caf::SRCosmic::exit, exit, flat::FlatVector3D::Fill(), flat::FlatLorentzVector::Fill(), flat::FlatTrueMichelE::Fill(), caf::SRCosmic::michel, michel, michel_idx, michel_length, michel_tree, caf::SRCosmic::nhitslc, nhitslc, caf::SRCosmic::nhittot, nhittot, caf::SRCosmic::p, caf::SRCosmic::pdg, pdg, caf::SRCosmic::penter, penter, caf::SRCosmic::pur, pur, caf::SRCosmic::stop, stop, caf::SRCosmic::time, caf::SRCosmic::visE, visE, caf::SRCosmic::visEinslc, visEinslc, caf::SRCosmic::vtx, vtx, submit_syst::x, caf::SRCosmic::zenith, and zenith.

Referenced by flat::FlatTruthBranch::Fill().

1599 {
1600  pdg = sr.pdg;
1601  E = sr.E;
1602  visE = sr.visE;
1603  visEinslc = sr.visEinslc;
1604  eff = sr.eff;
1605  pur = sr.pur;
1606  nhitslc = sr.nhitslc;
1607  nhittot = sr.nhittot;
1608  time = sr.time;
1609  azimuth = sr.azimuth;
1610  zenith = sr.zenith;
1611 
1612  p.Fill(sr.p);
1613  penter.Fill(sr.penter);
1614  vtx.Fill(sr.vtx);
1615  enter.Fill(sr.enter);
1616  exit.Fill(sr.exit);
1617  stop.Fill(sr.stop);
1618 
1619  michel_idx += michel_length; // increment taken by previous record
1620  michel_length = sr.michel.size();
1621  for(const auto& x: sr.michel){
1622  michel.Fill(x);
1623  michel_tree->Fill();
1624  }
1625 }
FlatVector3D vtx
Definition: FlatCosmic.h:46
SRVector3D enter
Cosmic entrance point in detector coordinates. [cm] When the primary doesn't enter the detector...
Definition: SRCosmic.h:40
short int pdg
Definition: FlatCosmic.h:32
FlatLorentzVector penter
Definition: FlatCosmic.h:45
void Fill(const caf::SRVector3D &sr)
float azimuth
Azimuth angle (w.r.t y-axis)
Definition: SRCosmic.h:38
TTree * michel_tree
Definition: FlatCosmic.h:51
const char * p
Definition: xmltok.h:285
SRLorentzVector p
True momentum [GeV].
Definition: SRCosmic.h:32
float visEinslc
Sum of FLS hits that made CellHits from this neutrino in this subevent [GeV].
Definition: SRCosmic.h:24
FlatTrueMichelE michel
Definition: FlatCosmic.h:52
float pur
Slicer purity for this truth interaction.
Definition: SRCosmic.h:26
SRVector3D vtx
Vertex position in detector coordinates [cm].
Definition: SRCosmic.h:34
float zenith
Zenith angle (w.r.t y-axis)
Definition: SRCosmic.h:39
SRVector3D stop
Cosmic end point in detector coordinates, regardless of whether it is inside or outside the detector...
Definition: SRCosmic.h:43
void Fill(const caf::SRLorentzVector &sr)
float E
True energy [GeV].
Definition: SRCosmic.h:22
float eff
Slicer efficiency for this truth interaction.
Definition: SRCosmic.h:25
SRVector3D exit
Cosmic exit point in detector coordinates. [cm] When the primary doesn't enter the detector...
Definition: SRCosmic.h:41
unsigned int nhitslc
Number of hits recorded in this slice by this truth interaction.
Definition: SRCosmic.h:27
float visE
Sum of FLS hits that made CellHits from this neutrino [GeV].
Definition: SRCosmic.h:23
std::vector< SRTrueMichelE > michel
Vector of true Michel electrons.
Definition: SRCosmic.h:36
short pdg
pdg code
Definition: SRCosmic.h:19
unsigned int nhittot
Definition: FlatCosmic.h:39
FlatVector3D enter
Definition: FlatCosmic.h:47
unsigned int nhitslc
Definition: FlatCosmic.h:38
SRLorentzVector penter
True momentum when entering the detector [GeV].
Definition: SRCosmic.h:33
FlatVector3D exit
Definition: FlatCosmic.h:48
FlatVector3D stop
Definition: FlatCosmic.h:49
void Fill(const caf::SRTrueMichelE &sr)
float time
interaction time.
Definition: SRCosmic.h:31
unsigned int nhittot
Total number of hits recorded for this truth interaction.
Definition: SRCosmic.h:28

Member Data Documentation

float flat::FlatCosmic::azimuth
protected

Definition at line 41 of file FlatCosmic.h.

Referenced by Fill(), and FlatCosmic().

float flat::FlatCosmic::E
protected

Definition at line 33 of file FlatCosmic.h.

Referenced by Fill(), and FlatCosmic().

float flat::FlatCosmic::eff
protected

Definition at line 36 of file FlatCosmic.h.

Referenced by Fill(), and FlatCosmic().

FlatVector3D flat::FlatCosmic::enter
protected

Definition at line 47 of file FlatCosmic.h.

Referenced by Fill().

FlatVector3D flat::FlatCosmic::exit
protected

Definition at line 48 of file FlatCosmic.h.

Referenced by Fill().

FlatTrueMichelE flat::FlatCosmic::michel
protected

Definition at line 52 of file FlatCosmic.h.

Referenced by Fill().

long flat::FlatCosmic::michel_idx
protected

Definition at line 53 of file FlatCosmic.h.

Referenced by Fill(), and FlatCosmic().

int flat::FlatCosmic::michel_length
protected

Definition at line 54 of file FlatCosmic.h.

Referenced by Fill(), and FlatCosmic().

TTree* flat::FlatCosmic::michel_tree
protected

Definition at line 51 of file FlatCosmic.h.

Referenced by Fill(), FlatCosmic(), and ~FlatCosmic().

unsigned int flat::FlatCosmic::nhitslc
protected

Definition at line 38 of file FlatCosmic.h.

Referenced by Fill(), and FlatCosmic().

unsigned int flat::FlatCosmic::nhittot
protected

Definition at line 39 of file FlatCosmic.h.

Referenced by Fill(), and FlatCosmic().

FlatLorentzVector flat::FlatCosmic::p
protected

Definition at line 44 of file FlatCosmic.h.

short int flat::FlatCosmic::pdg
protected

Definition at line 32 of file FlatCosmic.h.

Referenced by Fill(), and FlatCosmic().

FlatLorentzVector flat::FlatCosmic::penter
protected

Definition at line 45 of file FlatCosmic.h.

Referenced by Fill().

float flat::FlatCosmic::pur
protected

Definition at line 37 of file FlatCosmic.h.

Referenced by Fill(), and FlatCosmic().

FlatVector3D flat::FlatCosmic::stop
protected

Definition at line 49 of file FlatCosmic.h.

Referenced by Fill().

float flat::FlatCosmic::time
protected

Definition at line 40 of file FlatCosmic.h.

float flat::FlatCosmic::visE
protected

Definition at line 34 of file FlatCosmic.h.

Referenced by Fill(), and FlatCosmic().

float flat::FlatCosmic::visEinslc
protected

Definition at line 35 of file FlatCosmic.h.

Referenced by Fill(), and FlatCosmic().

FlatVector3D flat::FlatCosmic::vtx
protected

Definition at line 46 of file FlatCosmic.h.

Referenced by Fill().

float flat::FlatCosmic::zenith
protected

Definition at line 42 of file FlatCosmic.h.

Referenced by Fill(), and FlatCosmic().


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