CMS 3D CMS Logo

Public Member Functions | Private Attributes | Static Private Attributes

trackTools::MakeTrackCandidates Class Reference

Inherits FWCore::GuiBrowsers::ConfigToolBase::ConfigToolBase.

List of all members.

Public Member Functions

def __call__
def __init__
def getDefaultParameters
def toolCode

Private Attributes

 _comment
 _parameters

Static Private Attributes

tuple _defaultParameters = dicttypes.SortedKeysDict()
string _label = 'makeTrackCandidates'

Detailed Description

Create selected tracks and a candidate hypothesis on AOD:

Definition at line 224 of file trackTools.py.


Constructor & Destructor Documentation

def trackTools::MakeTrackCandidates::__init__ (   self)

Definition at line 230 of file trackTools.py.

00231                       :
00232         ConfigToolBase.__init__(self)
00233         self.addParameter(self._defaultParameters,'label','TrackCands', "output collection will be <'patAOD'+label>")
00234         self.addParameter(self._defaultParameters,'tracks',cms.InputTag('generalTracks'), 'input tracks')
00235         self.addParameter(self._defaultParameters,'particleType','pi+', 'particle type (for mass)')
00236         self.addParameter(self._defaultParameters,'preselection','pt > 10', 'preselection cut on the AOD candidates')
00237         self.addParameter(self._defaultParameters,'selection','pt > 10', 'selection cut on the PAT candidates (for the selectedLayer1Candidate collection)')
00238         self.addParameter(self._defaultParameters,'isolation',{'tracker':0.3, 'ecalTowers':0.3, 'hcalTowers':0.3}, "isolation to use (as 'source': value of dR)\ntracker     : as muon iso from tracks\necalTowers  : as muon iso from calo tower\nhcalTowers  : as muon iso from calo towers",allowedValues=['tracker','ecalTowers','hcalTowers'])
00239         self.addParameter(self._defaultParameters,'isoDeposits',['tracker','ecalTowers','hcalTowers'], 'iso deposits')
00240         self.addParameter(self._defaultParameters,'mcAs',None, "eplicate mc match as the one used by PAT on this AOD collection (None=no mc match); choose 'photon', 'electron', 'muon', 'tau','jet', 'met' as input string",Type=str,allowedValues=['photon', 'electron', 'muon', 'tau','jet', 'met', None], acceptNoneValue = True)
00241 
00242         self._parameters=copy.deepcopy(self._defaultParameters)
00243         self._comment = ""


Member Function Documentation

def trackTools::MakeTrackCandidates::__call__ (   self,
  process,
  label = None,
  tracks = None,
  particleType = None,
  preselection = None,
  selection = None,
  isolation = None,
  isoDeposits = None,
  mcAs = None 
)

Definition at line 247 of file trackTools.py.

00256                                       :
00257         if label  is None:
00258             label=self._defaultParameters['label'].value
00259         if tracks is None:
00260             tracks=self._defaultParameters['tracks'].value
00261         if particleType is None:
00262             particleType=self._defaultParameters['particleType'].value
00263         if preselection is None:
00264             preselection=self._defaultParameters['preselection'].value
00265         if selection is None:
00266             selection=self._defaultParameters['selection'].value
00267         if isolation is None:
00268             isolation=self._defaultParameters['isolation'].value
00269         if isoDeposits is None:
00270             isoDeposits=self._defaultParameters['isoDeposits'].value
00271         if mcAs is None:
00272             mcAs=self._defaultParameters['mcAs'].value
00273         self.setParameter('label',label)
00274         self.setParameter('tracks',tracks)
00275         self.setParameter('particleType',particleType)
00276         self.setParameter('preselection',preselection)
00277         self.setParameter('selection',selection)
00278         self.setParameter('isolation',isolation)
00279         self.setParameter('isoDeposits',isoDeposits)
00280         self.setParameter('mcAs',mcAs,True)
00281         self.apply(process)

def trackTools::MakeTrackCandidates::getDefaultParameters (   self)

Definition at line 244 of file trackTools.py.

00245                                   :
00246         return self._defaultParameters

def trackTools::MakeTrackCandidates::toolCode (   self,
  process 
)

Definition at line 282 of file trackTools.py.

00283                                :
00284         label=self._parameters['label'].value
00285         tracks=self._parameters['tracks'].value
00286         particleType=self._parameters['particleType'].value
00287         preselection=self._parameters['preselection'].value
00288         selection=self._parameters['selection'].value
00289         isolation=self._parameters['isolation'].value
00290         isoDeposits=self._parameters['isoDeposits'].value
00291         mcAs=self._parameters['mcAs'].value
00292 
00293         makeAODTrackCandidates(process,
00294                                tracks        = tracks,
00295                                particleType  = particleType,
00296                                candSelection = preselection,
00297                                label         = label
00298                                )
00299         makePATTrackCandidates(process,
00300                                label         = label,
00301                                input         = cms.InputTag('patAOD' + label),
00302                                isolation     = isolation,
00303                                isoDeposits   = isoDeposits,
00304                                mcAs          = mcAs,
00305                                selection     = selection
00306                                )
00307 
00308 makeTrackCandidates=MakeTrackCandidates()

Member Data Documentation

Definition at line 230 of file trackTools.py.

tuple trackTools::MakeTrackCandidates::_defaultParameters = dicttypes.SortedKeysDict() [static, private]

Definition at line 228 of file trackTools.py.

string trackTools::MakeTrackCandidates::_label = 'makeTrackCandidates' [static, private]

Definition at line 227 of file trackTools.py.

Definition at line 230 of file trackTools.py.