CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/RecoEgamma/EgammaPhotonProducers/python/conversionTrackSequence_cff.py

Go to the documentation of this file.
00001 import FWCore.ParameterSet.Config as cms
00002 
00003 import RecoEgamma.EgammaPhotonProducers.conversionTrackProducer_cfi
00004 import RecoEgamma.EgammaPhotonProducers.conversionTrackMerger_cfi
00005 
00006 # Conversion Track candidate producer 
00007 from RecoEgamma.EgammaPhotonProducers.conversionTrackCandidates_cfi import *
00008 # Conversion Track producer  ( final fit )
00009 from RecoEgamma.EgammaPhotonProducers.ckfOutInTracksFromConversions_cfi import *
00010 from RecoEgamma.EgammaPhotonProducers.ckfInOutTracksFromConversions_cfi import *
00011 ckfTracksFromConversions = cms.Sequence(conversionTrackCandidates*ckfOutInTracksFromConversions*ckfInOutTracksFromConversions)
00012 
00013 
00014 
00015 #producer from general tracks collection, set tracker only, merged arbitrated, merged arbitrated ecal/general flags
00016 generalConversionTrackProducer = RecoEgamma.EgammaPhotonProducers.conversionTrackProducer_cfi.conversionTrackProducer.clone(
00017     TrackProducer = cms.string('generalTracks'),
00018     setTrackerOnly = cms.bool(True),
00019     setArbitratedMergedEcalGeneral = cms.bool(True),
00020 )
00021 
00022 #producer from iter8 tracks collection, set tracker only, merged arbitrated, merged arbitrated ecal/general flags
00023 conversionStepConversionTrackProducer = RecoEgamma.EgammaPhotonProducers.conversionTrackProducer_cfi.conversionTrackProducer.clone(
00024     TrackProducer = cms.string('conversionStepTracks'),
00025     setTrackerOnly = cms.bool(True),
00026     setArbitratedMergedEcalGeneral = cms.bool(True),
00027 )
00028 
00029 
00030 #producer from inout ecal seeded tracks, set arbitratedecalseeded, mergedarbitratedecalgeneral and mergedarbitrated flags
00031 inOutConversionTrackProducer = RecoEgamma.EgammaPhotonProducers.conversionTrackProducer_cfi.conversionTrackProducer.clone(
00032     TrackProducer = cms.string('ckfInOutTracksFromConversions'),
00033     setArbitratedEcalSeeded = cms.bool(True),
00034     setArbitratedMergedEcalGeneral = cms.bool(True),    
00035 )
00036 
00037 #producer from outin ecal seeded tracks, set arbitratedecalseeded, mergedarbitratedecalgeneral and mergedarbitrated flags
00038 outInConversionTrackProducer = RecoEgamma.EgammaPhotonProducers.conversionTrackProducer_cfi.conversionTrackProducer.clone(
00039     TrackProducer = cms.string('ckfOutInTracksFromConversions'),
00040     setArbitratedEcalSeeded = cms.bool(True),
00041     setArbitratedMergedEcalGeneral = cms.bool(True),    
00042 )
00043 
00044 #producer from gsf tracks, set only mergedarbitrated flag (default behaviour)
00045 gsfConversionTrackProducer = RecoEgamma.EgammaPhotonProducers.conversionTrackProducer_cfi.conversionTrackProducer.clone(
00046     TrackProducer = cms.string('electronGsfTracks'),
00047     filterOnConvTrackHyp = cms.bool(False),
00048 )
00049 
00050 conversionTrackProducers = cms.Sequence(generalConversionTrackProducer*conversionStepConversionTrackProducer*inOutConversionTrackProducer*outInConversionTrackProducer*gsfConversionTrackProducer)
00051 
00052 
00053 #merge generalTracks and conversionStepTracks collections, with arbitration by nhits then chi^2/ndof for ecalseededarbitrated, mergedarbitratedecalgeneral and mergedarbitrated flags
00054 generalConversionStepConversionTrackMerger = RecoEgamma.EgammaPhotonProducers.conversionTrackMerger_cfi.conversionTrackMerger.clone(
00055     TrackProducer1 = cms.string('generalConversionTrackProducer'),
00056     TrackProducer2 = cms.string('conversionStepConversionTrackProducer'),
00057     #prefer collection settings:
00058     #-1: propagate output/flag from both input collections
00059     # 0: propagate output/flag from neither input collection
00060     # 1: arbitrate output/flag (remove duplicates by shared hits), give precedence to first input collection
00061     # 2: arbitrate output/flag (remove duplicates by shared hits), give precedence to second input collection
00062     # 3: arbitrate output/flag (remove duplicates by shared hits), arbitration first by number of hits, second by chisq/ndof  
00063     arbitratedMergedPreferCollection = cms.int32(3),
00064     arbitratedMergedEcalGeneralPreferCollection = cms.int32(3),        
00065 )
00066 
00067 #merge two ecal-seeded collections, with arbitration by nhits then chi^2/ndof for ecalseededarbitrated, mergedarbitratedecalgeneral and mergedarbitrated flags
00068 inOutOutInConversionTrackMerger = RecoEgamma.EgammaPhotonProducers.conversionTrackMerger_cfi.conversionTrackMerger.clone(
00069     TrackProducer1 = cms.string('inOutConversionTrackProducer'),
00070     TrackProducer2 = cms.string('outInConversionTrackProducer'),
00071     #prefer collection settings:
00072     #-1: propagate output/flag from both input collections
00073     # 0: propagate output/flag from neither input collection
00074     # 1: arbitrate output/flag (remove duplicates by shared hits), give precedence to first input collection
00075     # 2: arbitrate output/flag (remove duplicates by shared hits), give precedence to second input collection
00076     # 3: arbitrate output/flag (remove duplicates by shared hits), arbitration first by number of hits, second by chisq/ndof  
00077     arbitratedEcalSeededPreferCollection = cms.int32(3),    
00078     arbitratedMergedPreferCollection = cms.int32(3),
00079     arbitratedMergedEcalGeneralPreferCollection = cms.int32(3),        
00080 )
00081 
00082 #merge ecalseeded collections with collection from general tracks
00083 #trackeronly flag is forwarded from the generaltrack-based collections
00084 #ecalseeded flag is forwarded from the ecal seeded collection
00085 #arbitratedmerged flag is set based on shared hit matching, arbitration by nhits then chi^2/ndof
00086 #arbitratedmergedecalgeneral flag is set based on shared hit matching, precedence given to generalTracks
00087 generalInOutOutInConversionTrackMerger = RecoEgamma.EgammaPhotonProducers.conversionTrackMerger_cfi.conversionTrackMerger.clone(
00088     TrackProducer1 = cms.string('inOutOutInConversionTrackMerger'),
00089     TrackProducer2 = cms.string('generalConversionStepConversionTrackMerger'),
00090     arbitratedMergedPreferCollection = cms.int32(3),
00091     arbitratedMergedEcalGeneralPreferCollection = cms.int32(2),        
00092 )
00093 
00094 #merge the result of the above with the collection from gsf tracks
00095 #trackeronly, arbitratedmergedecalgeneral, and mergedecal flags are forwarded
00096 #arbitratedmerged flag set based on overlap removal by shared hits, with precedence given to gsf tracks
00097 gsfGeneralInOutOutInConversionTrackMerger = RecoEgamma.EgammaPhotonProducers.conversionTrackMerger_cfi.conversionTrackMerger.clone(
00098     TrackProducer1 = cms.string('generalInOutOutInConversionTrackMerger'),
00099     TrackProducer2 = cms.string('gsfConversionTrackProducer'),
00100     arbitratedMergedPreferCollection = cms.int32(2),
00101 )
00102 
00103 #final output collection contains combination of generaltracks, ecal seeded tracks and gsf tracks, with overlaps removed by shared hits
00104 #precedence is given first to gsf tracks, then to the combination of ecal seeded and general tracks
00105 #overlaps between the ecal seeded track collections and between ecal seeded and general tracks are arbitrated first by nhits then by chi^2/dof
00106 #(logic and much of the code is adapted from FinalTrackSelectors)
00107 
00108 conversionTrackMergers = cms.Sequence(inOutOutInConversionTrackMerger*generalConversionStepConversionTrackMerger*generalInOutOutInConversionTrackMerger*gsfGeneralInOutOutInConversionTrackMerger)
00109 
00110 conversionTrackSequence = cms.Sequence(ckfTracksFromConversions*conversionTrackProducers*conversionTrackMergers)
00111 
00112 #merge the general tracks with the collection from gsf tracks
00113 #arbitratedmerged flag set based on overlap removal by shared hits, with precedence given to gsf tracks
00114 gsfGeneralConversionTrackMerger = RecoEgamma.EgammaPhotonProducers.conversionTrackMerger_cfi.conversionTrackMerger.clone(
00115     TrackProducer1 = cms.string('generalConversionTrackProducer'),
00116     TrackProducer2 = cms.string('gsfConversionTrackProducer'),
00117     arbitratedMergedPreferCollection = cms.int32(2),
00118 )
00119 
00120 #special sequence for fastsim which skips the ecal-seeded and conversionStep tracks for now
00121 conversionTrackSequenceNoEcalSeeded = cms.Sequence(generalConversionTrackProducer*gsfConversionTrackProducer*gsfGeneralConversionTrackMerger)