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

Flat encoding of SRFluxWeights. More...

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

Public Member Functions

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

Protected Attributes

float cv
 
unsigned int nvuniv
 
TTree * vuniv_tree
 
float vuniv
 
long vuniv_idx
 
int vuniv_length
 

Detailed Description

Flat encoding of SRFluxWeights.

Definition at line 20 of file FlatFluxWeights.h.

Constructor & Destructor Documentation

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

Definition at line 1297 of file FlatRecord.cxx.

References compare_h5_caf::branch, cv, nvuniv, vuniv, vuniv_idx, vuniv_length, and vuniv_tree.

1298  : vuniv_tree(make_tree(prefix+"vuniv", "vuniv", tr)),
1299  vuniv(0),
1300  vuniv_idx(0), vuniv_length(0)
1301 {
1302  branch(tr, prefix+"cv", &cv, policy);
1303  branch(tr, prefix+"nvuniv", &nvuniv, policy);
1304  branch(vuniv_tree, prefix+"vuniv", &vuniv, policy);
1305  if(vuniv_tree->GetNbranches() > 0){
1306  branch(tr, prefix+"vuniv_idx", &vuniv_idx, 0);
1307  branch(tr, prefix+"vuniv_length", &vuniv_length, 0);
1308  }
1309 }
const XML_Char * prefix
Definition: expat.h:380
flat::FlatFluxWeights::~FlatFluxWeights ( )

Definition at line 1311 of file FlatRecord.cxx.

References vuniv_tree.

1312 {
1313  if(vuniv_tree->GetNbranches() > 0) vuniv_tree->Write();
1314  delete vuniv_tree;
1315 }

Member Function Documentation

void flat::FlatFluxWeights::Fill ( const caf::SRFluxWeights sr)

Definition at line 1317 of file FlatRecord.cxx.

References caf::SRFluxWeights::cv, cv, caf::SRFluxWeights::nvuniv, nvuniv, caf::SRFluxWeights::vuniv, vuniv, vuniv_idx, vuniv_length, vuniv_tree, and submit_syst::x.

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

1318 {
1319  cv = sr.cv;
1320  nvuniv = sr.nvuniv;
1321 
1322  vuniv_idx += vuniv_length; // increment taken by previous record
1323  vuniv_length = sr.vuniv.size();
1324  for(const auto& x: sr.vuniv){
1325  vuniv = x;
1326  vuniv_tree->Fill();
1327  }
1328 }
std::vector< float > vuniv
Reweight values for the multi-universe.
Definition: SRFluxWeights.h:18
unsigned int nvuniv
Number of universes.
Definition: SRFluxWeights.h:19
float cv
Reweight for the central value (cv)
Definition: SRFluxWeights.h:17

Member Data Documentation

float flat::FlatFluxWeights::cv
protected

Definition at line 29 of file FlatFluxWeights.h.

Referenced by Fill(), and FlatFluxWeights().

unsigned int flat::FlatFluxWeights::nvuniv
protected

Definition at line 30 of file FlatFluxWeights.h.

Referenced by Fill(), and FlatFluxWeights().

float flat::FlatFluxWeights::vuniv
protected

Definition at line 33 of file FlatFluxWeights.h.

Referenced by Fill(), and FlatFluxWeights().

long flat::FlatFluxWeights::vuniv_idx
protected

Definition at line 34 of file FlatFluxWeights.h.

Referenced by Fill(), and FlatFluxWeights().

int flat::FlatFluxWeights::vuniv_length
protected

Definition at line 35 of file FlatFluxWeights.h.

Referenced by Fill(), and FlatFluxWeights().

TTree* flat::FlatFluxWeights::vuniv_tree
protected

Definition at line 32 of file FlatFluxWeights.h.

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


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