This is a CMSSW 'analyzer' running onto tracker DPG calibTree
files, centrally produced, for analyses purposes. This package was designed for the investigation the SiStrip dynamic inefficiency in 2015-2016. Initially, the phenomenon was (incorrectly) believed to be due mainly to Heavy Ionizing Particles, aka HIP. Hence the name.
I'm sorry if the package is not clean with plenty of unused stuff all over the place, this was meant for my own usage at first, I'll be back and clean it at some point.
Because there are a lot of calibTree
out there. So, to have a better scaling for analyzing a lot of them, and because I'm lazy and the trees are available on eos
, I decided to have CRAB do the job handling, copying the output back to storage, etc. On the plus side, this also makes this code batch-system independent. So feel free to run this on lxplus or your local cluster, it does not matter.
Yes, the trick here is to have CRAB believes it is doing MC production, which gives some more freedom about this. The analyzer will read one calibTree
file per produced 'MC event'. This system do have some overhead, but I believe it's scaling much better.
cmsrel CMSSW_9_2_3_patch2
cd CMSSW_9_2_3_patch2/src
cmsenv
git cms-init
cd ${CMSSW_BASE}/src
git clone -o upstream git@github.com:blinkseb/TreeWrapper.git CalibTracker/TreeWrapper
git clone -o upstream git@github.com:OlivierBondu/HIPAnalysis.git CalibTracker/HIPAnalysis
cd ${CMSSW_BASE}/src/
scram b -j 4
cd CalibTracker/HIPAnalysis
pip install --user progressbar
A helper script exist: try to run python scripts/getFillScheme.py
. You need as an input the bunch fill number. It uses the LPC API to extract the bunch fill structure. Ultimately, it will be used in combination with the run registry API to give the bunch filling scheme, such as this wbm page is doing.
- First, you need to list the
calibTree
you are interested in- Usually they are in places like
/store/group/dpg_tracker_strip/comm_tracker/Strip/Calibration/calibrationtree/GR17/
- Create a file in
test/data
containing the full (eos) path of the files your interested in, see for exampletest/data/list_calibTrees_Fill-5750_Run-296173.txt
(note: putting#
at the beginning of the line will skip the file)
- Usually they are in places like
- Then, you want to create the histograms from the
calibTree
- The core code reading the
calibTree
and producing the histograms isplugins/CalibTreesLayerAnalysis.cc
- The corresponding configuration file is
test/CalibTreesLayerAnalysis.py
: edit, then run it viacmsRun CalibTreesLayerAnalysis.py
- Important Note: the number of events should not exceed the number of files you are reading
- Or run the analyzer via CRAB if you have a lot of files to analyse. The configuration file is
test/crab_CalibTreesLayerAnalysis.py
. Edit, then run it viacrab submit crab_CalibTreesLayerAnalysis.py
- Important Note: make sure the
config.Data.totalUnits
matches the number of files you are reading!
- Important Note: make sure the
- The core code reading the
- You know have the histograms! yeah! all you have to do now is plot them:
- The plotter is
python/plotLayerHistos.py
: edit, then run it viapython plotLayerHistos.py
- The plotter is
- Look at the plots, and finally do the physics: interpret them
Note: this is in large part a copy-paste of the instructions above
- First, you need to list the
calibTree
files you are interested in- Usually they are in places like
/store/group/dpg_tracker_strip/comm_tracker/Strip/Calibration/calibrationtree/GR17/
- Create a file in
test/data
containing the full (eos) path of the files your interested in, see for exampletest/data/list_calibTrees_Fill-5750_Run-296173.txt
(note: putting#
at the beginning of the line will skip the file)
- Usually they are in places like
- Then, you want to create the histograms from the
anEff/traj
trees within thecalibTree
files- The core code reading the
anEff/traj
and producing the histograms isplugins/anEffAnalysis.cc
- The corresponding configuration file is
test/anEffAnalysis.py
: edit, then run it viacmsRun anEffAnalysis.py
- Important Note: the number of events should not exceed the number of files you are reading
- Or run the analyzer via CRAB if you have a lot of files to analyse. The configuration file is
test/crab_anEffAnalysis.py
. Edit, then run it viacrab submit crab_anEffAnalysis.py
- Important Note: make sure the
config.Data.totalUnits
matches the number of files you are reading!
- Important Note: make sure the
- The core code reading the
- You know have the histograms! yeah! all you have to do now is plot them:
- The plotter is
python/plotanEff.py
: edit, then run it viapython plotanEff.py
- The plotter is
- Look at the plots, and finally do the physics: interpret them
But you're welcome to have a look around of course! Beware there are pieces of code that are useless at this point. There has been no thorough clean-up yet.