Analysis Code

The code is stored in

We usually define the properties of the objects in the


1. The Jets

a. Fat Jets (ak8jets)

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

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: (

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 :

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:

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:

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:


We have a flag to save this difference:


This is set up in the file:


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:

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


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


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

This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 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