CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
conversionTrackSequence_cff.py
Go to the documentation of this file.
2 
3 import RecoEgamma.EgammaPhotonProducers.conversionTrackProducer_cfi
4 import RecoEgamma.EgammaPhotonProducers.conversionTrackMerger_cfi
5 
6 # Conversion Track candidate producer
8 # Conversion Track producer ( final fit )
11 ckfTracksFromConversions = cms.Sequence(conversionTrackCandidates*ckfOutInTracksFromConversions*ckfInOutTracksFromConversions)
12 
13 
14 
15 #producer from general tracks collection, set tracker only, merged arbitrated, merged arbitrated ecal/general flags
16 generalConversionTrackProducer = RecoEgamma.EgammaPhotonProducers.conversionTrackProducer_cfi.conversionTrackProducer.clone(
17  TrackProducer = cms.string('generalTracks'),
18  setTrackerOnly = cms.bool(True),
19  setArbitratedMergedEcalGeneral = cms.bool(True),
20 )
21 
22 #producer from iter8 tracks collection, set tracker only, merged arbitrated, merged arbitrated ecal/general flags
23 conversionStepConversionTrackProducer = RecoEgamma.EgammaPhotonProducers.conversionTrackProducer_cfi.conversionTrackProducer.clone(
24  TrackProducer = cms.string('conversionStepTracks'),
25  setTrackerOnly = cms.bool(True),
26  setArbitratedMergedEcalGeneral = cms.bool(True),
27 )
28 
29 
30 #producer from inout ecal seeded tracks, set arbitratedecalseeded, mergedarbitratedecalgeneral and mergedarbitrated flags
31 inOutConversionTrackProducer = RecoEgamma.EgammaPhotonProducers.conversionTrackProducer_cfi.conversionTrackProducer.clone(
32  TrackProducer = cms.string('ckfInOutTracksFromConversions'),
33  setArbitratedEcalSeeded = cms.bool(True),
34  setArbitratedMergedEcalGeneral = cms.bool(True),
35 )
36 
37 #producer from outin ecal seeded tracks, set arbitratedecalseeded, mergedarbitratedecalgeneral and mergedarbitrated flags
38 outInConversionTrackProducer = RecoEgamma.EgammaPhotonProducers.conversionTrackProducer_cfi.conversionTrackProducer.clone(
39  TrackProducer = cms.string('ckfOutInTracksFromConversions'),
40  setArbitratedEcalSeeded = cms.bool(True),
41  setArbitratedMergedEcalGeneral = cms.bool(True),
42 )
43 
44 #producer from gsf tracks, set only mergedarbitrated flag (default behaviour)
45 gsfConversionTrackProducer = RecoEgamma.EgammaPhotonProducers.conversionTrackProducer_cfi.conversionTrackProducer.clone(
46  TrackProducer = cms.string('electronGsfTracks'),
47  filterOnConvTrackHyp = cms.bool(False),
48 )
49 
50 conversionTrackProducers = cms.Sequence(generalConversionTrackProducer*conversionStepConversionTrackProducer*inOutConversionTrackProducer*outInConversionTrackProducer*gsfConversionTrackProducer)
51 
52 
53 #merge generalTracks and conversionStepTracks collections, with arbitration by nhits then chi^2/ndof for ecalseededarbitrated, mergedarbitratedecalgeneral and mergedarbitrated flags
54 generalConversionStepConversionTrackMerger = RecoEgamma.EgammaPhotonProducers.conversionTrackMerger_cfi.conversionTrackMerger.clone(
55  TrackProducer1 = cms.string('generalConversionTrackProducer'),
56  TrackProducer2 = cms.string('conversionStepConversionTrackProducer'),
57  #prefer collection settings:
58  #-1: propagate output/flag from both input collections
59  # 0: propagate output/flag from neither input collection
60  # 1: arbitrate output/flag (remove duplicates by shared hits), give precedence to first input collection
61  # 2: arbitrate output/flag (remove duplicates by shared hits), give precedence to second input collection
62  # 3: arbitrate output/flag (remove duplicates by shared hits), arbitration first by number of hits, second by chisq/ndof
63  arbitratedMergedPreferCollection = cms.int32(3),
64  arbitratedMergedEcalGeneralPreferCollection = cms.int32(3),
65 )
66 
67 #merge two ecal-seeded collections, with arbitration by nhits then chi^2/ndof for ecalseededarbitrated, mergedarbitratedecalgeneral and mergedarbitrated flags
68 inOutOutInConversionTrackMerger = RecoEgamma.EgammaPhotonProducers.conversionTrackMerger_cfi.conversionTrackMerger.clone(
69  TrackProducer1 = cms.string('inOutConversionTrackProducer'),
70  TrackProducer2 = cms.string('outInConversionTrackProducer'),
71  #prefer collection settings:
72  #-1: propagate output/flag from both input collections
73  # 0: propagate output/flag from neither input collection
74  # 1: arbitrate output/flag (remove duplicates by shared hits), give precedence to first input collection
75  # 2: arbitrate output/flag (remove duplicates by shared hits), give precedence to second input collection
76  # 3: arbitrate output/flag (remove duplicates by shared hits), arbitration first by number of hits, second by chisq/ndof
77  arbitratedEcalSeededPreferCollection = cms.int32(3),
78  arbitratedMergedPreferCollection = cms.int32(3),
79  arbitratedMergedEcalGeneralPreferCollection = cms.int32(3),
80 )
81 
82 #merge ecalseeded collections with collection from general tracks
83 #trackeronly flag is forwarded from the generaltrack-based collections
84 #ecalseeded flag is forwarded from the ecal seeded collection
85 #arbitratedmerged flag is set based on shared hit matching, arbitration by nhits then chi^2/ndof
86 #arbitratedmergedecalgeneral flag is set based on shared hit matching, precedence given to generalTracks
87 generalInOutOutInConversionTrackMerger = RecoEgamma.EgammaPhotonProducers.conversionTrackMerger_cfi.conversionTrackMerger.clone(
88  TrackProducer1 = cms.string('inOutOutInConversionTrackMerger'),
89  TrackProducer2 = cms.string('generalConversionStepConversionTrackMerger'),
90  arbitratedMergedPreferCollection = cms.int32(3),
91  arbitratedMergedEcalGeneralPreferCollection = cms.int32(2),
92 )
93 
94 #merge the result of the above with the collection from gsf tracks
95 #trackeronly, arbitratedmergedecalgeneral, and mergedecal flags are forwarded
96 #arbitratedmerged flag set based on overlap removal by shared hits, with precedence given to gsf tracks
97 gsfGeneralInOutOutInConversionTrackMerger = RecoEgamma.EgammaPhotonProducers.conversionTrackMerger_cfi.conversionTrackMerger.clone(
98  TrackProducer1 = cms.string('generalInOutOutInConversionTrackMerger'),
99  TrackProducer2 = cms.string('gsfConversionTrackProducer'),
100  arbitratedMergedPreferCollection = cms.int32(2),
101 )
102 
103 #final output collection contains combination of generaltracks, ecal seeded tracks and gsf tracks, with overlaps removed by shared hits
104 #precedence is given first to gsf tracks, then to the combination of ecal seeded and general tracks
105 #overlaps between the ecal seeded track collections and between ecal seeded and general tracks are arbitrated first by nhits then by chi^2/dof
106 #(logic and much of the code is adapted from FinalTrackSelectors)
107 
108 conversionTrackMergers = cms.Sequence(inOutOutInConversionTrackMerger*generalConversionStepConversionTrackMerger*generalInOutOutInConversionTrackMerger*gsfGeneralInOutOutInConversionTrackMerger)
109 
110 conversionTrackSequence = cms.Sequence(ckfTracksFromConversions*conversionTrackProducers*conversionTrackMergers)
111 
112 #merge the general tracks with the collection from gsf tracks
113 #arbitratedmerged flag set based on overlap removal by shared hits, with precedence given to gsf tracks
114 gsfGeneralConversionTrackMerger = RecoEgamma.EgammaPhotonProducers.conversionTrackMerger_cfi.conversionTrackMerger.clone(
115  TrackProducer1 = cms.string('generalConversionTrackProducer'),
116  TrackProducer2 = cms.string('gsfConversionTrackProducer'),
117  arbitratedMergedPreferCollection = cms.int32(2),
118 )
119 
120 #special sequence for fastsim which skips the ecal-seeded and conversionStep tracks for now
121 conversionTrackSequenceNoEcalSeeded = cms.Sequence(generalConversionTrackProducer*gsfConversionTrackProducer*gsfGeneralConversionTrackMerger)