Analysis Code

The code is stored in

https://github.com/dromeroa/EDBR2_Znu/

We usually define the properties of the objects in the

EDBR2_Znu/EDBRCommon/python/



1. The Jets

a. Fat Jets (ak8jets)

The main properties of this jets are defined in the configuration file:

niceJets_cff.py

a.1 The niceJets

We select ak8 PatJets with an specific ID, for example loose ID

For this we use the pfJetIDSelector which we load with:

from PhysicsTools.SelectorUtils.pfJetIDSelector_cfi import pfJetIDSelector

Note that this file define the following selections: (https://cmssdt.cern.ch/SDT/doxygen/CMSSW_7_1_16/doc/html/d8/d00/pfJetIDSelector__cfi_8py_source.html)

pfJetIDSelector = cms.PSet(
                  version = cms.string('FIRSTDATA'),
                  quality = cms.string('LOOSE'))
a.1.1 The first filter

We start wit the following filter:

selectJets = cms.EDFilter("PFJetIDSelectionFunctorFilter",
                           filterParams = pfJetIDSelector.clone(),
                           src = cms.InputTag("slimmedJetsAK8"))

Here we used the filter : PFJetIDSelectionFunctorFilter, which is define in :

https://cmssdt.cern.ch/SDT/doxygen/CMSSW_7_1_0/doc/html/d4/d38/PFJetIDSelectionFunctor_8h_source.html

Basiclly this filter take the parameters of the PFJetIDSelector and provide slimmedJetsAK8 wich have been selected with loose ID.

a.1.2 The second filter

Here we are going to select jets with specific values of pt and eta:

niceJets = cms.EDFilter("PATJetSelector",
                        src = cms.InputTag("selectJets")
                        cut = cms.string("pt > 20 & abs(eta) < 2.4"),
                        filter = cms.bool(True))

The filter is defined here:

https://cmssdt.cern.ch/SDT/doxygen/CMSSW_7_4_9_patch1/doc/html/d6/d7d/PATJetSelector_8h_source.html

Note that the source of this filter is the output of the first filter (I think in a simple analyzer not work in this way)

a.1.3 The Sequence

Finally we use sequence in these two filters:

fatJetsNuSequence = cms.Sequence(
                                   selectJets *
                                   niceJets   )

b. The Hadronic V (V = Z,W)

The main properties of these bosons are defined in:

hadronicZnu_cff.py

b.1 The hadronicZnu

First we need to say that we are going to correct the energy of the jest JEC (Jet energy corrections), and this is not the same for data and MC.

We correct for MC:

L2Relative, L3Absolute

and for data:

L2L3Residual

We have a flag to save this difference:

isData

This is set up in the file:

EDBR2_Znu/EDBRCommon/plugins/CorrJetsProducer.cc

b.1.1 The Producer
corrJetsProducer = cms.EDProducer ( "CorrJetsProducer",
                                     jets = cms.InputTag( "niceJets" ),
                                     vertex = cms.InputTag( "goodOfflinePrimaryVertex" ),
                                     rho = cms.InputTag( "fixedGridRhoFastjetAll" ),
                                     payload = cms.string ( "AK8PFchs" ),
                                     isData = cms.bool ( False ))

Note that the source of this producer is the collection niceJets previously define.

And note that we are considering only for MC, because isData = False

Stop For data we include the extra term in the final configuration file:

process.corrJetsProducer.isData = True

Before Run be sure that this is true

b.1.2 The Filter
hadronicVnu = cms.EDFilter( "CandViewSelector",
                             src = cms.InputTag("corrJetsProducer:corrJets"),
                             cut = cms.string('pt > 200. & '
                                              'userFloat("ak8PFJetsCHSCorrPrunedMass") > 40. & '
                                              'userFloat("ak8PFJetsCHSCorrPrunedMass") < 105. '),
                             filter = cms.bool(True) )

Here the source are the previous corrected jets, and we apply a cut in the pt of the jets and in the pruned jet mass (This change in the case of blinding, which we set in the final configuration file).

b.1.3 The Sequence
hadronicVnuSequence = cms.Sequence( corrJetsProducer *
                                         hadronicVnu )

c. The Hadronic V in the main configuration file

The main configuration file have differents names in data and MC, so we just use the dta configuration file as an example:

analysis-MET_Run2015D_25ns_17-Nov_05Oct2015.py

In order to use the previous configuration files we have to load:

process.load("ExoDiBosonResonances.EDBRCommon.niceJets_cff")
process.load("ExoDiBosonResonances.EDBRCommon.hadronicZnu_cff")

The hadronic V filter

process.bestHadronicVnu = cms.EDFilter( "LargestPtCandSelector",
src = cms.InputTag("hadronicVnu"),
maxNumber = cms.uint32(1) )

We select from all the hadronic V the one who have the biggest pt

(This criteria could change)

 

-- davidromero - 2015-12-12

Comments

Topic revision: r2 - 2015-12-13 - davidromero
 

This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback

antalya escort bursa escort eskisehir escort istanbul escort izmir escort