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");
51 setValue(apply<FinalState>(e,
"FinalState").particles().size());
57 virtual std::unique_ptr<Rivet::Projection>
clone()
const {
62 using Projection::operator =;
69 CmpState::EQ : CmpState::NEQ;
105 setName(
"ALICE::CLMultiplicity");
113 this->
declare(fs,
"FinalState");
126 set(apply<FinalState>(e,
"FinalState").particles().size());
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;
257 if (apply<V0ATrigger>(e,
"V0A")() && apply<V0CTrigger>(e,
"V0C")())
pass();
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 =;
304 if (_cuts != o->_cuts)
return CmpState::NEQ;
305 return mkPCmp(*o,
"PrimaryParticles");
309 virtual std::unique_ptr<Rivet::Projection>
clone()
const {
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
Standard ALICE primary particle definition.
Definition AliceCommon.hh:288
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
Trigger projection for the ALICE V0-AND (a.k.a. CINT7) requirement.
Definition AliceCommon.hh:237
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
Representation of a HepMC event, and enabler of Projection caching.
Definition Event.hh:22
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
Apply the supplied projection on event evt.
Definition ProjectionApplier.hh:110
const PROJ & declare(const PROJ &proj, const std::string &name) const
Register a contained projection (user-facing version)
Definition ProjectionApplier.hh:175
Base class for all Rivet projections.
Definition Projection.hh:29
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
Base class for projections returning a single floating point value.
Definition SingleValueProjection.hh:17
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
Base class for projections returning a bool corresponding to a trigger.
Definition TriggerProjection.hh:18
void fail()
Indicate that the event has failed the trigger.
Definition TriggerProjection.hh:57
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
V0Multiplicity< 0 > V0MMultiplicity
Definition AliceCommon.hh:88
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
const Cut & open()
Fully open cut singleton, accepts everything.
Definition MC_CENT_PPB_Projections.hh:10