1#ifndef PROJECTIONS_ALICECOMMON_HH
2#define PROJECTIONS_ALICECOMMON_HH
4#include "Rivet/Projections/FinalState.hh"
5#include "Rivet/Projections/PrimaryParticles.hh"
6#include "Rivet/Projections/SingleValueProjection.hh"
7#include "Rivet/Projections/TriggerProjection.hh"
8#include "Rivet/Tools/AliceCommon.hh"
26 using SingleValueProjection::operator=;
29 setName(MODE < 0 ?
"ALICE::V0CMultiplicity"
30 : MODE > 0 ?
"ALICE::V0AMultiplicity"
31 :
"ALICE::V0MMultiplicity");
43 this->
declare(fs,
"FinalState");
62 virtual std::unique_ptr<Rivet::Projection>
clone()
const {
63 return std::unique_ptr<Projection>(
new V0Multiplicity<MODE>(*
this));
67 using Projection::operator=;
73 return dynamic_cast<const V0Multiplicity<MODE>*
>(&
p) ? CmpState::EQ : CmpState::NEQ;
101 template <
bool INNER>
108 setName(
"ALICE::CLMultiplicity");
118 this->
declare(fs,
"FinalState");
137 virtual std::unique_ptr<Rivet::Projection>
clone()
const {
142 using Projection::operator=;
183 this->
declare(fs,
"FinalState");
201 virtual std::unique_ptr<Rivet::Projection>
clone()
const {
206 using Projection::operator=;
215 return dynamic_cast<const V0Trigger<MODE>*
>(&
p) ? CmpState::EQ : CmpState::NEQ;
265 return dynamic_cast<const V0AndTrigger*
>(&
p) ? CmpState::EQ : CmpState::NEQ;
271 virtual std::unique_ptr<Rivet::Projection>
clone()
const {
272 return std::unique_ptr<Projection>(
new V0AndTrigger(*
this));
276 using Projection::operator=;
300 const PrimaryParticles* o =
dynamic_cast<const PrimaryParticles*
>(&
p);
301 if (_cuts != o->_cuts)
return CmpState::NEQ;
302 return mkPCmp(*o,
"PrimaryParticles");
306 virtual std::unique_ptr<Rivet::Projection>
clone()
const {
307 return std::unique_ptr<Projection>(
new PrimaryParticles(*
this));
311 using Projection::operator=;
330 const int pdg = abs(
p->pdg_id());
332 if (pdg > 1000000000)
return true;
335 case Rivet::PID::MUON:
336 case Rivet::PID::ELECTRON:
337 case Rivet::PID::GAMMA:
338 case Rivet::PID::PIPLUS:
339 case Rivet::PID::KPLUS:
340 case Rivet::PID::K0S:
341 case Rivet::PID::K0L:
342 case Rivet::PID::PROTON:
343 case Rivet::PID::NEUTRON:
344 case Rivet::PID::LAMBDA:
345 case Rivet::PID::SIGMAMINUS:
346 case Rivet::PID::SIGMAPLUS:
347 case Rivet::PID::XIMINUS:
348 case Rivet::PID::XI0:
349 case Rivet::PID::OMEGAMINUS:
350 case Rivet::PID::NU_E:
351 case Rivet::PID::NU_MU:
352 case Rivet::PID::NU_TAU:
return true;
Definition AliceCommon.hh:102
virtual CmpState compare(const Projection &p) const
Definition AliceCommon.hh:147
virtual ~CLMultiplicity()
Destructor.
Definition AliceCommon.hh:122
virtual std::unique_ptr< Rivet::Projection > clone() const
Definition AliceCommon.hh:137
CLMultiplicity()
Constructor.
Definition AliceCommon.hh:106
virtual void project(const Event &e)
Definition AliceCommon.hh:129
virtual CmpState compare(const Projection &p) const
Definition AliceCommon.hh:299
virtual std::unique_ptr< Rivet::Projection > clone() const
Clone this projection.
Definition AliceCommon.hh:306
bool isPrimaryPID(ConstGenParticlePtr p) const
Definition AliceCommon.hh:329
virtual CmpState compare(const Projection &p) const
Definition AliceCommon.hh:264
virtual std::unique_ptr< Rivet::Projection > clone() const
Definition AliceCommon.hh:271
virtual ~V0AndTrigger()
Destructor.
Definition AliceCommon.hh:250
V0AndTrigger()
Constructor.
Definition AliceCommon.hh:241
virtual void project(const Event &e)
Definition AliceCommon.hh:256
Definition AliceCommon.hh:23
virtual ~V0Multiplicity()
Destructor.
Definition AliceCommon.hh:47
virtual CmpState compare(const Projection &p) const
Definition AliceCommon.hh:72
virtual void project(const Event &e)
Definition AliceCommon.hh:54
virtual std::unique_ptr< Rivet::Projection > clone() const
Definition AliceCommon.hh:62
Definition AliceCommon.hh:172
virtual CmpState compare(const Projection &p) const
Definition AliceCommon.hh:214
V0Trigger()
Constructor.
Definition AliceCommon.hh:176
virtual void project(const Event &e)
Definition AliceCommon.hh:193
virtual std::unique_ptr< Rivet::Projection > clone() const
Definition AliceCommon.hh:201
virtual ~V0Trigger()
Destructor.
Definition AliceCommon.hh:187
Project out all final-state particles in an event. Probably the most important projection in Rivet!
Definition FinalState.hh:12
Project out primary particles according to definition.
Definition PrimaryParticles.hh:18
std::enable_if_t< std::is_base_of< Projection, PROJ >::value, const PROJ & > apply(const Event &evt, const Projection &proj) const
Definition ProjectionApplier.hh:124
const PROJ & declare(const PROJ &proj, const std::string &name) const
Register a contained projection (user-facing version).
Definition ProjectionApplier.hh:205
Projection()
The default constructor.
friend class Event
Event is a friend.
Definition Projection.hh:33
Cmp< Projection > mkPCmp(const Projection &otherparent, const std::string &pname) const
void setName(const std::string &name)
Used by derived classes to set their name.
Definition Projection.hh:146
void setValue(double v)
Set the value.
Definition SingleValueProjection.hh:49
SingleValueProjection()
The default constructor.
Definition SingleValueProjection.hh:21
void clear()
Unset the value.
Definition SingleValueProjection.hh:55
void fail()
Indicate that the event has failed the trigger.
Definition TriggerProjection.hh:58
TriggerProjection()
The default constructor.
Definition TriggerProjection.hh:22
void pass()
Indicate that the event has passed the trigger.
Definition TriggerProjection.hh:48
const Cut V0Cacceptance
Definition AliceCommon.hh:29
const Cut CL1acceptance
Definition AliceCommon.hh:41
const Cut CL0acceptance
Definition AliceCommon.hh:35
const Cut V0Aacceptance
Definition AliceCommon.hh:23
double p(const ParticleBase &p)
Unbound function access to p.
Definition ParticleBaseUtils.hh:819
Definition AliceCommon.hh:11
V0Multiplicity< 0 > V0MMultiplicity
Definition AliceCommon.hh:91
V0Trigger<-1 > V0ATrigger
Definition AliceCommon.hh:223
V0Trigger< 0 > V0OrTrigger
Definition AliceCommon.hh:233
V0Multiplicity<-1 > V0CMultiplicity
Definition AliceCommon.hh:86
V0Multiplicity<+1 > V0AMultiplicity
Definition AliceCommon.hh:81
CLMultiplicity< false > CL1Multiplicity
Definition AliceCommon.hh:161
CLMultiplicity< true > CL0Multiplicity
Definition AliceCommon.hh:156
V0Trigger<+1 > V0CTrigger
Definition AliceCommon.hh:228
const Cut & open()
Fully open cut singleton, accepts everything.
Definition LHCbCommon.hh:9