-- AlexanderFedotov - 07-Jul-2010

     Jets in CMSSW     

1. Links

2. Supported Jet Collections : labels

2.1 Declared list

Supported jet algorithms ( according to ) are AntiKt (R=0.5/0.7), SISCone (R=0.5/0.7) and kT (R=0.4/0.6). This means:

  • the respective jet collections (flavours: generator, calorimeter, particle-flow ) are standardly produced, and appear in RECO/AOD,
  • jet energy corrections procedures are provided for them

Gen Jets Calo Jets PF Jets
t y p e
vector<reco::GenJet> vector<reco::CaloJet> vector<reco::PFJet>
Algorithm R l a b e l
"officially supported" collections ( JetAlgorithms > Algorithms )
AntiKt 0.5 ak5GenJets ak5CaloJets ak5PFJets
AntiKt 0.7 ak7GenJets ak7CaloJets ak7PFJets
Note: In the Summer09 MC Production (CMSSW_3_1_X), the AntiKt jet collections are labeled differently: ak -> antikt
SISCone 0.5 sisCone5GenJets sisCone5CaloJets sisCone5PFJets
SISCone 0.7 sisCone7GenJets sisCone7CaloJets sisCone7PFJets
kT 0.4 kt4GenJets kt4CaloJets kt4PFJets
kT 0.6 kt6GenJets kt6CaloJets kt6PFJets
Note: The jet specific contents of a file can be inspected with edmDumpEventContent file.root | grep Jet
also present in RECO format (found in a 3_8_5 MC file)
ItCone 0.5 iterativeCone5GenJets iterativeCone5CaloJets iterativeCone5PFJets

2.2 Iterative cone stopped in 383?

From:
> Am I correct in my observation that the iterativeCone5CaloJets algorithm has
> been discontinued in 383?
A.: the support for itCone had been stopped quite a while ago, e.g. jet energy corrections are not provided anymore. Consequently, they were now removed from the standard RECO.
The recommended jet algorithm is Anti-kT R=0.5 (e.g. ak5CaloJets).

AF: Then why are the iterativeCone5...Jets seen in 3_8_5 ?
A: the iterativeCone5 jets seem to have been removed at some point from the AOD format while still kept in RECO (see next section).

2.3 Actual availability of jets

The actual availability of various types of jets, which is version-dependent, can probably be checked in the config file

The jet content of an event is defined there separately for AOD and RECO formats.

3. Jet producer: FastjetJetProducer

3.1 Relation to FastJet / Inheritance diagram / Location

All jet algorithms are interfaced to the FastJet package (Salam, Cacciari) via the FastjetJetProducer:

3.2 VirtualJetProducer: configuration parameters

Extracted from VirtualJetProducer.cc (3_8_5) :

type name default comment
string @module_label    
edm::InputTag src   input collection label
edm::InputTag srcPVs    
string jetType   GenJet / CaloJet / PFJet / ...
string jetAlgorithm   algorithm name
double rParam   jet "radius"
double inputEtMin   cutoff on the input object Et
(objs with Et < inputEtMin are discarded)
double inputEMin   cutoff on the input object E
double jetPtMin   cutoff on the output jet Pt ?
bool doPVCorrection    
bool doAreaFastjet    
bool doRhoFastjet    
bool doPUOffsetCorr    
unsigned maxBadEcalCells    
unsigned maxRecoveredEcalCells    
unsigned maxProblematicEcalCells    
unsigned maxBadHcalCells    
unsigned maxRecoveredHcalCells    
unsigned maxProblematicHcalCells    
optional parameters
string jetCollInstanceName ""  
string subtractorName    
double Ghost_EtaMax    
int Active_Area_Repeats    
double GhostArea    
bool restrictInputs    
unsigned int untracked maxInputs    
. . .

3.3 FastjetJetProducer: configuration parameters

Extracted from FastjetJetProducer.cc (3_8_5) :

type name default comment
all the parameters are optional:
bool UseOnlyVertexTracks false  
bool UseOnlyOnePV false  
double DzTrVtxMax 999999.  
double DxyTrVtxMax 999999.  
int MinVtxNdof 5  
double MaxVtxZ 15  

3.4 Available algorithms

3.4.1 The algorithms

The algorithms defined in VirtualJetProducer.cc (3_8_5) are:

jetAlgorithm
(cfg parameter)
interfaced FastJet algorithm
"SISCone" SISConePlugin (rParam_, 0.75, 0, 0.0, false,
fastjet::SISConePlugin::SM_pttilde)
"IterativeCone" CMSIterativeConePlugin (rParam_, 1.0)
"CDFMidPoint" CDFMidPointPlugin (rParam_, 0.75)
"ATLASCone" ATLASConePlugin (rParam_)
"Kt" JetDefinition (fastjet::kt_algorithm, rParam_)
"CambridgeAachen" JetDefinition (fastjet::cambridge_algorithm, rParam_)
"AntiKt" JetDefinition (fastjet::antikt_algorithm, rParam_)
"GeneralizedKt" JetDefinition (fastjet::genkt_algorithm, rParam_, -2)

3.4.2 FastJet constructors in use

The constructors are taken from the FastJet manual.

  • SISCone (p.29 of the manual)
SISConePlugin (double                         cone_radius,
               double                         overlap_threshold = 0.5,
               int                            n_pass_max = 0,
               double                         protojet_ptmin = 0.0,
               bool                           caching = false,
               SISConePlugin::SplitMergeScale split_merge_scale = SISConePlugin::SM_pttilde
              );
     
  • CMS iterative cone (p.34)
CMSIterativeConePlugin (double ConeRadius,
                        double SeedThreshold = 0.0
                       );
     
  • CDF Midpoint (p.32)
CDFMidPointPlugin ( double R,
                    double overlap_threshold,
                    double seed_threshold = 1.0,
                    double cone_area_fraction = 1.0
                  );
     
  • kt, anti-kt, Cambridge/Aachen (p.7)
fastjet::JetDefinition (fastjet::JetAlgorithm        jet_algorithm,
                        double                       R,
                        fastjet::RecombinationScheme recomb_scheme = E_scheme,
                        fastjet::Strategy            strategy = Best
                       );
     
  • Generalised-kt (p.8)
fastjet::JetDefinition (fastjet::JetAlgorithm        jet_algorithm,
                        double                       R,
                        double                       p,
                        fastjet::RecombinationScheme recomb_scheme = E_scheme,
                        fastjet::Strategy            strategy = Best
                       );
     
  • ATLAS iterative cone (p.34)
ATLASConePlugin ( double R,
                  double seedPt = 2.0,
                  double f = 0.5
                );
     

3.5 Example of configuration to produce Gen, Calo and PF jets with the AntiKt (R = 1.0) algorithm

The example is from JetAlgorithms > Algorithms .

Note that in case of generator jets, an additional producer InputGenJetsParticleSelector (see e.g. 3_8_5 ) needs to be called. It provides the input for the jet reconstruction: a reco::GenParticleRefVector object ( a typedef for the edm::Ref <reco::GenParticleCollection> ).
This extra module gets configured under the label genParticlesForJets via loading the file RecoJets/Configuration/python/GenJetParticles_cff.py .

#                   event setup
process.load("Configuration.StandardSequences.Geometry_cff")
process.load("Configuration.StandardSequences.MagneticField_cff")
#                   gen jet reconstruction modules
process.load("RecoJets.Configuration.GenJetParticles_cff")
process.load("RecoJets.JetProducers.ak5GenJets_cfi")
process.ak10GenJets = process.ak5GenJets.clone( rParam = 1.0)
#                   calo jet reconstruction module
process.load("RecoJets.JetProducers.ak5CaloJets_cfi")
process.ak10CaloJets = process.ak5CaloJets.clone( rParam = 1.0)
#                   pf jet reconstruction module
process.load("RecoJets.JetProducers.ak5PFJets_cfi")
process.ak10PFJets = process.ak5PFJets.clone( rParam = 1.0)
[...]
process.recoMyJets = cms.Path(process.genJetParticles + process.ak10GenJets + process.ak10CaloJets + process.ak10PFJets)
[...]
process.schedule = cms.Schedule([...],process.recoMyJets,process.myAnalysis,[...])

3.6 Standard Configurations

3.6.1 GenJets

In this section:


import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.GenJetParameters_cfi import *
from RecoJets.JetProducers.AnomalousCellParameters_cfi import *

ak5GenJets = cms.EDProducer(
    "FastjetJetProducer",
    GenJetParameters,
    AnomalousCellParameters,
    jetAlgorithm = cms.string("AntiKt"),
    rParam       = cms.double(0.5)
    )
     
import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.GenJetParameters_cfi import *
from RecoJets.JetProducers.AnomalousCellParameters_cfi import *

sisCone5GenJets = cms.EDProducer(
    "FastjetJetProducer",
    GenJetParameters,
    AnomalousCellParameters,
    jetAlgorithm = cms.string("SISCone"),
    rParam       = cms.double(0.5)
    )
     
More... Close
import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.GenJetParameters_cfi import *
from RecoJets.JetProducers.AnomalousCellParameters_cfi import *

kt4GenJets = cms.EDProducer(
    "FastjetJetProducer",
    GenJetParameters,
    AnomalousCellParameters,
    jetAlgorithm = cms.string("Kt"),
    rParam       = cms.double(0.4)
    )
     
More... Close
import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.GenJetParameters_cfi import *
from RecoJets.JetProducers.AnomalousCellParameters_cfi import *

iterativeCone5GenJets = cms.EDProducer(
    "FastjetJetProducer",
    GenJetParameters,
    AnomalousCellParameters,
    jetAlgorithm = cms.string("IterativeCone"),
    rParam       = cms.double(0.5)
    )
     
More... Close

  • There are also standard configurations for
               ca4GenJets (algorithm "CambridgeAachen") : ca4GenJets_cfi.py
               gk5GenJets (algorithm "GeneralizedKt") : gk5GenJets_cfi.py
    They are constructed very similarily to the previous modules.

  • All the above config files import GenJetParameters_cfi and AnomalousCellParameters_cfi , defining the parameter sets GenJetParameters and AnomalousCellParameters , which then are used inside the module definitions .
import FWCore.ParameterSet.Config as cms

GenJetParameters = cms.PSet(
    src            = cms.InputTag("genParticlesForJets"),
    srcPVs         = cms.InputTag(''),
    jetType        = cms.string('GenJet'),
    jetPtMin       = cms.double(3.0),
    inputEtMin     = cms.double(0.0),
    inputEMin      = cms.double(0.0),
    doPVCorrection = cms.bool(False),
    # pileup with offset correction
    doPUOffsetCorr = cms.bool(False),
       # if pileup is false, these are not read:
       nSigmaPU = cms.double(1.0),
       radiusPU = cms.double(0.5),  
    # fastjet-style pileup     
    doAreaFastjet  = cms.bool(False),
    doRhoFastjet   = cms.bool(False),
      # if doPU is false, these are not read:
      Active_Area_Repeats = cms.int32(5),
      GhostArea = cms.double(0.01),
      Ghost_EtaMax = cms.double(6.0)
    )
        
Note: in the previous Rev.1.7 (valid for 341 - 380_pre7), the jetPtMin was 5.0 i.o. 3.0 , and so it was since quite long ago (years...).
import FWCore.ParameterSet.Config as cms

AnomalousCellParameters = cms.PSet(
    maxBadEcalCells         = cms.uint32(9999999),
    maxRecoveredEcalCells   = cms.uint32(9999999),
    maxProblematicEcalCells = cms.uint32(9999999),
    maxBadHcalCells         = cms.uint32(9999999),
    maxRecoveredHcalCells   = cms.uint32(9999999),
    maxProblematicHcalCells = cms.uint32(9999999)
)
        

  • recoGenJets sequence and final configuration of GenJets

    The file RecoJets/Configuration/python/RecoGenJets_cff.py finalises the configuration of GenJets .
    In e.g. Rev.1.8 (valid from 360_pre5 to at least 390), the following actions are taken:
    • sisCone7GenJets, ak7GenJets, gk7GenJets, kt6GenJets, ca6GenJets are defined as clones of the existing definitions with changed jet radii
    • The whole zoo of already defined GenJets are cloned by appending the ending NoNu to the module names, and setting src = cms.InputTag("genParticlesForJetsNoNu") to the NoNu clones
    • An additional set of clones is produced by appending the ending NoMuNoNu to the module names, and setting src = cms.InputTag("genParticlesForJetsNoMuNoNu") to the NoMuNoNu clones
    • Then the recoGenJets sequence is introduced, combining the kt4, kt6, ak5, ak7, ic5 modules. This sequence seems to enter later the standard reconstruction (for the simulation)
    • Also introduced are the sequences
      • recoAllGenJets -- combining all the normal (i.e. w/o NoNu, NoMuNoNu) modules
      • recoAllGenJetsNoNu -- combining the NoNu zoo
      • recoAllGenJetsNoMuNoNu -- combining the NoMuNoNu zoo
    • Here is the Rev.1.8 text: More... Close
import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.sc5GenJets_cfi import sisCone5GenJets
from RecoJets.JetProducers.ic5GenJets_cfi import iterativeCone5GenJets
from RecoJets.JetProducers.ak5GenJets_cfi import ak5GenJets
from RecoJets.JetProducers.gk5GenJets_cfi import gk5GenJets
from RecoJets.JetProducers.kt4GenJets_cfi import kt4GenJets
from RecoJets.JetProducers.ca4GenJets_cfi import ca4GenJets

from RecoHI.HiJetAlgos.HiGenJets_cff import *


sisCone7GenJets = sisCone5GenJets.clone( rParam = 0.7 )
ak7GenJets      = ak5GenJets.clone( rParam = 0.7 )
gk7GenJets      = gk5GenJets.clone( rParam = 0.7 )
kt6GenJets      = kt4GenJets.clone( rParam = 0.6 )
ca6GenJets      = ca4GenJets.clone( rParam = 0.6 )


sisCone5GenJetsNoNu = sisCone5GenJets.clone( src = cms.InputTag("genParticlesForJetsNoNu") )
sisCone7GenJetsNoNu = sisCone7GenJets.clone( src = cms.InputTag("genParticlesForJetsNoNu") )
kt4GenJetsNoNu = kt4GenJets.clone( src = cms.InputTag("genParticlesForJetsNoNu") )
kt6GenJetsNoNu = kt6GenJets.clone( src = cms.InputTag("genParticlesForJetsNoNu") )
iterativeCone5GenJetsNoNu = iterativeCone5GenJets.clone( src = cms.InputTag("genParticlesForJetsNoNu") )
ak5GenJetsNoNu = ak5GenJets.clone( src = cms.InputTag("genParticlesForJetsNoNu") )
ak7GenJetsNoNu = ak7GenJets.clone( src = cms.InputTag("genParticlesForJetsNoNu") )
gk5GenJetsNoNu = gk5GenJets.clone( src = cms.InputTag("genParticlesForJetsNoNu") )
gk7GenJetsNoNu = gk7GenJets.clone( src = cms.InputTag("genParticlesForJetsNoNu") )
ca4GenJetsNoNu = ca4GenJets.clone( src = cms.InputTag("genParticlesForJetsNoNu") )
ca6GenJetsNoNu = ca6GenJets.clone( src = cms.InputTag("genParticlesForJetsNoNu") )

sisCone5GenJetsNoMuNoNu = sisCone5GenJets.clone( src = cms.InputTag("genParticlesForJetsNoMuNoNu") )
sisCone7GenJetsNoMuNoNu = sisCone7GenJets.clone( src = cms.InputTag("genParticlesForJetsNoMuNoNu") )
kt4GenJetsNoMuNoNu = kt4GenJets.clone( src = cms.InputTag("genParticlesForJetsNoMuNoNu") )
kt6GenJetsNoMuNoNu = kt6GenJets.clone( src = cms.InputTag("genParticlesForJetsNoMuNoNu") )
iterativeCone5GenJetsNoMuNoNu = iterativeCone5GenJets.clone( src = cms.InputTag("genParticlesForJetsNoMuNoNu") )
ak5GenJetsNoMuNoNu = ak5GenJets.clone( src = cms.InputTag("genParticlesForJetsNoMuNoNu") )
ak7GenJetsNoMuNoNu = ak7GenJets.clone( src = cms.InputTag("genParticlesForJetsNoMuNoNu") )
gk5GenJetsNoMuNoNu = gk5GenJets.clone( src = cms.InputTag("genParticlesForJetsNoMuNoNu") )
gk7GenJetsNoMuNoNu = gk7GenJets.clone( src = cms.InputTag("genParticlesForJetsNoMuNoNu") )
ca4GenJetsNoMuNoNu = ca4GenJets.clone( src = cms.InputTag("genParticlesForJetsNoMuNoNu") )
ca6GenJetsNoMuNoNu = ca6GenJets.clone( src = cms.InputTag("genParticlesForJetsNoMuNoNu") )

recoGenJets   =cms.Sequence(kt4GenJets+kt6GenJets+
                            iterativeCone5GenJets+
                            ak5GenJets+ak7GenJets)

recoAllGenJets=cms.Sequence(sisCone5GenJets+sisCone7GenJets+
                            kt4GenJets+kt6GenJets+
                            iterativeCone5GenJets+
                            ak5GenJets+ak7GenJets+
                            gk5GenJets+gk7GenJets+
                            ca4GenJets+ca6GenJets)

recoAllGenJetsNoNu=cms.Sequence(sisCone5GenJetsNoNu+sisCone7GenJetsNoNu+
                                kt4GenJetsNoNu+kt6GenJetsNoNu+
                                iterativeCone5GenJetsNoNu+
                                ak5GenJetsNoNu+ak7GenJetsNoNu+
                                gk5GenJetsNoNu+gk7GenJetsNoNu+
                                ca4GenJetsNoNu+ca6GenJetsNoNu)

recoAllGenJetsNoMuNoNu=cms.Sequence(sisCone5GenJetsNoMuNoNu+sisCone7GenJetsNoMuNoNu+
                                    kt4GenJetsNoMuNoNu+kt6GenJetsNoMuNoNu+
                                    iterativeCone5GenJetsNoMuNoNu+
                                    ak5GenJetsNoMuNoNu+ak7GenJetsNoMuNoNu+
                                    gk5GenJetsNoMuNoNu+gk7GenJetsNoMuNoNu+
                                    ca4GenJetsNoMuNoNu+ca6GenJetsNoMuNoNu)
        

. . .
from RecoJets.Configuration.RecoGenJets_cff import *
. . .
genJetMET = cms.Sequence(genJetParticles*recoGenJets+...)
pgen = cms.Sequence(...+genJetMET)
     

3.6.2 CaloJets

In this section:


import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.CaloJetParameters_cfi import *
from RecoJets.JetProducers.AnomalousCellParameters_cfi import *

ak5CaloJets = cms.EDProducer(
    "FastjetJetProducer",
    CaloJetParameters,
    AnomalousCellParameters,
    jetAlgorithm = cms.string("AntiKt"),
    rParam       = cms.double(0.5)
    )
     
import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.CaloJetParameters_cfi import *
from RecoJets.JetProducers.AnomalousCellParameters_cfi import *

sisCone5CaloJets = cms.EDProducer(
    "FastjetJetProducer",
    CaloJetParameters,
    AnomalousCellParameters,
    jetAlgorithm = cms.string("SISCone"),
    rParam       = cms.double(0.5)
    )
     
import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.CaloJetParameters_cfi import *
from RecoJets.JetProducers.AnomalousCellParameters_cfi import *

kt4CaloJets = cms.EDProducer(
    "FastjetJetProducer",
    CaloJetParameters,
    AnomalousCellParameters,
    jetAlgorithm = cms.string("Kt"),
    rParam       = cms.double(0.4)
    )
     
import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.CaloJetParameters_cfi import *
from RecoJets.JetProducers.AnomalousCellParameters_cfi import *

iterativeCone5CaloJets = cms.EDProducer(
    "FastjetJetProducer",
    CaloJetParameters,
    AnomalousCellParameters,
    jetAlgorithm = cms.string("IterativeCone"),
    rParam       = cms.double(0.5)
    )
     

  • There are also similar standard configurations for
               ca4CaloJets (algorithm "CambridgeAachen") : ca4CaloJets_cfi.py
               gk5CaloJets (algorithm "GeneralizedKt") : gk5CaloJets_cfi.py

  • All the above config files import CaloJetParameters_cfi and AnomalousCellParameters_cfi , defining the parameter sets CaloJetParameters and AnomalousCellParameters , which then are used inside the module definitions .
import FWCore.ParameterSet.Config as cms

CaloJetParameters = cms.PSet(
    src            = cms.InputTag('towerMaker'),
    srcPVs         = cms.InputTag('offlinePrimaryVertices'),
    jetType        = cms.string('CaloJet'),
    # minimum jet pt
    jetPtMin       = cms.double(3.0),
    # minimum calo tower input et
    inputEtMin     = cms.double(0.3),
    # minimum calo tower input energy
    inputEMin      = cms.double(0.0),
    # primary vertex correction
    doPVCorrection = cms.bool(True),
    # pileup with offset correction
    doPUOffsetCorr = cms.bool(False),
       # if pileup is false, these are not read:
       nSigmaPU = cms.double(1.0),
       radiusPU = cms.double(0.5),  
    # fastjet-style pileup 
    doAreaFastjet    = cms.bool(False),
    doRhoFastjet     = cms.bool(False),
       # if doPU is false, these are not read:
       Active_Area_Repeats = cms.int32(1),
       GhostArea = cms.double(0.01),
       Ghost_EtaMax = cms.double(5.0),
    )
        
Note: in the previous Rev.1.13 (valid for 341 - 380_pre7), the jetPtMin was 1.0 i.o. 3.0 , and so it was since at least rev.1.8 (300_pre2 -...)

  • recoJets sequence and final configuration of CaloJets

    The file RecoJets/Configuration/python/RecoJets_cff.py finalises the configuration of CaloJets .
    In e.g. Rev.1.5 (valid from 360_pre5 to at least 390_pre6), the following actions are taken:
    • sisCone7CaloJets, ak7CaloJets, gk7CaloJets, kt6CaloJets, ca6CaloJets are defined as clones of the existing definitions with changed jet radii
    • sisCone definitions are slightly modified
    • The whole zoo of already defined CaloJets are cloned by adding the ending PUCorr to the module names, and setting doPUOffsetCorr = True to the PUCorr clones
    • Then the recoJets sequence is introduced, combining the kt4, kt6, ak5, ak7, ic5 modules. This sequence seems to enter later the standard reconstruction
    • Also introduced are the sequences
      • recoAllJets -- combining all modules w/o pileup corrections (PUCorr)
      • recoAllJetsPUOffsetCorr -- combining the PUCorr zoo
    • Here is the Rev.1.5 text: More... Close
import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.sc5CaloJets_cfi import sisCone5CaloJets
from RecoJets.JetProducers.ic5CaloJets_cfi import iterativeCone5CaloJets
from RecoJets.JetProducers.ak5CaloJets_cfi import ak5CaloJets
from RecoJets.JetProducers.gk5CaloJets_cfi import gk5CaloJets
from RecoJets.JetProducers.kt4CaloJets_cfi import kt4CaloJets
from RecoJets.JetProducers.ca4CaloJets_cfi import ca4CaloJets


sisCone7CaloJets = sisCone5CaloJets.clone( rParam = 0.7 )
ak7CaloJets = ak5CaloJets.clone( rParam = 0.7 )
gk7CaloJets = gk5CaloJets.clone( rParam = 0.7 )
kt6CaloJets = kt4CaloJets.clone( rParam = 0.6 )
ca6CaloJets = ca4CaloJets.clone( rParam = 0.6 )

# Restrict SISCone algorithm to 1000 towers input
sisCone5CaloJets.restrictInputs = cms.bool(True)
sisCone5CaloJets.maxInputs = cms.uint32(1000)

sisCone7CaloJets.restrictInputs = cms.bool(True)
sisCone7CaloJets.maxInputs = cms.uint32(1000)

doPileup = cms.bool(True)

sisCone5CaloJetsPUCorr      =sisCone5CaloJets.clone      (doPUOffsetCorr = doPileup)
sisCone7CaloJetsPUCorr      =sisCone7CaloJets.clone      (doPUOffsetCorr = doPileup)
kt4CaloJetsPUCorr           =kt4CaloJets.clone           (doPUOffsetCorr = doPileup)
kt6CaloJetsPUCorr           =kt6CaloJets.clone           (doPUOffsetCorr = doPileup)
iterativeCone5CaloJetsPUCorr=iterativeCone5CaloJets.clone(doPUOffsetCorr = doPileup)
ak5CaloJetsPUCorr           =ak5CaloJets.clone           (doPUOffsetCorr = doPileup)
ak7CaloJetsPUCorr           =ak7CaloJets.clone           (doPUOffsetCorr = doPileup)
gk5CaloJetsPUCorr           =gk5CaloJets.clone           (doPUOffsetCorr = doPileup)
gk7CaloJetsPUCorr           =gk7CaloJets.clone           (doPUOffsetCorr = doPileup)
ca4CaloJetsPUCorr           =ca4CaloJets.clone           (doPUOffsetCorr = doPileup)
ca6CaloJetsPUCorr           =ca6CaloJets.clone           (doPUOffsetCorr = doPileup)


recoJets   =cms.Sequence(kt4CaloJets+kt6CaloJets+
                         iterativeCone5CaloJets+
                         ak5CaloJets+ak7CaloJets)

recoAllJets=cms.Sequence(sisCone5CaloJets+sisCone7CaloJets+
                         kt4CaloJets+kt6CaloJets+
                         iterativeCone5CaloJets+
                         ak5CaloJets+ak7CaloJets+
                         gk5CaloJets+gk7CaloJets+
                         ca4CaloJets+ca6CaloJets)


recoAllJetsPUOffsetCorr=cms.Sequence(sisCone5CaloJetsPUCorr+sisCone7CaloJetsPUCorr+
                                     kt4CaloJetsPUCorr+kt6CaloJetsPUCorr+
                                     iterativeCone5CaloJetsPUCorr+
                                     ak5CaloJetsPUCorr+ak7CaloJetsPUCorr+
                                     gk5CaloJetsPUCorr+gk7CaloJetsPUCorr+
                                     ca4CaloJetsPUCorr+ca6CaloJetsPUCorr)
        

import FWCore.ParameterSet.Config as cms

from RecoJets.Configuration.RecoJets_cff import *
from RecoJets.Configuration.JetIDProducers_cff import *
from RecoJets.Configuration.RecoTrackJets_cff import *
from RecoJets.Configuration.RecoJetAssociations_cff import *
from RecoJets.Configuration.RecoPFJets_cff import *
from RecoJets.Configuration.RecoJPTJets_cff import *

jetGlobalReco = cms.Sequence(recoJets*recoJetIds*recoTrackJets)
jetHighLevelReco = cms.Sequence(recoJetAssociations*recoPFJets*recoJPTJets)
     

. . .
from RecoJets.Configuration.RecoJetsGlobal_cff import *
. . .
globalreco = cms.Sequence(... * jetGlobalReco + ...)
globalreco_plusRS = cms.Sequence(globalreco*...)
globalreco_plusPL= cms.Sequence(globalreco*...)

# "Export" Section
reconstruction         = cms.Sequence(...*globalreco*)

#sequences with additional stuff
reconstruction_withPixellessTk  = cms.Sequence(...*globalreco_plusPL*...)
reconstruction_withRS  = cms.Sequence(...*globalreco_plusRS*...)
reconstruction_HcalNZS = cms.Sequence(...*globalreco*...)

#sequences without some stuffs
#
#reconstruction_woConv        = cms.Sequence(...*globalreco*...)
reconstruction_woCosmicMuons = cms.Sequence(...*globalreco*...)

# define a standard candle. please note I am picking up individual
# modules instead of sequences
#
reconstruction_standard_candle = cms.Sequence(...*globalreco*...)
     

3.6.3 PFJets

In this section:


import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.PFJetParameters_cfi import *
from RecoJets.JetProducers.AnomalousCellParameters_cfi import *

ak5PFJets = cms.EDProducer(
    "FastjetJetProducer",
    PFJetParameters,
    AnomalousCellParameters,
    jetAlgorithm = cms.string("AntiKt"),
    rParam       = cms.double(0.5)
    )
     
import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.PFJetParameters_cfi import *
from RecoJets.JetProducers.AnomalousCellParameters_cfi import *

sisCone5PFJets = cms.EDProducer(
    "FastjetJetProducer",
    PFJetParameters,
    AnomalousCellParameters,
    jetAlgorithm = cms.string("SISCone"),
    rParam       = cms.double(0.5)
    )
     
import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.PFJetParameters_cfi import *
from RecoJets.JetProducers.AnomalousCellParameters_cfi import *

kt4PFJets = cms.EDProducer(
    "FastjetJetProducer",
    PFJetParameters,
    AnomalousCellParameters,
    jetAlgorithm = cms.string("Kt"),
    rParam       = cms.double(0.4)
    )
     
import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.PFJetParameters_cfi import *
from RecoJets.JetProducers.AnomalousCellParameters_cfi import *

iterativeCone5PFJets = cms.EDProducer(
    "FastjetJetProducer",
    PFJetParameters,
    AnomalousCellParameters,
    jetAlgorithm = cms.string("IterativeCone"),
    rParam       = cms.double(0.5)
    )
     

  • There are also similar standard configurations for
               ca4PFJets (algorithm "CambridgeAachen") : ca4PFJets_cfi.py
               gk5PFJets (algorithm "GeneralizedKt") : gk5PFJets_cfi.py

  • All the above config files import PFJetParameters_cfi and AnomalousCellParameters_cfi , defining the parameter sets PFJetParameters and AnomalousCellParameters , which then are used inside the module definitions .
import FWCore.ParameterSet.Config as cms

PFJetParameters = cms.PSet(
    src            = cms.InputTag('particleFlow'),
    srcPVs         = cms.InputTag(''),
    jetType        = cms.string('PFJet'),
    jetPtMin       = cms.double(3.0),
    inputEMin      = cms.double(0.0),
    inputEtMin     = cms.double(0.0),
    doPVCorrection = cms.bool(False),
    # pileup with offset correction
    doPUOffsetCorr = cms.bool(False),
       # if pileup is false, these are not read:
       nSigmaPU = cms.double(1.0),
       radiusPU = cms.double(0.5),  
    # fastjet-style pileup     
    doAreaFastjet   = cms.bool(False),
    doRhoFastjet    = cms.bool(False),
      # if doPU is false, these are not read:
      Active_Area_Repeats = cms.int32(1),
      GhostArea = cms.double(0.01),
      Ghost_EtaMax = cms.double(5.0)
    )
        
Note: in the previous Rev.1.6 (valid for 341 - 380_pre7), the jetPtMin was 1.0 i.o. 3.0 , and so it was since at least rev.1.3 (300_pre3 -...)

  • recoPFJets sequence and final configuration of PFJets

    The file RecoJets/Configuration/python/RecoPFJets_cff.py finalises the configuration of PFJets .
    In e.g. Rev.1.7 (valid from 360_pre5 to at least 390), the following actions are taken:
    • sisCone7PFJets, ak7PFJets, gk7PFJets, kt6PFJets, ca6PFJets are defined as clones of the existing definitions with changed jet radii
    • Then the recoPFJets sequence is introduced, combining the kt4, kt6, ak5, ak7, ic5 modules. This sequence seems to enter later the standard reconstruction
    • Also introduced is the sequence
      • recoAllPFJets -- combining all the module introduced so far
    • Here is the Rev.1.7 text: More... Close
import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.sc5PFJets_cfi import sisCone5PFJets
from RecoJets.JetProducers.ic5PFJets_cfi import iterativeCone5PFJets
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
from RecoJets.JetProducers.gk5PFJets_cfi import gk5PFJets
from RecoJets.JetProducers.kt4PFJets_cfi import kt4PFJets
from RecoJets.JetProducers.ca4PFJets_cfi import ca4PFJets


sisCone7PFJets = sisCone5PFJets.clone( rParam = 0.7 )
ak7PFJets = ak5PFJets.clone( rParam = 0.7 )
gk7PFJets = gk5PFJets.clone( rParam = 0.7 )
kt6PFJets = kt4PFJets.clone( rParam = 0.6 )
ca6PFJets = ca4PFJets.clone( rParam = 0.6 )


recoPFJets   =cms.Sequence(kt4PFJets+kt6PFJets+
                           iterativeCone5PFJets+
                           ak5PFJets+ak7PFJets)

recoAllPFJets=cms.Sequence(sisCone5PFJets+sisCone7PFJets+
                           kt4PFJets+kt6PFJets+
                           iterativeCone5PFJets+
                           ak5PFJets+ak7PFJets+
                           gk5PFJets+gk7PFJets+
                           ca4PFJets+ca6PFJets)
        

import FWCore.ParameterSet.Config as cms

from RecoJets.Configuration.RecoJets_cff import *
from RecoJets.Configuration.JetIDProducers_cff import *
from RecoJets.Configuration.RecoTrackJets_cff import *
from RecoJets.Configuration.RecoJetAssociations_cff import *
from RecoJets.Configuration.RecoPFJets_cff import *
from RecoJets.Configuration.RecoJPTJets_cff import *

jetGlobalReco = cms.Sequence(recoJets*recoJetIds*recoTrackJets)
jetHighLevelReco = cms.Sequence(recoJetAssociations*recoPFJets*recoJPTJets)
     

. . .
from RecoJets.Configuration.RecoJetsGlobal_cff import *
. . .
highlevelreco = cms.Sequence(...*jetHighLevelReco*...)
. . .
# "Export" Section
reconstruction         = cms.Sequence(...*highlevelreco*...)

#sequences with additional stuff
reconstruction_withPixellessTk  = cms.Sequence(...*highlevelreco*...)
reconstruction_withRS  = cms.Sequence(...*highlevelreco*...)
reconstruction_HcalNZS = cms.Sequence(...*highlevelreco*...)

#sequences without some stuffs
reconstruction_woCosmicMuons = cms.Sequence(...*highlevelreco*...)
. . .
     

4. InputGenJetsParticleSelector : producing input for GenJet modules

4.1 General info

Purpose of the producer:

  • to select particles
    • from an input reco::GenParticleCollection
    • into an output reco::GenParticleRefVector object
      ( a typedef for the edm::Ref <reco::GenParticleCollection> ),
      which is needed as an input for the jet producer ( FastjetJetProducer ) in case of GenJets .

Inheritance diagram (CMSSW_3_8_5):

Parent arrow
edm::EDProducer
Parent arrow
InputGenJetsParticleSelector

Location:

Description from the code:

  • .h Rev.1.2 (valid from 330_pre1 to at least 390) More... Close
/* \class InputGenJetsParticleSelector
 * 
 * Selects particles for the GenJet input.
 * Deselect specified particles, also radiation from resoances.
 * Or only select partonic final state.
 * The algorithm is based on code of Christophe Saout. 
 *
 * \author: Andreas Oehler
 */
     
  • .cc Rev.1.3 (valid from 340 to at least 390) More... Close
/* \class GenJetInputParticleSelector
*
*  Selects particles that are used as input for the GenJet collection.
*  Logic: select all stable particles, except for particles specified in
*  the config file that come from
*  W,Z and H decays, and except for a special list, which can be used for
*  unvisible BSM-particles.
*  It is also possible to only selected the partonic final state, 
*  which means all particles before the hadronization step.
*
*  The algorithm is based on code of Christophe Saout.
*
*  Usage: [example for no resonance from nu an mu, and deselect invisible BSM 
*         particles ]
*
*  module genJetParticles = InputGenJetsParticleSelector {
*                InputTag src = "genParticles"
*                bool partonicFinalState = false  
*                bool excludeResonances = true   
*                vuint32 excludeFromResonancePids = {13,12,14,16}
*                bool tausAsJets = false
*                vuint32 ignoreParticleIDs = {   1000022, 2000012, 2000014,
*                                                2000016, 1000039, 5000039,
*                                                4000012, 9900012, 9900014,
*                                                9900016, 39}
*        }
*
* \author: Christophe Saout, Andreas Oehler
*
*/
     

4.2 Configuration parameters

Extracted from the .cc Rev.1.3 (valid from 340 to at least 390).

type name default comment
edm::InputTag src   input collection label
bool partonicFinalState  
bool excludeResonances  
bool tausAsJets  
std::vector < unsigned int > ignoreParticleIDs empty  
std::vector < unsigned int > excludeFromResonancePids  

4.3 Standard configuration

4.3.1 module genParticlesForJets and sequence genJetParticles

The configuration of the InputGenJetsParticleSelector producer is done in the file CMSSW/RecoJets/Configuration/python/GenJetParticles_cff.py .

  • the producer is configured under the label genParticlesForJets
  • then this label is put into the sequence genJetParticles

E.g., Rev.1.6 (valid from 360_pre3 to at least 390), contains:

import FWCore.ParameterSet.Config as cms

#
# $Id: GenJetParticles_cff.py,v 1.6 2010/03/01 21:25:51 wmtan Exp $
#
# ShR 27 Mar 07: move modules producing candidates for Jets from RecoGenJets.cff
# 
#
genParticlesForJets = cms.EDProducer("InputGenJetsParticleSelector",
    src = cms.InputTag("genParticles"),
    ignoreParticleIDs = cms.vuint32(
         1000022,
         1000012, 1000014, 1000016,
         2000012, 2000014, 2000016,
         1000039, 5100039,
         4000012, 4000014, 4000016,
         9900012, 9900014, 9900016,
         39),
    partonicFinalState = cms.bool(False),
    excludeResonances = cms.bool(True),
    excludeFromResonancePids = cms.vuint32(12, 13, 14, 16),
    tausAsJets = cms.bool(False)
)

genJetParticles = cms.Sequence(genParticlesForJets)

hiGenParticlesForJets = genParticlesForJets.clone()
hiGenParticlesForJets.src = cms.InputTag("hiGenParticles")

genParticlesForJetsNoNu = genParticlesForJets.clone()
genParticlesForJetsNoNu.ignoreParticleIDs += cms.vuint32( 12,14,16)

genParticlesForJetsNoMuNoNu = genParticlesForJets.clone()
genParticlesForJetsNoMuNoNu.ignoreParticleIDs += cms.vuint32( 12,13,14,16)
     

Note: There are additional configurations under labels hiGenParticlesForJets, genParticlesForJetsNoNu, genParticlesForJetsNoMuNoNu ( hi for heavy ions , ...).

  • What is excluded from the input particle collection?

    • ignoreParticleIDs defines a list of BSM particles: More... Close
      id PDG 2010 Sort Pythia 6.4 manual
      Chapt.5.1 Particle Codes
      Sort
      1000022 SUSY SUSY: ~chi_10
      1000012 SUSY SUSY: ~nu_eL
      1000014 SUSY SUSY: ~nu_muL
      1000016 SUSY SUSY: ~nu_tauL
      2000012 ? SUSY: ~nu_Re
      2000014 ? SUSY: ~nu_Rmu
      2000016 ? SUSY: ~nu_Rtau
      1000039 SUSY SUSY: ~Gravitino
      5100039 KALUZA-KLEIN EXCITATIONS ?
      4000012 EXCITED nu_e EXCITED ferm.: nu*_e0
      4000014 ? (? nu*_mu0 )
      4000016 ? (? nu*_tau0 )
      9900012 ? EXOTIC: nu_Re
      9900014 ? EXOTIC: nu_Rmu
      9900016 ? EXOTIC: nu_Rtau
      39 Graviton Graviton
    • There are also
excludeResonances = cms.bool(True),
excludeFromResonancePids = cms.vuint32(12, 13, 14, 16),
        
Here more substantial particles are listed: three neutrinos and mu- . However, the comments (.cc) in the producer code suggest that those particle are only excluded if they are products of W, Z, H decays? Are they? This has to be checked in the code...

4.3.2 Standard generator sequences with genJetParticles

The sequence genParticlesForJets is used in the file Configuration/StandardSequences/python/Generator_cff.py .
E.g, in Rev.1.12 (384 - 390) one finds: More... Close

. . .
from RecoJets.Configuration.GenJetParticles_cff import *
. . .
genJetMET = cms.Sequence(genJetParticles*recoGenJets+...)
pgen = cms.Sequence(...+genJetMET)
. . .
     


Edit | Attach | Watch | Print version | History: r21 < r20 < r19 < r18 < r17 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r21 - 2012-06-09 - AlexanderFedotov
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

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