TWiki
>
LHCb Web
>
LHCbComputing
>
LoKi
>
LoKiLUG
>
LoKiRefMan
>
LoKiGenParticleFunctions
(2013-12-15,
AlexN
)
(raw view)
E
dit
A
ttach
P
DF
---+!! LoKi's Generator (HepMC) Particle Functions --- %TOC% --- ---+++ ==G3Q==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_three_charge.html][LoKi::GenParticles::ThreeCharge()]]= The simple function which returns the triple charge of the particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const HepMC::GenParticle* p = ... ; const double q3 = G3Q ( p ) ; %ENDSYNTAX% ---+++ ==GABSID==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_abs_identifier.html][LoKi::GenParticles::AbsIdentifier()]]= The simple function which returns the absolute value of PDG-identifier of the particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const HepMC::GenParticle* p = ... ; const double absid = GABSID( p ) ; %ENDSYNTAX% The special equality/non-equality [[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/_gen_p_i_d_operators_8h.html][operators]] against =std::string= and =LHCb::ParticleID= objects are defined: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% GRange kaons = gselect ( "kaons" , "K+" == GABSID ) ; GRange nonmuons = gselect ( "!mu" , LHCb::ParticleID( 13 ) != GABSID ) ; %ENDSYNTAX% See also [[#LoKiCutsGID][GID]]. #LoKiCutsGALL ---+++ ==GALL==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/struct_lo_ki_1_1_boolean_constant.html][LoKi::BooleanConstant<const HepMC::GenParticle*>(true)]]= The most trivial _"select-all"_ predicate which always returns ==true== ---+++ ==GANCESTOR==, C++ type =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_is_an_ancestor.html][LoKi::GenParticles::IsAnAncestor]]= The predicate which evaluates for =true= for all 'ancestors' of given particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const HepMC::GenParticle bquark = ... ; // get all particles from b-quark typedef std::vector<const HepMC::GenParticle*> GPs ; GPs gps ; const LHCb::HepMCEvents* events = ... ; LoKi::Extract::genParticles ( events , // source std::back_inserter ( gps ) , // target GANCESTOR ( bquark ) ) ; // predicate %ENDSYNTAX% #LoKiCutsGBAR ---+++ ==GBAR==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_bar_code.html][LoKi::GenParticles:BarCode()]]= Simple function which returns the _bar-code_ of the particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% GRange one = gselect ( "One" , 1 == BAR ) ; %ENDSYNTAX% ---+++ ==GBARCODE== It is an alias for =GBAR=, see [[#LoKiCutsGBAR][GBAR]] ---+++ ==GBARYON==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_is_baryon.html][LoKi::GenParticles::IsBaryon()]]= Simple predicate which returns =true= for baryons %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select all beuaty baryons GRange good = gselect ( "good" , GBARYON && GBEAUTY ) ; %ENDSYNTAX% ---+++ ==GBEAUTY==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_has_quark.html][LoKi::GenParticles::HasQuark(LHCb::ParticleID::bottom)]]= Simple predicate which checks the presence of beauty quark: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select energetic beauty particles GRange good = gselect ( "good" , GBEAUTY && GPT > 1 * GeV ) ; %ENDSYNTAX% ---+++ ==GCHARGED==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_is_charged.html][LoKi::GenParticles::IsCharged()]]= Simple predicate which checks the charge of the particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select all charged msons GRange good = gselect ( "mesons" , GMESON && GCHARGED ) ; %ENDSYNTAX% ---+++ ==GCHARM==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_has_quark.html][LoKi::GenParticles::HasQuark(LHCb::ParticleID::charm)]]= Simple predicate which checks the presence of charm quark: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select energetic charm particles GRange good = gselect ( "good" , GCHARM && GPT > 1 * GeV ) ; %ENDSYNTAX% ---+++ ==GE==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_energy.html][LoKi::GenParticles::Energy()]]= The function which returns the transverse momenum of the particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select all fast particles only: GRange fast = gselect ( "fast" , GE > 50 * GeV ) ; %ENDSYNTAX% ---+++ ==GETA==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_pseudo_rapidity.html][LoKi::GenParticles::PseudoRapidity()]]= Simple function which evaluates pseudorapidity, <latex>\eta</latex>, of the particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% GRange inAcc = gselect ( "inAcc" , 5 > GETA && GETA > 2 ) ; %ENDSYNTAX% ---+++ ==GDELTAR2== It is an alias for =GDR2=, see [[#LoKiCutsGDR2][GDR2]] ---+++ ==GDETA==, C++ type =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_delpa_eta.html][LoKi::GenParticles::DeltaEta]]= Simple function which evaluates the difference in the pseudorapidity <latex>\eta</latex> with respect to some reference value <latex>\eta_0</latex>: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const HepMC::GenParticle* p = ... ; const Gaudi::LorentzVector& v = ... ; Fun deta = GDETA( v ) ; const double result = deta ( p ) ; %ENDSYNTAX% ---+++ ==GDPHI==, C++ type =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_delpa_phi.html][LoKi::GenParticles::DeltaPhi]]= Simple function which evaluates the difference in the azimuthal angle <latex>\phi</latex> with respect to some reference value <latex>\phi_0</latex>: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const HepMC::GenParticle* p = ... ; const Gaudi::LorentzVector& v = ... ; Fun dphi = GDPHI( v ) ; const double result = dphi ( p ) ; %ENDSYNTAX% #LoKiCutsGDR2 ---+++ ==GDR2==, C++ type =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_delta_r2.html][LoKi::GenParticles::DeltaR2]]= Simple function which evaluates <latex>\sqrt{ \Delta\phi^2 + \Delta\eta^2}</latex> %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const HepMC::GenParticle* p = ... ; const Gaudi::LorentzVector& v = ... ; Fun dr2 = GDR2( v.Phi() ) ; const double result = dr2 ( p ) ; %ENDSYNTAX% ---+++ ==GFALSE== It is an alias for =GNONE=, see [[#LoKiCutsGNONE][GNONE]] ---+++ ==GFAPVX==, C++ type C++ type =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_adapter_to_production_vertex.html][LoKi::GenParticles::AdapterToProductionVertex]]= The helper adapter which delegates the evaluation of the _"vertex"_ function to _production vertex_ of the particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% /// Extract all particles, which are produces at |z|<10 const LHCb::HepMCEvents* events get<LHCb::HepMCEvents>( LHCb::HepMCEventLocation::Default ) ; typedef std::vector<HepMC::GenParticle*> PARTICLES ; PARTICLES parts ; // create the predicate: GCut cut = GFAPVX( abs( GVZ ) , 0 ) < 10 ; LoKi::Extract::genParticles ( events , std::back_inserter ( parts ) , cut ) ; %ENDSYNTAX% ---+++ ==GFAEVX==, C++ type C++ type =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_adapter_to_end_vertex.html][LoKi::GenParticles::AdapterToEndVertex]]= The helper adapter which delegates the evaluation of the _"vertex"_ function to _end-vertex_ of the particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% /// Extract all particles, which are decayed after |z|>1*meter const LHCb::HepMCEvents* events get<LHCb::HepMCEvents>( LHCb::HepMCEventLocation::Default ) ; typedef std::vector<HepMC::GenParticle*> PARTICLES ; PARTICLES parts ; // create the predicate: GCut cut = GFAEVX( abs( GVZ ) , 0 ) > 1 * meter ; LoKi::Extract::genParticles ( events , std::back_inserter ( parts ) , cut ) ; %ENDSYNTAX% ---+++ ==GFROMTREE==, C++ type =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_from_hep_m_c_tree.html][LoKi::GenParticles::FromHepMCTree]]= The predicate which evaluates for =true= for all particles which belongs to "descendants" of the given particle/vertex %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const HepMC::GenParticle bquark = ... ; // get all particles from b-quark typedef std::vector<const HepMC::GenParticle*> GPs ; GPs gps ; const LHCb::HepMCEvents* events = ... ; LoKi::Extract::genParticles ( events , // source std::back_inserter ( gps ) , // target GFROMTREE ( bquark ) ) ; // predicate %ENDSYNTAX% ---+++ ==GHADRON==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_is_hadron.html][LoKi::GenParticles::IsHadron()]]= Simple predicate which returns =true= for hdrons %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select all charged hadrons GRange good = gselect ( "good" , GHADRON && GCHARGED ) ; %ENDSYNTAX% ---+++ ==GID==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_identifier.html][LoKi::GenParticles::Identifier()]]= The simple function which returns the value of PDG-identifier of the particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const HepMC::GenParticle* p = ... ; const double absid = GID( p ) ; %ENDSYNTAX% The special equality/non-equality [[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/_gen_p_i_d_operators_8h.html][operators]] against =std::string= and =LHCb::ParticleID= objects are defined: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% GRange kaons = gselect ( "kaons" , "K+" == GID ) ; GRange nonmuons = gselect ( "!mu" , LHCb::ParticleID( 13 ) != GID ) ; %ENDSYNTAX% See also [[#LoKiCutsGABSID][GABSID]]. ---+++ ==GINTREE==, C++ type =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_in_tree.html][LoKi::GenParticles::InTree()]]= Simple predicate which checks the presence of the particle, which satisfies the criteris in the decay tree %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% /// select semileptonic decays of beauty baryons: GRange good = gselect ( "good" , GBEAUTY && GBARYON && GINTREE( GLEPTON ) ) ; %ENDSYNTAX% ---+++ ==GLEPTON==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_is_lepton.html][LoKi::GenParticles::IsLepton()]]= Simple predicate which returns =true= for leptons %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select all neutral leptons GRange neutrinos = gselect ( "neutrinos" , GLEPTON && GNEUTRAL ) ; %ENDSYNTAX% ---+++ ==GM==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_mass.html][LoKi::GenParticles::Mass()]]= The function which returns the mass of the particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const HepMC::GenParticle* p = ... ; const double mass = GM ( p ) ; %ENDSYNTAX% ---+++ ==GMAX==, C++ type =[[http://lhcb-release-area.web.cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_max.html][LoKi::Max<const HepMC::GenParticle*>]]= The function which evaluated the maximum from the several other functions: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% GRange inCaloAcc = gselect ( "inCaloAcc" , GMAX( abs(PX/PZ) , abs(PY,PZ) ) < 300 * mrad ) ; /// the same: GRange inCaloAcc = gselect ( "inCaloAcc" , max( abs(PX/PZ) , abs(PY,PZ) ) < 300 * mrad ) ; %ENDSYNTAX% ---+++ ==GMESON==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_is_meson.html][LoKi::GenParticles::IsMeson()]]= Simple predicate which returns =true= for mesons %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select all charmed mesons: GRange good = gselect ( "good" , GMESON && GCHARM ) ; %ENDSYNTAX% ---+++ ==GMIN==, C++ type =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_min.html][LoKi::Min<const HepMC::GenParticle*>]]= The function which evaluated the minimum from the several other functions: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% GRange inCaloAcc = gselect ( "inCaloAcc" , GMIN( abs(PX/PZ) , abs(PY,PZ) ) > 30 * mrad ) ; /// the same: GRange inCaloAcc = gselect ( "inCaloAcc" , min( abs(PX/PZ) , abs(PY,PZ) ) > 30 * mrad ) ; %ENDSYNTAX% ---+++ ==GMOMDIST==, C++ type =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_momentum_distance.html][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. ---+++ ==GNEUTRAL==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_is_neutral.html][LoKi::GenParticles::IsNeutral()]]= Simple predicate which checks the charge of the particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select all neutral leptons GRange neutrinos = gselect ( "neutrinos" , GLEPTON && GNEUTRAL ) ; %ENDSYNTAX% ---+++ ==GNINTREE==, C++ type =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_n_in_tree.html][LoKi::GenParticles::NInTree]]= The function which counts number of particles in th decay tree of the particle, which satisfy certain criteria: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // get Generator information const LHCb::HepMCEvents* events = get<LHCb::HepMCEvents>( LHCb::HepMCEventLocation::Default ) ; typedef std::vector<const HepMC::GenParticle*> GenParticles ; /// select b(and antib) quarks from decay of higgs, /// == "count of Higgs occurances within parents " GenParticles bquarks ; LoKi::Extract::genParticles ( events , std::back_inserter( bquarks ) , ( "b" == GABSID ) && 1 == GNINTREE( "H_10" == GABSID , HepMC::parents ) ) ; %ENDSYNTAX% ---+++ ==GNLT==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_nominal_life_time.html][LoKi::GenParticles::NominalLifeTime()]]= The function which return the nominal life time of the particle, %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select long-lived particles GRange inAcc = gselect ( "inAcc" , GNLT > 1 * mm ) ; %ENDSYNTAX% #LoKiCutsGNONE ---+++ ==GNONE==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/struct_lo_ki_1_1_boolean_constant.html][LoKi::BooleanConstant<const HepMC::GenParticle*>(false)]]= The most trivial _"select-nothing"_ predicate which always returns ==false== ---+++ ==GNUCLEUS==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_is_nucleus.html][LoKi::GenParticles::IsNucleus()]]= Simple predicate which returns =true= for nuclea %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select all nuclea GRange nuclea = gselect ( "nuclea" , GNUCLEUS ) ; %ENDSYNTAX% ---+++ ==GONE==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/struct_lo_ki_1_1_constant.html][LoKi::Constant<const HepMC::GenParticle*>(1)]]= The most trivial _"select-nothing"_ predicate which always returns ==1== ---+++ ==GQUARK==, C++ type =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_has_quark.html][LoKi::GenParticles::HasQuark]]= Simple predicate which checks the quark content of the particles: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select all particle which simultaneously contain charm and strange quark: GRange ds = gselect ( "ds" , GQUARK(LHCb::ParticleID::charm) && GQUARK(LHCb::ParticleID::strange) ) ; %ENDSYNTAX% ---+++ ==GP==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_momentum.html][LoKi::GenParticles::Momentum()]]= The function which return the momenum of the particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select all fast particles only: GRange fast = gselect ( "fast" , GP > 10 * GeV ) ; %ENDSYNTAX% ---+++ ==GPHI==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_phi.html][LoKi::GenParticles::Phi()]]= Simple function which evaluates the azimuthal angle, <latex>\phi</latex>, of the particle. ---+++ ==GPT==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_transverse_momentum.html][LoKi::GenParticles::TransverseMomentum()]]= The function which returns the transverse momenum of the particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select all fast particles only: GRange fast = gselect ( "fast" , GPT> 1 * GeV ) ; %ENDSYNTAX% ---+++ ==GPTDIR==, C++ type =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_transverse_momentum_rel.html][LoKi::GenParticles::TransverseMomentumRel]]= The function which evaluates the transverse momentum with respect some direction, e.g. the direction of the jet: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const Gaudi::LorentzVector& jet = ... ; // select only leptons which large pt with respect to the jet: GRange withLargePt = gselect ( "LargePT" , LEPTON && GPTDIR ( jet ) > 1 * GeV ) ; %ENDSYNTAX% ---+++ ==GPX==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_momentum_x.html][LoKi::GenParticles::MomentumX()]]= The function which return x-component of particle's momentum: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select all fast particles only: GRange fast = gselect ( "fast" , sqrt(GPX*GPX+GPY*GPY) > 2 * GeV ) ; %ENDSYNTAX% ---+++ ==GPY==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_momentum_y.html][LoKi::GenParticles::MomentumY()]]= The function which return y-component of particle's momentum: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select all fast particles only: GRange fast = gselect ( "fast" , sqrt(GPX*GPX+GPY*GPY) > 2 * GeV ) ; %ENDSYNTAX% ---+++ ==GPZ==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_momentum_z.html][LoKi::GenParticles::MomentumZ()]]= The function which return z-component of particle's momentum: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select all fast particles only: GRange inAcc = gselect ( "inAcc" , sqrt(GPX*GPX+GPY*GPY)/GPZ < 300 * mrad ) ; %ENDSYNTAX% ---+++ ==GSSWITCH==, C++ type =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_simple_switch.html][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 =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_status.html][LoKi::GenParticles::Status()]]= The function which returns _status_ of the particle ---+++ ==GSTRANGE==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_has_quark.html][LoKi::GenParticles::HasQuark(LHCb::ParticleID::strange)]]= Simple predicate which checks the presence of strange quark: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select beauty and strange baryons GRange bs = gselect ( "bs" , GBARYON && GBEAUTY && GSTRANGE ) ; %ENDSYNTAX% ---+++ ==GSWITCH==, C++ type =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_switch.html][LoKi::Switch<const HepMC::GenParticle*>]]= The function which acts according to the rule: __ result = condition ? result1 : result2__: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% GFun fun = GSWITCH ( 0 < G3Q , 1/GP , GPT ) ; %ENDSYNTAX% ---+++ ==GTHETA==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_theta.html][LoKi::GenParticles::Theta()]]= Simple function which evaluates the polar angle, <latex>\theta</latex>, of the particle. #LoKiCutsGTIME ---+++ ==GTIME==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_proper_life_time.html][LoKi::GenParticles::ProperLifeTime()]]= The function which return the proper life time of the particle, <latex>c*\cdot\tau</latex>: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select long-lived particles GRange inAcc = gselect ( "inAcc" , CTIME > 1 * mm ) ; %ENDSYNTAX% ---+++ ==GTOP==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_has_quark.html][LoKi::GenParticles::HasQuark(LHCb::ParticleID::top)]]= Simple predicate which checks the presence of top quark: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select top particles (top-quark only?) GRange good = gselect ( "good" , GTOP ) ; %ENDSYNTAX% ---+++ ==GTRUE== It is an alias for =GALL=, see [[#LoKiCutsGALL][GALL]] ---+++ ==GVEV==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/class_lo_ki_1_1_gen_particles_1_1_valid_end_vertex.html][LoKi::GenParticles::ValidEndVertex()]]= Simple predicate which evaluates the validity of the _end-vertex_ of the particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% GRange decayedB = gselect ( "Bdec" , "B0" == GID && GVEV ) ; %ENDSYNTAX% ---+++ ==GZERO==, the instance of =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/struct_lo_ki_1_1_constant.html][LoKi::Constant<const HepMC::GenParticle*>(0)]]= The most trivial _"select-nothing"_ predicate which always returns ==0== --- -- [[Main.VanyaBelyaev][Vanya BELYAEV]] - 20 Jul 2007
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r5
<
r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
WYSIWYG
|
M
ore topic actions
Topic revision: r5 - 2013-12-15
-
AlexN
Log In
LHCb
LHCb Web
LHCb Web Home
Changes
Index
Search
LHCb webs
LHCbComputing
LHCb FAQs
LHCbOnline
LHCbPhysics
LHCbVELO
LHCbST
LHCbOT
LHCbRICH
LHCbMuon
LHCbTrigger
LHCbDetectorAlignment
LHCbTechnicalCoordination
LHCbUpgrade
Public webs
Public webs
ABATBEA
ACPP
ADCgroup
AEGIS
AfricaMap
AgileInfrastructure
ALICE
AliceEbyE
AliceSPD
AliceSSD
AliceTOF
AliFemto
ALPHA
ArdaGrid
ASACUSA
AthenaFCalTBAna
Atlas
AtlasLBNL
AXIALPET
CAE
CALICE
CDS
CENF
CERNSearch
CLIC
Cloud
CloudServices
CMS
Controls
CTA
CvmFS
DB
DefaultWeb
DESgroup
DPHEP
DM-LHC
DSSGroup
EGEE
EgeePtf
ELFms
EMI
ETICS
FIOgroup
FlukaTeam
Frontier
Gaudi
GeneratorServices
GuidesInfo
HardwareLabs
HCC
HEPIX
ILCBDSColl
ILCTPC
IMWG
Inspire
IPv6
IT
ItCommTeam
ITCoord
ITdeptTechForum
ITDRP
ITGT
ITSDC
LAr
LCG
LCGAAWorkbook
Leade
LHCAccess
LHCAtHome
LHCb
LHCgas
LHCONE
LHCOPN
LinuxSupport
Main
Medipix
Messaging
MPGD
NA49
NA61
NA62
NTOF
Openlab
PDBService
Persistency
PESgroup
Plugins
PSAccess
PSBUpgrade
R2Eproject
RCTF
RD42
RFCond12
RFLowLevel
ROXIE
Sandbox
SocialActivities
SPI
SRMDev
SSM
Student
SuperComputing
Support
SwfCatalogue
TMVA
TOTEM
TWiki
UNOSAT
Virtualization
VOBox
WITCH
XTCA
Welcome Guest
Login
or
Register
Cern Search
TWiki Search
Google Search
LHCb
All webs
Copyright &© 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