LoKi's Generator (HepMC) Particle Functions



GABSID, the instance of LoKi::GenParticles::AbsIdentifier()

The simple function which returns the absolute value of PDG-identifier of the particle:

 1000const HepMC::GenParticle* p = ... ;
 1010const double absid = GABSID( p ) ;
The special equality/non-equality operators against std::string and LHCb::ParticleID objects are defined:
 1000GRange kaons = gselect ( "kaons" , "K+" == GABSID ) ; 
 1010GRange nonmuons = gselect ( "!mu" , LHCb::ParticleID( 13 ) != GABSID ) ;
See also GID.

GALL, the instance of LoKi::BooleanConstant<const HepMC::GenParticle*>(true)

The most trivial "select-all" predicate which always returns true

GBAR, the instance of LoKi::GenParticles:BarCode()

Simple function which returns the bar-code of the particle:
 1000GRange one = gselect ( "One" , 1 == BAR ) ;

GBARCODE

It is an alias for GBAR, see GBAR

GETA, the instance of LoKi::GenParticles::PseudoRapidity()

Simple function which evaluates pseudorapidity, , of the particle:

 1000GRange inAcc = gselect ( "inAcc" , 5 > GETA &&  GETA > 2  ) ; 

GFALSE

It is an alias for GNONE, see GNONE

GID, the instance of LoKi::GenParticles::Identifier()

The simple function which returns the value of PDG-identifier of the particle:
 1000const HepMC::GenParticle* p = ... ;
 1010const double absid = GID( p ) ;
The special equality/non-equality operators against std::string and LHCb::ParticleID objects are defined:
 1000GRange kaons = gselect ( "kaons" , "K+" == GID ) ; 
 1010GRange nonmuons = gselect ( "!mu" , LHCb::ParticleID( 13 ) != GID ) ;
See also GABSID.

GMAX, C++ type LoKi::Max<const HepMC::GenParticle*>

The function which evaluated the maximum from the several other functions:
 1000GRange inCaloAcc = gselect ( "inCaloAcc" , GMAX( abs(PX/PZ) , abs(PY,PZ) ) < 300 * mrad ) ;
 1010/// the same:
 1020GRange inCaloAcc = gselect ( "inCaloAcc" , max( abs(PX/PZ) , abs(PY,PZ) ) < 300 * mrad ) ; 

GMIN, C++ type LoKi::Min<const HepMC::GenParticle*>

The function which evaluated the minimum from the several other functions:
 1000GRange inCaloAcc = gselect ( "inCaloAcc" , GMIN( abs(PX/PZ) , abs(PY,PZ) ) > 30 * mrad ) ;
 1010/// the same: 
 1020GRange inCaloAcc = gselect ( "inCaloAcc" , min( abs(PX/PZ) , abs(PY,PZ) ) > 30 * mrad ) ; 

GMOMDIST, C++ type LoKi::GenParticles::MomentumDistance

The function which evaluates the euclidian distance between particle's 4-momentum and some reference 4-momentum. It is very useful for kinematical matching.

GNONE, the instance of LoKi::BooleanConstant<const HepMC::GenParticle*>(false)

The most trivial "select-nothing" predicate which always returns false

GONE, the instance of LoKi::Constant<const HepMC::GenParticle*>(1)

The most trivial "select-nothing" predicate which always returns 1

GPHI, the instance of LoKi::GenParticles::Phi()

Simple function which evaluates the azimuthal angle, , of the particle.

GSSWITCH, C++ type LoKi::SimpleSwitch<const HepMC::GenParticle*>

The function which acts according to the rule: _ result = condition ? constant1 : constant2_. Essentially it could be considered as some kind of converter from predicate to function

GSTATUS, the instance of LoKi::GenParticles::Status()

The function which returns status of the particle

GSWITCH, C++ type LoKi::Switch<const HepMC::GenParticle*>

The function which acts according to the rule: _ result = condition ? result1 : result2_:
 1000GFun fun = GSWITCH ( 0 < G3Q , 1/GP , GPT ) ; 

GTHETA, the instance of LoKi::GenParticles::Theta()

Simple function which evaluates the polar angle, , of the particle.

GTRUE

It is an alias for GALL, see GALL

GVEV, the instance of LoKi::GenParticles::ValidEndVertex()

Simple predicate which evaluates the validity of the end-vertex of the particle:

 1000GRange decayedB = gselect ( "Bdec" , "B0" == GID && GVEV ) ; 

GZERO, the instance of LoKi::Constant<const HepMC::GenParticle*>(0)

The most trivial "select-nothing" predicate which always returns 0

-- Vanya Belyaev - 20 Jul 2007


This topic: LHCb > WebHome > LHCbComputing > LoKi > LoKiLUG > LoKiRefMan > LoKiGenParticleFunctions
Topic revision: r2 - 2007-07-20 - VanyaBelyaev
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback