Go to the Calibration/ZFitter directory and compile it:
make
Calibration/ZFitter will be your working directory now on.
Package content:
- BW_CB_pdf_class Breit-Wigner convoluted with Crystal Ball function PDF.
- Cruijff_pdf_class Class providing a RooPdf corresponding to a Cruijff function (Gaussian with exponential tails)
- ElectronCategory_class Di-electron events are selected using a short special syntax defined in this class.
- ZFit_class Zee Fit class: BW+CB and Cruijff.
- anyVar_class class for estimation of basic quantities for any Float_t branch in the tree
- ZFitter.cpp General program for Z fit (monitoring, calibration validation)
Input: While the classes are almost generic and flexible, the ZFitter program is thought to be used starting from ECALELF ntuples.
- data ntuples must contain:
- mc ntuples must contain:
- config files: see Config files syntax and generation
- ntuple config file: file containing the list of ntuples
- run range config file: file containing a list of run ranges: every region will be checked in every run range in this file
- category config file: file containing a list of regions (categories) for electrons it will be combined with the run range config file (if provided)
- options:
- selection common to all categories
- selection
- energy used for the invariant mass calculation (invMass_var)
- (not implemented) bin/unbin/mixed: performe binned/unbinned fit or a mix version (unbinned for < mixedSwitchValue events, binned otherwise)
- (not implemented) mixed switch value: 200 by default
Two methods are used in order to evaluate the energy scale and resolution:
- fitMethod: consists in fitting the Z lineshape with a parametric model (implemented in ZFit_class) This method gives an estimate of the Z peak and width separately for data and MC. On the other hand the energy scale and energy resolution are estimated for electrons belonging to the same di-electron categories. With this method the energy scale and resolution are measured for di-electron categories.
- smearingMethod: consists in using the Z lineshape from MC after the scaling and smearing of the single electron energy (implemented in RooSmearer). The energy scale and smearing is applied to the single electron energy before calculating the invariant mass, so they are directly the single electron energy scale and smearings.
- anyVarMethod: consists in measuring the effective sigma (minimum interval containing 68% of the events) and the mean in the effective sigma interval of the invariant mass distribution
The methods are implemented in separate classes, there is only one executable (./bin/ZFitter.exe) that with command line options can run the fitMethod or the smearingMethod or anyVarMethod
The inputs to the ZFitter program are given in the form of:
- configuration files (.dat)
- command line options
First, familiarize with the ntuple content: Ntuple content and logic of use
Generating PU weight files
How to make plots using ECALELF ntuples