コード例 #1
0
    def __init__(self, name, **kw):
        PyAlgorithm.__init__(self, name)
        self.name = name

        ## lepton's cuts
        self.leptonMinEt = kw.get('LeptonMinEt', 20. * GeV)
        self.leptonMaxEta = kw.get('LeptonMaxEta', 2.5)

        ## jets' cuts
        self.jetMinEt = kw.get('JetMinEt', 20. * GeV)
        self.jetMaxEta = kw.get('JetMaxEta', 2.5)

        ## lepton/jet isolation cut
        self.minDeltaRlj = kw.get('MinDeltaRlj', 0.1)

        ## missing et cut
        self.minMissingEt = kw.get('MinMissingEt', 20. * GeV)

        ## cluster isolation cut
        self.maxDeltaRcx = kw.get('MaxDeltaRcx', 0.4)

        ## track isolation cut
        self.maxDeltaRtx = kw.get('MaxDeltaRtx', 0.4)

        ## StoreGate keys
        self.electronsName = kw.get('Electrons', 'ElectronAODCollection')
        self.missingEtName = kw.get('MissingEt', 'MET_RefFinal')
        self.jetsName = kw.get('Jets', 'Kt4LCTopoJets')
        self.muonsName = kw.get('Muons', 'StacoMuonCollection')
        self.clustersName = kw.get('CaloClusters', 'CaloCalTopoCluster')
        self.tracksName = kw.get('Tracks', 'TrackParticleCandidate')
コード例 #2
0
 def __init__(self, name='PythonClassAlgorithm'):
     """ Constructor """
     PyAlgorithm.__init__(self, name)
コード例 #3
0
ファイル: unittests.py プロジェクト: marromlam/lhcb-software
    def setUp(self):
        self.alg = PyAlgorithm("MyAlgorithm")
        #if not self.is_app_run:
        TestLoKiTrigger.is_app_run = True
        #######################################################################
        # Create tracks
        #######################################################################
        self.tracks = []
        self.states = []
        self.stages = []
        self.candidates = []
        self.vcandidates = Hlt.Candidate.ConstVector()

        # States
        s = LHCb.State()  #1
        s.setState(0.0, 0.0, 0.0, -0.01, -0.01, 0.1)
        self.states.append(s)
        s = LHCb.State()  #2
        s.setState(0.0, 0.0, 0.0, +0.01, -0.01, 0.05)
        self.states.append(s)
        s = LHCb.State()  #3
        s.setState(0.0, 0.0, 0.0, -0.01, +0.01, 0.01)
        self.states.append(s)
        s = LHCb.State()  #4
        s.setState(0.0, 0.0, 0.0, 0.01, 0.01, 0.005)
        self.states.append(s)
        s = LHCb.State()  #5
        s.setState(0.0, 0.0, 0.0, 0.01, 0.01, 0.001)
        self.states.append(s)

        #tracks
        t = LHCb.Track()  #1
        t.addToStates(self.states[0])
        self.tracks.append(t)

        t = LHCb.Track()  #2
        t.addToStates(self.states[1])
        self.tracks.append(t)
        t = LHCb.Track()  #3
        t.addToStates(self.states[2])
        self.tracks.append(t)
        t = LHCb.Track()  #4
        t.addToStates(self.states[3])
        self.tracks.append(t)
        t = LHCb.Track()  #5
        t.addToStates(self.states[4])
        self.tracks.append(t)

        # Stages
        stage = Hlt.Stage()  #1
        lock = Hlt.Stage.Lock(stage, self.alg)
        stage.set(self.tracks[0])
        self.stages.append(stage)

        stage = Hlt.Stage()  #2
        lock = Hlt.Stage.Lock(stage, self.alg)
        stage.set(self.tracks[1])
        self.stages.append(stage)

        stage = Hlt.Stage()  #3
        lock = Hlt.Stage.Lock(stage, self.alg)
        stage.set(self.tracks[2])
        self.stages.append(stage)
        # Candidates
        c = Hlt.Candidate()  #1
        c.addToStages(self.stages[0])
        self.candidates.append(c)
        self.vcandidates.push_back(c)
        c = Hlt.Candidate()  #2
        c.addToStages(self.stages[1])
        self.candidates.append(c)
        self.vcandidates.push_back(c)
        c = Hlt.Candidate()  #3
        c.addToStages(self.stages[2])
        self.candidates.append(c)
        self.vcandidates.push_back(c)
コード例 #4
0
 def __init__(self, name):
     PyAlgorithm.__init__(self, name)
     self.name = name
コード例 #5
0
``C++ ToolKit  for Smart and Friendly Physics Analysis''

The package has been designed with the kind help from
Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas,
contributions and advices from G.Raven, J.van Tilburg,
A.Golutvin, P.Koppenburg have been used in the design.

"""
# =============================================================================
__author__ = "Alexander Mazurov  [email protected]"
__date__ = "2010-10-26"
__version__ = "$Revision$ "
# =============================================================================
from GaudiPython import AppMgr, PyAlgorithm
gaudi = AppMgr()
alg = PyAlgorithm("MyAlgorithm")
# =============================================================================
from LoKiTrigger.decorators import *
from LoKiCore.functions import *
from LoKiCore.functions import *
#from LoKiCore.basic import std, cpp
import LoKiCore

from GaudiPython import PyAlgorithm

# =============================================================================
if '__main__' == __name__:

    print '*' * 120
    print __doc__
    print ' Author  : %s ' % __author__