ECALELF  d6718b6cc30d69f18fde9018c5ae12f9d80bd7a5
Public Member Functions | Private Member Functions | Private Attributes | List of all members
anyVar_class Class Reference

class for estimation of basic quantities for any Float_t branch in the tree More...

Public Member Functions

 anyVar_class (TChain *data_chain_, std::vector< std::string > branchNames, ElectronCategory_class &cutter, std::string massBranchName, std::string outDirFitRes, TDirectory *dir, bool updateOnly=true)
 
void Import (TString commonCut, TString eleID_, std::set< TString > &branchList, unsigned int modulo=1)
 to be called in the main
 
void TreeAnalyzeShervin (std::string region, TCut cut_ele1, TCut cut_ele2, float scale=1., float smearing=0.)
 

Private Member Functions

void ImportTree (TChain *chain, TCut &commonCut, std::set< TString > &commonCutBranches, std::set< TString > &branchList, unsigned int modulo)
 add to the chain the entry list with selected events, the returned pointer is the same as the one in input
 
void TreeToTree (TChain *chain, std::set< TString > &branchList, unsigned int modulo=0)
 skim the input TChain with selected events, copying only active branches
 

Private Attributes

std::vector< std::unique_ptr
< std::ofstream > > 
_statfiles
 one file for each branch, here the stats are saved
 
std::string massBranchName_
 branch name for the di-object invariant mass
 
Double_t weight
 variable with the total event weight
 

Detailed Description

class for estimation of basic quantities for any Float_t branch in the tree

How to test linearity
for scale in 0.98 0.99 0.995 1 1.005 1.01 1.02 ; do mkdir -p scale_${scale}; ./bin/ZFitter.exe -f data/validation/test_ss.dat --regionsFile=data/regions/validation.dat  --noPU --commonCut="Et_25" --outDirFitResData=scale_${scale}/ --scale=$scale > scale_${scale}/scale.log; done
with fish:
for scale in scale_*; set scale (echo $scale | sed 's|scale_||') ; echo -ne "$scale\t"; grep EB-gold scale_{$scale}/invMass*.dat; end > p.dat
in gnuplot:
f(x) = m * x + q
p 'p.dat' u ($1-1):($7) w lp
fit f(x) 'p.dat' u ($1-1):($7) via m,q
rep f(x)
print m/q

Constructor & Destructor Documentation

anyVar_class::anyVar_class ( TChain *  data_chain_,
std::vector< std::string >  branchNames,
ElectronCategory_class cutter,
std::string  massBranchName,
std::string  outDirFitRes,
TDirectory *  dir,
bool  updateOnly = true 
)
Parameters
data_chain_chain with the data to be analyzed.
branchNamesvector of <branchName, kType>
cutteralready contructed with the right energySC branch set
massBranchNamename of the invariant mass branch
outDirFitResname of the output directory storing the files with the stats
updateOnlyif true opens the output files in append mode

References _statfiles.

Member Function Documentation

void anyVar_class::TreeAnalyzeShervin ( std::string  region,
TCut  cut_ele1,
TCut  cut_ele2,
float  scale = 1.,
float  smearing = 0. 
)
Return values
VOIDThe method is void, but it prints to one file the region name and the stats. The name of the output file is the same as the branch used to collect the stat. Refer to stats to see what is the print format

References _statfiles, and massBranchName_.


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