forked from ECALELFS/ECALELF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ZFitterConfigFiles.html
107 lines (104 loc) · 8.93 KB
/
ZFitterConfigFiles.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ECALELF: Config files syntax and generation</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="dirs.html"><span>Directories</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1><a class="anchor" id="ZFitterConfigFiles">Config files syntax and generation </a></h1><p>In order to work with ECALELF ntuples you should move to the Calibration/ZFitter directory. Now on the paths are relative to the Calibration/ZFitter directory.</p>
<p>There are three important directories where the proper .dat files should be put:</p>
<ul>
<li>data/validation/ <br/>
For the validation of rerecoes, the .dat files has to be put in a subdirectory of data/validation: ./data/validation/rereco/rerecoGroupName/ where rerecoGroupName is a name that you assign to a group of rerecoes that you want to test for example: you can use ./data/validation/rereco/Cal_Dic2013/ or ./data/validation/rereco/ungrouped/ this way the fit results will be put under the subdirectory rerecoGroupName and you will be able to move or remove it when the set of validations has finished. <br/>
The logic of the validation .dat files is reported below in a dedicated section.</li>
</ul>
<p>For standard validations you can use the data/regions/validation.dat that is set in the scripts as the default one.</p>
<ul>
<li>data/regions/ the fits are done in categories, the conditions that the electrons have to fulfil are defined in .dat files in this directory. In each .dat file, a set of categories are defined, one category for each line: see <a class="el" href="d5/d11/classElectronCategory__class.html" title="Di-electron events are selected using a short special syntax defined in this class...">ElectronCategory_class</a> for more information about the syntax</li>
</ul>
<ul>
<li>data/runRanges/ contains files that define a set of run ranges in order to perform the fits for the stability plots. The default one to be used is data/runRanges/monitoring.dat</li>
</ul>
<p>The syntax is the following: </p>
<div class="fragment"><pre class="fragment">
#runMin-runMax nEvents timeStampMin-timeStampMax
190645-190781 28734 1333819264-1333983242
190782-191042 24007 1334023525-1334188134
</pre></div><p> The second and third column are optional.</p>
<p>For more information on how to produce automatically the runRanges .dat files see: <a class="el" href="ZFitterConfigFiles.html#runDivide">How to produce runRanges .dat files</a></p>
<h2><a class="anchor" id="validationConfig">
Validation config files</a></h2>
<p>This config file contains the list of files to run on, the files containing the PU histograms for the PU reweighting and all the other files needed. The main idea in the ECALELF framework is to have a minimum set of variables in very small trees (the tree name is "selected"), while additional branches can be produced and added if needed as tree friends. The advantage is the possibility to produce ntuples for a larger set of studies with small specific trees for each of them.</p>
<p>The file is structured in 3 columns: tag, treeName and filePath as in the follows: </p>
<div class="fragment"><pre class="fragment">
# commented lines
# tag treeName file
s1 selected root://eoscms//eos/..../file.root
s2 selected root://eoscms//eos/..../file.root
d1 selected root://eoscms//eos/..../file.root
d pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/190456-204567-13Julv2_lastPrompt.69400.observed.root
s pileupHist /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/nPU-Summer12_DD3.observed.root
</pre></div><p>The first column (<b>tag</b>) indicates if this file is signal MC (s), background MC (b), or data (d).</p>
<p>The single samples are indicated by a number (s1, s2, etc., d1, d2, etc.)</p>
<p>The second column (<b>treeName</b>) is the name of the tree in the file</p>
<p>The third column (<b>filePath</b>) is the full path of the file files with the same tag and the same treeName are put in the same chain files with the same tag but different treeName are added as friends</p>
<p>For each <b>tag</b> (e.g. s1) one can have multiple chains with different <b>treeName</b> (e.g. selected, pileup, r9Weight, etc.), a chain with treeName=="selected" is mandatory since it is the main tree, all the other chains are considered as friends of the "selected".</p>
<h3><a class="anchor" id="pileupHist">
How to get the pileup histogram</a></h3>
<p>The files containing the histograms for the PU reweight are indicated with pileupHist as treeName and they are treated in a different way. There must be only one pileupHist for d and one for s, then the program calculates the weights for the MC, produces a temporary file with just one tree containing the weights (pileupTree) and it is added as friend to the chain of MC. You can also provide directly the "temporary" root file indicating s pileupTree file.root</p>
<p>When running the alcareco production for the MC, an additional file called PUDumper.root is produced for each job. It contains the</p>
<h3><a class="anchor" id="pileup">
How to produce ntuples with pileup weights</a></h3>
<p>In the config file the pileupHist must be indicated. When running the ZFitter.exe it will automatically calculate the weights and create the additional ntuples in the </p>
<div class="fragment"><pre class="fragment"> tmp/
</pre></div><p> directory. To just produce the ntuples: </p>
<div class="fragment"><pre class="fragment"> ./bin/ZFitter.exe -f data/validation/22Jan2012-stdMCAll.dat --savePUTreeWeight
</pre></div><p>It's sufficient to copy them from the tmp/ directory to another directory and to add them to the config file. Usually the pileupHist and pileup tree are put in the following directory: </p>
<div class="fragment"><pre class="fragment"> /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/
</pre></div><p>The tree name of the pileup weight files is <b>pileup:</b> </p>
<div class="fragment"><pre class="fragment">s1 pileup /afs/cern.ch/cms/CAF/CMSALCA/ALCA_ECALCALIB/ECALELF/puFiles/s1_pileupTrue....root
</pre></div><h3><a class="anchor" id="scaleSmearing">
Energy scale and smearing corrections</a></h3>
<p>Energy scale and smearings can be applied to the already existing ntuples. One can have different sets of energy scales and smearings, depending on</p>
<ul>
<li>the particular energy used for the invariant mass,</li>
<li>the particular algorithm</li>
<li>the number of steps in iterative procedure</li>
</ul>
<p>For more details see the section dedicated to the energy scale and smearing derivation.</p>
<p>Each set of energy scale and smearing corrections is defined by a "type" name. You can add all the wanted set of scale and smearing correction files to the same validation config file, but only the one specified by the --corrEleType and --smearEleType options are used. The name of the trees of the corrections are defined as follows: <basename>_<type>, where <basename> is scaleEle for energy scale corrections and smearEle for energy smearings. This way you don't need to modify your validation config file each time you want to run with a different set of corrections, you just need to pass the appropriate type name at the command line.</p>
<h2><a class="anchor" id="runDivide">
How to produce runRanges .dat files</a></h2>
<p>The idea is to produce a file with the run ranges with 100k Zee events (to have enough statistics in the EE), but taking into account also that some run ranges should not be between to TSs or two era (RUN A and B).</p>
<p>The run ranges:</p>
<ul>
<li>put in the data/runRanges/runRangeLimits.dat the runNumber that should start a new run range (TSs for example)</li>
<li>run the command <div class="fragment"><pre class="fragment"> ./bin/ZFitter.exe -f file.dat --runDivide
</pre></div></li>
</ul>
<p>The ZFitter.exe options are: </p>
<div class="fragment"><pre class="fragment"> --runDivide execute the run division
--nEvents_runDivide arg (=100000) Minimum number of events in a
run range
</pre></div> </div>
<hr size="1"/><address style="text-align: right;"><small>Generated on 24 Jun 2014 for ECALELF by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>