CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/RecoEgamma/EgammaPhotonProducers/python/conversionTrackSequenceForReReco_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 ckfTracksFromConversionsReReco = cms.Sequence(conversionTrackCandidates*ckfOutInTracksFromConversions*ckfInOutTracksFromConversions)
00012 
00013 
00014 #producer from general tracks collection, set tracker only and merged arbitrated flag
00015 generalConversionTrackProducerReReco = RecoEgamma.EgammaPhotonProducers.conversionTrackProducer_cfi.conversionTrackProducer.clone(
00016     TrackProducer = cms.string('generalTracks'),
00017     setTrackerOnly = cms.bool(True),
00018     useTrajectory = cms.bool(False),
00019 )
00020 
00021 #producer from iter8 tracks collection, set tracker only, merged arbitrated, merged arbitrated ecal/general flags
00022 conversionStepConversionTrackProducerReReco = RecoEgamma.EgammaPhotonProducers.conversionTrackProducer_cfi.conversionTrackProducer.clone(
00023     TrackProducer = cms.string('conversionStepTracks'),
00024     setTrackerOnly = cms.bool(True),
00025     setArbitratedMergedEcalGeneral = cms.bool(True),
00026     useTrajectory = cms.bool(False),
00027 )
00028 
00029 #producer from inout ecal seeded tracks, set arbitratedecalseeded and mergedarbitrated flags
00030 inOutConversionTrackProducerReReco = RecoEgamma.EgammaPhotonProducers.conversionTrackProducer_cfi.conversionTrackProducer.clone(
00031     TrackProducer = cms.string('ckfInOutTracksFromConversions'),
00032     setArbitratedEcalSeeded = cms.bool(True),
00033     useTrajectory = cms.bool(False), 
00034 )
00035 
00036 #producer from outin ecal seeded tracks, set arbitratedecalseeded and mergedarbitrated flags
00037 outInConversionTrackProducerReReco = RecoEgamma.EgammaPhotonProducers.conversionTrackProducer_cfi.conversionTrackProducer.clone(
00038     TrackProducer = cms.string('ckfOutInTracksFromConversions'),
00039     setArbitratedEcalSeeded = cms.bool(True),
00040     useTrajectory = cms.bool(False),
00041 )
00042 
00043 #producer from gsf tracks, set only mergedarbitrated flag (default behaviour)
00044 gsfConversionTrackProducerReReco = RecoEgamma.EgammaPhotonProducers.conversionTrackProducer_cfi.conversionTrackProducer.clone(
00045     TrackProducer = cms.string('electronGsfTracks'),
00046     useTrajectory = cms.bool(False),
00047 )
00048 
00049 conversionTrackProducersReReco = cms.Sequence(generalConversionTrackProducerReReco*conversionStepConversionTrackProducerReReco*inOutConversionTrackProducerReReco*outInConversionTrackProducerReReco*gsfConversionTrackProducerReReco)
00050 
00051 
00052 #merge generalTracks and conversionStepTracks collections, with arbitration by nhits then chi^2/ndof for ecalseededarbitrated, mergedarbitratedecalgeneral and mergedarbitrated flags
00053 generalConversionStepConversionTrackMergerReReco = RecoEgamma.EgammaPhotonProducers.conversionTrackMerger_cfi.conversionTrackMerger.clone(
00054     TrackProducer1 = cms.string('generalConversionTrackProducerReReco'),
00055     TrackProducer2 = cms.string('conversionStepConversionTrackProducerReReco'),
00056     #prefer collection settings:
00057     #-1: propagate output/flag from both input collections
00058     # 0: propagate output/flag from neither input collection
00059     # 1: arbitrate output/flag (remove duplicates by shared hits), give precedence to first input collection
00060     # 2: arbitrate output/flag (remove duplicates by shared hits), give precedence to second input collection
00061     # 3: arbitrate output/flag (remove duplicates by shared hits), arbitration first by number of hits, second by chisq/ndof  
00062     arbitratedMergedPreferCollection = cms.int32(3),
00063     arbitratedMergedEcalGeneralPreferCollection = cms.int32(3),        
00064 )
00065 
00066 #merge two ecal-seeded collections, with arbitration by nhits then chi^2/ndof for both ecalseededarbitrated and mergedarbitrated flags
00067 inOutOutInConversionTrackMergerReReco = RecoEgamma.EgammaPhotonProducers.conversionTrackMerger_cfi.conversionTrackMerger.clone(
00068     TrackProducer1 = cms.string('inOutConversionTrackProducerReReco'),
00069     TrackProducer2 = cms.string('outInConversionTrackProducerReReco'),
00070     #prefer collection settings:
00071     #-1: propagate output/flag from both input collections
00072     # 0: propagate output/flag from neither input collection
00073     # 1: arbitrate output/flag (remove duplicates by shared hits), give precedence to first input collection
00074     # 2: arbitrate output/flag (remove duplicates by shared hits), give precedence to second input collection
00075     # 3: arbitrate output/flag (remove duplicates by shared hits), arbitration first by number of hits, second by chisq/ndof  
00076     arbitratedEcalSeededPreferCollection = cms.int32(3),    
00077     arbitratedMergedPreferCollection = cms.int32(3),
00078 )
00079 
00080 #merge ecalseeded collections with collection from general tracks
00081 #trackeronly flag is forwarded from the generaltrack-based collections
00082 #ecalseeded flag is forwarded from the ecal seeded collection
00083 #arbitratedmerged flag is set based on shared hit matching, arbitration by nhits then chi^2/ndof
00084 generalInOutOutInConversionTrackMergerReReco = RecoEgamma.EgammaPhotonProducers.conversionTrackMerger_cfi.conversionTrackMerger.clone(
00085     TrackProducer1 = cms.string('inOutOutInConversionTrackMergerReReco'),
00086     TrackProducer2 = cms.string('generalConversionStepConversionTrackMergerReReco'),
00087     arbitratedMergedPreferCollection = cms.int32(3),
00088 )
00089 
00090 #merge the result of the above with the collection from gsf tracks
00091 #trackeronly and mergedecal flags are forwarded
00092 #arbitratedmerged flag set based on overlap removal by shared hits, with precedence given to gsf tracks
00093 gsfGeneralInOutOutInConversionTrackMergerReReco = RecoEgamma.EgammaPhotonProducers.conversionTrackMerger_cfi.conversionTrackMerger.clone(
00094     TrackProducer1 = cms.string('generalInOutOutInConversionTrackMergerReReco'),
00095     TrackProducer2 = cms.string('gsfConversionTrackProducerReReco'),
00096     arbitratedMergedPreferCollection = cms.int32(2),
00097 )
00098 
00099 #final output collection contains combination of generaltracks, ecal seeded tracks and gsf tracks, with overlaps removed by shared hits
00100 #precedence is given first to gsf tracks, then to the combination of ecal seeded and general tracks
00101 #overlaps between the ecal seeded track collections and between ecal seeded and general tracks are arbitrated first by nhits then by chi^2/dof
00102 #(logic and much of the code is adapted from FinalTrackSelectors)
00103 
00104 conversionTrackMergersReReco = cms.Sequence(inOutOutInConversionTrackMergerReReco*generalConversionStepConversionTrackMergerReReco*generalInOutOutInConversionTrackMergerReReco*gsfGeneralInOutOutInConversionTrackMergerReReco)
00105 
00106 conversionTrackSequenceForReReco = cms.Sequence(ckfTracksFromConversionsReReco*conversionTrackProducersReReco*conversionTrackMergersReReco)
00107 
00108 #merge the general tracks with the collection from gsf tracks
00109 #arbitratedmerged flag set based on overlap removal by shared hits, with precedence given to gsf tracks
00110 gsfGeneralConversionTrackMergerReReco = RecoEgamma.EgammaPhotonProducers.conversionTrackMerger_cfi.conversionTrackMerger.clone(
00111     TrackProducer1 = cms.string('generalConversionTrackProducerReReco'),
00112     TrackProducer2 = cms.string('gsfConversionTrackProducerReReco'),
00113     arbitratedMergedPreferCollection = cms.int32(2),
00114 )
00115 
00116 #conversionTrackSequenceNoEcalSeeded = cms.Sequence(generalConversionTrackProducer*gsfConversionTrackProducer*gsfGeneralConversionTrackMerger)