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

Flat encoding of SRMCReweight. More...

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

Public Member Functions

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

Protected Attributes

FlatFluxWeights ppfx
 
FlatGeant4Weights geant4
 
TTree * genie_tree
 
FlatGenieWeights genie
 
long genie_idx
 
int genie_length
 

Detailed Description

Flat encoding of SRMCReweight.

Definition at line 23 of file FlatMCReweight.h.

Constructor & Destructor Documentation

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

Definition at line 1186 of file FlatRecord.cxx.

References compare_h5_caf::branch, genie_idx, genie_length, and genie_tree.

1187  : ppfx(prefix+"ppfx.", tr, policy),
1188  geant4(prefix+"geant4.", tr, policy),
1189  genie_tree(make_tree(prefix+"genie", "genie", tr)),
1190  genie((prefix+"genie."), genie_tree, policy),
1191  genie_idx(0), genie_length(0)
1192 {
1193  if(genie_tree->GetNbranches() > 0){
1194  branch(tr, prefix+"genie_idx", &genie_idx, 0);
1195  branch(tr, prefix+"genie_length", &genie_length, 0);
1196  }
1197 }
FlatGenieWeights genie
const XML_Char * prefix
Definition: expat.h:380
FlatGeant4Weights geant4
FlatFluxWeights ppfx
flat::FlatMCReweight::~FlatMCReweight ( )

Definition at line 1199 of file FlatRecord.cxx.

References genie_tree.

1200 {
1201  if(genie_tree->GetNbranches() > 0) genie_tree->Write();
1202  delete genie_tree;
1203 }

Member Function Documentation

void flat::FlatMCReweight::Fill ( const caf::SRMCReweight sr)

Definition at line 1205 of file FlatRecord.cxx.

References flat::FlatFluxWeights::Fill(), flat::FlatGeant4Weights::Fill(), caf::SRMCReweight::geant4, geant4, caf::SRMCReweight::genie, genie_idx, genie_length, genie_tree, caf::SRMCReweight::ppfx, ppfx, and submit_syst::x.

1206 {
1207  ppfx.Fill(sr.ppfx);
1208  geant4.Fill(sr.geant4);
1209 
1210  genie_idx += genie_length; // increment taken by previous record
1211  genie_length = sr.genie.size();
1212  for(const auto& x: sr.genie){
1213  genie.Fill(x);
1214  genie_tree->Fill();
1215  }
1216 }
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
void Fill(const caf::SRFluxWeights &sr)
SRGeant4Weights geant4
GEANT4 weights.
Definition: SRMCReweight.h:25
FlatGeant4Weights geant4
FlatFluxWeights ppfx
std::vector< SRGenieWeights > genie
GENIE weights.
Definition: SRMCReweight.h:23
void Fill(const caf::SRGeant4Weights &sr)
SRFluxWeights ppfx
ppfx weights
Definition: SRMCReweight.h:24

Member Data Documentation

FlatGeant4Weights flat::FlatMCReweight::geant4
protected

Definition at line 33 of file FlatMCReweight.h.

Referenced by Fill().

FlatGenieWeights flat::FlatMCReweight::genie
protected

Definition at line 36 of file FlatMCReweight.h.

long flat::FlatMCReweight::genie_idx
protected

Definition at line 37 of file FlatMCReweight.h.

Referenced by Fill(), and FlatMCReweight().

int flat::FlatMCReweight::genie_length
protected

Definition at line 38 of file FlatMCReweight.h.

Referenced by Fill(), and FlatMCReweight().

TTree* flat::FlatMCReweight::genie_tree
protected

Definition at line 35 of file FlatMCReweight.h.

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

FlatFluxWeights flat::FlatMCReweight::ppfx
protected

Definition at line 32 of file FlatMCReweight.h.

Referenced by Fill().


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