Rivet  1.8.3
ClusteredPhotons.hh
1 // -*- C++ -*-
2 #ifndef RIVET_ClusteredPhotons_HH
3 #define RIVET_ClusteredPhotons_HH
4 
5 #include "Rivet/Tools/Logging.hh"
6 #include "Rivet/Rivet.hh"
7 #include "Rivet/Particle.hh"
8 #include "Rivet/Event.hh"
9 #include "Rivet/Projection.hh"
10 #include "Rivet/Projections/FinalState.hh"
11 #include "Rivet/Projections/IdentifiedFinalState.hh"
12 
13 namespace Rivet {
14 
15 
17  class ClusteredPhotons : public FinalState {
18  public:
19 
21 
22  ClusteredPhotons(const FinalState& fs, const FinalState& signal, double dRmax)
25  : _dRmax(dRmax)
26  {
27  setName("ClusteredPhotons");
28  IdentifiedFinalState photonfs(fs);
29  photonfs.acceptId(PHOTON);
30  addProjection(photonfs, "Photons");
31  addProjection(signal, "Signal");
32  }
33 
34 
36  virtual const Projection* clone() const {
37  return new ClusteredPhotons(*this);
38  }
40 
41 
42  public:
43 
44  protected:
45 
47  void project(const Event& e);
48 
50  int compare(const Projection& p) const;
51 
52 
53  private:
54 
56  double _dRmax;
57 
58  };
59 
60 
61 }
62 
63 
64 #endif
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:120
Definition: MC_JetAnalysis.hh:9
IdentifiedFinalState & acceptId(PdgId pid)
Add an accepted particle ID.
Definition: IdentifiedFinalState.hh:50
Produce a final state which only contains specified particle IDs.
Definition: IdentifiedFinalState.hh:16
ClusteredPhotons(const FinalState &fs, const FinalState &signal, double dRmax)
Definition: ClusteredPhotons.hh:24
Definition: Event.hh:22
virtual const Projection * clone() const
Clone on the heap.
Definition: ClusteredPhotons.hh:36
int compare(const Projection &p) const
Compare projections.
Definition: ClusteredPhotons.cc:10
Find final state photons which in a cone around any particle in the "signal" final state...
Definition: ClusteredPhotons.hh:17
void project(const Event &e)
Apply the projection on the supplied event.
Definition: ClusteredPhotons.cc:23
Project out all final-state particles in an event. Probably the most important projection in Rivet! ...
Definition: FinalState.hh:14
const PROJ & addProjection(const PROJ &proj, const std::string &name)
Definition: ProjectionApplier.hh:113
Base class for all Rivet projections.
Definition: Projection.hh:28