def _create_jets(self): # Use particle flow. if self._config["JET"]["PF"]: pfps = DataOnDemand(Location = "Phys/PFParticles/Particles") jets = JetMakerConf( self._name + "StdJets", R = self._config["JET"]["R"], JetEnergyCorrection = self._config["JET"]["JEC"]).algorithms[0] return Selection(self._name + "JetsSelection", Algorithm = jets, RequiredSelections = [pfps]) # Just use pions and photons. else: jets = LoKi__JetMaker( self._name + "JetsMaker", JetMaker = 'LoKi::FastJetMaker', JetID = False, Associate2Vertex = True, ApplyJEC = self._config["JET"]["JEC"], Inputs = ['Phys/StdLoosePhotons/Particles', 'Phys/StdAllNoPIDsPions/Particles'] ) jets.addTool(LoKi__FastJetMaker) jets.LoKi__FastJetMaker.Type = 2 jets.LoKi__FastJetMaker.RParameter = self._config["JET"]["R"] jets.LoKi__FastJetMaker.PtMin = self._config["JET"]["MIN_PT"] jets.LoKi__FastJetMaker.Recombination = 0 return Selection(self._name + "JetsSelection" , Algorithm = jets, RequiredSelections = [StdAllNoPIDsPions, StdLoosePhotons])
def setupJetMaker(self): from Configurables import LoKi__JetMaker, LoKi__FastJetMaker jetMakerName = self.name #if self.JetID : jetMakerName+= 'NoJetID' algo = LoKi__JetMaker(jetMakerName) algo.JetMaker = self.jetMakerTool algo.Associate2Vertex = self.AssociateWithPV algo.addTool(LoKi__FastJetMaker) algo.Inputs = self.Inputs tool = getattr(algo, 'LoKi__FastJetMaker') tool.Type = self.jetMakerType tool.RParameter = self.R tool.PtMin = self.PtMin tool.Recombination = 0 tool.JetID = self.jetidnumber if self.JetEnergyCorrection: algo.ApplyJEC = True algo.HistoPath = 'JEC/' if self.JetID: algo.ApplyJetID = True self.algorithms.append(algo)
def _createJets( self, name ): _stdAllPions = DataOnDemand( Location = "Phys/StdAllNoPIDsPions/Particles" ) _stdLoosePhotons = DataOnDemand( Location = "Phys/StdLoosePhotons/Particles" ) #_stdNoPIDsDownPions = DataOnDemand( Location = "Phys/StdNoPIDsDownPions/Particles" ) _jetAlgo = LoKi__JetMaker ( name+"JetMaker" ) _jetAlgo.JetMaker = 'LoKi__FastJetMaker' _jetAlgo.JetID = False _jetAlgo.ApplyJEC = False #If True, error _jetAlgo.Associate2Vertex = True ## Inputs are selected from the good PV before hands _jetAlgo.addTool ( LoKi__FastJetMaker ) _jetAlgo.Inputs = ['Phys/StdLoosePhotons/Particles','Phys/'+name+'HighPTPions/Particles']#'Phys/StdNoPIDsDownPions/Particles', _jetTool = getattr ( _jetAlgo , 'LoKi__FastJetMaker' ) _jetTool.Type = 2 ## anti-kt _jetTool.RParameter = 0.5 _jetTool.PtMin = self.__confdict__["2B4jet"]["PTmin"] _jetTool.Recombination = 0 return Selection( name+"Jets" , Algorithm = _jetAlgo, RequiredSelections = [_stdLoosePhotons, self.LongPions])#, _stdNoPIDsDownPions] )
def jetMakerConfig(name, Inputs, R): """ to ease jet maker config """ from Configurables import LoKi__JetMaker, LoKi__FastJetMaker algo = LoKi__JetMaker(name) algo.JetMaker = 'LoKi::FastJetMaker' algo.addTool(LoKi__FastJetMaker) algo.Inputs = Inputs tool = getattr(algo, 'LoKi__FastJetMaker') tool.Type = 2 tool.RParameter = R tool.Recombination = 0 return algo
# @date 2009-09-09 # ============================================================================= """ Configuration file for jets made with FastJet """ __author__ = "Victor COCO [email protected]" __version__ = "v1r0" # ============================================================================= __all__ = ('StdJets', 'FastJet', 'locations') # ============================================================================= from Gaudi.Configuration import * from Configurables import LoKi__JetMaker, LoKi__FastJetMaker from CommonParticles.Utils import * ## create the algorithm StdJets = LoKi__JetMaker('StdJets') # select the jet maker StdJets.JetMaker = 'LoKi__FastJetMaker' StdJets.addTool(LoKi__FastJetMaker) FastJet = getattr(StdJets, 'LoKi__FastJetMaker') ## configure Data-On-Demand service locations = updateDoD(StdJets) ## ============================================================================ if '__main__' == __name__: print __doc__