1#ifndef PROJECTIONS_ALICECOMMON_HH
2#define PROJECTIONS_ALICECOMMON_HH
4#include "Rivet/Tools/AliceCommon.hh"
5#include "Rivet/Projections/FinalState.hh"
6#include "Rivet/Projections/SingleValueProjection.hh"
7#include "Rivet/Projections/TriggerProjection.hh"
8#include "Rivet/Projections/PrimaryParticles.hh"
25 using SingleValueProjection::operator=;
27 setName(MODE<0 ?
"ALICE::V0CMultiplicity":
28 MODE>0 ?
"ALICE::V0AMultiplicity":
29 "ALICE::V0MMultiplicity");
38 this->
declare(fs,
"FinalState");
57 virtual std::unique_ptr<Rivet::Projection>
clone()
const {
58 return std::unique_ptr<Projection>(
new V0Multiplicity<MODE>(*
this));
62 using Projection::operator =;
68 return dynamic_cast<const V0Multiplicity<MODE>*
>(&
p) ?
69 CmpState::EQ : CmpState::NEQ;
105 setName(
"ALICE::CLMultiplicity");
113 this->
declare(fs,
"FinalState");
132 virtual std::unique_ptr<Rivet::Projection>
clone()
const {
137 using Projection::operator =;
144 CmpState::EQ : CmpState::NEQ;
180 this->
declare(fs,
"FinalState");
198 virtual std::unique_ptr<Rivet::Projection>
clone()
const {
203 using Projection::operator =;
213 CmpState::EQ : CmpState::NEQ;
266 CmpState::EQ : CmpState::NEQ;
272 virtual std::unique_ptr<Rivet::Projection>
clone()
const {
273 return std::unique_ptr<Projection>(
new V0AndTrigger(*
this));
277 using Projection::operator =;
303 const PrimaryParticles* o =
dynamic_cast<const PrimaryParticles*
>(&
p);
304 if (_cuts != o->_cuts)
return CmpState::NEQ;
305 return mkPCmp(*o,
"PrimaryParticles");
309 virtual std::unique_ptr<Rivet::Projection>
clone()
const {
310 return std::unique_ptr<Projection>(
new PrimaryParticles(*
this));
314 using Projection::operator =;
333 const int pdg = abs(
p->pdg_id());
335 if (pdg > 1000000000)
return true;
338 case Rivet::PID::MUON:
339 case Rivet::PID::ELECTRON:
340 case Rivet::PID::GAMMA:
341 case Rivet::PID::PIPLUS:
342 case Rivet::PID::KPLUS:
343 case Rivet::PID::K0S:
344 case Rivet::PID::K0L:
345 case Rivet::PID::PROTON:
346 case Rivet::PID::NEUTRON:
347 case Rivet::PID::LAMBDA:
348 case Rivet::PID::SIGMAMINUS:
349 case Rivet::PID::SIGMAPLUS:
350 case Rivet::PID::XIMINUS:
351 case Rivet::PID::XI0:
352 case Rivet::PID::OMEGAMINUS:
353 case Rivet::PID::NU_E:
354 case Rivet::PID::NU_MU:
355 case Rivet::PID::NU_TAU:
Definition AliceCommon.hh:100
virtual CmpState compare(const Projection &p) const
Definition AliceCommon.hh:142
virtual ~CLMultiplicity()
Destructor.
Definition AliceCommon.hh:117
virtual std::unique_ptr< Rivet::Projection > clone() const
Definition AliceCommon.hh:132
CLMultiplicity()
Constructor.
Definition AliceCommon.hh:104
virtual void project(const Event &e)
Definition AliceCommon.hh:124
virtual CmpState compare(const Projection &p) const
Definition AliceCommon.hh:302
virtual std::unique_ptr< Rivet::Projection > clone() const
Clone this projection.
Definition AliceCommon.hh:309
bool isPrimaryPID(ConstGenParticlePtr p) const
Definition AliceCommon.hh:332
virtual CmpState compare(const Projection &p) const
Definition AliceCommon.hh:263
virtual std::unique_ptr< Rivet::Projection > clone() const
Definition AliceCommon.hh:272
virtual ~V0AndTrigger()
Destructor.
Definition AliceCommon.hh:249
V0AndTrigger()
Constructor.
Definition AliceCommon.hh:241
virtual void project(const Event &e)
Definition AliceCommon.hh:255
Definition AliceCommon.hh:23
virtual ~V0Multiplicity()
Destructor.
Definition AliceCommon.hh:42
virtual CmpState compare(const Projection &p) const
Definition AliceCommon.hh:67
virtual void project(const Event &e)
Definition AliceCommon.hh:49
virtual std::unique_ptr< Rivet::Projection > clone() const
Definition AliceCommon.hh:57
Definition AliceCommon.hh:170
virtual CmpState compare(const Projection &p) const
Definition AliceCommon.hh:211
V0Trigger()
Constructor.
Definition AliceCommon.hh:174
virtual void project(const Event &e)
Definition AliceCommon.hh:190
virtual std::unique_ptr< Rivet::Projection > clone() const
Definition AliceCommon.hh:198
virtual ~V0Trigger()
Destructor.
Definition AliceCommon.hh:184
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:119
const PROJ & declare(const PROJ &proj, const std::string &name) const
Register a contained projection (user-facing version).
Definition ProjectionApplier.hh:184
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:148
void setValue(double v)
Set the value.
Definition SingleValueProjection.hh:48
SingleValueProjection()
The default constructor.
Definition SingleValueProjection.hh:21
void clear()
Unset the value.
Definition SingleValueProjection.hh:54
void fail()
Indicate that the event has failed the trigger.
Definition TriggerProjection.hh:57
TriggerProjection()
The default constructor.
Definition TriggerProjection.hh:22
void pass()
Indicate that the event has passed the trigger.
Definition TriggerProjection.hh:47
const Cut V0Cacceptance
Definition AliceCommon.hh:30
const Cut CL1acceptance
Definition AliceCommon.hh:42
const Cut CL0acceptance
Definition AliceCommon.hh:36
const Cut V0Aacceptance
Definition AliceCommon.hh:24
double p(const ParticleBase &p)
Unbound function access to p.
Definition ParticleBaseUtils.hh:653
Definition AliceCommon.hh:11
V0Multiplicity< 0 > V0MMultiplicity
Definition AliceCommon.hh:88
V0Trigger<-1 > V0ATrigger
Definition AliceCommon.hh:222
V0Trigger< 0 > V0OrTrigger
Definition AliceCommon.hh:232
V0Multiplicity<-1 > V0CMultiplicity
Definition AliceCommon.hh:83
V0Multiplicity<+1 > V0AMultiplicity
Definition AliceCommon.hh:78
CLMultiplicity< false > CL1Multiplicity
Definition AliceCommon.hh:158
CLMultiplicity< true > CL0Multiplicity
Definition AliceCommon.hh:153
V0Trigger<+1 > V0CTrigger
Definition AliceCommon.hh:227
const Cut & open()
Fully open cut singleton, accepts everything.
Definition MC_CENT_PPB_Projections.hh:10