====== Inclusive Vertex Finder (IVF) ====== The IVF will run out-of-the-box in CMSSW_5_3_11. If unsure, you can check out the following two packages: cvs co -r V02-02-06 RecoVertex/AdaptiveVertexFinder cvs co -r V01-10-02 RecoBTag/SecondaryVertex To use the same approach as the VHbb group, one also needs to check out two additional packages: cvs co -d IVF/BCandidateProducer UserCode/BbCorrelation/CMSSW/BAnalysis/BCandidateProducer cvs co -d ZSV/BAnalysis UserCode/ZSV/BAnalysis/ scram b -c Last command needed to update really old IVF package config files to BuildFile.xml files. ===== Work flow ===== ==== General vertexing ==== In order to get the IVF to work one has to perform inclusive vertexing by including [[https://github.com/cms-sw/cmssw/blob/CMSSW_5_3_X/RecoVertex/AdaptiveVertexFinder/python/inclusiveVertexing_cff.py|inclusiveVertexing_cff.py]]: process.load('RecoVertex/AdaptiveVertexFinder/inclusiveVertexing_cff') The IVF runs on pre-selected vertices. After a coarse pre-clustering based on track distances and angles, vertices are reconstructed with the Adaptive fitter (outlier resistant, iterative procedure). This is done using the inclusive vertex finder from the [[https://github.com/cms-sw/cmssw/tree/CMSSW_5_3_X/RecoVertex/AdaptiveVertexFinder|adaptive vertex finder package]]: * Source code: [[https://github.com/cms-sw/cmssw/blob/CMSSW_5_3_X/RecoVertex/AdaptiveVertexFinder/plugins/InclusiveVertexFinder.cc|InclusiveVertexFinder.cc]] * Configuration file: [[https://github.com/cms-sw/cmssw/blob/CMSSW_5_3_X/RecoVertex/AdaptiveVertexFinder/python/inclusiveVertexFinder_cfi.py|inclusiveVertexFinder_cfi.py]] These vertices are then merged depending on their significance in distance and the fraction of tracks they share (in particular vertices with a large fraction of common tracks are merged): * Source code: [[https://github.com/cms-sw/cmssw/blob/CMSSW_5_3_X/RecoVertex/AdaptiveVertexFinder/plugins/VertexMerger.cc|VertexMerger.cc]] * Configuration file: [[https://github.com/cms-sw/cmssw/blob/CMSSW_5_3_X/RecoVertex/AdaptiveVertexFinder/python/vertexMerger_cfi.py|vertexMerger_cfi.py]] * using the standard config: * maxFraction = 0.7 * minSignificance = 2 In the next step it is made sure that all tracks belong either to a secondary vertex or the primary vertex only optimising the assignment of tracks to vertices, followed by another vertex fit: * [[https://github.com/cms-sw/cmssw/blob/CMSSW_5_3_X/RecoVertex/AdaptiveVertexFinder/plugins/TrackVertexArbitrator.cc|TrackVertexArbitrator.cc]] * [[https://github.com/cms-sw/cmssw/blob/CMSSW_5_3_X/RecoVertex/AdaptiveVertexFinder/python/trackVertexArbitrator_cfi.py|trackVertexArbitrator_cfi.py]] These refitted vertices are then again merged depending on their significance in distance and the fraction of tracks they share: * Source code: [[https://github.com/cms-sw/cmssw/blob/CMSSW_5_3_X/RecoVertex/AdaptiveVertexFinder/plugins/VertexMerger.cc|VertexMerger.cc]] * Configuration file: [[https://github.com/cms-sw/cmssw/blob/CMSSW_5_3_X/RecoVertex/AdaptiveVertexFinder/python/vertexMerger_cfi.py|vertexMerger_cfi.py]] * config is overwritten by [[https://github.com/cms-sw/cmssw/blob/CMSSW_5_3_X/RecoVertex/AdaptiveVertexFinder/python/inclusiveVertexing_cff.py|inclusiveVertexing_cff.py]] to: * maxFraction = 0.2 * minSignificance = 10 ==== b-vertex filtering ==== The optimised vertices undergo a b-vertex filter: * Source code: [[https://github.com/cms-sw/cmssw/blob/CMSSW_5_3_X/RecoBTag/SecondaryVertex/plugins/BVertexFilter.cc|BVertexFilter.cc]] * Configuration file: [[https://github.com/cms-sw/cmssw/blob/CMSSW_5_3_X/RecoBTag/SecondaryVertex/python/bVertexFilter_cfi.py|bVertexFilter_cfi.py]] ==== b to charm decay vertex merging ==== The b-to-charm decay vertex merging attempts to identify B to D meson decays and merges them based on DeltaR, the vertex mass, the angle between them and the relative transverse momentum: * Source code: [[https://github.com/cms-sw/cmssw/blob/CMSSW_5_3_X/RecoBTag/SecondaryVertex/plugins/BtoCharmDecayVertexMerger.cc|BtoCharmDecayVertexMerger.cc]] * Configuration file: [[https://github.com/cms-sw/cmssw/blob/CMSSW_5_3_X/RecoBTag/SecondaryVertex/python/bToCharmDecayVertexMerger_cfi.py|bToCharmDecayVertexMerger_cfi.py]] ===== Useful links ===== partly used in VHbb ntuples: * VHbb recipe: https://twiki.cern.ch/twiki/bin/viewauth/CMS/VHbbAnalysisNewCode#NtupleV42_CMSSW_5_3_3_patch2 * http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/UserCode/VHbbAnalysis/HbbAnalyzer/test/patData.py?revision=1.9&view=markup Carlotta's code: * http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/UserCode/ZSVAnalysisForPaper/ZSVAnalysis/zsvanalysisforpaper_MCfall11_DYc_cfg.py?revision=1.1&view=markup * http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/UserCode/ZSVAnalysisForPaper/BCandidateProducer/plugins/BCandidateProducer.cc?revision=1.1&view=markup twiki documentation: * official recipe: https://twiki.cern.ch/twiki/bin/viewauth/CMS/InclusiveVertexFinderRecipes * combination with CSV tagger: https://twiki.cern.ch/twiki/bin/viewauth/CMS/CSVIVF CMSSW: * https://github.com/cms-sw/cmssw/blob/CMSSW_5_3_X/RecoVertex/AdaptiveVertexFinder/ * https://github.com/cms-sw/cmssw/blob/CMSSW_5_3_X/RecoBTag/SecondaryVertex/ ===== Current errors ===== none ===== Steps for MSSM Hbb analysis === cvs co -r V02-02-06 RecoVertex/AdaptiveVertexFinder cvs co -r V01-10-02 RecoBTag/SecondaryVertex Replace ''PhysicsTools/PatAlgos/python/tools/jetTools.py'' by this [[https://twiki.cern.ch/twiki/pub/CMS/InclusiveVertexFinderRecipes/jetTools.py.txt|version]]. Check for details of information: RecoBTag/SecondaryVertex/test/runIVFAnalyzer_cff.py RecoBTag/SecondaryVertex/test/IVFAnalyzer.cc And voila: The bdiscriminators below will be written to the jet collection in the PATtuple (default is all, see PatAlgos/PhysicsTools/python/tools/jetTools.py) jetBProbabilityBJetTags jetProbabilityBJetTags trackCountingHighPurBJetTags trackCountingHighEffBJetTags simpleSecondaryVertexHighEffBJetTags simpleSecondaryVertexHighPurBJetTags simpleInclusiveSecondaryVertexHighEffBJetTags simpleInclusiveSecondaryVertexHighPurBJetTags combinedSecondaryVertexBJetTags combinedSecondaryVertexMVABJetTags softMuonBJetTags softMuonByPtBJetTags softMuonByIP3dBJetTags simpleSecondaryVertexNegativeHighEffBJetTags simpleSecondaryVertexNegativeHighPurBJetTags negativeTrackCountingHighEffJetTags negativeTrackCountingHighPurJetTags combinedInclusiveSecondaryVertexBJetTags combinedMVABJetTags doubleSecondaryVertexHighEffBJetTags