1#ifndef PROJECTIONS_ALICECOMMON_HH
2#define PROJECTIONS_ALICECOMMON_HH
3#include "Rivet/Tools/AliceCommon.hh"
4#include "Rivet/Projections/FinalState.hh"
5#include "Rivet/Projections/SingleValueProjection.hh"
6#include "Rivet/Projections/TriggerProjection.hh"
7#include "Rivet/Projections/PrimaryParticles.hh"
25 setName(MODE<0 ?
"ALICE::V0CMultiplicity":
26 MODE>0 ?
"ALICE::V0AMultiplicity":
27 "ALICE::V0MMultiplicity");
36 this->
declare(fs,
"FinalState");
49 set(apply<FinalState>(e,
"FinalState").particles().size());
55 virtual std::unique_ptr<Rivet::Projection>
clone()
const {
60 using Projection::operator =;
67 CmpState::EQ : CmpState::NEQ;
103 setName(
"ALICE::CLMultiplicity");
111 this->
declare(fs,
"FinalState");
124 set(apply<FinalState>(e,
"FinalState").particles().size());
130 virtual std::unique_ptr<Rivet::Projection>
clone()
const {
135 using Projection::operator =;
142 CmpState::EQ : CmpState::NEQ;
178 this->
declare(fs,
"FinalState");
196 virtual std::unique_ptr<Rivet::Projection>
clone()
const {
201 using Projection::operator =;
211 CmpState::EQ : CmpState::NEQ;
255 if (apply<V0ATrigger>(e,
"V0A")() && apply<V0CTrigger>(e,
"V0C")())
pass();
264 CmpState::EQ : CmpState::NEQ;
270 virtual std::unique_ptr<Rivet::Projection>
clone()
const {
271 return std::unique_ptr<Projection>(
new V0AndTrigger(*
this));
275 using Projection::operator =;
302 if (_cuts != o->_cuts)
return CmpState::NEQ;
303 return mkPCmp(*o,
"PrimaryParticles");
307 virtual std::unique_ptr<Rivet::Projection>
clone()
const {
312 using Projection::operator =;
331 const int pdg = abs(
p->pdg_id());
333 if (pdg > 1000000000)
return true;
336 case Rivet::PID::MUON:
337 case Rivet::PID::ELECTRON:
338 case Rivet::PID::GAMMA:
339 case Rivet::PID::PIPLUS:
340 case Rivet::PID::KPLUS:
341 case Rivet::PID::K0S:
342 case Rivet::PID::K0L:
343 case Rivet::PID::PROTON:
344 case Rivet::PID::NEUTRON:
345 case Rivet::PID::LAMBDA:
346 case Rivet::PID::SIGMAMINUS:
347 case Rivet::PID::SIGMAPLUS:
348 case Rivet::PID::XIMINUS:
349 case Rivet::PID::XI0:
350 case Rivet::PID::OMEGAMINUS:
351 case Rivet::PID::NU_E:
352 case Rivet::PID::NU_MU:
353 case Rivet::PID::NU_TAU:
Definition AliceCommon.hh:98
virtual CmpState compare(const Projection &p) const
Definition AliceCommon.hh:140
virtual ~CLMultiplicity()
Destructor.
Definition AliceCommon.hh:115
virtual std::unique_ptr< Rivet::Projection > clone() const
Definition AliceCommon.hh:130
CLMultiplicity()
Constructor.
Definition AliceCommon.hh:102
virtual void project(const Event &e)
Definition AliceCommon.hh:122
Standard ALICE primary particle definition.
Definition AliceCommon.hh:286
virtual CmpState compare(const Projection &p) const
Definition AliceCommon.hh:300
virtual std::unique_ptr< Rivet::Projection > clone() const
Clone this projection.
Definition AliceCommon.hh:307
bool isPrimaryPID(ConstGenParticlePtr p) const
Definition AliceCommon.hh:330
Trigger projection for the ALICE V0-AND (a.k.a. CINT7) requirement.
Definition AliceCommon.hh:235
virtual CmpState compare(const Projection &p) const
Definition AliceCommon.hh:261
virtual std::unique_ptr< Rivet::Projection > clone() const
Definition AliceCommon.hh:270
virtual ~V0AndTrigger()
Destructor.
Definition AliceCommon.hh:247
V0AndTrigger()
Constructor.
Definition AliceCommon.hh:239
virtual void project(const Event &e)
Definition AliceCommon.hh:253
Definition AliceCommon.hh:22
virtual ~V0Multiplicity()
Destructor.
Definition AliceCommon.hh:40
virtual CmpState compare(const Projection &p) const
Definition AliceCommon.hh:65
virtual void project(const Event &e)
Definition AliceCommon.hh:47
virtual std::unique_ptr< Rivet::Projection > clone() const
Definition AliceCommon.hh:55
Definition AliceCommon.hh:168
virtual CmpState compare(const Projection &p) const
Definition AliceCommon.hh:209
V0Trigger()
Constructor.
Definition AliceCommon.hh:172
virtual void project(const Event &e)
Definition AliceCommon.hh:188
virtual std::unique_ptr< Rivet::Projection > clone() const
Definition AliceCommon.hh:196
virtual ~V0Trigger()
Destructor.
Definition AliceCommon.hh:182
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:19
const PROJ & declare(const PROJ &proj, const std::string &name)
Register a contained projection (user-facing version)
Definition ProjectionApplier.hh:170
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 (user-facing alias).
Definition ProjectionApplier.hh:89
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:142
Base class for projections returning a single floating point value.
Definition SingleValueProjection.hh:17
void set(double v)
Definition SingleValueProjection.hh:55
SingleValueProjection()
The default constructor.
Definition SingleValueProjection.hh:21
void clear()
Unset the value.
Definition SingleValueProjection.hh:58
Base class for projections returning a bool corresponding to a trigger.
Definition TriggerProjection.hh:17
void fail()
Indicate that the event has failed the trigger.
Definition TriggerProjection.hh:56
void pass()
Indicate that the event has passed the trigger.
Definition TriggerProjection.hh:46
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:684
V0Multiplicity< 0 > V0MMultiplicity
Definition AliceCommon.hh:86
V0Multiplicity<-1 > V0CMultiplicity
Definition AliceCommon.hh:81
V0Multiplicity<+1 > V0AMultiplicity
Definition AliceCommon.hh:76
CLMultiplicity< false > CL1Multiplicity
Definition AliceCommon.hh:156
CLMultiplicity< true > CL0Multiplicity
Definition AliceCommon.hh:151
const Cut & open()
Fully open cut singleton, accepts everything.
Definition MC_Cent_pPb.hh:10