ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/CmsHi/JetAnalysis/python/customise_cfi.py
Revision: 1.2
Committed: Sun Sep 18 15:45:49 2011 UTC (13 years, 7 months ago) by yilmaz
Content type: text/x-python
Branch: MAIN
CVS Tags: HiForest_V02_85, HiForest_V02_84, HiForest_V02_83, HiForest_V02_82, HiForest_V02_81, HiForest_V02_80, HiForest_V02_79, HiForest_V02_78, HiForest_V02_77, HiForest_V02_76, HiForest_V02_75, HiForest_V02_74, HiForest_V02_73, HiForest_V02_72, HiForest_V02_71, HiForest_V02_70, HiForest_V02_69, HiForest_V02_68, HiForest_V02_67, HiForest_V02_66, HiForest_V02_65, HiForest_V02_64, HiForest_V02_63, HiForest_V02_62, HiForest_V02_61, HiForest_V02_60, HiForest_V02_59, HiForest_V02_58, HiForest_V02_57, HiForest_V02_56, HiForest_V02_55, HiForest_V02_54, HiForest_V02_53, HiForest_V02_52, HiForest_V02_51, HiForest_V02_50, HiForest_V02_49, HiForest_V02_48, HiForest_V02_47, HiForest_V02_46, HiForest_V02_45, HiForest_V02_44, HiForest_V02_43, HiForest_V02_42, HiForest_V02_41, HiForest_V02_40, HiForest_V02_39, HiForest_V02_38, HiForest_V02_37, HiForest_V02_36, HiForest_V02_35, HiForest_V02_34, HiForest_V02_33, HiForest_V02_32, HiForest_V02_31, HiForest_V02_30, HiForest_V02_27, HiForest_V02_26, QM_2012, HiForest_V02_25, HiForest_V02_24, HiForest_V02_23, HiForest_V02_22, HiForest_V02_21, HiForest_V02_20, HiForest_V02_19, HiForest_V02_18, HiForest_V02_17, HiForest_V02_16, HiForest_V02_15, HiForest_V02_14, HiForest_V02_13, HiForest_V02_12, HiForest_V02_11, HiForest_V02_10, HiForest_V02_09, HiForest_V02_08, HiForest_V02_07, HiForest_V02_06, HiForest_V02_05, HiForest_V02_04, HiForest_V02_03, HiForest_V02_02, HiForest_V02_01, HiForest_V02_00, hi44X_02, hi441_1, hi441_0, hi413_11, hi413_10, hi413_09, hi413_08, hi413_07, hi413_06, hi413_05, hi413_04, hi413_03, hi413_02, HEAD
Branch point for: branch_44x
Changes since 1.1: +28 -1 lines
Log Message:
genjets

File Contents

# User Rev Content
1 frankma 1.1 # Turn of MC dependence in pat sequence
2     def removePatMCMatch(patJets):
3     patJets.addGenPartonMatch = False
4     patJets.embedGenPartonMatch = False
5     patJets.genPartonMatch = ''
6     patJets.addGenJetMatch = False
7     patJets.genJetMatch = ''
8     patJets.getJetMCFlavour = False
9     patJets.JetPartonMapSource = ''
10    
11     def usehiGoodMergedTracks(process):
12     print "hiGoodMergedTracks is used (except PF re-reco)! --> re-reco of conformalPixelTrackReco!"
13     process.hiextraTrackReco *= process.conformalPixelTrackReco
14     process.hiextraTrackReco *= process.hiGoodMergedTracks
15     print "add pixtrk eff ana"
16     process.trkcorr_seq *= process.hipixtrkEffAna_akpu3pf
17     print "change trk analyzers to include low pt trks"
18     process.trkAnalyzer.trackSrc = "hiGoodMergedTracks"
19     process.trkAnalyzer.trackPtMin = 0.5
20     process.genpAnalyzer.ptMin = 0.5
21    
22     def usehiHighPtTracks(process):
23     print "hiHighPtTracks is used for pf rereco"
24     process.trackerDrivenElectronSeeds.TkColList = ["hiHighPtTracks"]
25     print "change trk-calo analyzer to use hiHighPtTracks"
26     process.hitrkPfCandAnalyzer.Tracks = "hiHighPtTracks"
27    
28     def enableDataPat(process):
29 yilmaz 1.2 # jet
30 frankma 1.1 removePatMCMatch(process.icPu5patJets)
31     removePatMCMatch(process.akPu5PFpatJets)
32     removePatMCMatch(process.akPu3PFpatJets)
33 yilmaz 1.2 # photon
34     process.patPhotons.addGenMatch = False
35     process.patPhotons.embedGenMatch = False
36     process.makeHeavyIonPhotons.remove(process.photonMatch)
37 frankma 1.1
38     def enableDataAnalyzers(process):
39     process.icPu5JetAnalyzer.isMC = False
40     process.akPu5PFJetAnalyzer.isMC = False
41     process.akPu3PFJetAnalyzer.isMC = False
42    
43     def enableOpenHlt(process, seq):
44     from HLTrigger.HLTanalyzers.HI_HLTAnalyser_cff import hltanalysis
45     process.hltanalysis = hltanalysis
46     process.hltanalysis.RunParameters.Debug = False
47     process.hltanalysis.RunParameters.UseTFileService = True
48     process.hltanalysis.RunParameters.Monte = (False)
49     process.hltanalysis.RunParameters.DoMC = (False)
50     process.hltanalysis.RunParameters.DoJets = True
51     process.hltanalysis.RunParameters.DoPhotons = True
52     process.hltanalysis.RunParameters.DoSuperClusters = True
53     process.hltanalysis.recjets = "iterativeConePu5CaloJets"
54     process.hltanalysis.BarrelPhoton = "correctedIslandBarrelSuperClusters"
55     process.hltanalysis.EndcapPhoton = "correctedIslandEndcapSuperClusters"
56     process.hltanalysis.l1GtReadoutRecord = "gtDigis"
57     # add to seq
58     process.load("RecoHI.HiCentralityAlgos.CentralityBin_cfi")
59     seq*=process.centralityBin
60 yilmaz 1.2 seq*=process.hltanalysis
61    
62     def useSampleType(process,sampleType):
63     if sampleType == 0:
64     print "Running on non-embedded sample"
65     process.hiGenParticles.srcVector = ['generator']
66     process.icPu5JetAnalyzer.eventInfoTag = 'generator'
67     elif sampleType == 1:
68     print "Running on embedded sample"
69     process.hiGenParticles.srcVector = ['hiSignal']
70     process.icPu5JetAnalyzer.eventInfoTag = 'hiSignal'
71    
72     def setPhotonObject(process,photonObj="cleanPhotons"):
73     process.PhotonIDProd.photonProducer = photonObj
74     process.gamIsoDepositTk.src = photonObj
75     process.gamIsoDepositEcalFromHits.src = photonObj
76     process.gamIsoDepositHcalFromTowers.src = photonObj
77     process.gamIsoDepositHcalDepth1FromTowers.src = photonObj
78     process.gamIsoDepositHcalDepth2FromTowers.src = photonObj
79     # pat
80     process.patPhotons.photonSource = photonObj
81     process.photonMatch.src = photonObj
82