CMS 3D CMS Logo

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