ATLAS Offline Software
EventEtDensity.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef EVENTSHAPEEVENT_EVENTETDENSITY_H
8 #define EVENTSHAPEEVENT_EVENTETDENSITY_H
9 
10 #include "fastjet/RangeDefinition.hh"
11 
12 #include <cmath>
13 
15 {
16 public:
17 
42  EventEtDensity(double rho,double sigma=0.,double area=40.0*M_PI_2,
43  double etaLow=-5.,double etaHigh=5.);
56  EventEtDensity(double rho,double sigma,double area,
57  const fastjet::RangeDefinition& range);
58  // Use default copy constructor.
61 
67  enum DataIndex { RHOVALUE = 2,
68  RHOSIGMA = 3,
69  AREAVALUE = 4,
72  MAXINDEX = 5,
73  INVALIDINDEX = -1 };
74 
76  double rhoValue;
78  double rhoSigma;
80  double areaValue;
82  double etaRangeLow;
84  double etaRangeHigh;
85 
86 
87  static size_t capacity();
88 
90  fastjet::RangeDefinition range() const;
92  static fastjet::RangeDefinition range(const EventEtDensity& data);
120  static bool copyData(const std::vector<double>& lparm,
122  size_t lindx=0);
148  bool copyData(const std::vector<double>& lparm,size_t lindx=0);
149 
150 
151  static bool extractData(const EventEtDensity& data,
152  std::vector<double>& lparm,size_t lindx=0);
153 
154  bool extractData(std::vector<double>& lparm,size_t lindx=0) const;
155 
159  static EventEtDensity createStore(const std::vector<double>& lparm,
160  size_t lindx=0);
165  static void clear(EventEtDensity& data);
170  void clear();
171 
172 
173  static void reset(EventEtDensity& data);
174  void reset();
175 
176  bool inRange(double eta) const;
177 
178 // private:
179 
180 // /*! @brief Cached @f$ \rho @f$ */
181 // double m_rho;
182 // /*! @brief Cached @f$ \sigma @f$ */
183 // double m_sigma;
184 // /*! @brief Cached integrated jet catchment area */
185 // double m_area;
186 // /*! @brief Cached lower @f$ \eta @f$ range limit */
187 // double m_etaLow;
188 // /*! @brief Cached upper @f$ \eta @f$ range limit */
189 // double m_etaHigh;
190 };
191 
201 {
202  rhoValue = 0.;
203  rhoSigma = 0.;
204  etaRangeLow = -5.;
205  etaRangeHigh = 5.;
207 }
208 inline EventEtDensity::EventEtDensity(double rho,double sigma,double area,
209  double etaLow,double etaHigh)
210 {
211  rhoValue = rho;
212  rhoSigma = sigma;
213  areaValue = area;
214  etaRangeLow = etaLow;
215  etaRangeHigh = etaHigh;
216 }
217 inline EventEtDensity::EventEtDensity(double rho,double sigma,double area,
218  const fastjet::RangeDefinition& range)
219 {
220  rhoValue = rho;
221  rhoSigma = sigma;
222  areaValue = area;
223  range.get_rap_limits(etaRangeLow,etaRangeHigh);
224 }
225 
227 { }
228 
229 inline fastjet::RangeDefinition EventEtDensity::range() const
230 { return fastjet::RangeDefinition(etaRangeLow,etaRangeHigh); }
231 
232 inline fastjet::RangeDefinition EventEtDensity::range(const EventEtDensity&
233  data)
234 { return data.range(); }
235 
236 inline bool
237 EventEtDensity::copyData(const std::vector<double>& lparm,EventEtDensity& data,
238  size_t lindx)
239 { return data.copyData(lparm,lindx); }
240 
241 inline
242 EventEtDensity EventEtDensity::createStore(const std::vector<double>& lparm,
243  size_t lindx)
244 { EventEtDensity data; copyData(lparm,data,lindx); return data; }
245 
246 inline
248  std::vector<double>& lparm,size_t lindx)
249 { return data.extractData(lparm,lindx); }
250 
252 { data.clear(); }
253 
255 { return (size_t)MAXINDEX; }
256 
258 { data.reset(); }
259 
260 inline bool EventEtDensity::inRange(double eta) const
261 { return eta >= etaRangeLow && eta <= etaRangeHigh; }
262 
263 // inline EventEtDensity::EventEtDensity()
264 // : m_rho(0.), m_sigma(0.), m_area(40.*asin(1.)),
265 // , m_etaLow(-5.), m_etaHigh(5.)
266 // { }
267 
268 // inline EventEtDensity::EventEtDensity(double rho,double sigma,double area,
269 // double etaLow,double etaHigh)
270 // : m_rho(rho), m_sigma(sigma), m_area(area),
271 // , m_etaLow(etaLow), m_etaHigh(etaHigh)
272 // { }
273 // inline EventEtDensity::EventEtDensity(double rho,double sigma,double area,
274 // const fastjet::RangeDefinition range)
275 // : m_rho(rho), m_sigma(sigma), m_area(area)
276 // { range.get_rap_limits(m_etaLow,m_etaHigh); }
277 
278 // inline EventEtDensity::EventEtDensity(const EventEtDensity& data)
279 // : m_rho(data.m_rho), m_sigma(data.m_sigma), m_area(data.m_area)
280 // , m_etaLow(data.m_etaLow), m_etaHigh(data.m_etaHigh)
281 // { }
282 
283 // inline double EventEtDensity::rho() const
284 // { return m_rho; }
285 
286 // inline double EventEtDensity::sigma() const
287 // { return m_sigma; }
288 
289 // inline double EventEtDensity::area() const
290 // { return m_area; }
291 
292 // inline double EventEtDensity::etaLow() const
293 // { return m_etaLow; }
294 
295 // inline double EventEtDensity::etaHigh() const
296 // { return m_etaHigh; }
297 #endif
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
EventEtDensity::etaRangeLow
double etaRangeLow
Access to lower range limit.
Definition: EventEtDensity.h:82
pdg_comparison.sigma
sigma
Definition: pdg_comparison.py:324
EventEtDensity::RHOVALUE
@ RHOVALUE
Definition: EventEtDensity.h:67
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
M_PI
#define M_PI
Definition: ActiveFraction.h:11
EventEtDensity::areaValue
double areaValue
Access to total area occupied by probe jets.
Definition: EventEtDensity.h:80
EventEtDensity::etaRangeHigh
double etaRangeHigh
Access to upper range limit.
Definition: EventEtDensity.h:84
EventEtDensity::MAXINDEX
@ MAXINDEX
Definition: EventEtDensity.h:72
EventEtDensity::ETARANGELOW
@ ETARANGELOW
Definition: EventEtDensity.h:70
EventEtDensity::rhoValue
double rhoValue
Access to event transverse energy density .
Definition: EventEtDensity.h:76
EventEtDensity::copyData
static bool copyData(const std::vector< double > &lparm, EventEtDensity &data, size_t lindx=0)
Fill EventEtDensity from a vector.
Definition: EventEtDensity.h:237
EventEtDensity::RHOSIGMA
@ RHOSIGMA
Definition: EventEtDensity.h:68
EventEtDensity::clear
void clear()
Clear this EventEtDensity store.
Definition: EventEtDensity.cxx:42
EventEtDensity::inRange
bool inRange(double eta) const
Definition: EventEtDensity.h:260
EventEtDensity::DataIndex
DataIndex
Data indices in external vectors.
Definition: EventEtDensity.h:67
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
EventEtDensity::extractData
static bool extractData(const EventEtDensity &data, std::vector< double > &lparm, size_t lindx=0)
Definition: EventEtDensity.h:247
EventEtDensity::reset
void reset()
Definition: EventEtDensity.cxx:52
EventEtDensity::range
fastjet::RangeDefinition range() const
Convert range into fastjet::RangeDefinition.
Definition: EventEtDensity.h:229
EventEtDensity::~EventEtDensity
~EventEtDensity()
Destructor.
Definition: EventEtDensity.h:226
EventEtDensity
Data container for event Et densities.
Definition: EventEtDensity.h:15
EventEtDensity::rhoSigma
double rhoSigma
Access to spread of transverse energy density .
Definition: EventEtDensity.h:78
EventEtDensity::ETARANGEHIGH
@ ETARANGEHIGH
Definition: EventEtDensity.h:71
EventEtDensity::INVALIDINDEX
@ INVALIDINDEX
Definition: EventEtDensity.h:73
EventEtDensity::EventEtDensity
EventEtDensity()
Constructor.
Definition: EventEtDensity.h:200
area
double area(double R)
Definition: ConvertStaveServices.cxx:42
EventEtDensity::createStore
static EventEtDensity createStore(const std::vector< double > &lparm, size_t lindx=0)
Create EventEtDensity store.
Definition: EventEtDensity.h:242
fitman.rho
rho
Definition: fitman.py:532
EventEtDensity::capacity
static size_t capacity()
Definition: EventEtDensity.h:254
EventEtDensity::AREAVALUE
@ AREAVALUE
Definition: EventEtDensity.h:69