ECALELF
d6718b6cc30d69f18fde9018c5ae12f9d80bd7a5
|
If you are interested only in using the fit for validations you can skip this paragraphs and go directly to "RERECO VALIDATION instructions"
The .dat config file keeping the list of ntuples can be modified according to the needs adding or commenting unuseful ntuples or friend trees. It's then important to have a simple way to merge the trees in order to be able to manipulate, scan and plot variables from the ntuples. The ZFitter/script/GenRootChains.sh has been designed for this.
running the command:
./script/GenRootChains.sh -f data/validation/myConfigFile.dat
in the folder tmp/myConfigFile/ the s_chain.root and d_chain.root are created for MC and data respectively. The .root files have the TChains already defined, merging the files with the same treeName in the config file and adding the friends properly.
To work with ntuples you can do (see practical example below):
root -l tmp/myConfigFile/d_chain.root tmp/myConfigFile/s_chain.root TTree * data = (TTree *) _file0->Get("selected"); TTree * signalA = (TTree *) _file1->Get("selected"); data -> Draw("*"); signalA -> Draw("*");
A standard function for data/MC plots have been prepared and is available in python/plot.py. An example of how to use this library is in macro/standardDataMC.py
In the following you can find an example of production of data/MC plots with a config file with Moriond17 new regression
Simple:
./script/GenRootChains.sh -f data/validation/Moriond17_newRegr_v2.dat python macro/standardDataMC.py absEta_0_1-gold "(160,80,100)" -d tmp/Moriond17_oldRegr/d_chain.root,"Moriond Data" -s tmp/Moriond17_oldRegr/s1_chain.root,"Moriond17 Madgraph MC"
./script/GenRootChains.sh -f data/validation/Moriond17_oldRegr.dat -f data/validation/Winter_2016_reReco_v1.dat category="absEta_0_1-gold-EtLeading_32-EtSubLeading_20-noPF-isEle-eleID_cutBasedElectronID|Spring15|25ns|V1|standalone|loose" binning="(160,80,100)" WinterPow=tmp/Winter_2016_reReco_v1/s1_chain.root,"Winter2016 Powheg MC",invMass_SC_corr,energySCEle_corr WinterMadgraph=tmp/Winter_2016_reReco_v1/s2_chain.root,"Winter2016 Madgraph MC",invMass_SC_corr,energySCEle_corr MoriondMadgraph=tmp/Moriond17_oldRegr/s1_chain.root,"Moriond17 Madgraph MC",invMass_ECAL_ele,energy_ECAL_ele MoriondHerwig=tmp/Moriond17_oldRegr/s2_chain.root,"Moriond17 Herwig MC",invMass_ECAL_ele,energy_ECAL_ele MoriondData=tmp/Moriond17_oldRegr/d_chain.root,"Moriond17 Data",invMass_ECAL_ele python macro/standardDataMC.py $category $binning -s "$WinterPow" -s "$WinterMadgraph" -s "$MoriondMadgraph" -d "$MoriondData" -x InvMass -n WinterMoriondComp_InvMass