Rivet  3.1.3
GammaGammaLeptons.hh
1 // -*- C++ -*-
2 #ifndef RIVET_GammaGammaLeptons_HH
3 #define RIVET_GammaGammaLeptons_HH
4 
5 #include "Rivet/Projections/Beam.hh"
6 #include "Rivet/Projections/PromptFinalState.hh"
7 #include "Rivet/Projections/HadronicFinalState.hh"
8 #include "Rivet/Projections/DressedLeptons.hh"
9 #include "Rivet/Projections/UndressBeamLeptons.hh"
10 #include "Rivet/Particle.hh"
11 #include "Rivet/Event.hh"
12 
13 namespace Rivet {
14 
15 
17  // Heavily based on DISLepton
18  class GammaGammaLeptons : public Projection {
19  public:
20 
23  enum SortOrder { ENERGY, ETA, ET };
24 
26 
27 
37  GammaGammaLeptons(const std::map<std::string,std::string> & opts =
38  std::map<std::string,std::string>())
39  : _isolDR(0.0), _sort(ENERGY) {
40  setName("GammaGammaLeptons");
41  declare(HadronicFinalState(), "IFS");
42 
43  auto sorting = opts.find("LSort");
44  if ( sorting != opts.end() && sorting->second == "ETA" )
45  _sort = ETA;
46  else if ( sorting != opts.end() && sorting->second == "ET" )
47  _sort = ET;
48 
49  double undresstheta = 0.0;
50  auto undress = opts.find("Undress");
51  if ( undress != opts.end() )
52  undresstheta = std::stod(undress->second);
53  if ( undresstheta > 0.0 )
54  declare(UndressBeamLeptons(undresstheta), "Beam");
55  else
56  declare(Beam(), "Beam");
57 
58  auto isol = opts.find("IsolDR");
59  if ( isol != opts.end() ) _isolDR = std::stod(isol->second);
60 
61  double dressdr = 0.0;
62  auto dress = opts.find("DressDR");
63  if ( dress != opts.end() )
64  dressdr = std::stod(dress->second);
65 
66  auto lmode = opts.find("LMode");
67  if ( lmode != opts.end() && lmode->second == "any" )
68  declare(FinalState(), "LFS");
69  else if ( lmode != opts.end() && lmode->second == "dressed" )
70  declare(DressedLeptons(dressdr), "LFS");
71  else
72  declare(PromptFinalState(), "LFS");
73  }
74 
81  GammaGammaLeptons(const FinalState & leptoncandidates,
82  const Beam & beamproj = Beam(),
83  const FinalState & isolationfs = FinalState(),
84  double isolationcut = 0.0, SortOrder sorting = ENERGY)
85  : _isolDR(isolationcut), _sort(sorting) {
86  declare(leptoncandidates, "LFS");
87  declare(isolationfs, "IFS");
88  declare(beamproj, "Beam");
89  }
90 
91 
92 
95 
97 
98 
99  protected:
100 
102  virtual void project(const Event& e);
103 
105  virtual CmpState compare(const Projection& p) const;
106 
107 
108  public:
109 
111  const ParticlePair & in() const { return _incoming; }
112 
114  const ParticlePair & out() const { return _outgoing; }
115 
116  private:
117 
119  ParticlePair _incoming;
120 
122  ParticlePair _outgoing;
123 
125  double _isolDR;
126 
128  SortOrder _sort;
129 
130  };
131 
132 }
133 
134 
135 #endif
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:142
Definition: MC_Cent_pPb.hh:10
GammaGammaLeptons(const FinalState &leptoncandidates, const Beam &beamproj=Beam(), const FinalState &isolationfs=FinalState(), double isolationcut=0.0, SortOrder sorting=ENERGY)
Definition: GammaGammaLeptons.hh:81
Get the incoming and outgoing leptons in a gamma gamma collision event in e+e-.
Definition: GammaGammaLeptons.hh:18
const ParticlePair & in() const
The incoming lepton.
Definition: GammaGammaLeptons.hh:111
Cluster photons from a given FS to all charged particles (typically leptons)
Definition: DressedLeptons.hh:56
const ParticlePair & out() const
The outgoing lepton.
Definition: GammaGammaLeptons.hh:114
virtual void project(const Event &e)
Perform the projection operation on the supplied event.
Representation of a HepMC event, and enabler of Projection caching.
Definition: Event.hh:22
Project only hadronic final state particles.
Definition: HadronicFinalState.hh:16
Project out the incoming beams, but subtract any colinear photons from lepton beams within a given co...
Definition: UndressBeamLeptons.hh:13
GammaGammaLeptons(const std::map< std::string, std::string > &opts=std::map< std::string, std::string >())
Definition: GammaGammaLeptons.hh:37
virtual CmpState compare(const Projection &p) const
Compare with other projections.
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:170
Project out the incoming beams.
Definition: Beam.hh:129
Base class for all Rivet projections.
Definition: Projection.hh:29
DEFAULT_RIVET_PROJ_CLONE(GammaGammaLeptons)
Clone on the heap.
Find final state particles directly connected to the hard process.
Definition: PromptFinalState.hh:24
SortOrder
Definition: GammaGammaLeptons.hh:23