Analysis tools for calorimetry:
- hits/cells/cluster read from EDM in c++
- setup and results of analysis (drawing etc.) handled from python
Dependencies:
- ROOT
- PODIO
- fcc-edm taken from the FCC software stack:
source init.sh
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=../install ..
make -j 8 install
cd ..
To see the help message:
python scripts/calo_init.py --help
The required argument is the input file name and the energy (vector):
python scripts/calo_init.py <INPUT_FILE_NAME>.root [energy]
User may also specify any of the optional arguments.
In particular, if user wants to analyse multiple files:
python scripts/calo_init.py <INPUT_FILE_NAME_CONTAINING_?_CHARACTER>.root ENERGY -r [LIST_OF_SUBSTITUTIONS]
where -r
indicates that a regex should be used, substituting the ?
character in the input (or output) file name with the elements of the list of substitutions.
For instance,
python scripts/calo_init.py 'output_10GeV_?.root' 10 -r firstPart secondPart
results in:
Input file: output_10GeV_firstPart.root
Input file: output_10GeV_secondPart.root
Energy of initial particle: [10] GeV
If instead of of a list, "energy" is used after "-r" option, the '?' character gets substituted with the energy of the particles.
For instance,
python scripts/calo_init.py 'output_?GeV.root' 10 50 100 -r energy
results in:
Input file: output_10GeV.root
Input file: output_50GeV.root
Input file: output_100GeV.root
Energy of initial particle: [10, 50, 100] GeV
Required arguments:
- input file name
- energy
- sampling factor
python scripts/test_macro_simple.py <INPUT_FILE_NAME>.root ENERGY SF
Required arguments:
- input file name
- energy
- sampling factor
Analysis is done for one file.
python scripts/test_macro_profiles.py <INPUT_FILE_NAME>.root ENERGY SF
Required arguments:
- input file name
- energy
- sf
Analysis is done for one file.
python scripts/test_macro_cells.py <INPUT_FILE_NAME>.root ENERGY SF
Preview of the reconstructed cluster. The first plot contains all towers, the second the centre of the cluster and the third one all the cells associated to the cluster. Additionally the windows used in the reconstrucion are drawn.
Required arguments:
- input file name
- energy
Analysis is done for all the files (all energies), but for one event from each (default: first event).
python scripts/plot_recoExample.py <INPUT_FILE_NAME>.root ENERGY
Input file name and the energy are required.
List of additional options:
-r REGEX [REGEX ...], --regex REGEX [REGEX ...]
String to insert in place of '?' character in file
names ("energy" inserts the values of energies)
-o OUTPUT, --output OUTPUT
Output file name
-v, --verbose Verbose
--clusterColl CLUSTERCOLL
Name of the clusters collection
(fcc::CaloClusterCollection)
--positionColl POSITIONCOLL
Name of the positioned cells collection
(fcc::PositionedCaloHitCollection)
--windowSeed WINDOWSEED WINDOWSEED
Size of the window used for seeding [eta,phi]
--windowPos WINDOWPOS WINDOWPOS
Size of the window used for berycentre coalculation
[eta,phi]
--windowDupl WINDOWDUPL WINDOWDUPL
Size of the window used for duplicate removal
[eta,phi]
--dEta DETA DETA Size of the tower in eta
--maxEta MAXETA Maximum eta
--dPhi DPHI Size of the tower in phi
--numPhi NUMPHI Number of the towers in phi
--zoom ZOOM ZOOM How many bins around centre should be visible
--event EVENT Number of an event to draw
Monitor plots of the reconstruction procedure. The plots are created based on the clusters and generated particles (for single particle events only).
python scripts/plot_recoMonitor.py <INPUT_FILE_NAME>.root ENERGY <INPUT_FILE_WITH_MC_INFORMATION>.root
The plots are saved to root file and as a png. The first row includes the energy distribution, energy distribution as a function of phi, number of reconstructed clusters and the number of reconstructed clusters as a function of phi. The second row contains information about any reconstructed duplicates (difference of energy, eta, phi and R=sqrt(eta^2+phi^2) with respect to the most energetic cluster). The last row contains comparison to the MC particle: difference in eta distribution, difference in eta as a function of eta, difference in phi distribution and difference in phi as a function of phi.
python scripts/plot_recoMonitor.py root://eospublic.cern.ch//eos/fcc/users/n/novaj/combCaloForBerlin/output_combCalo_reconstructionSW_e50GeV_part1.root 50 root://eospublic.cern.ch//eos/fcc/users/n/novaj/combCaloForBerlin/output_combCalo_e50GeV_part1_v3.root --clusterColl EcalClusters --correctionParams 0.1369 0.004587 0.1692 0.6769 --cellColl ECalCellsForSW --bitfield system:4,cryo:1,type:3,subtype:3,cell:6,eta:9,phi:10
List of additional options:
-r REGEX [REGEX ...], --regex REGEX [REGEX ...]
String to insert in place of '?' character in file
names ("energy" inserts the values of energies)
-o OUTPUT, --output OUTPUT
Output file name
-v, --verbose Verbose
--particleColl PARTICLECOLL
Name of the MC particle collection
(fcc::MCParticleCollection)
--clusterColl CLUSTERCOLL
Name of the clusters collection
(fcc::CaloClusterCollection)
--dEta DETA DETA Size of the tower in eta
--maxEta MAXETA Maximum eta
--dPhi DPHI Size of the tower in phi
--numPhi NUMPHI Number of the towers in phi
Input files: ROOT files with energy distribution saved with name "energy". Each ROOT file should contain distribution for one energy. Such input files may be obtained e.g. by plot_recoMonitor.py
macro.
Energy distributions are fitted twice with Gaussian, and the energy resolution plot is fitted with p0+p1/sqrt(E) function.
python scripts/plot_enResolution.py energy?GeV.root 20 50 100 200 500 1000 -r energy
- Create Class deriving from
BaseAnalysis
orBaseTwoFileAnalysis
. Include:
- histograms (push back to m_histograms)
- processEvent method
- finishLoop method
- Add class to
include/LinkDef.h
andCMakeLists.txt
so it can be accessed from ROOT. - Create analysis script:
- add command line arguments
- retrieve histograms after analysis is done