ATLAS Offline Software
Loading...
Searching...
No Matches
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{
16public:
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
74
76 double rhoValue;
78 double rhoSigma;
80 double areaValue;
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
199
201{
202 rhoValue = 0.;
203 rhoSigma = 0.;
204 etaRangeLow = -5.;
205 etaRangeHigh = 5.;
207}
208inline 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}
217inline 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
228
229inline fastjet::RangeDefinition EventEtDensity::range() const
230{ return fastjet::RangeDefinition(etaRangeLow,etaRangeHigh); }
231
232inline fastjet::RangeDefinition EventEtDensity::range(const EventEtDensity&
233 data)
234{ return data.range(); }
235
236inline bool
237EventEtDensity::copyData(const std::vector<double>& lparm,EventEtDensity& data,
238 size_t lindx)
239{ return data.copyData(lparm,lindx); }
240
241inline
242EventEtDensity EventEtDensity::createStore(const std::vector<double>& lparm,
243 size_t lindx)
244{ EventEtDensity data; copyData(lparm,data,lindx); return data; }
245
246inline
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
260inline 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
#define M_PI
Scalar eta() const
pseudorapidity method
double area(double R)
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
static bool extractData(const EventEtDensity &data, std::vector< double > &lparm, size_t lindx=0)
void clear()
Clear this EventEtDensity store.
double etaRangeLow
Access to lower range limit.
static size_t capacity()
double etaRangeHigh
Access to upper range limit.
fastjet::RangeDefinition range() const
Convert range into fastjet::RangeDefinition.
~EventEtDensity()
Destructor.
double rhoSigma
Access to spread of transverse energy density .
double rhoValue
Access to event transverse energy density .
static EventEtDensity createStore(const std::vector< double > &lparm, size_t lindx=0)
Create EventEtDensity store.
EventEtDensity()
Constructor.
DataIndex
Data indices in external vectors.
static bool copyData(const std::vector< double > &lparm, EventEtDensity &data, size_t lindx=0)
Fill EventEtDensity from a vector.
double areaValue
Access to total area occupied by probe jets.
bool inRange(double eta) const