Esempio n. 1
0
By usage of this code one clearly states the disagreement 
with the smear campaign of Dr.O.Callot et al.: 
``No Vanya's lines are allowed in LHCb/Gaudi software.''

"""
# =============================================================================
__author__ = 'Vanya BELYAEV [email protected]'
__date__ = "2006-10-08"
__version__ = "$Revision$"
__all__ = ()
# =============================================================================
## logging
# =============================================================================
from Bender.Logger import getLogger
if '__main__' == __name__: logger = getLogger('Bender.Startup')
else: logger = getLogger(__name__)
# =============================================================================


def with_ipython():
    try:
        __IPYTHON__
        return True
    except NameError:
        return False


## check if the file is actually "empty"
def _empty_(fname):
Esempio n. 2
0
                  $Revision: 172885 $
Last modification $Date: 2014-05-16 19:48:30 +0200 (Fri, 16 May 2014) $
               by $Author: ibelyaev $
"""
# =============================================================================
__author__  = " Vanya BELYAEV [email protected] "
__date__    = " 2006-10-12 " 
__version__ = " $Revision: 172885 $ "
# ============================================================================= 
## import everything from bender 
from   Bender.Main import *
# =============================================================================
## optional logging
# =============================================================================
from Bender.Logger import getLogger 
if '__main__' == __name__ : logger = getLogger ( 'BenderTutor.Tis&Tos' )
else                      : logger = getLogger ( __name__ )
# =============================================================================
## @class TisTosTuple
#  Enhanced functionality for n-tuples 
#  @author Vanya BELYAEV [email protected]
class TisTosTuple(Algo):
    """
    Enhanced functionality for n-tuples 
    """
    def initialize ( self ) :

        sc = Algo.initialize ( self ) ## initialize the base class
        if sc.isFailure() : return sc

        #
Esempio n. 3
0
LoKi project: ``C++ ToolKit for Smart and Friendly Physics Analysis''

By usage of this code one clearly states the disagreement 
with the smear campaign of Dr.O.Callot et al.: 
``No Vanya's lines are allowed in LHCb/Gaudi software.''

"""
# =============================================================================
__author__ = 'Vanya BELYAEV [email protected]'
__date__ = "2004-07-11"
__version__ = "$Revision$"
# =============================================================================
## logging
# =============================================================================
from Bender.Logger import getLogger
if '__main__' == __name__: logger = getLogger('BenderTools.All')
else: logger = getLogger(__name__)
# =============================================================================
from Bender.Main import *
## MC :
from LoKiGen.decorators import *
from LoKiGenMC.decorators import *
from LoKiMC.decorators import *
from LoKiPhysMC.decorators import *
from LoKiAlgoMC.decorators import *

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

    logger.info(80 * '*')
    logger.info(__doc__)
Esempio n. 4
0
__version__ = '$Revision$'
# =============================================================================
## needed to produce/visualize the histograms
import ROOT
from Bender.Main import *  # import all bender goodies
## easy access to various geometry routines
import LHCbMath.Types
from Gaudi.Configuration import *  # needed for job configuration
# =============================================================================
from GaudiKernel.SystemOfUnits import GeV, MeV, mm
from GaudiKernel.PhysicalConstants import c_light
# =============================================================================
# logging
# =============================================================================
from Bender.Logger import getLogger
logger = getLogger(__name__)
# =============================================================================
import BenderTools.TisTos  # add methods for TisTos
import BenderTools.Fill  # add methods to fill n-tuple info
# =============================================================================

# =============================================================================
# @class BB
#  Simple template algorithm to study 2xB
#  @date   2011-05-27
#  @author Vanya BELYAEV [email protected]


class BB (Algo):

    """
Esempio n. 5
0
def _bender_at_exit_ () :
    """
    At-Exit action
    """
    from Bender.Logger import getLogger 
    if '__main__' == __name__ : logger = getLogger ( 'Bender.Fixes' )
    else                      : logger = getLogger ( __name__ )
    
    logger.debug ( '*'*120 ) 
    logger.debug ( 'custom "atexit" handler is being invoked' ) 
    logger.debug ( '*'*120 ) 
    
    from GaudiPython.Bindings import _gaudi
    rc = None 
    if _gaudi :

        if hasattr ( _gaudi , 'GaudiPythonAlgos' ) :
            _algos = _gaudi.GaudiPythonAlgos
            while _algos :
                _a = _algos.pop(0)
                del _a
                logger.debug ( "Clear list of 'GaudiPythonAlgos'" )

        logger.debug ( 'AppMgr.exit() is being invoked' )
        rc = _gaudi.ReturnCode 
        _gaudi.exit  ()

    logger.debug ( '*'*120 ) 
    logger.debug ( 'custom "atexit" handler has been invoked' ) 
    logger.debug ( '*'*120 )

    if rc :

        """     
        const int Success                  = 0x00;
        const int GenericFailure           = 0x01;
        /// @defgroup loop_stop Loop termination
        /// Error codes for abnormal loop termination.
        /// @{
        const int FailInput                = 0x02; //< Error opening file
        const int AlgorithmFailure         = 0x03; //<
        const int ScheduledStop            = 0x04; //< Loop terminated because of user request
        const int IncidentFailure          = 0x05; //< Fatal error in Incident handling
        const int UnhandledException       = 0x06; //<
        const int CorruptedInput           = 0x10; //< Input file showed a corruption
        /// @}
        /// @{
        /// Error codes for operation failures.
        const int FinalizationFailure      = 0x0b;
        /// @}
        const int SignalOffset             = 0x80; //< Offset for signal-related return codes
        """
        
        nc = '0x%x' % rc 
        if   0x00 == rc : nc = 'Success'
        elif 0x01 == rc : nc = 'GenericFailure'
        elif 0x02 == rc : nc = 'FailInput'
        elif 0x03 == rc : nc = 'AlgorithmFailure'
        elif 0x04 == rc : nc = 'ScheduledStop'
        elif 0x05 == rc : nc = 'IncidentFailure'
        elif 0x06 == rc : nc = 'UnhandledException'
        elif 0x10 == rc : nc = 'CorruptedInput'
        elif 0x0b == rc : nc = 'FinalizationFailure'
        
        logger.info ( 'Call sys.exit ("%s")' % nc )
        import sys 
        sys.exit ( rc ) 
# =============================================================================
import ROOT
from Bender.MainMC import * 
from GaudiKernel.SystemOfUnits import GeV, MeV, mm
import BenderTools.Fill

# =============================================================================
## (optional) logging
# =============================================================================

__author__  = " Ben Couturier [email protected] "
__date__    = " 2014-02-05 " 
__version__ = " Version $Revision:$ "

from Bender.Logger import getLogger 
if '__main__' == __name__ : logger = getLogger ( 'Bender.Startup' )
else                      : logger = getLogger ( __name__ )
# =============================================================================

## @class TrackFilter
#  Simple class to filter tracks in D0 -> K pi decays
class TrackFilter(AlgoMC):
    """
    Algorithm to filter interesting tracks from the same PV as the foound D0
    """

    ## initialize the algorithm
    def initialize ( self ) :
        """
        Initialize the algorithm
        """
Esempio n. 7
0
# =============================================================================
__author__  = "Vanya BELYAEV [email protected]"
__date__    = "2010-02-12"
__version__ = "$Revision$"
__all__     = ( 'extendfile1'  ,
                'extendfile2'  ,
                'extendfile'   ,
                'inCastor'     ,
                'inEOS'        ,
                'inGrid'       ,
                'hasGridProxy' ) 
# =============================================================================
## logging
# =============================================================================
from Bender.Logger import getLogger 
if '__main__' == __name__ : logger = getLogger ( 'BenderTools.DataUtils' )
else                      : logger = getLogger ( __name__ )
# =============================================================================
_castor = '/castor/cern.ch/grid'
_nsls   = 'nsls -l %s'
# =============================================================================
## check the presence of the file in (CERN) Castor
#
#  @code
#
#   >>> lfn = '/lhcb/Collisons11/......'
#   >>> ok = inCastor ( lfn ) ## check CERN Grid Castor storage 
#
#  @endcode
#
#  @code
Esempio n. 8
0
__author__  = "Thomas RUF, Vanya BELYAEV"
__date__    = "2012-10-24"
__version__ = "$Revision$"
# =============================================================================
__all__     = (
    'useDBTagsFromData' , 
    'getDBTags'         ,
    'getMetaInfo'       ,
    'extractTags'       ,
    'extractMetaInfo'       
    )
# =============================================================================
## logging
# =============================================================================
from Bender.Logger import getLogger 
if '__main__' == __name__ : logger = getLogger ( 'BenderTools.GetDBTags' )
else                      : logger = getLogger ( __name__ )
# =============================================================================
def _lfn_pfn_strip_ ( file_name ) :
    #
    #
    if 0 < file_name.find ( ' ' ) :
        p = file_name.find ( 'DATAFILE=' )
        if 0 <= p  :
            p1 = file_name.find ( "'", p  + 9 )
            p2 = file_name.find ( "'", p1 + 1 )
            l = len ( file_name )
            
            if 0 < p1 and p1 < p2 and p1 < l and p2 < l : pass 
            else :
                p1 = file_name.find ( '"' , p  + 9 )
Esempio n. 9
0
By usage of this code one clearly states the disagreement 
with the smear campaign of Dr.O.Callot et al.: 
``No Vanya's lines are allowed in LHCb/Gaudi software.''

"""
# =============================================================================
__author__  = 'Vanya BELYAEV [email protected]'
__date__    = "2011-10-21"
__version__ = '$Revision$'
__all__     = ()
# =============================================================================
## logging
# =============================================================================
from Bender.Logger import getLogger 
if '__main__' == __name__ : logger = getLogger ( 'BenderTools.Fixes_Gaudi' )
else                      : logger = getLogger ( __name__ )
# =============================================================================
logger.info ( '*** Fix some Gaudi features' ) 
# =============================================================================
from LoKiCore.basic import cpp
IStateful    = cpp.IStateful 
StateMachine = cpp.Gaudi.StateMachine
# =============================================================================
import GaudiPython.Bindings
_EvtSel      = GaudiPython.Bindings.iEventSelector

if not hasattr ( _EvtSel , '_openNew_') :
    
    def _openNew_ ( self                ,
                    stream              ,
Esempio n. 10
0
LoKi project: ``C++ ToolKit for Smart and Friendly Physics Analysis''

By usage of this code one clearly states the disagreement 
with the campaign of Dr.O.Callot et al.: 
``No Vanya's lines are allowed in LHCb/Gaudi software.''

"""
# =============================================================================
__author__ = 'Vanya BELYAEV [email protected]'
__date__ = "2004-07-11"
__version__ = "$Revision$"
# =============================================================================
## logging
# =============================================================================
from Bender.Logger import getLogger
if '__main__' == __name__: logger = getLogger('Bender.MainMC')
else: logger = getLogger(__name__)
# =============================================================================
from Bender.Main import *
##
logger.info("Load simulation stuff")
from LoKiGen.decorators import *
from LoKiGenMC.decorators import *
from LoKiMC.decorators import *
from LoKiPhysMC.decorators import *
from LoKiAlgoMC.decorators import *

## prepare machinery for powerfull n-tuple filling
from BenderTools.Fill import decorateFill as _decorateFill
_decorateFill(AlgoMC)
## prepare machinery for TisTos'sing
Esempio n. 11
0
#                                                                             #
# This file contains the boiler plate for running over data in Bender. Unless #
# you want to fiddle with the data options, you probably don't need to do     #
# anything in here.                                                           #
#                                                                             #
###############################################################################

#import everything from bender
from Bender.Main import *

__author__ = "Michael McCann"
__date__ = "2020/10/18"
__version__ = "0.01"

from Bender.Logger import getLogger
if '__main__' == __name__: logger = getLogger('Something')
else: logger = getLogger(__name__)

import os

#This is the work horse of the code, you probably want to be looking there
from Bs2Phi3TauTau import Bs2Phi3TauTau

# =============================================================================


# =============================================================================
## The configuration of the job
def configure(
        inputdata,  ## the list of input files  
        catalogs=[],  ## xml-catalogs (filled by GRID)
Esempio n. 12
0
                  $Revision$
Last modification $Date$
               by $Author$
"""
# =============================================================================
__author__ = " Vanya BELYAEV [email protected] "
__date__ = " 2006-10-12 "
__version__ = " Version $Revision$ "
# =============================================================================
## import everything from bender
# =============================================================================
## optional logging
# =============================================================================
from Bender.Logger import getLogger
if '__main__' == __name__: logger = getLogger('BenderTutor.InspectParticles')
else: logger = getLogger(__name__)
# =============================================================================
from Bender.Main import *


# =============================================================================
## @class InspectParticles
#  Inspect particles from the certain TES location
#  @author Vanya BELYAEV [email protected]
class InspectParticles(Algo):
    """
    The most trivial algorithm to print 'Hello,world!'
    """

    ## the main 'analysis' method
Esempio n. 13
0
__date__ = "2012-06-12"
__version__ = '$Revision$'
__all__ = (
    #
    'fireIncident',
    'tagEvent',
    'markEvent',
    'copyGoodEvents',
    'writeEvent',
    #
)
# =============================================================================
## logging
# =============================================================================
from Bender.Logger import getLogger
if '__main__' == __name__: logger = getLogger('BenderTools.GoodEvents')
else: logger = getLogger(__name__)

# =============================================================================


# ===========================================================================
## fire the incident with given name
def fireIncident(name="GoodEvent", source="Bender"):
    """ Fire the incident
    >>> fireIncident()    
    """
    from Bender.Utils import appMgr
    _g = appMgr()
    _is = _g.incSvc()
    _is.fireIncident(name, source)
Esempio n. 14
0
# =============================================================================
__author__  = 'Vanya BELYAEV [email protected]'
__date__    = "2010-09-10"
__version__ = '$Revision$'
__all__     = (
    'configChkTrg' ,
    'chkTrg'      
    ) 
# =============================================================================
import ROOT 
ROOT.PyConfig.IgnoreCommandLineOptions = True
# =============================================================================
## logging
# =============================================================================
from Bender.Logger import getLogger 
logger = getLogger( __name__ )
# =============================================================================
## postpone the massive import from Bender 
def chkTrg  ( ) :    
    """
    Create the algorithm for trigger checks 
    """
    from   Bender.Main          import Algo, SUCCESS, PALL  
    import BenderTools.TisTos   ## add methods for TisTos 
    # =============================================================================
    ## @class CheckTrg
    #  simple class to perform quick check for TisTos 
    #  @date   2010-09-10
    #  @author Vanya BELYAEV [email protected]
    class CheckTrg(Algo) :
        """
Esempio n. 15
0
   no-mc-decays [options] -d GENERUCDECAY
                          -z DECAYINQUESTION file1 [ file2 [...


"""
# =============================================================================
__author__  = " Vanya BELYAEV [email protected] "
__date__    = " 2013-09-25 "
__version__ = " $Revision$ "
__all__     = ( 'noDecays' , ) 
# =============================================================================
## logging
# =============================================================================
from Bender.Logger import getLogger, setLogging 
if '__main__' == __name__ : logger = getLogger ( 'BenderTools.NoMCdecay' )
else                      : logger = getLogger ( __name__ )
# =============================================================================
## look for ``no-decays''-events
#  @author Vanya BELYAEV [email protected]
#  @date  2012-09025
def noDecays ( config  , colors = False ) :
    """
    Look for ``no-decays'' events 
    """
    if not config.Simulation  :
        logger.warning ( 'Redefine "Simulation" to be true')
        
    if config.nEvents < 0 :
        logger.info ( 'Redefine "nEvents" to be 10000' ) 
        config.nEvents = 10000 
Esempio n. 16
0
               by $Author$
"""
# =============================================================================
__author__ = " Vanya BELYAEV [email protected] "
__date__ = " 2014-10-31"
__version__ = " $Revision$"
# =============================================================================
## import everything from bender
from Bender.Main import *
from GaudiKernel.SystemOfUnits import GeV
from BenderTools.FakeH import FakeKaon
# =============================================================================
## optional logging
# =============================================================================
from Bender.Logger import getLogger
if '__main__' == __name__: logger = getLogger('BenderTutor.TupleTools')
else: logger = getLogger(__name__)


# =============================================================================
## @class FakeParticle
#  Demonstration how to use ``Fake-H''-utility
#  @author Vanya BELYAEV [email protected]
#  @date 2015-10-31
class FakeParticle(Algo):
    """
    Demonstration how to use ``Fake-H''-utility 
    """

    ## the main 'analysis' method
    def analyse(self):  ## IMPORTANT!
Esempio n. 17
0
               by $Author: ibelyaev $
"""
# =============================================================================
__author__ = " Vanya BELYAEV [email protected] "
__date__ = " 2006-10-12 "
__version__ = " Version $Revision: 1.15 $ "
# =============================================================================
import ROOT
from GaudiKernel.SystemOfUnits import GeV
## import everything from bender
from Bender.MainMC import *
# =============================================================================
## optional logging
# =============================================================================
from Bender.Logger import getLogger
if '__main__' == __name__: logger = getLogger('BenderTutor.MCmatch')
else: logger = getLogger(__name__)


# =============================================================================
## @class MCmatch
#  Very simple manipulations with MC-truth matched events
#  @author Vanya BELYAEV [email protected]
class MCmatch(AlgoMC):  ## <--- Note the base class here
    """
    Make combinatorics and composed particle creation in Bender 
    """

    ## the main 'analysis' method
    def analyse(self):  ## IMPORTANT!
        """
Esempio n. 18
0
By usage of this code one clearly states the disagreement 
with the smear campaign of Dr.O.Callot et al.: 
``No Vanya's lines are allowed in LHCb/Gaudi software.''

"""
# =============================================================================
__author__  = 'Vanya BELYAEV [email protected]'
__date__    = "2004-07-11"
__version__ = '$Revision$'
__all__     = ()
# =============================================================================
## logging
# =============================================================================
from Bender.Logger import getLogger 
logger = getLogger(__name__)
# =============================================================================
if '__main__' == __name__ : logger = getLogger ( 'Bender.Fixes' )
else                      : logger = getLogger ( __name__ )
# =============================================================================
#
# =============================================================================
## "at-exit action 
def _bender_at_exit_ () :
    """
    At-Exit action
    """
    from Bender.Logger import getLogger 
    if '__main__' == __name__ : logger = getLogger ( 'Bender.Fixes' )
    else                      : logger = getLogger ( __name__ )
    
Esempio n. 19
0
with the smear campaign of Dr.O.Callot et al.: 
    ``No Vanya's lines are allowed in LHCb/Gaudi software.''

                  $Revision$
Last modification $Date$
               by $Author$
"""
# =============================================================================
__author__ = " Vanya BELYAEV [email protected] "
__date__ = " 2016-01-15 "
__version__ = "$Revision$ "
# =============================================================================
## optional logging
# =============================================================================
from Bender.Logger import getLogger
if '__main__' == __name__: logger = getLogger('TestTransporters')
else: logger = getLogger(__name__)
# =============================================================================
## import everything from bender
from Bender.Main import *
from GaudiKernel.SystemOfUnits import cm, GeV


# =============================================================================
## @class TransportersTest
#  Compare CPU performance for particle transporters
#  @author Vanya BELYAEV [email protected]
#  @date 2016-01-14
class TransportersTest(Algo):
    """
    Compare CPU performance for particle transporters 
Esempio n. 20
0
By usage of this code one clearly states the disagreement 
with the smear campaign of Dr.O.Callot et al.: 
``No Vanya's lines are allowed in LHCb/Gaudi software.''

"""
# =============================================================================
__author__ = "Vanya BELYAEV [email protected]"
__date__ = "2011-10-05"
__version__ = "$Revision$"
__all__ = ('uDstConf', )
# =============================================================================
## logging
# =============================================================================
from Bender.Logger import getLogger
if '__main__' == __name__: logger = getLogger('Bender.MicroDST')
else: logger = getLogger(__name__)
# =============================================================================
logger.warning('Use BenderTools.MicroDST!')
# =============================================================================
from BenderTools.MicroDST import uDstConf

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

    logger.info(80 * '*')
    logger.info(__doc__)
    logger.info(' Author  : %s ' % __author__)
    logger.info(' Version : %s ' % __version__)
    logger.info(' Date    : %s ' % __date__)
    logger.info(' Symbols : %s ' % list(__all__))
Esempio n. 21
0
                  $Revision$
Last modification $Date$
               by $Author$

"""
# =============================================================================
__author__ = 'Vanya BELYAEV [email protected]'
__date__ = "2010-09-10"
__version__ = '$Revision$'
__all__ = ('configure', )
__usage__ = 'dst_explorer [options] file1 [ file2 [ file3 [ file4 ....'
# =============================================================================
# logging
# =============================================================================
from Bender.Logger import getLogger, setLogging
if '__main__' == __name__: logger = getLogger('BenderTools.DstExplorer')
else: logger = getLogger(__name__)


# =============================================================================
## configure the application from parser data
def configure(config, colors=False):
    """Configure the application from parser data 
    """

    #
    if config.OutputLevel <= 3 and not config.Quiet:
        _vars = vars(config)
        _keys = _vars.keys()
        _keys.sort()
        logger.info('Configuration:')
Esempio n. 22
0
By usage of this code one clearly states the disagreement 
with the smear campain of Dr.O.Callot et al.: 
    ``No Vanya's lines are allowed in LHCb/Gaudi software.''

"""
# =============================================================================
__version__ = "$Revision$"
__author__ = "Vanya BELYAEV [email protected]"
__date__ = "2014-05-12"
# =============================================================================
__all__ = ('RemoveDaughter', )
# =============================================================================
## logging
# =============================================================================
from Bender.Logger import getLogger
if '__main__' == __name__: logger = getLogger('BenderTools.RemoveDaughter')
else: logger = getLogger(__name__)
# ==============================================================================
from LoKiCore.basic import cpp, LHCb
import LoKiPhys.Phys
## smart reference class
_SR = cpp.SmartRef(LHCb.Particle)
_SRV = cpp.SmartRefVector(LHCb.Particle)
## add proper __nonzero__
_SR.__nonzero__ = lambda s: bool(s.target())


# ==============================================================================
## @class RemoveDaughter
#  Helper utulitiy for temporary removal of daughter particle form decay tree
#  @code
Esempio n. 23
0
# -*- coding: utf-8 -*-
# =============================================================================
__author__  = " Greig Cowan (based on script from Vanya)" 
__date__    = " 2015-02-19 " 
__version__ = " Version $Revision: 173922 $ "
# =============================================================================
from GaudiKernel.SystemOfUnits import GeV 
## import everything from bender 
from Bender.Main import *
import BenderTools.Fill
import BenderTools.TisTos
# =============================================================================
## optional logging
# =============================================================================
from Bender.Logger import getLogger 
if '__main__' == __name__ : logger = getLogger ( 'BenderTutor.Histos&Tuples' )
else                      : logger = getLogger ( __name__ )
# =============================================================================
## @class HistosAndTuples
#  Inspect particles from the certain TES location and fill histos and tuple
class HistosAndTuples(Algo):
    """
    Inspect particles from the certain TES location and fill histos and tuple
    """
    def initialize ( self ) :

        sc = Algo.initialize ( self ) ## initialize the base class
        if sc.isFailure() : return sc

        ## initialize functionality for enhanced n-tuples 
        sc = self.fill_initialize ()
Esempio n. 24
0
# -*- coding: utf-8 -*-
# =============================================================================
__author__  = " Greig Cowan (based on script from Vanya)" 
__date__    = " 2015-02-19 " 
__version__ = " Version $Revision: 173922 $ "
# =============================================================================
from GaudiKernel.SystemOfUnits import GeV 
## import everything from bender 
from Bender.Main import *
import BenderTools.Fill
import BenderTools.TisTos
# =============================================================================
## optional logging
# =============================================================================
from Bender.Logger import getLogger 
if '__main__' == __name__ : logger = getLogger ( 'BenderTutor.Histos&Tuples' )
else                      : logger = getLogger ( __name__ )
# =============================================================================
## @class HistosAndTuples
#  Inspect particles from the certain TES location and fill histos and tuple
class HistosAndTuples(Algo):
    """
    Inspect particles from the certain TES location and fill histos and tuple
    """
    def initialize ( self ) :

        sc = Algo.initialize ( self ) ## initialize the base class
        if sc.isFailure() : return sc

        ## initialize functionality for enhanced n-tuples 
        sc = self.fill_initialize ()
Esempio n. 25
0
    'preStart_actions',
    'postStart_actions',
    ##
    'addPreRunAction',
    'addPostRunAction',
    'addPreInitAction',
    'addPostInitAction',
    'addPreStartAction',
    'addPostStartAction',
    ##
)
# =============================================================================
## logging
# =============================================================================
from Bender.Logger import getLogger
if '__main__' == __name__: logger = getLogger('Bender.Utils')
else: logger = getLogger(__name__)
## ============================================================================
from LoKiCore.basic import cpp

SUCCESS = cpp.StatusCode(cpp.StatusCode.SUCCESS, True)
## ============================================================================
__Bender_PreRun_Actions = [lambda: logger.verbose('"run"    pre-action')]
__Bender_PostRun_Actions = [lambda: logger.verbose('"run"   post-action')]
__Bender_PreInit_Actions = []
__Bender_PostInit_Actions = []
__Bender_PreStart_Actions = []
__Bender_PostStart_Actions = []


## ============================================================================
Esempio n. 26
0
with the smear campaign of Dr.O.Callot et al.: 
    ``No Vanya's lines are allowed in LHCb/Gaudi software.''

                  $Revision$
Last modification $Date$
               by $Author$
"""
# =============================================================================
__author__ = " Vanya BELYAEV [email protected] "
__date__ = " 2006-10-12 "
__version__ = " $Revision$ "
# =============================================================================
## logging
# =============================================================================
from Bender.Logger import getLogger
if '__main__' == __name__: logger = getLogger('Xuhao')
else: logger = getLogger(__name__)
# =============================================================================
## import everything from bender
from Bender.Main import *


# =============================================================================
## @class Lines
#  Get list of trigger lines, efficient for D0 -> K- mu+ nu decays
#  @date 2016-01-14
#  @author Vanya BELYAEV [email protected]
class Lines(Algo):
    """
    Enhanced functionality for n-tuples 
    """
Esempio n. 27
0
               by $Author: ibelyaev $
"""
# =============================================================================
__author__ = " Vanya BELYAEV [email protected] "
__date__ = " 2006-10-12 "
__version__ = " Version $Revision: 1.15 $ "
# =============================================================================
import ROOT
from GaudiKernel.SystemOfUnits import GeV
## import everything from bender
from Bender.MainMC import *
# =============================================================================
## logging (optional)
# =============================================================================
from Bender.Logger import getLogger
if '__main__' == __name__: logger = getLogger('BenderTutor.Generator')
else: logger = getLogger(__name__)


# =============================================================================
## @class Generator
#  Very simple manipulations with Generator/HepMC information
#  @author Vanya BELYAEV [email protected]
class Generator(AlgoMC):  ## <--- Note the base class here
    """
    Very simple manipulations with Generator/HepMC information
    """

    ## the main 'analysis' method
    def analyse(self):  ## IMPORTANT!
        """
Esempio n. 28
0
"""
# =============================================================================
__version__ = "$Revision$"
__author__ = "Vanya BELYAEV [email protected]"
__date__ = "2011-06-07"
# =============================================================================
__all__ = (
    'decision',  ## collect trigger decisions
    'trgDecs',  ## print trigger statistics 
    'tistos',  ## fill N-tuple with TisTos information
)
# =============================================================================
## logging
# =============================================================================
from Bender.Logger import getLogger
if '__main__' == __name__: logger = getLogger('BenderTools.TisTosMC')
else: logger = getLogger(__name__)
# ==============================================================================
logger.warning("Obsolete module, to be removed SOON")
# =============================================================================
if '__main__' == __name__:

    logger.info(80 * '*')
    logger.info(__doc__)
    logger.info(' Author  : %s ' % __author__)
    logger.info(' Version : %s ' % __version__)
    logger.info(' Date    : %s ' % __date__)
    logger.info(' Symbols : %s ' % list(__all__))
    logger.info(80 * '*')

# =============================================================================
Esempio n. 29
0
                  $Revision$
Last modification $Date$
               by $Author$
"""
# =============================================================================
__author__  = " Vanya BELYAEV [email protected] "
__date__    = " 2016-02-16" 
__version__ = " $Revision$"
# ============================================================================= 
## import everything from bender 
from   Bender.Main import *
# =============================================================================
## optional logging
# =============================================================================
from Bender.Logger import getLogger 
if '__main__' == __name__ : logger = getLogger ( 'BenderTutor.K0fromV0' )
else                      : logger = getLogger ( __name__ )
# =============================================================================
## @class V0
#  Demonstration how to use K0s & Lambda0 from V0 
#  @author Vanya BELYAEV [email protected]
#  @date 2016-02-16
class V0(Algo):
    """
    Demonstration how to use K0s and Lambda0 from V0 
    """

    ## the main 'analysis' method 
    def analyse( self ) :   ## IMPORTANT! 
        """
        The main 'analysis' method