LoKi's Generator (HepMC) Particle Functions
- GABSID, the instance of LoKi::GenParticles::AbsIdentifier()
- GALL, the instance of LoKi::BooleanConstant<const HepMC::GenParticle*>(true)
- GBAR, the instance of LoKi::GenParticles:BarCode()
- GBARCODE
- GETA, the instance of LoKi::GenParticles::PseudoRapidity()
- GFALSE
- GID, the instance of LoKi::GenParticles::Identifier()
- GMAX, C++ type LoKi::Max<const HepMC::GenParticle*>
- GMIN, C++ type LoKi::Min<const HepMC::GenParticle*>
- GMOMDIST, C++ type LoKi::GenParticles::MomentumDistance
- GNONE, the instance of LoKi::BooleanConstant<const HepMC::GenParticle*>(false)
- GONE, the instance of LoKi::Constant<const HepMC::GenParticle*>(1)
- GPHI, the instance of LoKi::GenParticles::Phi()
- GSSWITCH, C++ type LoKi::SimpleSwitch<const HepMC::GenParticle*>
- GSTATUS, the instance of LoKi::GenParticles::Status()
- GSWITCH, C++ type LoKi::Switch<const HepMC::GenParticle*>
- GTHETA, the instance of LoKi::GenParticles::Theta()
- GTRUE
- GVEV, the instance of LoKi::GenParticles::ValidEndVertex()
- GZERO, the instance of LoKi::Constant<const HepMC::GenParticle*>(0)
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.
The most trivial
"select-all" predicate which always returns
true
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
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
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.
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 ) ;
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 ) ;
The function which evaluates the euclidian distance between particle's 4-momentum and some reference 4-momentum.
It is very useful for kinematical matching.
The most trivial
"select-nothing" predicate which always returns
false
The most trivial
"select-nothing" predicate which always returns
1
Simple function which evaluates the azimuthal angle,

, of the particle.
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
The function which returns
status of the particle
The function which acts according to the rule:
_ result = condition ? result1 : result2_:
1000GFun fun = GSWITCH ( 0 < G3Q , 1/GP , GPT ) ;
Simple function which evaluates the polar angle,

, of the particle.
GTRUE
It is an alias for
GALL
, see
GALL
Simple predicate which evaluates the validity of the
end-vertex of the particle:
1000GRange decayedB = gselect ( "Bdec" , "B0" == GID && GVEV ) ;
The most trivial
"select-nothing" predicate which always returns
0
--
Vanya Belyaev - 20 Jul 2007