TWiki
>
LHCb Web
>
LHCbComputing
>
LoKi
>
LoKiLUG
>
LoKiRefMan
>
LoKiParticleFunctions
(2018-12-19,
unknown
)
(raw view)
E
dit
A
ttach
P
DF
---+!! LoKi's Particle Functions This lists a lot of the LoKi Functors. See DaVinciTutorial4 for a hands-on tutorial. A list with examples of use in =CombineParticles= can be found at LoKiHybridFilters. As neither are guaranteed to be a complete list, you can always see the DOxygen for the =LoKi::Cuts= namespace [[http://lhcb-doxygen.web.cern.ch/lhcb-doxygen/davinci/latest/d7/dae/namespace_lo_ki_1_1_cuts.html][here]]. --- %TOC% --- ---+++ ==ALL==, C++: the instance of =LoKi::BooleanConstant<const LHCb::Particle*>(true)= The most trivial _"select-all"_ predicate which always returns =true= #LoKiCutsABSID ---+++ ==ABSID==, the instance of =LoKi::Particles::AbsIdentifier()= The simple function which returns the absolute value of PDG-identifier of the particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; const double absid = ABSID( p ) ; %ENDSYNTAX% The special equality/non-equality operators against =std::string= and =LHCb::ParticleID= objects are defined: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% Range kaons = select ( "kaons" , "K+" == ABSID ) ; Range nonmuons = select ( "!mu" , LHCb::ParticleID( 13 ) != ABSID ) ; %ENDSYNTAX% See also [[#LoKiCutsID][ID]]. #LoKiCutsADMASS ---+++ ==ADMASS==, C++ type =LoKi::Particles::AbsDeltaMass= The simple function which returns the absolute value of the deviation of the particle's mass from some reference value or the nominal mass: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* d0 = ... ; Fun dm = ADMASS ( 1.864 * GeV ) ; ///< constructor from the reference mass const double delta = dm ( d0 ) ; ///< evaluate abs(mass - 1.864 * GeV) %ENDSYNTAX% The function could be used with various constructors: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* particle = ... ; // get the particle IParticlePropertySvc* ppsvc = ... ; // get the service const ParticleProperty& D0 = ... ; // get from the service Fun dm1 = ADMASS ( "D0" , ppsvc ) ; ///< constructor form the name and Service const double dm1 = dm1 ( particle ) ; Fun dm2 = ADMASS ( 241 , ppsvc ) ; ///< constructor from PID and Service const double dm2 = dm2 ( particle ) ; Fun dm3 = ADMASS ( D0 ) ; ///< constructor from ParticleProperty const double dm3 = dm3 ( particle ) ; Fun dm4 = ADMASS ( "D0" ) ; ///< constructor from the name const double mm4 = dm4 ( particle ) ; Fun dm5 = ADMASS ( LHCb::ParticleID ( 421 ) ) ; // constructor from PID const double mm5 = dm5 ( particle ) ; %ENDSYNTAX% The later two constructors could be used _only_ if _LoKi Service_, implementation of =LoKi::ILoKiSvc= insterface, is active. The function is very convinient to be used in the loops: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% Cut dm = ADMASS("phi(1020)") < 10 * MeV ; ///< create the cut for ( Loop phi = loop ( "K+ K-" , "phi(1020)") ; phi ; ++phi ) { if ( dm ( phi ) ) { phi -> save ( "phi" ) ; } } %ENDSYNTAX% See also [[#LoKiCutsDMASS][DMASS]]. #LoKiCutsDMMASS ---+++ ==ADMMASS==, C++ type =LoKi::Particles::AbsDeltaMeasuredMass= The simple function which returns the absolute value of the deviation of the particle's measured mass from some refernece value or the nominal mass: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* d0 = ... ; Fun dm = ADMMASS ( 1.864 * GeV ) ; ///< constructor from the reference mass const double delta = dm ( d0 ) ; ///< evaluate abs( measuredMass - 1.864 * GeV) %ENDSYNTAX% The function could be used with various constructors: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* particle = ... ; // get the particle IParticlePropertySvc* ppsvc = ... ; // get the service const ParticleProperty& D0 = ... ; // get from the service Fun dm1 = ADMMASS ( "D0" , ppsvc ) ; ///< constructor form the name and Service const double dm1 = dm1 ( particle ) ; Fun dm2 = ADMMASS ( 241 , ppsvc ) ; ///< constructor from PID and Service const double dm2 = dm2 ( particle ) ; Fun dm3 = ADMMASS ( D0 ) ; ///< constructor from ParticleProperty const double dm3 = dm3 ( particle ) ; Fun dm4 = ADMMASS ( "D0" ) ; ///< constructor from the name const double mm4 = dm4 ( particle ) ; Fun dm5 = ADMMASS ( LHCb::ParticleID ( 421 ) ) ; // constructor from PID const double mm5 = dm5 ( particle ) ; %ENDSYNTAX% The later two constructors could be used _only_ if _LoKi Service_, implementation of =LoKi::ILoKiSvc= insterface, is active. See also [[#LoKiCutsDMMASS][DMMASS]]. ---+++ ==BASIC== It is an alias for ==ISBASIC==, see [[#LoKiCutsISBASIC][ISBASIC]] #LoKiCutsCHILD ---+++ ==CHILD==, C++ type =LoKi::Particles::ChildFunction= The function which delegates the evaluation of another function to the daugher particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* B = ... ; // pt of the first daughter: Fun fun1 = CHILD ( PT , 1 ) ; const double pt1 = fun1 ( B ) ; // energy of the first daughter of the first daughter: Fun fun2 = CHILD ( E , 1 , 1 ) ; const double e11 = fun2 ( B ) ; %ENDSYNTAX% Note: * The indices start from ==1== ---+++ ==CHILDFUN== It is an alias for ==CHILD==, see [[#LoKiCutsCHILD][CHILD]] #LoKiCutsCHILDCUT ---+++ ==CHILDCUT==, C++ type =LoKi::Particles::ChildPredicate= The predicate which delegates the evaluation of another predicate to the daugher particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* B = ... ; // is the first daughter a pion? Cut cut1 = CHILDCUT ( "pi+" == ABSID , 1 ) ; const bool pion1 = cut1( B ) ; %ENDSYNTAX% Note: * The indices start from ==1== #LoKiCutsCHI2M ---+++ ==CHI2M==, C++ type =LoKi::Particles::DeltaMeasuredMassChi2= The simple function which returns the deviation of the the particle's measured mass from some refernece value or the nominal mass in <latex>\chi^2</latex> units %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* d0 = ... ; Fun chi2m = CHI2M ( 1.864 * GeV ) ; ///< constructor from the reference mass const double chi2 = chi2m ( d0 ) ; ///< evaluate chi2(mass - 1.864 * GeV) %ENDSYNTAX% The function could be used with various constructors: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* particle = ... ; // get the particle IParticlePropertySvc* ppsvc = ... ; // get the service const ParticleProperty& D0 = ... ; // get from the service Fun dm1 = CHI2M ( "D0" , ppsvc ) ; ///< constructor form the name and Service const double dm1 = dm1 ( particle ) ; Fun dm2 = CHI2M ( 241 , ppsvc ) ; ///< constructor from PID and Service const double dm2 = dm2 ( particle ) ; Fun dm3 = CHI2M ( D0 ) ; ///< constructor from ParticleProperty const double dm3 = dm3 ( particle ) ; Fun dm4 = CHI2M ( "D0" ) ; ///< constructor from the name const double mm4 = dm4 ( particle ) ; Fun dm5 = CHI2M ( LHCb::ParticleID ( 421 ) ) ; // constructor from PID const double mm5 = dm5 ( particle ) ; %ENDSYNTAX% The later two constructors could be used _only_ if _LoKi Service_, the implementation of =LoKi::ILoKiSvc= insterface, is active. ---+++ ==CHI2MASS== It is an alias for ==CHI2M==, see [[#LoKiCutsCHI2M][CHI2M]] ---+++ ==CHI2MIP== It is an alias for ==MIPCHI2==, see [[#LoKiCutsMIPCHI2][MIPCHI2]] #LoKiCutsCL ---+++ ==CL==, the instance of =LoKi::Particles::ConfidenceLevel()= The simple function which returns _the confedence level_ of the particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; const double cl = CL ( p ) ; %ENDSYNTAX% ---+++ ==CLAPP==, C++ type =LoKi::Particles::ClosestApproach= The simple function which evaluated the distance of the closest approach between the particle and some reference particle. =IDistanceCalculator= is used for the evaluation. %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* K = ... ; // find all "close" paricles: Range closest = select ( "closest" , CLAPP( K1 , geo() ) < 0.1 * mm ) ; %ENDSYNTAX% ---+++ ==CLAPPCHI2==, C++ type =LoKi::Particles::ClosestApproachChi2= The simple function which evaluated the <latex>\chi^2</latex> of the distance of the closest approach between the particle and some reference particle. =IDistanceCalculator= is used for the evaluation. %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* K = ... ; // find all "close" paricles: Range closest = select ( "closest" , CLAPPCHI2( K1 , geo() ) < 9 ) ; %ENDSYNTAX% ---+++ ==CONFLEV== It is an alias for ==CL==, see [[#LoKiCutsCL][CL]] ---+++ ==CONFLEVEL== It is an alias for ==CL==, see [[#LoKiCutsCL][CL]] #LoKiCutsCOUNTER ---+++ ==COUNTER==, C++ type =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/struct_lo_ki_1_1_monitoring_1_1_counter.html][LoKi::Monitoring::Counter<const LHCb::Particle*>]]= The simple predicate, useful for monitoring of the another predicates. Essentially it monitors the performance (acceptance rate) of another predicate. %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // The predicate to be monitored: Cut cut = ... ; // the generic Counter: StatEntity* counter = ...; // Monitored predicate: Cut mon = COUNTER( cut , counter ) ; // use it! for ( ... ) { ... const LHCb::Particle* p = ... ; const bool result = mon ( p ) ; ///< use the predicate! ... } ... info () << " The performace: " << endreq << " # of entries #" << counter->nEntries() << endreq << " Acceptance rate (" << counter->eff()*100 << " += " << counter->effErr() * 100 ) << ")%" << endreq ; ... %ENDSYNTAX% The generic counter of C++ type =[[http://cern.ch/proj-gaudi/releases/latest/doxygen/class_stat_entity.html][StatEntity]]= could be either _the local_ counter owned by the =[[http://proj-gaudi.web.cern.ch/proj-gaudi/releases/latest/doxygen/class_gaudi_algorithm.html][GaudiAlgorithm]]= or =[[http://proj-gaudi.web.cern.ch/proj-gaudi/releases/latest/doxygen/class_gaudi_tool.html][GaudiTool]]= base classes, or it could be the counter from =[[http://cern.ch/proj-gaudi/releases/latest/doxygen/class_i_stat_svc.html][IStatSvc]]= or =[[http://cern.ch/proj-gaudi/releases/latest/doxygen/class_i_counter_svc.html][ICounterSvc]]= services. The alternative (and recommended!) way for creation of the monitored predicate is through the function =monitor=: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // The predicate to be monitored: Cut cut = ... ; // the generic Counter: StatEntity* counter = ...; // Monitored predicate: Cut mon = monitor ( cut , counter ) ; %ENDSYNTAX% E.g. in the case of _local_ counter, it could be: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // The predicate to be monitored: Cut cut = ... ; // Monitored predicate: Cut mon = monitor ( cut , counter("SomeEfficiencyCounter") ) ; %ENDSYNTAX% The substitution of the predicate could be done _on-flight_ without disturbing of the actual processing: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // The regular predicate Cut cut = ... ; if ( monitoring ) ///< add the monitoring capabilities (if needed) { cut = monitor ( cut , counter("SomeEfficiencyCounter") ) ; } %ENDSYNTAX% The string representation of the monitored predicate and the unique ID are delegated to the predicate itself, making the object __non-reconstructable__ from its own string representation. It is done _on-purpose_ to avoid _any_ interference and disturbance with the regular procession. ---+++ ==CTAU== It is an alias for ==TIMEDIST==, see [[#LoKiCutsTIMEDIST][TIMEDIST]] ---+++ ==CTAUDOT== It is an alias for ==TDOT==, see [[#LoKiCutsTDOT][TDOT]] ---+++ ==CTAUSIGN== It is an alias for ==TSIGND==, see [[#LoKiCutsTSIGND][TSIGND]] ---+++ ==DANG== It is an alias for ==DIRA==, see [[#LoKiCutsDIRA][DIRA]] ---+++ ==DELTAR2== It is an alias for ==DR2==, see [[#LoKiCutsDR2][DR2]] ---+++ ==DETA==, C+ type =LoKi::Particles::DeltaEta= The function which returns the value of <latex>\Delta\eta</latex> for the particle's momenta with respect some reference momentum: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* jet = ... ; Fun deta = DETA ( jet->momentum() ) ; const LHCb::Particle* p = ... ; const double deltaEta = deta ( p ) ; %ENDSYNTAX% #LoKiCutsDIRA ---+++ ==DIRA==, C++ type =LoKi::Particles::CosineDirectionAngle= The function evaluates the coside of the angle between the momentum of the particle and the direction vector from some reference vertex or 3D-point to the end-vertex of the particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::VertexBase* primary = ... ; const LHCb::Particle* B = ... ; // get the particle Fun dira = DIRA ( primary ) ; const double result = dira ( B ) ; %ENDSYNTAX% #LoKiCutsDMASS ---+++ ==DMASS==, C++ type =LoKi::Particles::DeltaMass= The simple function which returns the deviation of the particle's mass from some refernece value or the nominal mass: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* d0 = ... ; Fun dm = DMASS ( 1.864 * GeV ) ; ///< constructor from the reference mass const double delta = dm ( d0 ) ; ///< evaluate (mass - 1.864 * GeV) %ENDSYNTAX% The function could be used with various constructors: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* particle = ... ; // get the particle IParticlePropertySvc* ppsvc = ... ; // get the service const ParticleProperty& D0 = ... ; // get from the service Fun dm1 = DMASS ( "D0" , ppsvc ) ; ///< constructor form the name and Service const double dm1 = dm1 ( particle ) ; Fun dm2 = DMASS ( 241 , ppsvc ) ; ///< constructor from PID and Service const double dm2 = dm2 ( particle ) ; Fun dm3 = DMASS ( D0 ) ; ///< constructor from ParticleProperty const double dm3 = dm3 ( particle ) ; Fun dm4 = DMASS ( "D0" ) ; ///< constructor from the name const double mm4 = dm4 ( particle ) ; Fun dm5 = DMASS ( LHCb::ParticleID ( 421 ) ) ; // constructor from PID const double mm5 = dm5 ( particle ) ; %ENDSYNTAX% The later two constructors could be used _only_ if _LoKi Service_, implementation of =LoKi::ILoKiSvc= insterface, is active. See also [[#LoKiCutsADMASS][ADMASS]]. #LoKiCutsDMMASS ---+++ ==DMMASS==, C++ type =LoKi::Particles::DeltaMeasuredMass= The simple function which returns the deviation of the particle's measured mass from some refernece value or the nominal mass: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* d0 = ... ; Fun dm = DMMASS ( 1.864 * GeV ) ; ///< constructor from the reference mass const double delta = dm ( d0 ) ; ///< evaluate ( measuredMass - 1.864 * GeV) %ENDSYNTAX% The function could be used with various constructors: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* particle = ... ; // get the particle IParticlePropertySvc* ppsvc = ... ; // get the service const ParticleProperty& D0 = ... ; // get from the service Fun dm1 = DMMASS ( "D0" , ppsvc ) ; ///< constructor form the name and Service const double dm1 = dm1 ( particle ) ; Fun dm2 = DMMASS ( 241 , ppsvc ) ; ///< constructor from PID and Service const double dm2 = dm2 ( particle ) ; Fun dm3 = DMMASS ( D0 ) ; ///< constructor from ParticleProperty const double dm3 = dm3 ( particle ) ; Fun dm4 = DMMASS ( "D0" ) ; ///< constructor from the name const double mm4 = dm4 ( particle ) ; Fun dm5 = DMMASS ( LHCb::ParticleID ( 421 ) ) ; // constructor from PID const double mm5 = dm5 ( particle ) ; %ENDSYNTAX% The later two constructors could be used _only_ if _LoKi Service_, implementation of =LoKi::ILoKiSvc= insterface, is active. See also [[#LoKiCutsADMMASS][ADMMASS]]. ---+++ ==DPHI==, C+ type =LoKi::Particles::DeltaPhi= The function which returns the value of <latex>\Delta\phi</latex> for the particle's momenta with respect some reference momentum: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* jet = ... ; Fun dphi = DPHI ( jet->momentum() ) ; const LHCb::Particle* p = ... ; const double deltaPhi = dphi ( p ) ; %ENDSYNTAX% #LoKiCutsDR2 ---+++ ==DR2==, C+ type =LoKi::Particles::DeltaR2= The function which returns the value of <latex>\Delta\phi^2+\Delta\eta^2</latex> for the particle's momenta with respect some reference momentum: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* jet = ... ; Fun dr2 = DR2 ( jet->momentum() ) ; const LHCb::Particle* p = ... ; const double deltaR2 = dr2 ( p ) ; %ENDSYNTAX% ---+++ ==E==, the instance of =LoKi::Particles::Energy()= The simple function which returns the value of the particle's energy: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% Range energetic = select ( "energetic" , E > 10 * GeV ) ; %ENDSYNTAX% ---+++ ==ETA==, the instance of =LoKi::Particles::PseudoRapidity()= The simple function which returns the pseudorapidity: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% Range some = select ( "eta<4" , ETA < 4 ) ; %ENDSYNTAX% ---+++ ==EQUALTO==, C++ type =LoKi::EqualToValue<const LHCb::Particle*>= The simple predicate which checks if the value of the certain function equal to some predefined value: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% Range k1 = select ( "positive" , EQUALTO( Q , +1.0 ) ) ; Range k2 = select ( "positive" , Q == +1 ) ; ///< the same %ENDSYNTAX% ---+++ ==FILTER==, C++ type =LoKi::Particles::Filter=, The adapter predicate, which allows to use =IFilterCriterion= tool as _LoKi predicate_: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% IFilterCriterion* criterion = ... ; // select particles accroding to criterion: Range good = select ( "good" , FILTER ( criterion ) ) ; ///< use the tool %ENDSYNTAX% ---+++ ==FROM== It is an alias for ==ISINTREE==, see [[#LoKiCutsISINTREE][ISINTREE]] ---+++ ==FROMTREE== It is an alias for ==ISINTREE==, see [[#LoKiCutsISINTREE][ISINTREE]] ---+++ ==HASCALOS== It is an alias for ==PPHASCALOS==, see [[#LoKiCutsPPHASCALOS][PPHASCALOS]] #LoKiCutsHASINFO ---+++ ==HASINFO==, C++ type =LoKi::Particles::HasInfo= The predicate which checks the presence of the entries in "extraInfo" field of the particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% Range weighted = select ( "withweight" , HASINFO ( LHCb::Particle::Weight) ) ; const bool good = HASKEY( p ) ; %ENDSYNTAX% #LoKiCutsHASKEY ---+++ ==HASKEY==, the instance of =LoKi::Particles::HasKey()= The predicate which returns =true= if the argument has _the assigned key_: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; const bool good = HASKEY( p ) ; %ENDSYNTAX% For invalid arguments =false= is returned. See also [[#LoKiCutsKEY][KEY]]. ---+++ ==HASMUON== It is an alias for ==PPHASMUON==, see [[#LoKiCutsPPHASMUON][PPHASMUON]] ---+++ ==HASPINFO== It is an alias for ==HASINFO==, see [[#LoKiCutsHASINFO][HASINFO]] ---+++ ==HASPROTO==, the instance of =LoKi::Particles::HasProto()= The predicate which check the presence of the protoparticle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select the basic particles with valid protoparticle: Range withProto = select ( "WithProto" , HASPROTO ) ; %ENDSYNTAX% #LoKiCutsHASPROTOS ---+++ ==HASPROTOS==, C++ type =LoKi::Particles::HasProtos= The predicate which check the presence the protoparticles from the list: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% SEQUENCE protoparticles = ... ; // select only particles, which are "independent" from the protoparticles in the list Range good = select ( "Good" , !HASPROTOS( protoparticles ) ) ; %ENDSYNTAX% #LoKiCutsHASPROTOSINTREE ---+++ ==HASPROTOSINTREE==, C++ type =LoKi::Particles::HasProtosInTree= The predicate which check the presence the protoparticles from the list in thedecay tree of the particles: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% SEQUENCE protoparticles = ... ; // select only particles, which are "independent" from the protoparticles in the list Range good = select ( "Good" , !HASPROTOSINTREE( protoparticles ) ) ; %ENDSYNTAX% ---+++ ==HASRICH== It is an alias for ==PPHASRICH==, see [[#LoKiCutsPPHASRICH][PPHASRICH]] ---+++ ==HASSTATE==, C++ type =LoKi::Particles::TrackHasState= The predicate which evaluates =LHCb::Track::hasStateAt= %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select only particles from tracks whcih has state at TT: Range good = select ( "Good" , HASTRACK && HASSTATE ( LHCb::State::AtTT ) ) ; %ENDSYNTAX% #LoKiCutsHASTRACKS ---+++ ==HASTRACKS==, C++ type =LoKi::Particles::HasTracks= The predicate which check the presence the tracks from the list: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% SEQUENCE tracks = ... ; // select only particles, which are "independent" from the tracks in the list Range good = select ( "Good" , !HASTRACKS( tracks ) ) ; %ENDSYNTAX% #LoKiCutsHASTRACKSINTREE ---+++ ==HASTRACKS==, C++ type =LoKi::Particles::HasTracks= The predicate which check the presence the tracks from the list in the decay tree of the particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% SEQUENCE tracks = ... ; // select only particles, which are "independent" from the tracks in the list Range good = select ( "Good" , !HASTRACKSINTREE( tracks ) ) ; %ENDSYNTAX% ---+++ ==HASVERTEX==, the instance of =LoKi::Particles::HasVertex()= The predicate which check the presence of the vertex: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // select the particles with the vertex: Range withVertex = select ( "WithVertex" , HASVERTEX ) ; %ENDSYNTAX% #LoKiCutsID ---+++ ==ID==, the instance of =LoKi::Particles::Identifier()= The simple function which returns the value of PDG-identifier of the particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; const double id = ID( p ) ; %ENDSYNTAX% The special equality/non-equality operators against =std::string= and =LHCb::ParticleID= objects are defined: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% Range kaons = select ( "kaons" , "K+" == ID ) ; Range notgamma = select ( "!gamma" , LHCb::ParticleID( 22 ) != ID ) ; %ENDSYNTAX% For the invalid argument =LoKi::Constanst::InvalidID= is returned. See also [[#LoKiCutsABSID][ABSID]]. #LoKiCutsINFO ---+++ ==INFO==, C++ type =LoKi::Particles::Info= The function which extract "extra" information using =LHCb::Particle::info(...)= method: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; const int index = ... ; Fun info = INFO( index , -1000.0 ) ; const double result = info ( p ) ; %ENDSYNTAX% #LoKiCutsINTES ---+++ ==INTES==, C++ type =LoKi::Particles::InTES= The predicate which checks the certain the location of particle in Transient Event Store. It is useful to separate the input particles from the different TES locations: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% Range noPID = select ( "NoPID" , INTES("NoPID", false) ) ; %ENDSYNTAX% The second argument switch on/off the match of the full TES path. The leading ="/Event/"= could be always omitted. #LoKiCutsINTREE ---+++ ==INTREE==, C++ type =LoKi::Particles::InTree= The predicate which recursively checks the presence in the decay tree of the particle the (grand)-daughter which satisfies the specified criteria: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* B = ... ; // check the presence of phi in the decay tree: Cut good = INTREE( "phi(1020)" == ID ) ; const bool hasPhiInDecay = good ( B ) ; %ENDSYNTAX% ---+++ ==IP==, C++ type =LoKi::Particles::ImpPar= The function which calculates the impact parameter of the particle with respect to some vertex or 3D-point using =IDistanceCalculator= tool: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::VertexBase* primary = ... ; // get all particles with large impact parameters: Range largeIP = select ( "notFromPV" , 0.2 * mm < IP ( primary , geo() ) ) ; %ENDSYNTAX% ---+++ ==IPCHI2==, C++ type =LoKi::Particles::ImpParChi2= The function which calculates the <latex>\chi^2</latex> of the impact parameter of the particle with respect to some vertex or 3D-point using =IDistanceCalculator= tool: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::VertexBase* primary = ... ; // get all particles with large impact parameters: Range largeIP = select ( "notFromPV" , 4 < IPCHI2 ( primary , geo() ) ) ; %ENDSYNTAX% #LoKiCutsIPMIN ---+++ ==IPMIN==, C++ type =LoKi::Particles::MinImpPar= The function which calculates the minimum value of the impact parameter of the particle with respect to some set of reference vertices or 3D-point using =IDistanceCalculator= tool: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% SEQUENCE primaries = ... ; // get all particles with large impact parameters: Range largeIP = select ( "notFromPV" , 0.2 * mm < IPMIN ( primaries , geo() ) ) ; %ENDSYNTAX% ---+++ ==IS==, C++ type =LoKi::Particles::IsAParticle= The predicate which checks if th eparticle is contained in other list: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% SEQUENCE particles = ... ; // get the particle not from the list Range notFromList = select ( "notFromList" , !IS( particles ) ) ; %ENDSYNTAX% #LoKiCutsISBASIC ---+++ ==ISBASIC==, the instance of =LoKi::Particles::IsBasic()= The predicate which checks if the particle _is a basic particle_, =LHCb::Particle::isBasic=: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% Range basic = select ( "basic" , ISBASIC ) ; %ENDSYNTAX% ---+++ ==ISDOWN==, the instance of =EQUALTO(TRTYPE,LHCb::Track::Downstream)= The predicate which checks the type of underlying track: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // get the particles from downstream tracks Range down = select ( "Down" , HASTRACK && ISDOWN ) ; %ENDSYNTAX% #LoKiCutsISINTREE ---+++ ==ISINTREE==, C++ type =LoKi::Particles::IsAParticle= The predicate which checks if the particle or any of its daughters in the list: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% SEQUENCE particles = ... ; // get the particle not from the list Range notFromList = select ( "notFromList" , !ISINTREE ( particles ) ) ; %ENDSYNTAX% ---+++ ==ISLONG==, the instance of =EQUALTO(TRTYPE,LHCb::Track::Long)= The predicate which checks the type of underlying track: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // get the particles from long track Range longs = select ( "Long" , HASTRACK && ISLONG ) ; %ENDSYNTAX% ---+++ ==ISMUON==, the instance of =LoKi::Particles::IsMuon()= The predicate which checks =LHCb::MuonPID::isMuon=: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% Range isMuon = select ( "isMuon" , ISBASIC && ISMUON ) ; %ENDSYNTAX% ---+++ ==ISTTRACK==, the instance of =EQUALTO(TRTYPE,LHCb::Track::Ttrack)= The predicate which checks the type of underlying track: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // get the particles from T-tracks Range ts = select ( "T" , HASTRACK && ISTTRACK ) ; %ENDSYNTAX% ---+++ ==ISUP==, the instance of =EQUALTO(TRTYPE,LHCb::Track::Upstream)= The predicate which checks the type of underlying track: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // get the particles from upstream tracks Range ups = select ( "Up" , HASTRACK && ISUP ) ; %ENDSYNTAX% #LoKiCutsKEY ---+++ ==KEY==, the instance of =LoKi::Particles::Key()= The function which returns the value of _the assigned key_. %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; const double key = KEY( p ) ; %ENDSYNTAX% For invalid arguments, of if no key is assigned =LoKi::Constants::InvalidKey= is returned. See also [[#LoKiCutsHASKEY][HASKEY]] #LoKiCutsLV0 ---+++ ==LV0==, C++ type =LoKi::Particles::DecayAngle=, The function evaluated the cosine of the angle between the daughters's momentum and the mother flight direction in the rest system of the mother particle. For two-body decays it is just a polarization angle of the mother particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; Fun fun = LV0(1) ; // the dacy angle of the first daughte const double result = fun ( B ) ; %ENDSYNTAX% Note: * The name comes from KAL language * The indices start from ==1== ---+++ ==LV01==, the instance of =LoKi::Particles::DecayAngle(1)=, The function evaluated the cosine of the angle between the first daughters's momentum and the mother flight direction in the rest system of the mother particle. %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; const double result = LV01 ( B ) ; %ENDSYNTAX% The name comes from KAL language. See [[#LoKiCutsLV0][LV0]] ---+++ ==LV02==, the instance of =LoKi::Particles::DecayAngle(2)=, The function evaluated the cosine of the angle between the second daughters's momentum and the mother flight direction in the rest system of the mother particle. %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; const double result = LV02 ( B ) ; %ENDSYNTAX% The name comes from KAL language. See [[#LoKiCutsLV0][LV0]] ---+++ ==LV03==, the instance of =LoKi::Particles::DecayAngle(3)=, The function evaluated the cosine of the angle between the third daughters's momentum and the mother flight direction in the rest system of the mother particle. %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; const double result = LV03 ( B ) ; %ENDSYNTAX% The name comes from KAL language. See [[#LoKiCutsLV0][LV0]] ---+++ ==LV04==, the instance of =LoKi::Particles::DecayAngle(4)=, The function evaluated the cosine of the angle between the fourth daughters's momentum and the mother flight direction in the rest system of the mother particle. %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; const double result = LV04 ( B ) ; %ENDSYNTAX% The name comes from KAL language. See [[#LoKiCutsLV0][LV0]] ---+++ ==M==, the instance of type =LoKi::Particles::Mass()= The simple function which returns _the kinematical mass_ of the particle <latex>\sqrt{E^2-\vec{p}^2}</latex>, using =Gaudi::LorentzVector::Mass= method: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; const double mass = M( p ) ; %ENDSYNTAX% #LoKiCutsMASS ---+++ ==MASS==, C++ type =LoKi::Particles::InvariantMass= The simple function which returns _the invariant mass_ of the subcombinations of daughter particles. %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; Fun m12 = MASS(1,2) ; ///< the invariant mass of the first and the second daughter particles const double mass = m12( p ) ; %ENDSYNTAX% Note: * the indices for daughter particles start from =1= * index =0= corresponds to the mother particle itself #LoKiCutsMAXTREE ---+++ ==MAXTREE==, C++ type =LoKi::Particles::MaxTree= The function with scans the decay tree and return the maximal value of another function, evaluated for the (grand)daughter particles which satisfy the certain criteria %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* B = ... ; // maximal deviation from nominal mass for all phis in the tree: Fun fun = MAXTREE ( ADMASS("phi(1020)") , "phi(1020)" == ID , -1 ) ; const double maxDM = fun ( B ) ; %ENDSYNTAX% ---+++ ==MM==, the instance of =LoKi::Particles::MeasuredMass()= The simple function which returns _the measured mass_ of the particle, using =LHCb::Particle::measuredMass= method: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; const double measuredMass = MM( p ) ; %ENDSYNTAX% ---+++ ==MINCLAPP==, C++ type =LoKi::Particles::MinClosestApproach= The simple function which returns the minimum of the closest approached of the particle against some set of other particles. =IDistanceCalculator= is used for evaluation. %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% SEQUENCE particles = ... ; Fun fun = MINCLAPP( particles, geo() ) ; const LHCb::Particle* p = ... ; const double minDOCA = fun ( p ) ; %ENDSYNTAX% ---+++ ==MINCLAPPCHI2==, C++ type =LoKi::Particles::MinClosestApproachChi2= The simple function which returns the minimum <latex>\chi^2</latex> of the closest approached of the particle against some set of other particles. =IDistanceCalculator= is used for evaluation. %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% SEQUENCE particles = ... ; Fun fun = MINCLAPPCHI2( particles, geo() ) ; const LHCb::Particle* p = ... ; const double minDOCAchi2 = fun ( p ) ; %ENDSYNTAX% ---+++ ==MINIP== It is an alias for ==IPMIN==, see [[#LoKiCutsIPMIN][IPMIN]] #LoKiCutsMINTREE ---+++ ==MINTREE==, C++ type =LoKi::Particles::MinTree= The function with scans the decay tree and return the minimal value of another function, evaluated for the (grand)daughter particles which satisfy the certain criteria %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* B = ... ; // minimal transverse momentum of the basic particle Fun fun = MINTREE ( PT , BASIC , -10 * TeV ) ; const double minPT = fun ( B ) ; %ENDSYNTAX% ---+++ ==MINVD== It is an alias for ==VDMIN==, see [[#LoKiCutsVDMIN][VDMIN]] ---+++ ==MINVDCHI2== It is an alias for ==VDMINCHI2==, see [[#LoKiCutsVDMINCHI2][VDMINCHI2]] ---+++ ==MIP== It is an alias for ==IPMIN==, see [[#LoKiCutsIPMIN][IPMIN]] #LoKiCutsMIPCHI2 ---+++ ==MIPCHI2==, C++ type =LoKi::Particles::MinImpParChi2= The function which calculates the minimum <latex>\chi^2</latex> value of the impact parameter of the particle with respect to some set of reference vertices or 3D-point using =IDistanceCalculator= tool: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% SEQUENCE primaries = ... ; // get all particles with large impact parameters: Range largeIP = select ( "notFromPV" , 4 < MINCHI2 ( primaries , geo() ) ) ; %ENDSYNTAX% #LoKiCutsMULTTREE ---+++ ==MULTTREE==, C++ type =LoKi::Particles::MultTree= The function with accumulate (by multiplication) the value of another function for all daughter particles inthe decay tree, which satisfy the certain criteria %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* B = ... ; // the product of all weigth for the composed particles: Fun fun = MULTTREE ( W , !BASIC , 1.0 ) ; const double multW = fun ( B ) ; %ENDSYNTAX% ---+++ ==M12==, the instance of =LoKi::Particles::InvariantMass(1,2)= The simple function which returns _the invariant mass_ of the first and the second daughter particles %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; // the invariant mass of the first and the second daughter particles const double mass = M12( p ) ; %ENDSYNTAX% See [[#LoKiCutsMASS][MASS]] ---+++ ==M13==, the instance of =LoKi::Particles::InvariantMass(1,3)= The simple function which returns _the invariant mass_ of the first and the third daughter particles %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; // the invariant mass of the first and the third daughter particles const double mass = M13( p ) ; %ENDSYNTAX% See [[#LoKiCutsMASS][MASS]] ---+++ ==M14==, the instance of =LoKi::Particles::InvariantMass(1,4)= The simple function which returns _the invariant mass_ of the first and the fourth daughter particles %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; // the invariant mass of the first and the fourth daughter particles const double mass = M14( p ) ; %ENDSYNTAX% See [[#LoKiCutsMASS][MASS]] ---+++ ==M23==, the instance of =LoKi::Particles::InvariantMass(2,3)= The simple function which returns _the invariant mass_ of the second and the third daughter particles %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; // the invariant mass of the second and the third daughter particles const double mass = M23( p ) ; %ENDSYNTAX% See [[#LoKiCutsMASS][MASS]] ---+++ ==M24==, the instance of =LoKi::Particles::InvariantMass(2,4)= The simple function which returns _the invariant mass_ of the second and the fourth daughter particles %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; // the invariant mass of the second and the fourth daughter particles const double mass = M24( p ) ; %ENDSYNTAX% See [[#LoKiCutsMASS][MASS]] ---+++ ==M34==, the instance of =LoKi::Particles::InvariantMass(3,4)= The simple function which returns _the invariant mass_ of the third and the fourth daughter particles %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; // the invariant mass of the third and the fourth daughter particles const double mass = M34( p ) ; %ENDSYNTAX% See [[#LoKiCutsMASS][MASS]] #LoKiCutsNDAUGS ---+++ ==NDAUGS==, the instance of =LoKi::Particles::NumberOfDaughters()== The simple function which return number of daughter particles, =LHCb::Particle::daughters().size()=: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% /// select two body B-decays: Range twobody = select ( "2" , 2 == NDAUGS ) ; %ENDSYNTAX% ---+++ ==NDAUGHTERS== It is an alias for ==NDAUGS==, see [[#LoKiCutsNDAUGS][NDAUGS]] #LoKiCutsNINTREE ---+++ ==NINTREE==, C++ type =LoKi::Particles::NinTree= The function with returns the number of the (grand)daughters inthe decay tree of the particle which satisfies the specified criteria: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* B = ... ; // select the particles with at least tho kaons in the decay tree Range with2K = select ( "With2Kaons" , 1.9 < NINTREE( "K+" == ABSID ) ) %ENDSYNTAX% #LoKiCutsNONE ---+++ ==NONE==, the instance of =LoKi::BooleanConstant<const LHCb::Particle*>(false)= The most trivial _"select-none"_ predicate which always returns =false= #LoKiCutsONE ---+++ ==ONE==, the instance of =LoKi::Constant<const LHCb::Particle*>(1)= The trivial function which always returns =1= ---+++ ==P==, the instance of type =LoKi::Particles::Momentum()= The simple function which returns the value of the particle's momentum: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% Range energetic = select ( "energetic" , P > 10 * GeV ) ; %ENDSYNTAX% ---+++ ==P2==, the instance of =LoKi::Particles::Momentum2()= The simple function which returns the squared value of the particle's momentum: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* B = ... ; const double p2 = P2( B ) ; %ENDSYNTAX% ---+++ ==PALL== It is an alias for ==ALL==, see [[#LoKiCutsALL][ALL]] ---+++ ==PFALSE== It is an alias for ==NONE==, see [[#LoKiCutsFALSE][NONE]] ---+++ ==PHASINFO== It is an alias for ==HASINFO==, see [[#LoKiCutsHASINFO][HASINFO]] ---+++ ==PHI==, the instance of =LoKi::Particles::Phi()= The simple function which returns the asimuthal angle <latex>\phi</latex> %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; const double phi = PHI( p ) ; %ENDSYNTAX% ---+++ ==PIDe==, The instance of =LoKi::Particles::ProtoInfo( LHCb::ProtoParticle::CombDLLe , 0 , -1000 )= Simple function which returns the combined identification for the electron hypothesis: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // get all good electrons: Range electrons = select ( "e" , "e+" == ABSPID && 2 < PIDe ) ; %ENDSYNTAX% See [[#LoKiCutsPPINFO][PPINFO]]. ---+++ ==PIDmu==, The instance of =LoKi::Particles::ProtoInfo( LHCb::ProtoParticle::CombDLLmu , 0 , -1000 )= Simple function which returns the combined identification for the muon hypothesis: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // get all good muons: Range muons = select ( "mu" , "mu+" == ABSPID && -10 < PIDmu ) ; %ENDSYNTAX% See [[#LoKiCutsPPINFO][PPINFO]]. ---+++ ==PIDk==, The instance of =LoKi::Particles::ProtoInfo( LHCb::ProtoParticle::CombDLLk , 0 , -1000 )= Simple function which returns the combined identification for the kaon hypothesis: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // get all good kaons: Range kaons = select ( "K" , "K+" == ABSPID && -2 < PIDK ) ; %ENDSYNTAX% See [[#LoKiCutsPPINFO][PPINFO]]. ---+++ ==PIDp==, The instance of =LoKi::Particles::ProtoInfo( LHCb::ProtoParticle::CombDLLp , 0 , -1000 )= Simple function which returns the combined identification for the proton hypothesis: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // get all good protons: Range protons = select ( "p" , "p+" == ABSPID && -5 < PIDp ) ; %ENDSYNTAX% See [[#LoKiCutsPPINFO][PPINFO]]. ---+++ ==PIDpi==, The instance of =LoKi::Particles::ProtoInfo( LHCb::ProtoParticle::CombDLLpi , 0 , -1000 )= Simple function which returns the combined identification for the pion hypothesis: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // get all good pions: Range pions = select ( "mu" , "pi+" == ABSPID && -10 < PIDpi ) ; %ENDSYNTAX% See [[#LoKiCutsPPINFO][PPINFO]]. Note: * according to the convention, it is set to ==0== ---+++ ==PINFO== It is an alias for ==INFO==, see [[#LoKiCutsINFO][INFO]] ---+++ ==PINTES== It is an alias for ==INTES==, see [[#LoKiCutsINTES][INTES]] #LoKiCutsPLOT ---+++ ==PLOT==, C++ type =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/struct_lo_ki_1_1_monitoring_1_1_plot.html][LoKi::Monitoring::Plot<const LHCb::Particle*>]]= The simple function, useful for monitoring of the another function. Essentially it applies the noather function and fills the histogram with the results. %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // The function to be monitored: Fun fun = ... ; // the histogram AIDA::IHistogramID* histo = ... ; // Monitored function: Fun mon = PLOT ( fun , histo ) ; // use it! for ( ... ) { ... const LHCb::Particle* p = ... ; const double result = mon ( p ) ; ///< use the function! ... } ... %ENDSYNTAX% The alternative (and recommended!) way for creation of the monitored function is through the function =monitor=: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // The function to be monitored: Fun fun = ... ; // the histogram AIDA::IHistogramID* histo = ... ; // Monitored function: Fun mon = monitor ( fun , histo ) ; %ENDSYNTAX% The substitution of the function could be done _on-flight_ without disturbing of the actual processing: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // The regular function Fun fun = ... ; if ( monitoring ) ///< add the monitoring capabilities (if needed) { AIDA::IHistogram1D histo = ... ; fun = monitor ( fun , histo ) ; } %ENDSYNTAX% The string representation of the monitored function and the unique ID are delegated to the function itself, making the object __non-reconstructable__ from its own string representation. It is done _on-purpose_ to avoid _any_ interference and disturbance with the regular procession. ---+++ ==PNONE== It is an alias for ==NONE==, see [[#LoKiCutsNONE][NONE]] ---+++ ==PONE== It is an alias for ==ONE==, see [[#LoKiCutsONE][ONE]] ---+++ ==PPHASINFO==, C++ type =LoKi::Particles::ProtoHasInfo= The simple predicated which checks =LHCb::ProtoParticle::hasInfo= for the underlying protoparticle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // get all particles where protoparticle has PhotonID infomration: Range withPhotonID = select ( "Good" , BASIC && PPHASINFO( LHCb::ProtoParticle::PhotonID ) ) ; %ENDSYNTAX% #LoKiCutsPPHASCALOS ---+++ ==PPHASCALOS==, The instance of =LoKi::Particles::ProtoHasCaloHypos()= The simple predicated which checks the existence of =LHCb::ProtoParticle::calos= for the underlying protoparticle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // get all particles where protoparticle has CaloHypo object Range withCalo = select ( "Good" , BASIC && PPHASCALOS ) ; %ENDSYNTAX% #LoKiCutsPPHASMUON ---+++ ==PPHASMUON==, The instance of =LoKi::Particles::ProtoHasMuonPID()= The simple predicated which checks the existence of =LHCb::ProtoParticle::muonPID= for the underlying protoparticle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // get all particles where protoparticle has RichPID object Range withMuonID = select ( "Good" , BASIC && PPHASMUON ) ; %ENDSYNTAX% #LoKiCutsPPHASRICH ---+++ ==PPHASRICH==, The instance of =LoKi::Particles::ProtoHasRichPID()= The simple predicated which checks the existence of =LHCb::ProtoParticle::richPID= for the underlying protoparticle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // get all particles where protoparticle has RichPID object Range withRichID = select ( "Good" , BASIC && PPHASRICH ) ; %ENDSYNTAX% #LoKiCutsPPINFO ---+++ ==PPINFO==, C++ type =LoKi::Particles::ProtoInfo= The function which delegates the evaluation of =LHCb::ProtoParticle::info= for the underlying protoparticle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // get all particles where protoparticle has good RichPion information: Range withGoodRichID = select ( "RICH" , BASIC && -5 < PPINFO( LHCb::ProtoParticle::RichPion , 0 , -1000 ) ) ; %ENDSYNTAX% ---+++ ==PROTOS== It is an alias for ==HASPROTOS==, see [[#LoKiCutsHASPROTOS][HASPROTOS]] ---+++ ==PROTOSINTREE== It is an alias for ==HASPROTOSINTREE==, see [[#LoKiCutsHASPROTOSINTREE][HASPROTOSINTREE]] ---+++ ==PSAME== It is an alias for ==SAME==, see [[#LoKiCutsSAME][SAME]] ---+++ ==PSWITCH== It is an alias for ==SWITCH==, see [[#LoKiCutsSWITCH][SWITCH]] ---+++ ==PT==, the instance of =LoKi::Particles::TransverseMomentum()= The simple function which returns the particle's transverse momentum: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* B = ... ; const double pt = PT ( B ) ; %ENDSYNTAX% #LoKiCutsPTDIR --+++ ==PTDIR==, C++ type =LoKi::Particles::TransverseMomentumRel= The simple function which evaluates the the particle's transverse momentum with respect to some 3D or Lorentz vector: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* jet = ... ; Fun pt = PTDIR ( jet->momentum() ) ; const LHCb::Particle* mu = ... ; const double result = pt ( mu ) ; /// evaluate pt with respect to jet axis %ENDSYNTAX% ---+++ ==PTREL== It is an alias for ==PTDIR==, see [[#LoKiCutsPTREL][PTDIR]] ---+++ ==PTRUE== It is an alias for ==ALL==, see [[#LoKiCutsALL][ALL]] ---+++ ==PVALID== It is an alias for ==VALID==, see [[#LoKiCutsVALID][VALID]] ---+++ ==PVTRACK==, C++ type =LoKi::Particles::HasTracksFromPV= The simple predicate which evaluates to =true= for _the basic_ particle, which __directly__ participate into the primary vertex recontruction: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::RecVertex* primary = ... ; // select only particle not used for PV recontruction: Range good = select ( "Good" , BASIC && !PVTRACK( primary ) ) ; %ENDSYNTAX% ---+++ ==PVTRACKINTREE==, C++ type =LoKi::Particles::HasTracksFromPVInTree= The simple predicate which evaluates to =true= for the particles which __directly or indirectly__ participate into the primary vertex recontruction: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::RecVertex* primary = ... ; // select only particle not used for PV recontruction: Range good = select ( "Good" , !PVTRACKINTREE ( primary ) ) ; %ENDSYNTAX% ---+++ ==PX==, the instance of =LoKi::Particles::MomentumX()= The simple function which returns X-component of the particle's momentum: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* B = ... ; const double px = PX ( B ) ; %ENDSYNTAX% ---+++ ==PY==, the instance of =LoKi::Particles::MomentumY()= The simple function which returns Y-component of the particle's momentum: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* B = ... ; const double py = PY ( B ) ; %ENDSYNTAX% For the invalid argument =LoKi::Constanst::InvalidMomentum= is returned. ---+++ ==PZ==, the instance of =LoKi::Particles::MomentumZ()= The simple function which returns Z-component of the particle's momentum: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* B = ... ; const double pz = PZ ( B ) ; %ENDSYNTAX% For the invalid argument =LoKi::Constanst::InvalidMomentum= is returned. ---+++ ==PZERO== It is an alias for ==ZERO==, see [[#LoKiCutsZERO][ZERO]] #LoKiCutsQ ---+++ ==Q==, the instance of =LoKi::Particles::Charge()= The function which evaluates the charge of the particle, using the information from =LHCb::ParticleID=. %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; const bool positive = 0 < Q ( p ) ; %ENDSYNTAX% =LoKi::Constants::InvalidCharge= is returned for invalid arguments. See also [[#LoKiCutsSUMQ][SUMQ]] #LoKiCutsSAME ---+++ ==SAME==, C++ type =LoKi::TheSame<const LHCb::Particle>= The predicate which check if the particle is _the same_ as some reference particle. %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p1 = ... ; Cut same = SAME ( p1 ) ; const LHCb::Particle* p2 = ... ; const bool theSame = same ( p2 ) ; %ENDSYNTAX% #LoKiCutsSTAT ---+++ ==STAT==, C++ type =[[http://cern.ch/LHCb-release-area/DOC/lhcb/releases/latest/doxygen/struct_lo_ki_1_1_monitoring_1_1_stat.html][LoKi::Monitoring::Stat<const LHCb::Particle*>]]= The simple function, useful for monitoring of the another function. Essentially it monitors the results of another function. %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // The function to be monitored: Fun fun = ... ; // the generic Counter: StatEntity* counter = ...; // Monitored function: Fun mon = STAT ( fun , counter ) ; // use it! for ( ... ) { ... const LHCb::Particle* p = ... ; const double result = mon ( p ) ; ///< use the function! ... } ... info () << " The performace: " << endreq << " # of entries #" << counter->nEntries() << endreq << " Total sum " << counter->flag () << endreq << " Mean+-RMS " << counter->flagMean() << "+-" << counter->flagRMS() << endreq << " Min/Max " << counter->flagMin() << "/" << counter->flagMax() << endreq ; ... %ENDSYNTAX% The generic counter of C++ type =[[http://cern.ch/proj-gaudi/releases/latest/doxygen/class_stat_entity.html][StatEntity]]= could be either _the local_ counter owned by the =[[http://proj-gaudi.web.cern.ch/proj-gaudi/releases/latest/doxygen/class_gaudi_algorithm.html][GaudiAlgorithm]]= or =[[http://proj-gaudi.web.cern.ch/proj-gaudi/releases/latest/doxygen/class_gaudi_tool.html][GaudiTool]]= base classes, or it could be the counter from =[[http://cern.ch/proj-gaudi/releases/latest/doxygen/class_i_stat_svc.html][IStatSvc]]= or =[[http://cern.ch/proj-gaudi/releases/latest/doxygen/class_i_counter_svc.html][ICounterSvc]]= services. The alternative (and recommended!) way for creation of the monitored function is through the function =monitor=: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // The function to be monitored: Fun fun = ... ; // the generic Counter: StatEntity* counter = ...; // Monitored function: Fun mon = monitor ( fun , counter ) ; %ENDSYNTAX% E.g. in the case of _local_ counter, it could be: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // The function to be monitored: Fun fun = ... ; // Monitored function: Fun mon = monitor ( fun , counter("SomeEfficiencyCounter") ) ; %ENDSYNTAX% The substitution of the function could be done _on-flight_ without disturbing of the actual processing: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // The regular function Fun fun = ... ; if ( monitoring ) ///< add the monitoring capabilities (if needed) { fun = monitor ( fun , counter("SomeEfficiencyCounter") ) ; } %ENDSYNTAX% The string representation of the monitored function and the unique ID are delegated to the function itself, making the object __non-reconstructable__ from its own string representation. It is done _on-purpose_ to avoid _any_ interference and disturbance with the regular procession. #LoKiCutsSWITCH ---+++ ==SWITCH==, C++ type =LoKi::Switch<const LHCb::Particle*>= The function which acts according _the rule_: __result = condition ? function1 : function2__: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% Fun fun = SWITCH ( 0 < Q , PT , 1/PT ) ; %ENDSYNTAX% #LoKiCutsSUMQ ---+++ ==SUMQ==, the instance of =LoKi::Particles::SumCharge()= The function which evaluates the charge of the particle. For composed particles _the charge_ is defined as the recursive sum over the charged all daughter particles, for _the basic_ particles the information from =LHCb::ParticleID= is used %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* B = ... ; const bool positive = 0 < SUMQ ( B ) ; %ENDSYNTAX% See also [[#LoKiCutsQ][Q]] #LoKiCutsSUMTREE ---+++ ==SUMTREE==, C++ type =LoKi::Particles::SumTree= The function with accumulate (by addition) the value of another function for all daughter particles inthe decay tree, which satisfy the certain criteria %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* B = ... ; // get th ealgenrac sum of all transverse momenta for the pions Fun fun = SUMTREE ( PT , "pi+" == ABSID , 0.0 ) ; const double sumPt = fun ( B ) ; %ENDSYNTAX% ---+++ ==TD== It is an alias for ==TIMEDIST==, see [[#LoKiCutsTIMEDIST][TIMEDIST]] ---+++ ==TDIST== It is an alias for ==TIMEDIST==, see [[#LoKiCutsTIMEDIST][TIMEDIST]] ---+++ ==TDSIGN== It is an alias for ==TSIGND==, see [[#LoKiCutsTSIGND][TSIGND]] #LoKiCutsTIMEDIST ---+++ ==TIMEDIST==, C++ type =LoKi::Particles::TimeDistance=, The function evaluates the proper lifetime <latex>c\tau</latex> of the particle between "end-vertex" and some reference vertex or 3D-point. The function =LoKi::Particles::VertexDistance= is used for evaluation of geometry distance. %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::VertexBase* primary ; Fun fun = TIMEDIST ( primary ) ) const LHCb::Particle* B = ... ; const bool ctau = fun ( B ) ; %ENDSYNTAX% ---+++ ==TRACKFROMPV== It is an alias for ==PVTRACK==, see [[#LoKiCutsPVRACK][PVTRACK]] ---+++ ==TRACKFROMPVINTREE== It is an alias for ==PVTRACKINTREE==, see [[#LoKiCutsPVRACKINTREE][PVTRACKINTREE]] ---+++ ==TRACKS== It is an alias for ==HASTRACKS==, see [[#LoKiCutsHASTRACKS][HASTRACKS]] ---+++ ==TRACKSINTREE== It is an alias for ==HASTRACKSINTREE==, see [[#LoKiCutsHASTRACKSINTREE][HASTRACKSINTREE]] ---+++ ==TRCHI2==, the instance of =LoKi::Particles::TrackChi2()=, The function returns =LHCb::Track::chi2= for the underlying track: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // get only good tracks with small chi2: Range good = select ( "good" , HASTRACK && 100 > TRCHI2 ) ; %ENDSYNTAX% ---+++ ==TRCHI2DOF==, the instance of =LoKi::Particles::TrackChi2PerDoF()=, The function returns =LHCb::Track::chi2PerDoF= for the underlying track: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // get only good tracks with small chi2: Range good = select ( "good" , HASTRACK && 3 > TRCHI2DOF ) ; %ENDSYNTAX% ---+++ ==TRHISTORY==, the instance of =LoKi::Particles::TrackHistory()=, The function returns =LHCb::Track::history= for the underlying track: ---+++ ==TRHISTORYFIT==, the instance of =LoKi::Particles::TrackHistoryFit()=, The function returns =LHCb::Track::historyFit= for the underlying track: ---+++ ==TRSTATUS==, the instance of =LoKi::Particles::TrackStatus()=, The function returns =LHCb::Track::status= for the underlying track: ---+++ ==TRTYPE==, the instance of =LoKi::Particles::TrackType()=, The function returns =LHCb::Track::type= for th eunderlying track: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% // get only long tracks: Range good = select ( "long" , HASTRACK && LHCb::Track::Long == TRTYPE ) ; %ENDSYNTAX% #LoKiCutsTSIGND ---+++ ==TSIGND==, C++ type =LoKi::Particles::TimeSignedDistance=, The function evaluates the proper lifetime <latex>c\tau</latex> of the particle between "end-vertex" and some reference vertex or 3D-point. The function =LoKi::Particles::VertexSignedDistance= is used for evaluation of geometry distance. %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::VertexBase* primary ; Fun fun = TSIGND ( primary ) ) const LHCb::Particle* B = ... ; const bool ctau = fun ( B ) ; %ENDSYNTAX% #LoKiCutsTDOT ---+++ ==TDOT==, C++ type =LoKi::Particles::TimeDotDistance=, The function evaluates the proper lifetime <latex>c\tau</latex> of the particle between "end-vertex" and some reference vertex or 3D-point along the particle momentum. The function =LoKi::Particles::VertexDotDistance= is used for evaluation of geometry distance. %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::VertexBase* primary ; Fun fun = TDOTD ( primary ) ) const LHCb::Particle* B = ... ; const bool ctau = fun ( B ) ; %ENDSYNTAX% #LoKiCutsVALID ---+++ ==VALID==, the instance of =LoKi::Valid<const LHCb::Particle*>()= The trivial predicate which checks the validity of the argument: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const std::vector<const LHCb::Particle*>& p = ... ; // check for invalid pointers: if ( std::find_if ( p.begin() , p.end() , !VALID ) != p.end() ) { ... there are null pointers ... } %ENDSYNTAX% #LoKiCutsVD ---+++ ==VD==, C++ type =LoKi::Particles::VertexDistance= The simple function which evaluates the geometrical 3D-distance between _the end-vertex_ of the particle, <latex>\vec{v}</latex>, and some reference _vertex_ or 3D-point, <latex>\vec{v}^0</latex>, as <latex>\left| \vec{v} - \vec{v}^0 \right|</latex>: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::VertexBase* primary = ... ; Fun vd = VD ( primary ) ; const LHCb::Particle* B = ... ; const double dist = vd ( B ) ; %ENDSYNTAX% #LoKiCutsVDCHI2 ---+++ ==VDCHI2==, C++ type =LoKi::Particles::VertexChi2Distance= The simple function which evaluates the geometrical distance between _the end-vertex_ of the particle,<latex>\vec{v}</latex>, and some reference _vertex_ or 3D-point, <latex>\vec{v}^0</latex>, in <latex>\chi^2</latex> units: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::VertexBase* primary = ... ; Fun chi2d = VDCHI2 ( primary ) ; const LHCb::Particle* B = ... ; const double chi2 = chi2d ( B ) ; %ENDSYNTAX% #LoKiCutsVDDOT ---+++ ==VDDOT==, C++ type =LoKi::Particles::VertexDotDistance= The simple function which evaluates the distance between _the end-vertex_ of the particle,<latex>\vec{v}</latex>, and some reference _vertex_ or 3D-point, <latex>\vec{v}^0</latex>, along the particle momentum <latex>\frac{ \left( \vec{v} - \vec{v}^0 \right)\cdot \vec{p} } { \vec{p}^2}</latex>: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::VertexBase* primary = ... ; Fun vd = VDDOT ( primary ) ; const LHCb::Particle* B = ... ; const double dist = vd ( B ) ; %ENDSYNTAX% #LoKiCutsVDMIN ---+++ ==VDMIN==, C++ type =LoKi::Particles::MinVertexDistance= The function which evaluates the minimal distance between _the end-vertex_ of the particle,<latex>\vec{v}</latex>, and the set of the reference _vertices_ or 3D-points: <latex>\min_i \left| \vec{v} - \vec{v}^0_i \right| </latex>: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% CONTAINER primaries = ... ; Fun fun = VDMIN ( primaries ) ; const LHCb::Particle* B = ... ; const double vdMin = fun ( B ) ; %ENDSYNTAX% #LoKiCutsVDMINCHI2 ---+++ ==VDMINCHI2==, C++ type =LoKi::Particles::MinVertexDistance= The function which evaluates the minimal <latex>\chi^2</latex>-distance between _the end-vertex_ of the particle,<latex>\vec{v}</latex>, and the set of the reference _vertices_ or 3D-points: <latex>\min_i \chi^2_i</latex>: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% CONTAINER primaries = ... ; Fun fun = VDMINCHI2( primaries ) ; const LHCb::Particle* B = ... ; const double minChi2 = fun ( B ) ; %ENDSYNTAX% #LoKiCutsVDSIGN ---+++ ==VDSIGN==, C++ type =LoKi::Particles::VertexSignedDistance= The simple function which evaluates _the signed_ geometrical 3D-distance between _the end-vertex_ of the particle ,<latex>\vec{v}</latex>, and some reference _vertex_ or 3D-point, <latex>\vec{v}^0</latex>, the distance is signed according to the sign of <latex>v_z-v^0_z</latex>: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::VertexBase* primary = ... ; Fun vd = VDSIGN ( primary ) ; const LHCb::Particle* B = ... ; const double dist = vd ( B ) ; %ENDSYNTAX% #LoKiCutsVFASPF ---+++ ==VFASPF==, C++ type =LoKi::Particles::VFunAsPFun= The adapter function, which applies _the vertex function_ to _the end vertex_ of the given particle: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% CONTAINER primaries = ... ; // get long lived particles with v_z > 20 * cm Range londLived = select ( "LongLived" , 20 * cm < VFASPF( VZ ) ) ; %ENDSYNTAX% ---+++ ==VFUNASPFUN== It is an alias for ==VFASPF==, see [[#LoKiCutsVFASPF][VFASPF]] ---+++ ==W== It is an alias for ==WEIGHT==, see [[#LoKiCutsWEIGHT][WEIGHT]] #LoKiCutsWEIGHT ---+++ ==WEIGHT==, the instance of =LoKi::Particles::Weight()= The simple function which returns _the weight_ of the particle, =LHCb::Particle::weight=: %SYNTAX{ syntax="cpp" numbered="1000" numstep="10" }% const LHCb::Particle* p = ... ; const double weight = WEIGHT ( p ) ; %ENDSYNTAX% #LoKiCutsZERO ---+++ ==ZERO==, the instance of =LoKi::Constant<const LHCb::Particle*>(0)= The most trivial function which always returns =0= --- -- [[Main.VanyaBelyaev][Vanya BELYAEV]] - 17 Jul 2007
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r13
<
r12
<
r11
<
r10
<
r9
|
B
acklinks
|
V
iew topic
|
WYSIWYG
|
M
ore topic actions
Topic revision: r13 - 2018-12-19
-
unknown
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