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

Flat encoding of SRTruth. More...

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

Public Member Functions

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

Protected Attributes

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

Detailed Description

Flat encoding of SRTruth.

Definition at line 23 of file FlatTruth.h.

Constructor & Destructor Documentation

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

Definition at line 1629 of file FlatRecord.cxx.

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

1630  : p(prefix+"p.", tr, policy),
1631  vtx(prefix+"vtx.", tr, policy),
1632  michel_tree(make_tree(prefix+"michel", "michel", tr)),
1633  michel((prefix+"michel."), michel_tree, policy),
1634  michel_idx(0), michel_length(0)
1635 {
1636  branch(tr, prefix+"pdg", &pdg, policy);
1637  branch(tr, prefix+"E", &E, policy);
1638  branch(tr, prefix+"visE", &visE, policy);
1639  branch(tr, prefix+"visEinslc", &visEinslc, policy);
1640  branch(tr, prefix+"eff", &eff, policy);
1641  branch(tr, prefix+"pur", &pur, policy);
1642  branch(tr, prefix+"nhitslc", &nhitslc, policy);
1643  branch(tr, prefix+"nhittot", &nhittot, policy);
1644  branch(tr, prefix+"time", &time, policy);
1645  if(michel_tree->GetNbranches() > 0){
1646  branch(tr, prefix+"michel_idx", &michel_idx, 0);
1647  branch(tr, prefix+"michel_length", &michel_length, 0);
1648  }
1649 }
short int pdg
Definition: FlatTruth.h:32
float visEinslc
Definition: FlatTruth.h:35
TTree * michel_tree
Definition: FlatTruth.h:45
const XML_Char * prefix
Definition: expat.h:380
FlatLorentzVector p
Definition: FlatTruth.h:42
FlatTrueMichelE michel
Definition: FlatTruth.h:46
unsigned int nhittot
Definition: FlatTruth.h:39
unsigned int nhitslc
Definition: FlatTruth.h:38
FlatVector3D vtx
Definition: FlatTruth.h:43
flat::FlatTruth::~FlatTruth ( )

Definition at line 1651 of file FlatRecord.cxx.

References michel_tree.

1652 {
1653  if(michel_tree->GetNbranches() > 0) michel_tree->Write();
1654  delete michel_tree;
1655 }
TTree * michel_tree
Definition: FlatTruth.h:45

Member Function Documentation

void flat::FlatTruth::Fill ( const caf::SRTruth sr)

Definition at line 1657 of file FlatRecord.cxx.

References caf::SRTruth::E, E, caf::SRTruth::eff, eff, flat::FlatVector3D::Fill(), flat::FlatTrueMichelE::Fill(), caf::SRTruth::michel, michel, michel_idx, michel_length, michel_tree, caf::SRTruth::nhitslc, nhitslc, caf::SRTruth::nhittot, nhittot, caf::SRTruth::p, caf::SRTruth::pdg, pdg, caf::SRTruth::pur, pur, caf::SRTruth::time, caf::SRTruth::visE, visE, caf::SRTruth::visEinslc, visEinslc, caf::SRTruth::vtx, vtx, and submit_syst::x.

1658 {
1659  pdg = sr.pdg;
1660  E = sr.E;
1661  visE = sr.visE;
1662  visEinslc = sr.visEinslc;
1663  eff = sr.eff;
1664  pur = sr.pur;
1665  nhitslc = sr.nhitslc;
1666  nhittot = sr.nhittot;
1667  time = sr.time;
1668 
1669  p.Fill(sr.p);
1670  vtx.Fill(sr.vtx);
1671 
1672  michel_idx += michel_length; // increment taken by previous record
1673  michel_length = sr.michel.size();
1674  for(const auto& x: sr.michel){
1675  michel.Fill(x);
1676  michel_tree->Fill();
1677  }
1678 }
void Fill(const caf::SRVector3D &sr)
const char * p
Definition: xmltok.h:285
short int pdg
Definition: FlatTruth.h:32
SRVector3D vtx
Vertex position in detector coordinates [cm].
Definition: SRTruth.h:35
float E
True energy [GeV].
Definition: SRTruth.h:24
float visEinslc
Definition: FlatTruth.h:35
float eff
Slicer efficiency for this truth interaction.
Definition: SRTruth.h:27
unsigned int nhitslc
Number of hits recorded in this slice by this truth interaction.
Definition: SRTruth.h:29
std::vector< SRTrueMichelE > michel
Vector of true Michel electrons.
Definition: SRTruth.h:37
float visE
Sum of FLS hits that made CellHits from this neutrino [GeV].
Definition: SRTruth.h:25
float visEinslc
Sum of FLS hits that made CellHits from this neutrino in this subevent [GeV].
Definition: SRTruth.h:26
unsigned int nhittot
Total number of hits recorded for this truth interaction.
Definition: SRTruth.h:30
TTree * michel_tree
Definition: FlatTruth.h:45
float pur
Slicer purity for this truth interaction.
Definition: SRTruth.h:28
FlatTrueMichelE michel
Definition: FlatTruth.h:46
unsigned int nhittot
Definition: FlatTruth.h:39
unsigned int nhitslc
Definition: FlatTruth.h:38
FlatVector3D vtx
Definition: FlatTruth.h:43
short pdg
pdg code
Definition: SRTruth.h:21
void Fill(const caf::SRTrueMichelE &sr)
float time
interaction time.
Definition: SRTruth.h:33
SRLorentzVector p
True momentum [GeV].
Definition: SRTruth.h:34

Member Data Documentation

float flat::FlatTruth::E
protected

Definition at line 33 of file FlatTruth.h.

Referenced by Fill(), and FlatTruth().

float flat::FlatTruth::eff
protected

Definition at line 36 of file FlatTruth.h.

Referenced by Fill(), and FlatTruth().

FlatTrueMichelE flat::FlatTruth::michel
protected

Definition at line 46 of file FlatTruth.h.

Referenced by Fill().

long flat::FlatTruth::michel_idx
protected

Definition at line 47 of file FlatTruth.h.

Referenced by Fill(), and FlatTruth().

int flat::FlatTruth::michel_length
protected

Definition at line 48 of file FlatTruth.h.

Referenced by Fill(), and FlatTruth().

TTree* flat::FlatTruth::michel_tree
protected

Definition at line 45 of file FlatTruth.h.

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

unsigned int flat::FlatTruth::nhitslc
protected

Definition at line 38 of file FlatTruth.h.

Referenced by Fill(), and FlatTruth().

unsigned int flat::FlatTruth::nhittot
protected

Definition at line 39 of file FlatTruth.h.

Referenced by Fill(), and FlatTruth().

FlatLorentzVector flat::FlatTruth::p
protected

Definition at line 42 of file FlatTruth.h.

short int flat::FlatTruth::pdg
protected

Definition at line 32 of file FlatTruth.h.

Referenced by Fill(), and FlatTruth().

float flat::FlatTruth::pur
protected

Definition at line 37 of file FlatTruth.h.

Referenced by Fill(), and FlatTruth().

float flat::FlatTruth::time
protected

Definition at line 40 of file FlatTruth.h.

float flat::FlatTruth::visE
protected

Definition at line 34 of file FlatTruth.h.

Referenced by Fill(), and FlatTruth().

float flat::FlatTruth::visEinslc
protected

Definition at line 35 of file FlatTruth.h.

Referenced by Fill(), and FlatTruth().

FlatVector3D flat::FlatTruth::vtx
protected

Definition at line 43 of file FlatTruth.h.

Referenced by Fill().


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