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"
24 using SingleValueProjection::operator=;
26 setName(MODE<0 ?
"ALICE::V0CMultiplicity":
27 MODE>0 ?
"ALICE::V0AMultiplicity":
28 "ALICE::V0MMultiplicity");
37 this->
declare(fs,
"FinalState");
50 setValue(apply<FinalState>(e,
"FinalState").particles().size());
56 virtual std::unique_ptr<Rivet::Projection>
clone()
const {
61 using Projection::operator =;
68 CmpState::EQ : CmpState::NEQ;
104 setName(
"ALICE::CLMultiplicity");
112 this->
declare(fs,
"FinalState");
125 set(apply<FinalState>(e,
"FinalState").particles().size());
131 virtual std::unique_ptr<Rivet::Projection>
clone()
const {
136 using Projection::operator =;
143 CmpState::EQ : CmpState::NEQ;
179 this->
declare(fs,
"FinalState");
197 virtual std::unique_ptr<Rivet::Projection>
clone()
const {
202 using Projection::operator =;
212 CmpState::EQ : CmpState::NEQ;
256 if (apply<V0ATrigger>(e,
"V0A")() && apply<V0CTrigger>(e,
"V0C")())
pass();
265 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 =;
303 if (_cuts != o->_cuts)
return CmpState::NEQ;
304 return mkPCmp(*o,
"PrimaryParticles");
308 virtual std::unique_ptr<Rivet::Projection>
clone()
const {
313 using Projection::operator =;
332 const int pdg = abs(p->pdg_id());
334 if (pdg > 1000000000)
return true;
337 case Rivet::PID::MUON:
338 case Rivet::PID::ELECTRON:
339 case Rivet::PID::GAMMA:
340 case Rivet::PID::PIPLUS:
341 case Rivet::PID::KPLUS:
342 case Rivet::PID::K0S:
343 case Rivet::PID::K0L:
344 case Rivet::PID::PROTON:
345 case Rivet::PID::NEUTRON:
346 case Rivet::PID::LAMBDA:
347 case Rivet::PID::SIGMAMINUS:
348 case Rivet::PID::SIGMAPLUS:
349 case Rivet::PID::XIMINUS:
350 case Rivet::PID::XI0:
351 case Rivet::PID::OMEGAMINUS:
352 case Rivet::PID::NU_E:
353 case Rivet::PID::NU_MU:
354 case Rivet::PID::NU_TAU:
Definition AliceCommon.hh:99
virtual CmpState compare(const Projection &p) const
Definition AliceCommon.hh:141
virtual ~CLMultiplicity()
Destructor.
Definition AliceCommon.hh:116
virtual std::unique_ptr< Rivet::Projection > clone() const
Definition AliceCommon.hh:131
CLMultiplicity()
Constructor.
Definition AliceCommon.hh:103
virtual void project(const Event &e)
Definition AliceCommon.hh:123
Standard ALICE primary particle definition.
Definition AliceCommon.hh:287
virtual CmpState compare(const Projection &p) const
Definition AliceCommon.hh:301
virtual std::unique_ptr< Rivet::Projection > clone() const
Clone this projection.
Definition AliceCommon.hh:308
bool isPrimaryPID(ConstGenParticlePtr p) const
Definition AliceCommon.hh:331
Trigger projection for the ALICE V0-AND (a.k.a. CINT7) requirement.
Definition AliceCommon.hh:236
virtual CmpState compare(const Projection &p) const
Definition AliceCommon.hh:262
virtual std::unique_ptr< Rivet::Projection > clone() const
Definition AliceCommon.hh:271
virtual ~V0AndTrigger()
Destructor.
Definition AliceCommon.hh:248
V0AndTrigger()
Constructor.
Definition AliceCommon.hh:240
virtual void project(const Event &e)
Definition AliceCommon.hh:254
Definition AliceCommon.hh:22
virtual ~V0Multiplicity()
Destructor.
Definition AliceCommon.hh:41
virtual CmpState compare(const Projection &p) const
Definition AliceCommon.hh:66
virtual void project(const Event &e)
Definition AliceCommon.hh:48
virtual std::unique_ptr< Rivet::Projection > clone() const
Definition AliceCommon.hh:56
Definition AliceCommon.hh:169
virtual CmpState compare(const Projection &p) const
Definition AliceCommon.hh:210
V0Trigger()
Constructor.
Definition AliceCommon.hh:173
virtual void project(const Event &e)
Definition AliceCommon.hh:189
virtual std::unique_ptr< Rivet::Projection > clone() const
Definition AliceCommon.hh:197
virtual ~V0Trigger()
Destructor.
Definition AliceCommon.hh:183
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
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:87
V0Multiplicity<-1 > V0CMultiplicity
Definition AliceCommon.hh:82
V0Multiplicity<+1 > V0AMultiplicity
Definition AliceCommon.hh:77
CLMultiplicity< false > CL1Multiplicity
Definition AliceCommon.hh:157
CLMultiplicity< true > CL0Multiplicity
Definition AliceCommon.hh:152
const Cut & open()
Fully open cut singleton, accepts everything.
Definition MC_CENT_PPB_Projections.hh:10