Imperial Analysis
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Physics Objects

This page documents:

  • The physics object classes available in the framework
  • The CMSSW modules used to produce them
  • Example python configuration for each module
  • The object properties that are not filled by default in each module
  • Recipes for non-standard objects and reconstruction

Use the contents panel on the right to navigate between objects. Each section provides links to the documentation for the object class in question as well as the producer module. To check the list of properties an object class provides, follow the link to the object page. From this page the documentation for each set_[property] method will contain a link to the source code of the producer module where this method is called.

An example python configuration for each producer module is also given below. All these snippets are extracted from the file: python/default_producers_cfi.py.

The basic configuration for each module is usually the same: the input option takes an edm::InputTag to the input object collection, and the branch option takes a string that will label the branch in the output TTree. Other options typically control the addition of extra object properties that are not filled by default in the module. Reasons for this can vary, but are typically due to one of the following:

  • The interface to access the property changes between CMSSW releases, or is not present at all in some subset of releases
    The code to access this property can't be included in the producer, as it would fail to compile in some releases. The solution is often a separate producer for just this property, stored in an independent git repository that can be checked-out as a separate CMSSW package. This repository can then have separate branches for different versions of CMSSW. This separate producer will typically add an edm::ValueMap<T> to the event, where T is the type of the property in question. An option is then provided in the producer to read load this ValueMap and extract the values. There are several examples of this workaround below. These separate producers follow a module naming convention of IC[Object][Property]Calcuator, a CMSSW package convention of ICAnalysis/[Property]Calculator and git repository convention of ICAnalysis-[Property]Calculator.
  • A new method to calculate some property is introduced in a later CMSSW release, but the possibility to use the old method should be maintained.
    If both the new and the old method are supported in all CMSSW versions then one possibility is to just add an option to the main producer to switch between methods. Or, if the new method is only available in later releases, a better way is to create a separate producer in a new package as in the previous example. The old method should also be moved to a separate producer. However this may remain within this package as long as it still compiles in all the supported releases.
  • The property requires several other inputs from the edm::Event
    In this case to allow maximum flexibility the other inputs must also be specified in the module configuration, and the calculation should remain optional to allow for the case where these inputs are not available in some dataset to be processed.
Note
Producer input collections: The majority of the CMSSW producer modules listed below use edm::View objects to access the input collection. This provides a certain amount of flexibility in the actual type of the input collection. An edm::View<T>, where T is some object class, can access an std::vector<T>, an edm::RefVector<T>, or the corresponding collections for some other type U which derives from the type T.
Warning
Reading ValueMaps: Because of the way references are stored in edm::ValueMap objects these should not be produced using and edm::RefVector<T> collection as input, but rather the original std::vector<T> collection of concrete objects. For example, even if you intend to ntuple-ise a filtered edm::RefVector<GsfElectron> collection, you should still produce the ID and isolation ValueMap objects using the original std::vector<GsfElectron> collection.

Candidate

Example usage

1 icCandidateProducer = cms.EDProducer('ICCandidateProducer',
2  branch = cms.string("l1EmIsolated"),
3  input = cms.InputTag("l1extraParticles", "Isolated", "RECO")
4 )

PFCandidate

  • Definition: ic::PFCandidate
  • CMSSW Producers: ICPFProducer, ICPFFromPackedProducer
  • Producer Input: Either a collection compatible with an edm::View<reco::PFCandidate> or an edm::View<pat::PackedCandidate> (the latter only available in CMSSW_7_X_Y series releases)
  • Producer Output: std::vector<ic::PFCandidate>

Example usage

1 icPFProducer = cms.EDProducer('ICPFProducer',
2  branch = cms.string("pfCandidates"),
3  input = cms.InputTag("particleFlow", "", "RECO"),
4  requestTracks = cms.bool(False),
5  requestGsfTracks = cms.bool(False),
6  inputUnpackedTracks = cms.InputTag("")
7 )
8 
9 icPFFromPackedProducer = cms.EDProducer('ICPFFromPackedProducer',
10  branch = cms.string("pfCandidates"),
11  input = cms.InputTag("packedPFCandidates", "", "PAT"),
12  requestTracks = cms.bool(False),
13  requestGsfTracks = cms.bool(False),
14  inputUnpackedTracks = cms.InputTag("unpackedTracksAndVertices")
15 )

CompositeCandidate

An ic::CompositeCandidate aggregates multiple ic::Candidate (or derived) objects, summing the charge and four-momenta, while maintaining pointers to the original input objects. Due to its transient nature a CMSSW producer is not provided.

Electron

The producer takes as input any collection where the objects are, or derive from, reco::GsfElectron objects. This includes pat::Electron collections. There are several ic::Electron properties which are not calculated by default in the producer:

Properties Notes
ic::Electron::r9 A ValueMap for this variable can be calculated by the external producer ICAnalysis-ElectronR9Calculator. The option inputR9 should be set to this ValueMap and the includeR9 option should be set to True.
ic::Electron::hcal_sum The extra inputs required to calculate this variable are not available in the AOD for all CMSSW release series. The method by which the variable is calculated is also expected to change in the CMSSW_7_X_Y series. A ValueMap for this variable can be produced by the ICElectronHcalDepthCalculator module within this package. The option inputHcalSum should be set to this ValueMap and the option includeHcalSum option set to true.
ic::Electron::has_matched_conversion In anticipation of the method to calculate this flag changing in future releases the calculation has moved to a separate producer, ICElectronConversionCalculator, within this package. This calculates a ValueMap which should be specified by the option inputConversionMatches when the includeConversionMatches option is set to True.
ic::Electron::dxy_vertex
ic::Electron::dz_vertex
These must be calculated with respect to a user-specified reco::Vertex. The first vertex in the collection specified by the inputVertices option will be used when includeVertexIP is set to True.
ic::Electron::dxy_beamspot This must be calculated with respect to a user-specified reco::BeamSpot. The beamspot set by the inputBeamspot option will be used when the option includeBeamspotIP is set to True.
ic::Electron::dr03_pfiso_charged_all
ic::Electron::dr03_pfiso_charged
ic::Electron::dr03_pfiso_neutral
ic::Electron::dr03_pfiso_gamma
ic::Electron::dr03_pfiso_pu
ic::Electron::dr04_pfiso_charged_all
ic::Electron::dr04_pfiso_charged
ic::Electron::dr04_pfiso_neutral
ic::Electron::dr04_pfiso_gamma
ic::Electron::dr04_pfiso_pu
These should be calculated on-the-fly in a CMSSW job. Individual analyses may modify the isolation definition, for example changing veto cones. See the section PF Isolation below for software recipes. Two sets of isolation values may be stored, nominally for isolation cones of sizes \(\Delta R = 0.3\) and \(\Delta R = 0.4\). These are enabled via the options includePFIso03 and includePFIso04 respectively. The InputTag for each isolation sum ValueMap must be specified in the pfIso03 and/or pfIso04 PSets as relevant.

Example usage

1 icElectronProducer = cms.EDProducer('ICElectronProducer',
2  branch = cms.string("electrons"),
3  input = cms.InputTag("gsfElectrons"),
4  includeR9 = cms.bool(False),
5  inputR9 = cms.InputTag("icElectronR9Calculator"),
6  includeHcalSum = cms.bool(False),
7  inputHcalSum = cms.InputTag("icElectronHcalDepthCalculator"),
8  includeConversionMatches = cms.bool(False),
9  inputConversionMatches = cms.InputTag("icElectronConversionCalculator"),
10  includeVertexIP = cms.bool(False),
11  inputVertices = cms.InputTag("offlinePrimaryVertices"),
12  includeBeamspotIP = cms.bool(False),
13  inputBeamspot = cms.InputTag("offlineBeamSpot"),
14  includeFloats = cms.PSet(
15  # A named list of InputTags identifying edm::ValueMap<float>
16  # objects keyed on the input GsfElectron collection. The hash
17  # of the name and the float value will be stored. For example:
18  # mvaNonTrigV0 = cms.InputTag("mvaNonTrigV0")
19  ),
20  includePFIso03 = cms.bool(False),
21  pfIso03 = cms.PSet(
22  chargedAll = cms.InputTag("elPFIsoValueChargedAll03PFIdPFIso"),
23  charged = cms.InputTag("elPFIsoValueCharged03PFIdPFIso"),
24  neutral = cms.InputTag("elPFIsoValueNeutral03PFIdPFIso"),
25  gamma = cms.InputTag("elPFIsoValueGamma03PFIdPFIso"),
26  pu = cms.InputTag("elPFIsoValuePU03PFIdPFIso")
27  ),
28  includePFIso04 = cms.bool(False),
29  pfIso04 = cms.PSet(
30  chargedAll = cms.InputTag("elPFIsoValueChargedAll04PFIdPFIso"),
31  charged = cms.InputTag("elPFIsoValueCharged04PFIdPFIso"),
32  neutral = cms.InputTag("elPFIsoValueNeutral04PFIdPFIso"),
33  gamma = cms.InputTag("elPFIsoValueGamma04PFIdPFIso"),
34  pu = cms.InputTag("elPFIsoValuePU04PFIdPFIso")
35  ),
36  includeClusterIso = cms.bool(False),
37  clusterIso = cms.PSet(
38  ecal = cms.InputTag("elEcalPFClusterIso"),
39  hcal = cms.InputTag("elHcalPFClusterIso")
40  )
41 )

Muon

  • Definition: ic::Muon
  • CMSSW Producer: ICMuonProducer
  • Producer Input: Any collection compatible with an edm::View<reco::Muon> or an edm::View<reco::PFCandidate>, but see below for details
  • Producer Output: std::vector<ic::Muon>

The producer operates in one of two modes, controlled by the option isPF. When set to False, the input collection should contain reco::Muon (or derived) objects. This includes pat::Muon collections. When set to True, the input should be a collection of reco::PFCandidate objects that are identified as PF muons. There are several ic::Muon properties which are not calculated by default in the producer:

Properties Notes
ic::Muon::dxy_vertex
ic::Muon::dz_vertex
These must be calculated with respect to a user-specified reco::Vertex. The first vertex in the collection specified by the inputVertices option will be used when includeVertexIP is set to True.
ic::Muon::dxy_beamspot This must be calculated with respect to a user-specified reco::BeamSpot. The beamspot set by the inputBeamspot option will be used when the option includeBeamspotIP is set to True.
ic::Muon::dr03_pfiso_charged_all
ic::Muon::dr03_pfiso_charged
ic::Muon::dr03_pfiso_neutral
ic::Muon::dr03_pfiso_gamma
ic::Muon::dr03_pfiso_pu
ic::Muon::dr04_pfiso_charged_all
ic::Muon::dr04_pfiso_charged
ic::Muon::dr04_pfiso_neutral
ic::Muon::dr04_pfiso_gamma
ic::Muon::dr04_pfiso_pu
These should be calculated on-the-fly in a CMSSW job. Individual analyses may modify the isolation definition, for example changing veto cones. See the section PF Isolation below for software recipes. Two sets of isolation values may be stored, nominally for isolation cones of sizes \(\Delta R = 0.3\) and \(\Delta R = 0.4\). These are enabled via the options includePFIso03 and includePFIso04 respectively. The InputTag for each isolation sum ValueMap must be specified in the pfIso03 and/or pfIso04 PSets as relevant.

Example usage

1 icMuonProducer = cms.EDProducer('ICMuonProducer',
2  branch = cms.string("muons"),
3  input = cms.InputTag("muons"),
4  isPF = cms.bool(False),
5  includeVertexIP = cms.bool(False),
6  inputVertices = cms.InputTag("offlinePrimaryVertices"),
7  includeBeamspotIP = cms.bool(False),
8  inputBeamspot = cms.InputTag("offlineBeamSpot"),
9  includeFloats = cms.PSet(
10  # A named list of InputTags identifying edm::ValueMap<float>
11  # objects keyed on the input collection objects. The hash
12  # of the name and the float value will be stored.
13  ),
14  includeDoubles = cms.PSet(
15  # A named list of InputTags identifying edm::ValueMap<double>
16  # objects keyed on the input collection objects. The hash
17  # of the name and the double value (cast as float) will be stored.
18  ),
19  includePFIso03 = cms.bool(False),
20  pfIso03 = cms.PSet(
21  chargedAll = cms.InputTag("muPFIsoValueChargedAll03PFIso"),
22  charged = cms.InputTag("muPFIsoValueCharged03PFIso"),
23  neutral = cms.InputTag("muPFIsoValueNeutral03PFIso"),
24  gamma = cms.InputTag("muPFIsoValueGamma03PFIso"),
25  pu = cms.InputTag("muPFIsoValuePU03PFIso")
26  ),
27  includePFIso04 = cms.bool(False),
28  pfIso04 = cms.PSet(
29  chargedAll = cms.InputTag("muPFIsoValueChargedAll04PFIso"),
30  charged = cms.InputTag("muPFIsoValueCharged04PFIso"),
31  neutral = cms.InputTag("muPFIsoValueNeutral04PFIso"),
32  gamma = cms.InputTag("muPFIsoValueGamma04PFIso"),
33  pu = cms.InputTag("muPFIsoValuePU04PFIso")
34  )
35 )

Photon

The producer takes as input a collection of reco::Photon objects. The following ic::Photon properties are not calculated by default:

Properties Notes
ic::Photon::pass_electron_veto This flag is calculated by a separate producer in this package: ICPhotonElectronVetoCalculator
ic::Photon::had_tower_over_em This is calculated by an external producer available in the ICAnalysis-PhotonHadTowerOverEmCalculator repository.
ic::Photon::dr03_pfiso_charged
ic::Photon::dr03_pfiso_neutral
ic::Photon::dr03_pfiso_gamma
As for Electron and Muon production the isolation values will be extracted from the specified ValueMap inputs.

Example usage

1 icPhotonProducer = cms.EDProducer('ICPhotonProducer',
2  branch = cms.string("photons"),
3  input = cms.InputTag("photons"),
4  includeElectronVeto = cms.bool(False),
5  inputElectronVeto = cms.InputTag("icPhotonElectronVetoCalculator"),
6  includeHadTowOverEm = cms.bool(False),
7  includePFIso03 = cms.bool(False),
8  pfIso03 = cms.PSet(
9  chargedAll = cms.InputTag("phPFIsoValueChargedAll03PFIso"),
10  charged = cms.InputTag("phPFIsoValueCharged03PFIso"),
11  neutral = cms.InputTag("phPFIsoValueNeutral03PFIso"),
12  gamma = cms.InputTag("phPFIsoValueGamma03PFIso"),
13  pu = cms.InputTag("phPFIsoValuePU03PFIso")
14  ),
15  includePFIso04 = cms.bool(False),
16  pfIso04 = cms.PSet(
17  chargedAll = cms.InputTag("phPFIsoValueChargedAll04PFIso"),
18  charged = cms.InputTag("phPFIsoValueCharged04PFIso"),
19  neutral = cms.InputTag("phPFIsoValueNeutral04PFIso"),
20  gamma = cms.InputTag("phPFIsoValueGamma04PFIso"),
21  pu = cms.InputTag("phPFIsoValuePU04PFIso")
22  ),
23  includeIsoFromPat = cms.bool(False)
24 )

Tau

  • Definition: ic::Tau
  • CMSSW Producer: ICTauProducer
  • Producer Input: Any collection compatible with an edm::View<reco::PFTau> or an edm::View<pat::Tau>, but see below
  • Producer Output: std::vector<ic::Tau>
  • Producer Requests: Can request the reco::Track objects from the charged PF constituents. The request will be produced with the label requestedTracks.

The producer is a template class on the type of the input objects. Two specific template instances are defined as CMSSW modules: one for reco::PFTau input (ICPFTauProducer) and the other for pat::Tau input (ICPFTauFromPatProducer). The main difference between the two is that the user must specify the list of discriminators to extract from the edm::Event in the reco::PFTau case, whereas in the pat::Tau case these are extracted directly from the input object.

The following ic::Tau properties are not calculated by default:

Properties Notes
ic::Tau::lead_dxy_vertex
ic::Tau::lead_dz_vertex
These must be calculated with respect to a user-specified reco::Vertex. The first vertex in the collection specified by the inputVertices option will be used when includeVertexIP is set to True.

Example usage

1 icTauProducer = cms.EDProducer("ICPFTauProducer",
2  branch = cms.string("taus"),
3  input = cms.InputTag("hpsPFTauProducer"),
4  inputVertices = cms.InputTag("offlinePrimaryVertices"),
5  includeVertexIP = cms.bool(False),
6  requestTracks = cms.bool(False),
7  includeTotalCharged = cms.bool(False),
8  totalChargedLabel = cms.string('totalCharged'),
9  tauIDs = cms.PSet(
10  # Add a list of discriminators that should be loaded from the edm::Event.
11  # Each discriminator will be stored as a float and associated to the hash
12  # of the label string given here (e.g. "decayModeFinding" below). Some TauID
13  # PSets have been defined in python/tau_discriminators_cfi.py, and these follow
14  # the labelling convention used in the default PAT sequences.
15  # Note that if the ICPFTauFromPatProducer is used this list will be ignored.
16  #
17  # decayModeFinding = cms.InputTag("hpsPFTauDiscriminationByDecayModeFinding"),
18  # etc...
19  ),
20  requestPFCandidates = cms.bool(False),
21  inputPFCandidates = cms.InputTag("pfCandidates"),
22  isSlimmed = cms.bool(False)
23 )
24 
25 icTauFromPatProducer = cms.EDProducer("ICPFTauFromPatProducer",
26  branch = cms.string("taus"),
27  input = cms.InputTag("slimmedTaus"),
28  inputVertices = cms.InputTag("offlineSlimmedPrimaryVertices"),
29  includeVertexIP = cms.bool(False),
30  requestTracks = cms.bool(False),
31  includeTotalCharged = cms.bool(False),
32  totalChargedLabel = cms.string('totalCharged'),
33  tauIDs = cms.PSet(),
34  requestPFCandidates = cms.bool(False),
35  inputPFCandidates = cms.InputTag("packedPFCandidates"),
36  isSlimmed = cms.bool(True)
37 )

Missing Tranvserse Energy

Two producers are provided, both of which take a vector of reco::MET (or derived) objects as input. The ICMetProducer will produce a vector of ic::Met objects, whereas the ICSingleMetProducer will produce a single ic::Met object. The ICMetProducer can optionally read a vector<std::size_t> from the edm::Event that should be aligned with the input vector<reco::MET> and will be used to set the ic::Met::id values in the output collection. The main use for this feature is in conjunction with the MVA MET producer where MET objects must be identified by combined hashes of the lepton inputs.

Example usage

1 icMetProducer = cms.EDProducer('ICPFMetProducer',
2  branch = cms.string("pfMet"),
3  input = cms.InputTag("pfMet"),
4  includeCustomID = cms.bool(False),
5  inputCustomID = cms.InputTag(""),
6  doGenMet = cms.bool(False),
7  includeExternalMetsig = cms.bool(False),
8  includeExternalMetsigMethod2 = cms.bool(False),
9  metsig = cms.PSet(
10  metsig = cms.InputTag("METSignificance","METSignificance"),
11  metsigcov00 = cms.InputTag("METSignificance","CovarianceMatrix00"),
12  metsigcov01 = cms.InputTag("METSignificance","CovarianceMatrix01"),
13  metsigcov10 = cms.InputTag("METSignificance","CovarianceMatrix10"),
14  metsigcov11 = cms.InputTag("METSignificance","CovarianceMatrix11")
15  ),
16  metsig_method2 = cms.PSet(
17  metsig = cms.InputTag("METSignificance","METSignificance"),
18  metsigcov = cms.InputTag("METSignificance","METCovariance")
19  ),
20  #includeMetCorrections = cms.bool(False),
21  #metcorrections = cms.vstring(
22  # 'Raw','Type1','Type01','TypeXY','Type1XY','Type01XY','Type1Smear','Type01Smear','Type1SmearXY','Type01SmearXY','RawCalo'),
23  #includeMetUncertainties = cms.bool(False),
24  #metuncertainties = cms.vstring(
25  # 'JetResUp','JetResDown','JetEnUp','JetEnDown','MuonEnUp','MuonEnDown','ElectronEnUp','ElectronEnDown','TauEnUp','TauEnDown','UnclusteredEnUp','UnclusteredEnDown','PhotonEnUp','PhotonEnDown','NoShift')
26 )
27 
28 icMetFromPatProducer = cms.EDProducer('ICPFMetFromPatProducer',
29  branch = cms.string("pfMet"),
30  input = cms.InputTag("slimmedMETs"),
31  includeCustomID = cms.bool(False),
32  includeUserCandID = cms.bool(False),
33  inputCustomID = cms.InputTag(""),
34  doGenMet = cms.bool(False),
35  includeExternalMetsig = cms.bool(False),
36  includeExternalMetsigMethod2 = cms.bool(False),
37  getUncorrectedMet = cms.bool(False),
38  metsig = cms.PSet(
39  metsig = cms.InputTag("METSignificance","METSignificance"),
40  metsigcov00 = cms.InputTag("METSignificance","CovarianceMatrix00"),
41  metsigcov01 = cms.InputTag("METSignificance","CovarianceMatrix01"),
42  metsigcov10 = cms.InputTag("METSignificance","CovarianceMatrix10"),
43  metsigcov11 = cms.InputTag("METSignificance","CovarianceMatrix11")
44  ),
45  metsig_method2 = cms.PSet(
46  metsig = cms.InputTag("METSignificance","METSignificance"),
47  metsigcov = cms.InputTag("METSignificance","METCovariance")
48  ),
49  includeMetCorrections = cms.bool(False),
50  metcorrections = cms.vstring(
51  'Raw','Type1','Type01','TypeXY','Type1XY','Type01XY','Type1Smear','Type01Smear','Type1SmearXY','Type01SmearXY','RawCalo'),
52  includeMetUncertainties = cms.bool(False),
53  metuncertainties = cms.vstring(
54  'JetResUp','JetResDown','JetEnUp','JetEnDown','MuonEnUp','MuonEnDown','ElectronEnUp','ElectronEnDown','TauEnUp','TauEnDown','UnclusteredEnUp','UnclusteredEnDown','PhotonEnUp','PhotonEnDown','NoShift')
55 )
56 
1 icSingleMetProducer = cms.EDProducer('ICSingleMetProducer',
2  branch = cms.string("genMet"),
3  input = cms.InputTag("genMetTrue")
4 )

Jet

  • Definition: ic::Jet, ic::CaloJet, ic::JPTJet, ic::PFJet
  • CMSSW Producers: ICJetProducer (see below for template instantiations)
  • Producer Input: Any collection compatible with an edm::View<reco::Jet> or edm::View<pat::Jet> (see below for details)
  • Producer Output: std::vector<ic::Jet>, std::vector<ic::CaloJet>, std::vector<ic::JPTJet>, std::vector<ic::PFJet>
  • Producer Requests:
    • Can request the reco::Track objects for the charged constituents of PFJet or JPTJet inputs. The request will be produced with the label requestedTracks.
    • Can request the reco::SecondaryVertexTagInfo objects associated to the jets, which will be produced with the label requestedSVInfo.

The ic::JetProducer is a template class that is specialised for both the input and output jet types. While making the code more complex, this avoids a large amount of duplication that would result for have a normal producer for each possible input-output pairing. The possible CMSSW producers are defined here.

Each choice of input and output type brings with it the need for a specific set of options. This is addressed through two helper structs, the JetSrcHelper which is templated only on the input type, and the JetDestHelper which is templated only on the output type. Please see the documentation pages of these structs for further details.

An important distinction to make between using a reco::Jet and a pat::Jet as input is the treatment of the jet energy corrections. This module assumes a reco::Jet collection as input is uncorrected. The JetSrcHelper in this case provides extra options to specify the list of corrections to apply and an optional cut string that may be applied after the input jet is corrected and before a corresponding ic::Jet is produced.

The following properties are not calculated by default:

Properties Notes
ic::Jet::parton_flavour For reco::Jet input producers only: The MC truth jet flavour (as a PDG ID). The method by which this is calculated is expected to change for 2015 data analyses. In anticipation, the calculation has moved to a separate producer: ICJetFlavourCalculator, within this package. This calculates a ValueMap which should be specified by the option inputJetFlavour when the includeJetFlavour option is set to True.
ic::PFJet::pu_id_mva_value For ic::PFJet output producers only: See the section below for details on producing a pileup jet MVA ValueMap. This should be specified by the option inputPileupID when the icludePileupID option is set to True.
ic::PFJet::beta
ic::PFJet::beta_max
ic::PFJet::linear_radial_moment
ic::PFJet::charged_multiplicity_nopu
For ic::PFJet output producers only: These variables are only calculated when includeTrackBasedVars is set to True and both the inputTracks and inputVertices collections are defined.
ic::JPTJet::beta
ic::JPTJet::beta_max
ic::JPTJet::track_pt_total
For ic::JPTJet output producers only: These variables are only calculated when includeTrackBasedVars is set to True and both the inputTracks and inputVertices collections are defined.
ic::CaloJet::fHPD
ic::CaloJet::fRBX
ic::CaloJet::id_loose
ic::CaloJet::id_tight
For ic::CaloJet and ic::JPTJet output producers only: Requires an external reco::JetID map. Set inputJetID to the label of this map and set includeJetID to True.

Example usage

1 ## This example given for the reco::PFJet --> ic::PFJet version
2 ## of the producer. The srcConfig and destConfig options for the
3 ## other input and output choices are also given below but are
4 ## commented out
5 icPFJetProducer = cms.EDProducer('ICPFJetProducer',
6  branch = cms.string("pfJets"),
7  input = cms.InputTag("ak5PFJets"),
8  #### The srcConfig PSet when the input is a reco::Jet collection
9  srcConfig = cms.PSet(
10  includeJetFlavour = cms.bool(False),
11  inputJetFlavour = cms.InputTag("icPFJetFlavourCalculator"),
12  ### If True corrects the input jets using the list of correctors
13  ### given by JECs below
14  applyJECs = cms.bool(False),
15  ### If True saves the value of each correction factor along witht he
16  ### hash of the label given in the option JECs below
17  includeJECs = cms.bool(False),
18  JECs = cms.PSet(
19  ### E.g.
20  # L1FastJet = cms.string("ak5PFL1Fastjet"),
21  # L2Relative = cms.string("ak5PFL2Relative"),
22  # L3Absolute = cms.string("ak5PFL3Absolute")
23  ),
24  ### If true will apply the cut specfied by 'cutAfterJECS' to the corrected
25  ### input jets
26  applyCutAfterJECs = cms.bool(False),
27  cutAfterJECs = cms.string(""),
28  inputSVInfo = cms.InputTag("secondaryVertexTagInfosAK5PF"),
29  requestSVInfo = cms.bool(False),
30  BTagDiscriminators = cms.PSet(
31  ### E.g.
32  # simpleSecondaryVertexHighEffBJetTags = cms.InputTag("simpleSecondaryVertexHighEffBJetTagsAK5PF"),
33  # simpleSecondaryVertexHighPurBJetTags = cms.InputTag("simpleSecondaryVertexHighPurBJetTagsAK5PF"),
34  # combinedSecondaryVertexBJetTags = cms.InputTag("combinedSecondaryVertexBJetTagsAK5PF")
35  ),
36  ),
37  #### The srcConfig PSet when the input is a pat::Jet collection
38  # srcConfig = cms.PSet(
39  # includeJetFlavour = cms.bool(False),
40  # includeJECs = cms.bool(False),
41  # inputSVInfo = cms.InputTag("secondaryVertexTagInfosAOD"),
42  # requestSVInfo = cms.bool(False)
43  # ),
44  #### The destConfig PSet when the output is an ic::PFJet collection
45  destConfig = cms.PSet(
46  includePileupID = cms.bool(False),
47  inputPileupID = cms.InputTag("puJetMva", "fullDiscriminant"),
48  includeTrackBasedVars = cms.bool(False),
49  inputTracks = cms.InputTag("generalTracks"),
50  inputVertices = cms.InputTag("offlinePrimaryVertices"),
51  requestTracks = cms.bool(False)
52  )
53  #### The destConfig PSet when the output is an ic::CaloJet collection
54  # destConfig = cms.PSet(
55  # includeJetID = cms.bool(False),
56  # inputJetID = cms.InputTag("ak5JetID"),
57  # includeTowerCounts = cms.bool(False)
58  # )
59  #### The destConfig PSet when the output is an ic::JPTJet collection
60  # destConfig = cms.PSet(
61  # includeTrackBasedVars = cms.bool(False),
62  # inputTracks = cms.InputTag("generalTracks"),
63  # inputVertices = cms.InputTag("offlinePrimaryVertices"),
64  # requestTracks = cms.bool(False),
65  # includeJetID = cms.bool(False),
66  # inputJetID = cms.InputTag("ak5JetID"),
67  # includeTowerCounts = cms.bool(False)
68  # )
69  #### The destConfig PSet when the output is an ic::Jet collection (empty!)
70  # destConfig = cms.PSet()
71 )
72 
73 
74 icPFJetFromPatProducer = cms.EDProducer('ICPFJetFromPatProducer',
75  branch = cms.string("pfJetsFromPat"),
76  input = cms.InputTag("ak4PFJets"),
77  #### The srcConfig PSet when the input is a reco::Jet collection
78  #### The srcConfig PSet when the input is a pat::Jet collection
79  srcConfig = cms.PSet(
80  isSlimmed = cms.bool(False),
81  slimmedPileupIDLabel = cms.string('pileupJetId:fullDiscriminant'),
82  includeJetFlavour = cms.bool(False),
83  includeJECs = cms.bool(False),
84  inputSVInfo = cms.InputTag("secondaryVertexTagInfosAOD"),
85  requestSVInfo = cms.bool(False)
86  ),
87  #### The destConfig PSet when the output is an ic::PFJet collection
88  destConfig = cms.PSet(
89  includePileupID = cms.bool(False),
90  inputPileupID = cms.InputTag("puJetMva", "fullDiscriminant"),
91  includeTrackBasedVars = cms.bool(False),
92  inputTracks = cms.InputTag("generalTracks"),
93  inputVertices = cms.InputTag("offlinePrimaryVertices"),
94  requestTracks = cms.bool(False)
95  )
96  #### The destConfig PSet when the output is an ic::CaloJet collection
97  # destConfig = cms.PSet(
98  # includeJetID = cms.bool(False),
99  # inputJetID = cms.InputTag("ak5JetID"),
100  # includeTowerCounts = cms.bool(False)
101  # )
102  #### The destConfig PSet when the output is an ic::JPTJet collection
103  # destConfig = cms.PSet(
104  # includeTrackBasedVars = cms.bool(False),
105  # inputTracks = cms.InputTag("generalTracks"),
106  # inputVertices = cms.InputTag("offlinePrimaryVertices"),
107  # requestTracks = cms.bool(False),
108  # includeJetID = cms.bool(False),
109  # inputJetID = cms.InputTag("ak5JetID"),
110  # includeTowerCounts = cms.bool(False)
111  # )
112  #### The destConfig PSet when the output is an ic::Jet collection (empty!)
113  # destConfig = cms.PSet()
114 )
115 

Vertex

  • Definition: ic::Vertex
  • CMSSW Producers: ICVertexProducer
  • Producer Input: Any collection compatible with an edm::View<reco::Vertex>
  • Producer Output: std::vector<ic::Vertex>
  • Producer Requests: Can request the reco::Track objects used in the vertex fit. The request will be produced with the label requestedTracks.

The producer can be configured to store only the first vertex in the input collection by setting the value of the firstVertexOnly option to True. The ic::Track::id values of the tracks used in each vertex fit can also be stored (along with the fit weighting), subject to a minimum threshold set by the option trackPtThreshold.

Example usage

1 icVertexProducer = cms.EDProducer('ICVertexProducer',
2  branch = cms.string("vertices"),
3  input = cms.InputTag("offlinePrimaryVertices"),
4  firstVertexOnly = cms.bool(False),
5  trackPtThreshold = cms.double(0.0),
6  requestTracks = cms.bool(False)
7 )

Secondary Vertex

  • Definition: ic::SecondaryVertex
  • CMSSW Producers: ICSecondaryVertexProducer
  • Producer Input: Any collection compatible with an edm::View<reco::SecondaryVertexTagInfo>
  • Producer Output: std::vector<ic::SecondaryVertex>
  • Producer Requests: Can request the reco::Track objects used in the vertex fit. The request will be produced with the label requestedTracks.

Note that each reco::SecondaryVertexTagInfo input (one per jet) can contain multiple secondary vertices, each of which will be added to the output collection. The ic::Track::id values of the tracks used in each vertex fit can also be stored (along with the fit weighting), subject to a minimum threshold set by the option trackPtThreshold.

Example usage

1 icSecondaryVertexProducer = cms.EDProducer('ICSecondaryVertexProducer',
2  branch = cms.string("secondaryVertices"),
3  input = cms.InputTag(""),
4  trackPtThreshold = cms.double(0.0),
5  requestTracks = cms.bool(False)
6 )

Track

Two track classes are provided. The ic::Track is the standard class and the ic::LightTrack provides a limited subset of the ic::Track variables for situations where these are sufficient for analysis and ntuple space is at a premium.

Example usage

1 icTrackProducer = cms.EDProducer('ICTrackProducer',
2  branch = cms.string("tracks"),
3  input = cms.InputTag("generalTracks")
4 )
1 icLightTrackProducer = cms.EDProducer('ICLightTrackProducer',
2  branch = cms.string("tracks"),
3  input = cms.InputTag("generalTracks")
4 )

GenParticle

The producer can optionally store the relations between particles in decay chains using the includeMothers and includeDaughters flags. When enabled, these options tell the producer to save the corresponding vectors of ic::GenParticle::index values. Note that this index is different from the ic::GenParticle::id value, and is equal to the vector index position of the reco::GenParticle in the input collection.

Example usage

1 icGenParticleProducer = cms.EDProducer('ICGenParticleProducer',
2  branch = cms.string("genParticles"),
3  input = cms.InputTag("genParticles"),
4  includeMothers = cms.bool(True),
5  includeDaughters = cms.bool(True),
6  includeStatusFlags = cms.bool(False)
7 )

GenJet

  • Definition: ic::GenJet
  • CMSSW Producers: ICGenJetProducer
  • Producer Input: Any collection compatible with an edm::View<reco::GenJet>
  • Producer Output: std::vector<ic::GenJet>
  • Producer Requests: Can request the reco::GenParticle objects clustered into each jet. The request will be produced with the label requestedGenParticles.

Note that due to technical limitations, if the requestGenParticles option is set to True, the original reco::GenParticle collection from which the jets were clustered must also be specified in the option inputGenParticles.

Example usage

1 icGenJetProducer = cms.EDProducer('ICGenJetProducer',
2  branch = cms.string("genJets"),
3  input = cms.InputTag("ak5GenJets"),
4  inputGenParticles = cms.InputTag("genParticles"),
5  requestGenParticles = cms.bool(False),
6  isSlimmed = cms.bool(False)
7 )

PileupInfo

Each object PileupSummaryInfo object in the input collection provides the pileup information for a single bunch crossing. The bunch crossing number, ic::PileupInfo::bunch_crossing can be used to identify the bunch crossing relative to the hard scatter interaction (which has a bunch crossing of zero).

Example usage

1 icPileupInfoProducer = cms.EDProducer('ICPileupInfoProducer',
2  branch = cms.string("pileupInfo"),
3  input = cms.InputTag("addPileupInfo")
4 )

SuperCluster

The ic::SuperCluster class does not inherit from ic::Candidate but is instead specified by the supercluster position and direction with respect to the detector origin. The producer requires two collections as input as these are stored separately for barrel and endcap superclusters in the edm::Event.

Example usage

1 icSuperClusterProducer = cms.EDProducer('ICSuperClusterProducer',
2  branch = cms.string("superClusters"),
3  inputBarrel = cms.InputTag("correctedHybridSuperClusters"),
4  inputEndcap = cms.InputTag("correctedMulti5x5SuperClustersWithPreshower")
5 )

TriggerPath

The file test/validation_cfg.py contains examples for creating the pat::TriggerEvent in various CMSSW releases. The producer can be configured to only store the paths that fired in each event via the option includeAcceptedOnly. There is also an option splitVersion (off by default) to strip the integer version number from each trigger path name, and store this is a separate variable: ic::TriggerPath::version. If this is enabled it may also be useful to set saveStrings to False. The ic::TriggerPath::name will not be written, the version-less name will still be hashed and stored in the ic::TriggerPath::id variables, saving space overall.

Example usage

1 icTriggerPathProducer = cms.EDProducer('ICTriggerPathProducer',
2  branch = cms.string("triggerPaths"),
3  input = cms.InputTag("patTriggerEvent"),
4  includeAcceptedOnly = cms.bool(True),
5  saveStrings = cms.bool(True),
6  splitVersion = cms.bool(False),
7  inputIsStandAlone = cms.bool(False),
8  prescaleFallback = cms.bool(False),
9  hltProcess = cms.string('HLT'),
10  inputPrescales = cms.InputTag("patTrigger", "", "PAT") # only used when inputIsStandAlone is true
11 )

TriggerObject

The producer will store a collection of trigger objects used in the specified hltPath. Each object stores a vector of the (hashed) labels of the filter modules that accepted the object in the path.

Example usage

1 icTriggerObjectProducer = cms.EDProducer('ICTriggerObjectProducer',
2  branch = cms.string("triggerObjects"),
3  input = cms.InputTag("patTriggerEvent"),
4  hltPath = cms.string(""),
5  storeOnlyIfFired = cms.bool(False),
6  inputIsStandAlone = cms.bool(False),
7  inputTriggerResults = cms.InputTag("TriggerResults", "", "HLT")
8 )

EventInfo

The core event variables, such as event, lumi and run, are stored automatically. Other variables of interest may be added via the producer options. The options includeJetRho and includeLeptonRho can be used to store the values of the median energy densities used for the pileup jet energy correction and the lepton pileup isolation respectively. The appropriate inputs should be specified by the options inputJetRho and inputLeptonRho. The number of vertices in a particular collection (inputVertices) can also be stored (includeVertexCount), which is a space-saving alternative to storing an entire ic::Vertex collection. The options filters, weights and genFilterWeights are used to specify corresponding lists of input bool, double and GenFilterInfo values that should be added to the ic::EventInfo using the labels provided in the PSet.

Example usage

1 icEventInfoProducer = cms.EDProducer('ICEventInfoProducer',
2  branch = cms.string("eventInfo"),
3  lheProducer = cms.InputTag("externalLHEProducer"),
4  includeLHEWeights = cms.bool(False),
5  includeEmbeddingWeights = cms.bool(False),
6  includeJetRho = cms.bool(False),
7  inputJetRho = cms.InputTag("fixedGridRhoFastjetAll"),
8  includeLeptonRho = cms.bool(False),
9  inputLeptonRho = cms.InputTag("fixedGridRhoFastjetAll"),
10  includeHT = cms.bool(False),
11  includeVertexCount = cms.bool(False),
12  inputVertices = cms.InputTag("offlinePrimaryVertices"),
13  includeCSCFilter = cms.bool(False),
14  inputCSCFilter = cms.InputTag("BeamHaloSummary"),
15  filters = cms.PSet(),
16  weights = cms.PSet(
17  ),
18  genFilterWeights = cms.PSet(
19  ),
20  includeFiltersFromTrig = cms.bool(False),
21  filtersfromtrig = cms.vstring("Flag_CSCTightHaloFilter","Flag_hcalLaserEventFilter","Flag_EcalDeadCellTriggerPrimitiveFilter","Flag_goodVertices","Flag_eeBadScFilter","Flag_ecalLaserCorrFilter","Flag_trkPOGFilters","Flag_trkPOG_manystripclus53X","Flag_trkPOG_toomanystripclus53X","Flag_trkPOG_logErrorTooManyClusters","Flag_METFilters"),
22  inputfiltersfromtrig = cms.InputTag("TriggerResults")
23 )

Non-standard Objects

MVA MET / Pileup jet ID

Supported releases:

  • CMSSW_4_2_8_patch7
  • CMSSW_5_3_X
  • CMSSW_7_0_X pileup jet ID only

Links:

The MVA MET is not available by default in any CMSSW release, and pileup jet ID is only included in the CMSSW_7_0_X series. A recipe is given below for obtaining the versions that were used in the legacy HiggsTauTau analysis, which was based on CMSSW_5_3_7. Newer recipes for the MVA MET have also been provided and are currently in use by some groups. See the twiki page above for details. Notably, newer MVA trainings have been provided that do not require the addition of recoil corrections, but these have not yet been tested in this framework.

The following recipe can be used to set-up the MVA MET and pileup ID in a different CMSSW_5_3_X release. It works by extracting the relevant git commits from a prepared branch based on the CMSSSW_5_3_7 release, and applying these commits to a branch created from a different release.

1 # Assume we want to set up the MVA MET in some 5_3_X release other than 5_3_7
2 # If you haven't already - create the project area
3 scramv1 project CMSSW_5_3_X; cd CMSSW_5_3_X/src
4 # This will initialise git and create the local branch from-CMSSW_5_3_X
5 # We'll assume that this is the branch you want to add the MVA MET to.
6 git-cms-addpkg FWCore/Version
7 # Add the ic-cmssw fork of the cmssw repo and fetch its branches
8 git remote add -f ic-cmssw git@github.com:ajgilbert/cmssw.git
9 # Create a temporary branch from the 5_3_7 branch containing the MVA MET
10 git checkout --no-track -b rebase-attempt ic-cmssw/MVAMET-PileupJetID-from-CMSSW_5_3_7
11 # This is the command that will do all the work, attempting to rebase the commits
12 # that add the MVA MET onto your 5_3_X release
13 git rebase --onto from-CMSSW_5_3_X CMSSW_5_3_7 rebase-attempt
14 # If there are no merge issues this should complete fine. If you do hit
15 # issues the rebase will pause, and you will have to fix any merge issues
16 # by hand, then instruct git to continue the rebase. If in doubt, git status
17 # should tell you what you need to do.
18 # Once the rebase is finished, switch back to our target branch
19 git checkout from-CMSSW_5_3_X
20 # This should now be a trivial fast-forward merge
21 git merge rebase-attempt
22 # All done - we can delete the temporary branch
23 git branch -d rebase-attempt
24 # Now update the sparse-checkout file so the modified packages will be visible
25 git-cms-sparse-checkout CMSSW_X_Y_Z HEAD
26 # This updates the actual working directory with the new packages
27 git read-tree -u --reset HEAD
28 # Optional: if you want to use the lepton-pair input version of the MVA MET, checkout this
29 # standalone package. Different branches exist for `5_3_X` and `4_2_X` releases. See the
30 # README on the project page for more information:
31 # https://github.com/ajgilbert/ICAnalysis-MVAMETPairProducer
32 git clone git@github.com:ajgilbert/ICAnalysis-MVAMETPairProducer.git ICAnalysis/MVAMETPairProducer
Todo:
Document example python configs for the MVA MET and pileup jet ID

Tau Reconstruction and Discrimination

Supported releases:

  • CMSSW_4_2_8_patch7
  • CMSSW_5_3_X
  • CMSSW_7_0_X

Links:

Over time many improvements to the tau reconstruction and identification have been developed by the tau POG. The twiki link above is a good reference to the different versions of the tau ID and how to add these to a release using git. The reconstruction and ID used in the legacy HiggsTauTau analysis corresponds to the section Legacy Tau ID (Run I). This is now available by default in releases starting from CMSSW_5_3_12. For older releases the recipe provided on the twiki might cause issues with the merging. It may be safer to identify just the commits that change the RecoTauTag package and git cherry-pick them one-by-one, e.g.

1 # Get a summary of which commits changed the RecoTauTag package between
2 # the current HEAD and the recommended branch
3 git log --oneline HEAD..cms-tau-pog/CMSSW_5_3_X -- RecoTauTag
4 # Cherry-pick each commit - shouldn't result in any conflicts
5 git cherry-pick ....
6 git cherry-pick ....
7 git checkout HEAD

PF Isolation

  • CMSSW_4_2_8_patch7
  • CMSSW_5_3_X
  • CMSSW_7_0_X

The calculation of PF iso-deposits for electrons changed during the CMSSW_5_3_X series. In the legacy HiggsTauTau analysis this was updated using a CVS tag on top of the CMSSW_5_3_7 release. See this git commit for details of the changes:

This updated version was included after some later CMSSW_5_3_X release, so check first if you need to apply it. The change from CandIsolatorFromDeposits to PFCandIsolatorFromDeposits modules for the iso-deposit calculation should be a good indicator.

Todo:
Document example python configs for PF isolation

MVA Electron ID

Supported releases:

  • CMSSW_4_2_8_patch7
  • CMSSW_5_3_X
  • CMSSW_7_0_X

The code for the electron ID MVA is contained in the EgammaAnalysis/ElectronTools package. In older CMSSW_5_3_X series releases this package was not included. For the legacy HiggsTauTau analysis this code was added to the CMSSW_5_3_7 release using a CVS recipe, but is now most easily obtained by a git cherry-pick of this commit:

Todo:
Document example python configs for MVA electron ID