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

Flat encoding of SRParticleTruth. More...

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

Public Member Functions

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

Protected Attributes

int pdg
 
int motherpdg
 
float eff
 
float pur
 
int trkID
 
float visE
 
float visEinslc
 
float daughterVisE
 
float daughterVisEinslc
 
float visEBirks
 
float visEinslcBirks
 
float daughterVisEBirks
 
float daughterVisEinslcBirks
 
short unsigned int processMax
 
float processParticleE
 
FlatLorentzVector p
 
FlatLorentzVector motherp
 
FlatVector3D start
 
TTree * motherlist_tree
 
int motherlist
 
long motherlist_idx
 
int motherlist_length
 
TTree * daughterlist_tree
 
int daughterlist
 
long daughterlist_idx
 
int daughterlist_length
 
TTree * daughterVisEnergies_tree
 
float daughterVisEnergies
 
long daughterVisEnergies_idx
 
int daughterVisEnergies_length
 
TTree * primNeutronE_tree
 
float primNeutronE
 
long primNeutronE_idx
 
int primNeutronE_length
 
TTree * primNeutronProcessE_tree
 
float primNeutronProcessE
 
long primNeutronProcessE_idx
 
int primNeutronProcessE_length
 

Detailed Description

Flat encoding of SRParticleTruth.

Definition at line 22 of file FlatParticleTruth.h.

Constructor & Destructor Documentation

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

Definition at line 4715 of file FlatRecord.cxx.

References compare_h5_caf::branch, daughterlist, daughterlist_idx, daughterlist_length, daughterlist_tree, daughterVisE, daughterVisEBirks, daughterVisEinslc, daughterVisEinslcBirks, daughterVisEnergies, daughterVisEnergies_idx, daughterVisEnergies_length, daughterVisEnergies_tree, eff, motherlist, motherlist_idx, motherlist_length, motherlist_tree, motherpdg, pdg, primNeutronE, primNeutronE_idx, primNeutronE_length, primNeutronE_tree, primNeutronProcessE, primNeutronProcessE_idx, primNeutronProcessE_length, primNeutronProcessE_tree, processMax, processParticleE, pur, trkID, visE, visEBirks, visEinslc, and visEinslcBirks.

4716  : p(prefix+"p.", tr, policy),
4717  motherp(prefix+"motherp.", tr, policy),
4718  start(prefix+"start.", tr, policy),
4719  motherlist_tree(make_tree(prefix+"motherlist", "motherlist", tr)),
4720  motherlist(0),
4722  daughterlist_tree(make_tree(prefix+"daughterlist", "daughterlist", tr)),
4723  daughterlist(0),
4725  daughterVisEnergies_tree(make_tree(prefix+"daughterVisEnergies", "daughterVisEnergies", tr)),
4728  primNeutronE_tree(make_tree(prefix+"primNeutronE", "primNeutronE", tr)),
4729  primNeutronE(0),
4731  primNeutronProcessE_tree(make_tree(prefix+"primNeutronProcessE", "primNeutronProcessE", tr)),
4734 {
4735  branch(tr, prefix+"pdg", &pdg, policy);
4736  branch(tr, prefix+"motherpdg", &motherpdg, policy);
4737  branch(tr, prefix+"eff", &eff, policy);
4738  branch(tr, prefix+"pur", &pur, policy);
4739  branch(tr, prefix+"trkID", &trkID, policy);
4740  branch(tr, prefix+"visE", &visE, policy);
4741  branch(tr, prefix+"visEinslc", &visEinslc, policy);
4742  branch(tr, prefix+"daughterVisE", &daughterVisE, policy);
4743  branch(tr, prefix+"daughterVisEinslc", &daughterVisEinslc, policy);
4744  branch(tr, prefix+"visEBirks", &visEBirks, policy);
4745  branch(tr, prefix+"visEinslcBirks", &visEinslcBirks, policy);
4746  branch(tr, prefix+"daughterVisEBirks", &daughterVisEBirks, policy);
4747  branch(tr, prefix+"daughterVisEinslcBirks", &daughterVisEinslcBirks, policy);
4748  branch(tr, prefix+"processMax", &processMax, policy);
4749  branch(tr, prefix+"processParticleE", &processParticleE, policy);
4750  branch(motherlist_tree, prefix+"motherlist", &motherlist, policy);
4751  if(motherlist_tree->GetNbranches() > 0){
4752  branch(tr, prefix+"motherlist_idx", &motherlist_idx, 0);
4753  branch(tr, prefix+"motherlist_length", &motherlist_length, 0);
4754  }
4755  branch(daughterlist_tree, prefix+"daughterlist", &daughterlist, policy);
4756  if(daughterlist_tree->GetNbranches() > 0){
4757  branch(tr, prefix+"daughterlist_idx", &daughterlist_idx, 0);
4758  branch(tr, prefix+"daughterlist_length", &daughterlist_length, 0);
4759  }
4760  branch(daughterVisEnergies_tree, prefix+"daughterVisEnergies", &daughterVisEnergies, policy);
4761  if(daughterVisEnergies_tree->GetNbranches() > 0){
4762  branch(tr, prefix+"daughterVisEnergies_idx", &daughterVisEnergies_idx, 0);
4763  branch(tr, prefix+"daughterVisEnergies_length", &daughterVisEnergies_length, 0);
4764  }
4765  branch(primNeutronE_tree, prefix+"primNeutronE", &primNeutronE, policy);
4766  if(primNeutronE_tree->GetNbranches() > 0){
4767  branch(tr, prefix+"primNeutronE_idx", &primNeutronE_idx, 0);
4768  branch(tr, prefix+"primNeutronE_length", &primNeutronE_length, 0);
4769  }
4770  branch(primNeutronProcessE_tree, prefix+"primNeutronProcessE", &primNeutronProcessE, policy);
4771  if(primNeutronProcessE_tree->GetNbranches() > 0){
4772  branch(tr, prefix+"primNeutronProcessE_idx", &primNeutronProcessE_idx, 0);
4773  branch(tr, prefix+"primNeutronProcessE_length", &primNeutronProcessE_length, 0);
4774  }
4775 }
FlatLorentzVector motherp
short unsigned int processMax
const XML_Char * prefix
Definition: expat.h:380
flat::FlatParticleTruth::~FlatParticleTruth ( )

Definition at line 4777 of file FlatRecord.cxx.

References daughterlist_tree, daughterVisEnergies_tree, motherlist_tree, primNeutronE_tree, and primNeutronProcessE_tree.

4778 {
4779  if(motherlist_tree->GetNbranches() > 0) motherlist_tree->Write();
4780  delete motherlist_tree;
4781  if(daughterlist_tree->GetNbranches() > 0) daughterlist_tree->Write();
4782  delete daughterlist_tree;
4783  if(daughterVisEnergies_tree->GetNbranches() > 0) daughterVisEnergies_tree->Write();
4784  delete daughterVisEnergies_tree;
4785  if(primNeutronE_tree->GetNbranches() > 0) primNeutronE_tree->Write();
4786  delete primNeutronE_tree;
4787  if(primNeutronProcessE_tree->GetNbranches() > 0) primNeutronProcessE_tree->Write();
4788  delete primNeutronProcessE_tree;
4789 }

Member Function Documentation

void flat::FlatParticleTruth::Fill ( const caf::SRParticleTruth sr)

Definition at line 4791 of file FlatRecord.cxx.

References caf::SRParticleTruth::daughterlist, daughterlist, daughterlist_idx, daughterlist_length, daughterlist_tree, daughterVisE, caf::SRParticleTruth::daughterVisE, daughterVisEBirks, caf::SRParticleTruth::daughterVisEBirks, daughterVisEinslc, caf::SRParticleTruth::daughterVisEinslc, daughterVisEinslcBirks, caf::SRParticleTruth::daughterVisEinslcBirks, caf::SRParticleTruth::daughterVisEnergies, daughterVisEnergies, daughterVisEnergies_idx, daughterVisEnergies_length, daughterVisEnergies_tree, caf::SRParticleTruth::eff, eff, flat::FlatLorentzVector::Fill(), flat::FlatVector3D::Fill(), caf::SRParticleTruth::motherlist, motherlist, motherlist_idx, motherlist_length, motherlist_tree, caf::SRParticleTruth::motherp, motherp, caf::SRParticleTruth::motherpdg, motherpdg, caf::SRParticleTruth::p, caf::SRParticleTruth::pdg, pdg, caf::SRParticleTruth::primNeutronE, primNeutronE, primNeutronE_idx, primNeutronE_length, primNeutronE_tree, caf::SRParticleTruth::primNeutronProcessE, primNeutronProcessE, primNeutronProcessE_idx, primNeutronProcessE_length, primNeutronProcessE_tree, processMax, caf::SRParticleTruth::processMax, processParticleE, caf::SRParticleTruth::processParticleE, caf::SRParticleTruth::pur, pur, caf::SRParticleTruth::start, start, caf::SRParticleTruth::trkID, trkID, visE, caf::SRParticleTruth::visE, visEBirks, caf::SRParticleTruth::visEBirks, visEinslc, caf::SRParticleTruth::visEinslc, visEinslcBirks, caf::SRParticleTruth::visEinslcBirks, and submit_syst::x.

Referenced by flat::FlatSlcME::Fill(), flat::FlatShower::Fill(), flat::FlatTrkME::Fill(), flat::FlatMRProperties::Fill(), flat::FlatShowerLID::Fill(), flat::FlatKalmanTrack::Fill(), flat::FlatTrack::Fill(), flat::FlatBpfTrack::Fill(), flat::FlatProng::Fill(), and flat::FlatFuzzyKProng::Fill().

4792 {
4793  pdg = sr.pdg;
4794  motherpdg = sr.motherpdg;
4795  eff = sr.eff;
4796  pur = sr.pur;
4797  trkID = sr.trkID;
4798  visE = sr.visE;
4799  visEinslc = sr.visEinslc;
4802  visEBirks = sr.visEBirks;
4806  processMax = sr.processMax;
4808 
4809  p.Fill(sr.p);
4810  motherp.Fill(sr.motherp);
4811  start.Fill(sr.start);
4812 
4813  motherlist_idx += motherlist_length; // increment taken by previous record
4814  motherlist_length = sr.motherlist.size();
4815  for(const auto& x: sr.motherlist){
4816  motherlist = x;
4817  motherlist_tree->Fill();
4818  }
4819 
4820  daughterlist_idx += daughterlist_length; // increment taken by previous record
4821  daughterlist_length = sr.daughterlist.size();
4822  for(const auto& x: sr.daughterlist){
4823  daughterlist = x;
4824  daughterlist_tree->Fill();
4825  }
4826 
4827  daughterVisEnergies_idx += daughterVisEnergies_length; // increment taken by previous record
4829  for(const auto& x: sr.daughterVisEnergies){
4831  daughterVisEnergies_tree->Fill();
4832  }
4833 
4834  primNeutronE_idx += primNeutronE_length; // increment taken by previous record
4835  primNeutronE_length = sr.primNeutronE.size();
4836  for(const auto& x: sr.primNeutronE){
4837  primNeutronE = x;
4838  primNeutronE_tree->Fill();
4839  }
4840 
4841  primNeutronProcessE_idx += primNeutronProcessE_length; // increment taken by previous record
4843  for(const auto& x: sr.primNeutronProcessE){
4845  primNeutronProcessE_tree->Fill();
4846  }
4847 }
float daughterVisE
Visible Energy in detector for all daughters of this particle, all summed FLSHits that made CellHits ...
std::vector< float > daughterVisEnergies
Energy of each particle contributing to the prong.
void Fill(const caf::SRVector3D &sr)
SRLorentzVector p
True energy 4-vector of the best matched particle.
const char * p
Definition: xmltok.h:285
float eff
True deposited energy collection efficiency for the best matched particle relative to the slice...
float daughterVisEinslcBirks
Visible Energy in detector for all daughters of this particle, slice summed FLSHits that made CellHit...
float daughterVisEBirks
Visible Energy in detector for all daughters of this particle, all summed FLSHits that made CellHits ...
FlatLorentzVector motherp
void Fill(const caf::SRLorentzVector &sr)
float visEinslc
Visible Energy in detector, slice summed FLSHits that made CellHits [GeV].
float visE
Visible Energy in detector, all summed FLSHits that made CellHits [GeV].
float visEinslcBirks
Visible Energy in detector, slice summed FLSHits that made CellHits [GeV] with birks suppression...
int pdg
PDG Code of the best matched truth particle.
int motherpdg
PDG Code of the mother of the best matched truth particle.
short unsigned int processMax
float pur
True deposited energy purity for the best matched particle.
float visEBirks
Visible Energy in detector, all summed FLSHits that made CellHits [GeV] with birks suppression...
std::vector< float > primNeutronProcessE
std::vector< int > motherlist
gen_process_t processMax
The process conributing the most the prong.
std::vector< int > daughterlist
float processParticleE
Energy of the particle causing the process that contirbuted the most.
int trkID
GEANT trackId for particle.
float daughterVisEinslc
Visible Energy in detector for all daughters of this particle, slice summed FLSHits that made CellHit...
SRLorentzVector motherp
True energy 4-vector of the mother particle.
std::vector< float > primNeutronE
Energy of the primary neutron that is linked to the prong, if one exists.

Member Data Documentation

int flat::FlatParticleTruth::daughterlist
protected

Definition at line 57 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

long flat::FlatParticleTruth::daughterlist_idx
protected

Definition at line 58 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

int flat::FlatParticleTruth::daughterlist_length
protected

Definition at line 59 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

TTree* flat::FlatParticleTruth::daughterlist_tree
protected

Definition at line 56 of file FlatParticleTruth.h.

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

float flat::FlatParticleTruth::daughterVisE
protected

Definition at line 38 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

float flat::FlatParticleTruth::daughterVisEBirks
protected

Definition at line 42 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

float flat::FlatParticleTruth::daughterVisEinslc
protected

Definition at line 39 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

float flat::FlatParticleTruth::daughterVisEinslcBirks
protected

Definition at line 43 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

float flat::FlatParticleTruth::daughterVisEnergies
protected

Definition at line 62 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

long flat::FlatParticleTruth::daughterVisEnergies_idx
protected

Definition at line 63 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

int flat::FlatParticleTruth::daughterVisEnergies_length
protected

Definition at line 64 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

TTree* flat::FlatParticleTruth::daughterVisEnergies_tree
protected

Definition at line 61 of file FlatParticleTruth.h.

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

float flat::FlatParticleTruth::eff
protected

Definition at line 33 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

int flat::FlatParticleTruth::motherlist
protected

Definition at line 52 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

long flat::FlatParticleTruth::motherlist_idx
protected

Definition at line 53 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

int flat::FlatParticleTruth::motherlist_length
protected

Definition at line 54 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

TTree* flat::FlatParticleTruth::motherlist_tree
protected

Definition at line 51 of file FlatParticleTruth.h.

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

FlatLorentzVector flat::FlatParticleTruth::motherp
protected

Definition at line 48 of file FlatParticleTruth.h.

Referenced by Fill().

int flat::FlatParticleTruth::motherpdg
protected

Definition at line 32 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

FlatLorentzVector flat::FlatParticleTruth::p
protected

Definition at line 47 of file FlatParticleTruth.h.

int flat::FlatParticleTruth::pdg
protected

Definition at line 31 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

float flat::FlatParticleTruth::primNeutronE
protected

Definition at line 67 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

long flat::FlatParticleTruth::primNeutronE_idx
protected

Definition at line 68 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

int flat::FlatParticleTruth::primNeutronE_length
protected

Definition at line 69 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

TTree* flat::FlatParticleTruth::primNeutronE_tree
protected

Definition at line 66 of file FlatParticleTruth.h.

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

float flat::FlatParticleTruth::primNeutronProcessE
protected

Definition at line 72 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

long flat::FlatParticleTruth::primNeutronProcessE_idx
protected

Definition at line 73 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

int flat::FlatParticleTruth::primNeutronProcessE_length
protected

Definition at line 74 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

TTree* flat::FlatParticleTruth::primNeutronProcessE_tree
protected

Definition at line 71 of file FlatParticleTruth.h.

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

short unsigned int flat::FlatParticleTruth::processMax
protected

Definition at line 44 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

float flat::FlatParticleTruth::processParticleE
protected

Definition at line 45 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

float flat::FlatParticleTruth::pur
protected

Definition at line 34 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

FlatVector3D flat::FlatParticleTruth::start
protected
int flat::FlatParticleTruth::trkID
protected

Definition at line 35 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

float flat::FlatParticleTruth::visE
protected

Definition at line 36 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

float flat::FlatParticleTruth::visEBirks
protected

Definition at line 40 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

float flat::FlatParticleTruth::visEinslc
protected

Definition at line 37 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().

float flat::FlatParticleTruth::visEinslcBirks
protected

Definition at line 41 of file FlatParticleTruth.h.

Referenced by Fill(), and FlatParticleTruth().


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