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 inout ecal seeded tracks, set arbitratedecalseeded, mergedarbitratedecalgeneral and mergedarbitrated flags
23 inOutConversionTrackProducer = RecoEgamma.EgammaPhotonProducers.conversionTrackProducer_cfi.conversionTrackProducer.clone(
24  TrackProducer = cms.string('ckfInOutTracksFromConversions'),
25  setArbitratedEcalSeeded = cms.bool(True),
26  setArbitratedMergedEcalGeneral = cms.bool(True),
27 )
28 
29 #producer from outin ecal seeded tracks, set arbitratedecalseeded, mergedarbitratedecalgeneral and mergedarbitrated flags
30 outInConversionTrackProducer = RecoEgamma.EgammaPhotonProducers.conversionTrackProducer_cfi.conversionTrackProducer.clone(
31  TrackProducer = cms.string('ckfOutInTracksFromConversions'),
32  setArbitratedEcalSeeded = cms.bool(True),
33  setArbitratedMergedEcalGeneral = cms.bool(True),
34 )
35 
36 #producer from gsf tracks, set only mergedarbitrated flag (default behaviour)
37 gsfConversionTrackProducer = RecoEgamma.EgammaPhotonProducers.conversionTrackProducer_cfi.conversionTrackProducer.clone(
38  TrackProducer = cms.string('electronGsfTracks'),
39 )
40 
41 conversionTrackProducers = cms.Sequence(generalConversionTrackProducer*inOutConversionTrackProducer*outInConversionTrackProducer*gsfConversionTrackProducer)
42 
43 #merge two ecal-seeded collections, with arbitration by nhits then chi^2/ndof for ecalseededarbitrated, mergedarbitratedecalgeneral and mergedarbitrated flags
44 inOutOutInConversionTrackMerger = RecoEgamma.EgammaPhotonProducers.conversionTrackMerger_cfi.conversionTrackMerger.clone(
45  TrackProducer1 = cms.string('inOutConversionTrackProducer'),
46  TrackProducer2 = cms.string('outInConversionTrackProducer'),
47  #prefer collection settings:
48  #-1: propagate output/flag from both input collections
49  # 0: propagate output/flag from neither input collection
50  # 1: arbitrate output/flag (remove duplicates by shared hits), give precedence to first input collection
51  # 2: arbitrate output/flag (remove duplicates by shared hits), give precedence to second input collection
52  # 3: arbitrate output/flag (remove duplicates by shared hits), arbitration first by number of hits, second by chisq/ndof
53  arbitratedEcalSeededPreferCollection = cms.int32(3),
54  arbitratedMergedPreferCollection = cms.int32(3),
55  arbitratedMergedEcalGeneralPreferCollection = cms.int32(3),
56 )
57 
58 #merge ecalseeded collections with collection from general tracks
59 #trackeronly flag is forwarded from the generaltrack-based collections
60 #ecalseeded flag is forwarded from the ecal seeded collection
61 #arbitratedmerged flag is set based on shared hit matching, arbitration by nhits then chi^2/ndof
62 #arbitratedmergedecalgeneral flag is set based on shared hit matching, precedence given to generalTracks
63 generalInOutOutInConversionTrackMerger = RecoEgamma.EgammaPhotonProducers.conversionTrackMerger_cfi.conversionTrackMerger.clone(
64  TrackProducer1 = cms.string('inOutOutInConversionTrackMerger'),
65  TrackProducer2 = cms.string('generalConversionTrackProducer'),
66  arbitratedMergedPreferCollection = cms.int32(3),
67  arbitratedMergedEcalGeneralPreferCollection = cms.int32(2),
68 )
69 
70 #merge the result of the above with the collection from gsf tracks
71 #trackeronly, arbitratedmergedecalgeneral, and mergedecal flags are forwarded
72 #arbitratedmerged flag set based on overlap removal by shared hits, with precedence given to gsf tracks
73 gsfGeneralInOutOutInConversionTrackMerger = RecoEgamma.EgammaPhotonProducers.conversionTrackMerger_cfi.conversionTrackMerger.clone(
74  TrackProducer1 = cms.string('generalInOutOutInConversionTrackMerger'),
75  TrackProducer2 = cms.string('gsfConversionTrackProducer'),
76  arbitratedMergedPreferCollection = cms.int32(2),
77 )
78 
79 #final output collection contains combination of generaltracks, ecal seeded tracks and gsf tracks, with overlaps removed by shared hits
80 #precedence is given first to gsf tracks, then to the combination of ecal seeded and general tracks
81 #overlaps between the ecal seeded track collections and between ecal seeded and general tracks are arbitrated first by nhits then by chi^2/dof
82 #(logic and much of the code is adapted from FinalTrackSelectors)
83 
84 conversionTrackMergers = cms.Sequence(inOutOutInConversionTrackMerger*generalInOutOutInConversionTrackMerger*gsfGeneralInOutOutInConversionTrackMerger)
85 
86 conversionTrackSequence = cms.Sequence(ckfTracksFromConversions*conversionTrackProducers*conversionTrackMergers)
87 
88 #merge the general tracks with the collection from gsf tracks
89 #arbitratedmerged flag set based on overlap removal by shared hits, with precedence given to gsf tracks
90 gsfGeneralConversionTrackMerger = RecoEgamma.EgammaPhotonProducers.conversionTrackMerger_cfi.conversionTrackMerger.clone(
91  TrackProducer1 = cms.string('generalConversionTrackProducer'),
92  TrackProducer2 = cms.string('gsfConversionTrackProducer'),
93  arbitratedMergedPreferCollection = cms.int32(2),
94 )
95 
96 conversionTrackSequenceNoEcalSeeded = cms.Sequence(generalConversionTrackProducer*gsfConversionTrackProducer*gsfGeneralConversionTrackMerger)