TopSanityChecker
TopSanityChecker
The aim of the sanity checker is to check for each datasample containing pat objects if everything is ok.
Could be used to
- Check the integrity of the data
- Check if we can access to all the methods and variables needed for the analysis
- Check if bugs are still there
- Compare FullSim & FastSim
- Compare different Generator
- Compare different CMSSW releases
The output of this code (rootfiles and logfiles) should be stored in a backup location to be reused when needed (by example for comparison)
Location of the code
- You can find the code on cvs: UserCode/TopBrussels/SanityChecker
- To check out the code:
cvs co UserCode/TopBrussels ; mv UserCode/TopBrussels . ; rm -r UserCode ; scramv1 b;
- To update the existing file:
export CVSROOT=:ext:your_login@cmscvs.cern.ch:/cvs_server/repositories/CMSSW
cvs update
- To commit new file
cvs add new_file
cvs commit
Versions
Actually 3 branches exists:
- MAIN
- CMSSW_22X
- CMSSW_31X
ex: doing cvs co -r CMSSW_31X UserCode/TopBrussels/SanityChecker will checkout the latest development for 31X series.
It still possible to use tag which are linked or not to a branch:
- cvs co -r v1 UserCode/TopBrussels/SanityChecker : last version working with "old CMSSW tag" (TtGenEvent home made)
- cvs co -r CMSSW_227_TQAF_V04-08-07_v1 UserCode/TopBrussels/SanityChecker: version working with CMSSW_2_2_7 & TQAF V04-08-07
- REMARK One schould use TQAF V04-08-08 to have the genevent properly working!
- cvs co -r CMSSW_312_Greg_PreProdValidation UserCode/TopBrussels/SanityChecker version used for pre-production validation
REMARK
- Please take care of the branch/tag initially used to checkout when commiting the code because the news files will be save in MAIN or CMSSW_22X or CMSSW_31X depending of the case !!
- It's important to create a new tag once we have a functioning version !!
Short description of modules
Here you can find a short description of the modules which you can include in your sanity check.
- Kinematics (Joris)
- This module will check the availability of basic members of the pat::Jets, pat::Muons, pat::METs, etc. Furthermore it will make plots of the p4() members like eta, Et, phi, etc.
- Resolutions (Petra)
- Lepton (Muon & Electron) (Gregory)
- Jet/MET (Gregory & Ilaria)
- GenParticles & TtGenEvent (Ilaria & Eric)
- Truth Reco (base on Matching) (Petra)
List of plots in all the modules http://mon.iihe.ac.be/trac/t2b/wiki/TopSanityCheckerModules
How to run the code
- The code is compatible with pat layer 1 objects produced in CMSSW_2_2_X (X=3,4) with this tag VXX-XX-XX for PhysicsTools/PatAlgos. Remark, this is a bit unclear at this moment, we should keep track of the PAT version we used to make the PAT objects which we use to develop the code on.
- You can use the following cfg file as an example to run the modules of the SanityChecker: test/dummychecker_cfg.py
How to create new module
- Use as example the src/DummyChecker.cc file.
- Copy this file - rename it with the name of your new "module" (ex: KinematicsChecker) and change all the occurences DummyChecker by this new name
- This line: DEFINE_FWK_MODULE(MyNewModule) at the end of your cc file will define your new module which could be called latter by the cfg_py file (on test directory)
- The technicalities solved are:
- Use the TFileService
- Create new directories & subdirectories
- Create TH1D & TH1F & TH2F
- Use the MessageLogger with several levels
- Create differents log files for each level
To do list
- Concerning the MessageLogger, we should define categories. Proposition: NoDataFound - LinkBroken - TooMuchDataFound - SummaryError - MainResults
Some links
- For TFileService https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideTFileService
- For MessageLogger https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideMessageLogger & http://www.uscms.org/LPC/lpc_offl/MessageLogger/parameters.html
MC Validation
- CMSSW_3_1_X MC validation http://mon.iihe.ac.be/trac/t2b/wiki/TopSanityCheckerValidation
- cvs co -r CMSSW_312_Greg_PreProdValidation UserCode/TopBrussels/SanityChecker (version used for the pre-production validation)