Rivet: /Users/chrisg/software/rivet/include/Rivet/Projections/DISLepton.hh Source File

| Rivet 3.1.9

DISLepton.hh
1// -*- C++ -*-
2#ifndef RIVET_DISLepton_HH
3#define RIVET_DISLepton_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/Projections/VetoedFinalState.hh"
11#include "Rivet/Particle.hh"
12#include "Rivet/Event.hh"
13
14namespace Rivet {
15
16
18 class DISLepton : public FinalState {
19 public:
20
23 enum SortOrder { ENERGY, ETA, ET };
24
26
27
37 DISLepton(const std::map<std::string,std::string> & opts =
38 std::map<std::string,std::string>())
39 : _isolDR(0.0), _sort(ENERGY), _lmode("any") {
40 setName("DISLepton");
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 _lmode = (opts.count("LMode") == 0) ? "any" : opts.at("LMode");
67 if ( _lmode == "any" )
68 declare(FinalState(), "LFS");
69 else if ( _lmode == "dressed" )
70 declare(DressedLeptons(dressdr), "LFS");
71 else
72 declare(PromptFinalState(), "LFS");
73
74 // Identify the non-outgoing lepton part of the event
75 VetoedFinalState remainingFS;
76 remainingFS.addVetoOnThisFinalState(*this);
77 declare(remainingFS, "RFS");
78 }
79
81 DEFAULT_RIVET_PROJ_CLONE(DISLepton);
82
84
86 using Projection::operator =;
87
88
89 protected:
90
92 virtual void project(const Event& e);
93
95 virtual CmpState compare(const Projection& p) const;
96
97
98 public:
99
101 const Particle& in() const { return _incoming; }
102
104 const Particle& out() const { return _outgoing; }
105
107 int pzSign() const { return sign(_incoming.pz()); }
108
112
113
117 const VetoedFinalState& remainingFinalState() const;
118
120 void clear() { _theParticles.clear(); }
121
122 protected:
123
125 Particle _incoming;
126
128 Particle _outgoing;
129
131 double _isolDR;
132
134 SortOrder _sort;
135
137 std::string _lmode;
138
139 };
140
141}
142
143
144#endif
Rivet::Beam
Project out the incoming beams.
Definition Beam.hh:129
Rivet::DISLepton
Get the incoming and outgoing leptons in a DIS event.
Definition DISLepton.hh:18
Rivet::DISLepton::out
const Particle & out() const
The outgoing lepton.
Definition DISLepton.hh:104
Rivet::DISLepton::project
virtual void project(const Event &e)
Perform the projection operation on the supplied event.
Rivet::DISLepton::in
const Particle & in() const
The incoming lepton.
Definition DISLepton.hh:101
Rivet::DISLepton::clear
void clear()
Clear the projection.
Definition DISLepton.hh:120
Rivet::DISLepton::remainingFinalState
const VetoedFinalState & remainingFinalState() const
Rivet::DISLepton::compare
virtual CmpState compare(const Projection &p) const
Compare with other projections.
Rivet::DISLepton::pzSign
int pzSign() const
Sign of the incoming lepton pz component.
Definition DISLepton.hh:107
Rivet::DISLepton::SortOrder
SortOrder
Definition DISLepton.hh:23
Rivet::DISLepton::DISLepton
DISLepton(const std::map< std::string, std::string > &opts=std::map< std::string, std::string >())
Definition DISLepton.hh:37
Rivet::DISLepton::DEFAULT_RIVET_PROJ_CLONE
DEFAULT_RIVET_PROJ_CLONE(DISLepton)
Clone on the heap.
Rivet::DressedLeptons
Cluster photons from a given FS to all charged particles (typically leptons)
Definition DressedLeptons.hh:61
Rivet::Event
Representation of a HepMC event, and enabler of Projection caching.
Definition Event.hh:22
Rivet::FinalState
Project out all final-state particles in an event. Probably the most important projection in Rivet!
Definition FinalState.hh:12
Rivet::HadronicFinalState
Project only hadronic final state particles.
Definition HadronicFinalState.hh:16
Rivet::Particle
Particle representation, either from a HepMC::GenEvent or reconstructed.
Definition Particle.hh:53
Rivet::ProjectionApplier::declare
const PROJ & declare(const PROJ &proj, const std::string &name)
Register a contained projection (user-facing version)
Definition ProjectionApplier.hh:170
Rivet::Projection
Base class for all Rivet projections.
Definition Projection.hh:29
Rivet::Projection::setName
void setName(const std::string &name)
Used by derived classes to set their name.
Definition Projection.hh:142
Rivet::PromptFinalState
Find final state particles directly connected to the hard process.
Definition PromptFinalState.hh:24
Rivet::UndressBeamLeptons
Project out the incoming beams, but subtract any colinear photons from lepton beams within a given co...
Definition UndressBeamLeptons.hh:13
Rivet::VetoedFinalState
FS modifier to exclude classes of particles from the final state.
Definition VetoedFinalState.hh:11
Rivet::VetoedFinalState::addVetoOnThisFinalState
VetoedFinalState & addVetoOnThisFinalState(const ParticleFinder &fs)
Veto particles from a supplied final state.
Definition VetoedFinalState.hh:194
Rivet::Kin::p
double p(const ParticleBase &p)
Unbound function access to p.
Definition ParticleBaseUtils.hh:684
Rivet
Definition MC_Cent_pPb.hh:10
Rivet::sign
constexpr std::enable_if< std::is_arithmetic< NUM >::value, int >::type sign(NUM val)
Find the sign of a number.
Definition MathUtils.hh:266