rivet is hosted by Hepforge, IPPP Durham
Rivet  2.7.0
AtlasCommon.hh
1 // -*- C++ -*-
2 #ifndef RIVET_ATLAS_COMMON_HH
3 #define RIVET_ATLAS_COMMON_HH
4 
5 #include "Rivet/Projections/FinalState.hh"
6 #include "Rivet/Projections/ChargedFinalState.hh"
7 #include "Rivet/Projections/SingleValueProjection.hh"
8 #include "Rivet/Projections/TriggerProjection.hh"
9 
10 namespace Rivet {
12 
13  namespace ATLAS {
16 
17 public:
18 
21  declare(FinalState(Cuts::eta < -3.2 && Cuts::eta > -4.9 && Cuts::pT > 0.1*GeV),
22  "SumET_PB_Centrality");
23  }
24 
27 
28 protected:
29 
31  void project(const Event& e) {
32  clear();
33  const FinalState & fsfwd =
34  apply<FinalState>(e, "SumET_PB_Centrality");
35  double estimate = 0.0;
36  for ( const Particle & p : fsfwd.particles() ) {
37  estimate += p.Et();
38  }
39  set(estimate);
40  }
41 
43  int compare(const Projection& p) const {
44  return mkNamedPCmp(p, "SumET_PB_Centrality");
45  }
46 
47 };
48 
51 
52 public:
53 
56  declare(FinalState(Cuts::abseta > 3.2 && Cuts::abseta < 4.9 && Cuts::pT > 0.1*GeV),
57  "SumET_PBPB_Centrality");
58  }
59 
62 
63 protected:
64 
66  void project(const Event& e) {
67  clear();
68  const FinalState & fsfwd =
69  apply<FinalState>(e, "SumET_PBPB_Centrality");
70  double estimate = 0.0;
71  for ( const Particle & p : fsfwd.particles() ) {
72  estimate += p.Et();
73  }
74  set(estimate);
75  }
76 
78  int compare(const Projection& p) const {
79  return mkNamedPCmp(p, "SumET_PBPB_Centrality");
80  }
81 
82 };
83 
86 
87 public:
88 
91  declare(ChargedFinalState(Cuts::eta > 2.09 && Cuts::eta < 3.84 &&
92  Cuts::pT > 0.1*GeV), "MBB");
93  declare(ChargedFinalState(Cuts::eta < -2.09 && Cuts::eta > -3.84 &&
94  Cuts::pT > 0.1*GeV), "MBF");
95  }
96 
99 
100 protected:
101 
103  void project(const Event& event) {
104  pass();
105  if ( applyProjection<FinalState>(event,"MBF").particles().empty() ||
106  applyProjection<FinalState>(event,"MBB").particles().empty() )
107  fail();
108  }
109 
111  int compare(const Projection& p) const {
112  return mkNamedPCmp(p, "MBF") || mkNamedPCmp(p, "MBB");
113  }
114 
115 };
116 
117 }
118 }
119 
120 #endif
Centrality projection for PbPb collisions (two sided)
Definition: AtlasCommon.hh:50
Definition: ALICE_2010_I880049.cc:13
int compare(const Projection &p) const
Compare projections.
Definition: AtlasCommon.hh:111
SumET_PBPB_Centrality()
Constructor.
Definition: AtlasCommon.hh:55
void project(const Event &event)
Perform the projection on the Event.
Definition: AtlasCommon.hh:103
Base class for projections returning a single floating point value.
Definition: SingleValueProjection.hh:18
virtual const Particles & particles() const
Get the particles in no particular order, with no cuts.
Definition: ParticleFinder.hh:49
std::vector< GenParticle const * > particles(const GenEvent *ge)
Definition: RivetHepMC.hh:36
Particle representation, either from a HepMC::GenEvent or reconstructed.
Definition: Particle.hh:18
SumET_PB_Centrality()
Constructor.
Definition: AtlasCommon.hh:20
Definition: Event.hh:22
ATLAS min bias trigger conditions.
Definition: AtlasCommon.hh:85
Base class for projections returning a bool corresponding to a trigger.
Definition: TriggerProjection.hh:19
int compare(const Projection &p) const
Compare projections.
Definition: AtlasCommon.hh:78
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
Definition: Projection.cc:51
void project(const Event &e)
Perform the projection on the Event.
Definition: AtlasCommon.hh:31
Project out all final-state particles in an event. Probably the most important projection in Rivet! ...
Definition: FinalState.hh:12
const PROJ & declare(const PROJ &proj, const std::string &name)
Register a contained projection (user-facing version)
Definition: ProjectionApplier.hh:160
Centrality projection for pPb collisions (one sided)
Definition: AtlasCommon.hh:15
Project only charged final state particles.
Definition: ChargedFinalState.hh:11
DEFAULT_RIVET_PROJ_CLONE(SumET_PB_Centrality)
Clone on the heap.
int compare(const Projection &p) const
Compare projections.
Definition: AtlasCommon.hh:43
Base class for all Rivet projections.
Definition: Projection.hh:29
MinBiasTrigger()
Constructor.
Definition: AtlasCommon.hh:90
void project(const Event &e)
Perform the projection on the Event.
Definition: AtlasCommon.hh:66
void clear()
Unset the value.
Definition: SingleValueProjection.hh:47