CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/RecoTauTag/TauTagTools/python/RecoTauCommonJetSelections_cfi.py

Go to the documentation of this file.
00001 import FWCore.ParameterSet.Config as cms
00002 import copy
00003 
00004 '''
00005 
00006 Common training defintions
00007 
00008 Author: Evan K. Friis (UC Davis)
00009 
00010 '''
00011 
00012 # Base jets of tau production
00013 jet_collection = cms.InputTag('ak5PFJets')
00014 
00015 # Kinematic selections
00016 kinematic_selection = cms.string('pt > 5.0 & abs(eta) < 2.5')
00017 
00018 # Lead object jet selection
00019 lead_object_jet_selection = cms.string("getPFConstituent(0).pt() > 1.0")
00020 
00021 # Basic kinematic plots
00022 kin_plots = cms.VPSet(
00023     cms.PSet(
00024         min = cms.untracked.double(0),
00025         max = cms.untracked.double(100),
00026         nbins = cms.untracked.int32(25),
00027         name = cms.untracked.string("pt"),
00028         description = cms.untracked.string("Pt"),
00029         plotquantity = cms.untracked.string("pt()"),
00030         lazyParsing = cms.untracked.bool(True)
00031     ),
00032     cms.PSet(
00033         min = cms.untracked.double(-2.5),
00034         max = cms.untracked.double(2.5),
00035         nbins = cms.untracked.int32(25),
00036         name = cms.untracked.string("eta"),
00037         description = cms.untracked.string("Eta"),
00038         plotquantity = cms.untracked.string("eta()"),
00039         lazyParsing = cms.untracked.bool(True)
00040     ),
00041     cms.PSet(
00042         min = cms.untracked.double(-3.14),
00043         max = cms.untracked.double(3.14),
00044         nbins = cms.untracked.int32(25),
00045         name = cms.untracked.string("phi"),
00046         description = cms.untracked.string("Phi"),
00047         plotquantity = cms.untracked.string("phi()"),
00048         lazyParsing = cms.untracked.bool(True)
00049     ),
00050     cms.PSet(
00051         min = cms.untracked.double(0.0),
00052         max = cms.untracked.double(10.0),
00053         nbins = cms.untracked.int32(50),
00054         name = cms.untracked.string("mass"),
00055         description = cms.untracked.string("mass"),
00056         plotquantity = cms.untracked.string("mass()"),
00057         lazyParsing = cms.untracked.bool(True)
00058     ),
00059 )
00060 
00061 # Jet plots
00062 jet_histograms = cms.VPSet(
00063     cms.PSet(
00064         min = cms.untracked.double(0.0),
00065         max = cms.untracked.double(20.0),
00066         nbins = cms.untracked.int32(100),
00067         name = cms.untracked.string("collimation"),
00068         description = cms.untracked.string("Pt * Width"),
00069         plotquantity = cms.untracked.string("pt()*sqrt(etaetaMoment())"),
00070         lazyParsing = cms.untracked.bool(True)
00071     ),
00072     cms.PSet(
00073         min = cms.untracked.double(0.0),
00074         max = cms.untracked.double(50.0),
00075         nbins = cms.untracked.int32(100),
00076         name = cms.untracked.string("leadobject"),
00077         description = cms.untracked.string("Pt of lead jet object"),
00078         plotquantity = cms.untracked.string("getPFConstituent(0).pt()"),
00079         lazyParsing = cms.untracked.bool(True)
00080     ),
00081 )
00082 jet_histograms.extend(kin_plots)
00083 
00084 tau_histograms = cms.VPSet(
00085     cms.PSet(
00086         min = cms.untracked.double(-3.5),
00087         max = cms.untracked.double(20.5),
00088         nbins = cms.untracked.int32(24),
00089         name = cms.untracked.string("decaymode"),
00090         description = cms.untracked.string("DecayMode"),
00091         plotquantity = cms.untracked.string("decayMode"),
00092         lazyParsing = cms.untracked.bool(True)
00093     )
00094 )
00095 
00096 tau_histograms.extend(kin_plots)
00097 # Make plots of underlying jet pt and matched pt as well.
00098 for kinematic_var in kin_plots:
00099     jetPtVersion = copy.deepcopy(kinematic_var)
00100     jetPtVersion.name = kinematic_var.name.value() + "OfJet"
00101     jetPtVersion.description = kinematic_var.description.value() + "Of Jet"
00102     #jetPtVersion.plotquantity = "jetRef()." + kinematic_var.plotquantity.value()
00103     jetPtVersion.plotquantity = "jetRef()." + kinematic_var.plotquantity.value()
00104     tau_histograms.append(jetPtVersion)
00105 
00106     matchedVersion = copy.deepcopy(kinematic_var)
00107     matchedVersion.name = kinematic_var.name.value() + "OfMatched"
00108     matchedVersion.description = kinematic_var.description.value() + "Of Matched"
00109     matchedVersion.plotquantity = "alternatLorentzVect()." +\
00110             kinematic_var.plotquantity.value()
00111     tau_histograms.append(matchedVersion)
00112 
00113 # Add some resolution plots
00114 tau_histograms.append(
00115     cms.PSet(
00116         min = cms.untracked.double(-20.5),
00117         max = cms.untracked.double(20.5),
00118         nbins = cms.untracked.int32(41),
00119         name = cms.untracked.string("decaymodeRes"),
00120         description = cms.untracked.string("DecayModeRes"),
00121         plotquantity = cms.untracked.string(
00122             "decayMode() - bremsRecoveryEOverPLead()"),
00123         lazyParsing = cms.untracked.bool(True)
00124     )
00125 )
00126 
00127 tau_histograms.append(
00128     cms.PSet(
00129         min = cms.untracked.double(-25),
00130         max = cms.untracked.double(25),
00131         nbins = cms.untracked.int32(100),
00132         name = cms.untracked.string("ptRes"),
00133         description = cms.untracked.string("PtRes"),
00134         plotquantity = cms.untracked.string("pt()-alternatLorentzVect().pt()"),
00135         lazyParsing = cms.untracked.bool(True)
00136     )
00137 )
00138 
00139 tau_histograms.append(
00140     cms.PSet(
00141         min = cms.untracked.double(-0.2),
00142         max = cms.untracked.double(-0.2),
00143         nbins = cms.untracked.int32(100),
00144         name = cms.untracked.string("etaRes"),
00145         description = cms.untracked.string("EtaRes"),
00146         plotquantity = cms.untracked.string("eta()-alternatLorentzVect().eta()"),
00147         lazyParsing = cms.untracked.bool(True)
00148     )
00149 )
00150 
00151 tau_histograms.append(
00152     cms.PSet(
00153         min = cms.untracked.double(-0.5),
00154         max = cms.untracked.double(0.5),
00155         nbins = cms.untracked.int32(100),
00156         name = cms.untracked.string("phiRes"),
00157         description = cms.untracked.string("phiRes"),
00158         plotquantity = cms.untracked.string(
00159             "deltaPhi(phi(), alternatLorentzVect().phi())"),
00160         lazyParsing = cms.untracked.bool(True)
00161     )
00162 )
00163 
00164 tau_histograms.append(
00165     cms.PSet(
00166         min = cms.untracked.double(-5),
00167         max = cms.untracked.double(5.0),
00168         nbins = cms.untracked.int32(100),
00169         name = cms.untracked.string("massRes"),
00170         description = cms.untracked.string("massRes"),
00171         plotquantity = cms.untracked.string("mass() - alternatLorentzVect().mass()"),
00172         lazyParsing = cms.untracked.bool(True)
00173     )
00174 )