Inherits FWCore::GuiBrowsers::ConfigToolBase::ConfigToolBase.
Public Member Functions | |
def | __call__ |
def | __init__ |
def | getDefaultParameters |
def | toolCode |
Private Attributes | |
_comment | |
_parameters | |
Static Private Attributes | |
tuple | _defaultParameters = dicttypes.SortedKeysDict() |
string | _label = 'makeAODTrackCandidates' |
Create selected tracks and a candidate hypothesis on AOD:
Definition at line 4 of file trackTools.py.
def trackTools::MakeAODTrackCandidates::__init__ | ( | self | ) |
Definition at line 11 of file trackTools.py.
00012 : 00013 ConfigToolBase.__init__(self) 00014 self.addParameter(self._defaultParameters,'label','TrackCands', "output collection will be <'patAOD'+label>") 00015 self.addParameter(self._defaultParameters,'tracks',cms.InputTag('generalTracks'), 'input tracks') 00016 self.addParameter(self._defaultParameters,'particleType','pi+', 'particle type (for mass)') 00017 self.addParameter(self._defaultParameters,'candSelection','pt > 10', 'preselection cut on the candidates') 00018 00019 self._parameters=copy.deepcopy(self._defaultParameters) 00020 self._comment = ""
def trackTools::MakeAODTrackCandidates::__call__ | ( | self, | |
process, | |||
label = None , |
|||
tracks = None , |
|||
particleType = None , |
|||
candSelection = None |
|||
) |
Definition at line 24 of file trackTools.py.
00029 : 00030 if label is None: 00031 label=self._defaultParameters['label'].value 00032 if tracks is None: 00033 tracks=self._defaultParameters['tracks'].value 00034 if particleType is None: 00035 particleType=self._defaultParameters['particleType'].value 00036 if candSelection is None: 00037 candSelection=self._defaultParameters['candSelection'].value 00038 self.setParameter('label',label) 00039 self.setParameter('tracks',tracks) 00040 self.setParameter('particleType',particleType) 00041 self.setParameter('candSelection',candSelection) 00042 self.apply(process)
def trackTools::MakeAODTrackCandidates::getDefaultParameters | ( | self | ) |
Definition at line 21 of file trackTools.py.
def trackTools::MakeAODTrackCandidates::toolCode | ( | self, | |
process | |||
) |
Definition at line 43 of file trackTools.py.
00043 : 00044 label=self._parameters['label'].value 00045 tracks=self._parameters['tracks'].value 00046 particleType=self._parameters['particleType'].value 00047 candSelection=self._parameters['candSelection'].value 00048 00049 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi"); 00050 ## add ChargedCandidateProducer from track 00051 setattr(process, 'patAOD' + label + 'Unfiltered', cms.EDProducer("ConcreteChargedCandidateProducer", 00052 src = tracks, 00053 particleType = cms.string(particleType) 00054 ) 00055 ) 00056 ## add CandViewSelector with preselection string 00057 setattr(process, 'patAOD' + label, cms.EDFilter("CandViewSelector", 00058 src = cms.InputTag('patAOD' + label + 'Unfiltered'), 00059 cut = cms.string(candSelection) 00060 ) 00061 ) 00062 ## run production of TrackCandidates at the very beginning of the sequence 00063 process.patDefaultSequence.replace(process.patCandidates, getattr(process, 'patAOD' + label + 'Unfiltered') * getattr(process, 'patAOD' + label) * process.patCandidates) 00064 00065 makeAODTrackCandidates=MakeAODTrackCandidates() 00066 00067
Definition at line 11 of file trackTools.py.
tuple trackTools::MakeAODTrackCandidates::_defaultParameters = dicttypes.SortedKeysDict() [static, private] |
Definition at line 9 of file trackTools.py.
string trackTools::MakeAODTrackCandidates::_label = 'makeAODTrackCandidates' [static, private] |
Definition at line 8 of file trackTools.py.
Definition at line 11 of file trackTools.py.