ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
EventEtDensity Class Reference

Data container for event Et densities. More...

#include <EventEtDensity.h>

Collaboration diagram for EventEtDensity:

Public Types

enum  DataIndex {
  RHOVALUE = 2, RHOSIGMA = 3, AREAVALUE = 4, ETARANGELOW = 0,
  ETARANGEHIGH = 1, MAXINDEX = 5, INVALIDINDEX = -1
}
 Data indices in external vectors. More...
 

Public Member Functions

 EventEtDensity ()
 Constructor. More...
 
 EventEtDensity (double rho, double sigma=0., double area=40.0 *M_PI_2, double etaLow=-5., double etaHigh=5.)
 Constructor. More...
 
 EventEtDensity (double rho, double sigma, double area, const fastjet::RangeDefinition &range)
 Constructor. More...
 
 ~EventEtDensity ()
 Destructor. More...
 
fastjet::RangeDefinition range () const
 Convert \( \eta \) range into fastjet::RangeDefinition. More...
 
bool copyData (const std::vector< double > &lparm, size_t lindx=0)
 Fill this EventEtDensity from a vector. More...
 
bool extractData (std::vector< double > &lparm, size_t lindx=0) const
 
void clear ()
 Clear this EventEtDensity store. More...
 
void reset ()
 
bool inRange (double eta) const
 

Static Public Member Functions

static size_t capacity ()
 
static fastjet::RangeDefinition range (const EventEtDensity &data)
 Convert \( \eta \) range into fastjet::RangeDefinition. More...
 
static bool copyData (const std::vector< double > &lparm, EventEtDensity &data, size_t lindx=0)
 Fill EventEtDensity from a vector. More...
 
static bool extractData (const EventEtDensity &data, std::vector< double > &lparm, size_t lindx=0)
 
static EventEtDensity createStore (const std::vector< double > &lparm, size_t lindx=0)
 Create EventEtDensity store. More...
 
static void clear (EventEtDensity &data)
 Clear EventEtDensity store. More...
 
static void reset (EventEtDensity &data)
 

Public Attributes

double rhoValue
 Access to event transverse energy density \( \rho \). More...
 
double rhoSigma
 Access to spread of transverse energy density \( \sigma \). More...
 
double areaValue
 Access to total area occupied by \( p_T > 0. \) probe jets. More...
 
double etaRangeLow
 Access to lower \( \eta \) range limit. More...
 
double etaRangeHigh
 Access to upper \( \eta \) range limit. More...
 

Detailed Description

Data container for event Et densities.

Allows compact distribution and access to transverse energy event densities as provided by fastjet

Definition at line 14 of file EventEtDensity.h.

Member Enumeration Documentation

◆ DataIndex

Data indices in external vectors.

Deines the order in an external vector, as e.g. used in the copyData function.

Enumerator
RHOVALUE 
RHOSIGMA 
AREAVALUE 
ETARANGELOW 
ETARANGEHIGH 
MAXINDEX 
INVALIDINDEX 

Definition at line 67 of file EventEtDensity.h.

67  { RHOVALUE = 2,
68  RHOSIGMA = 3,
69  AREAVALUE = 4,
70  ETARANGELOW = 0,
71  ETARANGEHIGH = 1,
72  MAXINDEX = 5,
73  INVALIDINDEX = -1 };

Constructor & Destructor Documentation

◆ EventEtDensity() [1/3]

EventEtDensity::EventEtDensity ( )
inline

Constructor.

Generates empty EventEtDensity structure - generally not very useful.

Definition at line 200 of file EventEtDensity.h.

201 {
202  rhoValue = 0.;
203  rhoSigma = 0.;
204  etaRangeLow = -5.;
205  etaRangeHigh = 5.;
207 }

◆ EventEtDensity() [2/3]

EventEtDensity::EventEtDensity ( double  rho,
double  sigma = 0.,
double  area = 40.0*M_PI_2,
double  etaLow = -5.,
double  etaHigh = 5. 
)
inline

Constructor.

Generates loaded EventEtDensity structure.

Parameters
[in]rhoevent transverse energy density
[in]sigmaevent transverse energy fluctuation (default 0. - optional argument from e.g. fastjet )
[in]areatotal area in range occupied by probe jets with \( p_T > 0 \) (default no jets, i.e. \( \Delta\eta \times 2\pi$ \) - optional argument from e.g. fastjet )
[in]etaLowlower limit \( \eta_L \) of \( \eta \) range in which density is evaluated (default: ATLAS coverage \( \eta_L = -5. \) - optional argument )
[in]etaHighupper limit \( \eta_H \) of \( \eta \) range in which density is evaluated (default: ATLAS coverage \( \eta_H = 5. \) - optional argument )

Definition at line 208 of file EventEtDensity.h.

210 {
211  rhoValue = rho;
212  rhoSigma = sigma;
213  areaValue = area;
214  etaRangeLow = etaLow;
215  etaRangeHigh = etaHigh;
216 }

◆ EventEtDensity() [3/3]

EventEtDensity::EventEtDensity ( double  rho,
double  sigma,
double  area,
const fastjet::RangeDefinition &  range 
)
inline

Constructor.

Generates loaded EventEtDensity structure.

Parameters
[in]rhoevent transverse energy density
[in]sigmaevent transverse energy fluctuation (typically from fastjet )
[in]areatotal area in range occupied by probe jets with \( p_T > 0 \) (typically from fastjet )
[in]rangerange in which density is to be evaluated, presented as fastjet::Rangedefinition

Definition at line 217 of file EventEtDensity.h.

219 {
220  rhoValue = rho;
221  rhoSigma = sigma;
222  areaValue = area;
223  range.get_rap_limits(etaRangeLow,etaRangeHigh);
224 }

◆ ~EventEtDensity()

EventEtDensity::~EventEtDensity ( )
inline

Destructor.

Definition at line 226 of file EventEtDensity.h.

227 { }

Member Function Documentation

◆ capacity()

size_t EventEtDensity::capacity ( )
inlinestatic

Definition at line 254 of file EventEtDensity.h.

255 { return (size_t)MAXINDEX; }

◆ clear() [1/2]

void EventEtDensity::clear ( )

Clear this EventEtDensity store.

Sets all data to EventFeatureToolBase::invalidValue() .

Definition at line 42 of file EventEtDensity.cxx.

43 {
44  double invVal(EventShapeConstants::invalidValue());
45  rhoValue = invVal;
46  rhoSigma = invVal;
47  areaValue = invVal;
48  etaRangeLow = invVal;
49  etaRangeHigh = invVal;
50 }

◆ clear() [2/2]

void EventEtDensity::clear ( EventEtDensity data)
inlinestatic

Clear EventEtDensity store.

Sets all data to EventFeatureToolBase::invalidValue() .

Definition at line 251 of file EventEtDensity.h.

252 { data.clear(); }

◆ copyData() [1/2]

bool EventEtDensity::copyData ( const std::vector< double > &  lparm,
EventEtDensity data,
size_t  lindx = 0 
)
inlinestatic

Fill EventEtDensity from a vector.

Parameters
[in]lparmconst reference to non-modifiable list of density variables (needs to contain at least MAXINDEX variables)
[out]datareference to modifiable EventEtDensity object
[in]lindxstarting index for parameter copy (optional, default lindx = 0)
Returns
Number of values filled - typically the minimum of the vector size and the number of storable parameters (5).

This function will make the following assignments (not the actual implementation, just to illustrate the behaviour):

size_t offset(lindx*(size_t)MAXINDEX); data.rhoValue = lparm.at(offset+(size_t)RHOVALUE); data.rhoSigma = lparm.at(offset+(size_t)RHOSIGMA); data.areaValue = lparm.at(offset+(size_t)AREAVALUE); data.etaRangeLow = lparm.at(offset+(size_t)ETARANGELOW); data.etaRangeHigh = lparm.at(offset+(size_t)ETARANGEHIGH);

Only full blocks of MAXINDEX data words are copied. This means that only data up to the last full block of MAXINDEX numbers is converted.

Definition at line 237 of file EventEtDensity.h.

239 { return data.copyData(lparm,lindx); }

◆ copyData() [2/2]

bool EventEtDensity::copyData ( const std::vector< double > &  lparm,
size_t  lindx = 0 
)

Fill this EventEtDensity from a vector.

Parameters
[in]lparmconst reference to non-modifiable list of density variables
[in]lindxstarting index for parameter copy (optional, default lindx = 0)
Returns
Number of values filled - typically the minimum of the vector size and the number of storable parameters (5).

This function will make the following assignments (not the actual implementation, just to illustrate the behaviour):

size_t offset(lindx*(size_t)MAXINDEX); data.rhoValue = lparm.at(offset+(size_t)RHOVALUE); data.rhoSigma = lparm.at(offset+(size_t)RHOSIGMA); data.areaValue = lparm.at(offset+(size_t)AREAVALUE); data.etaRangeLow = lparm.at(offset+(size_t)ETARANGELOW); data.etaRangeHigh = lparm.at(offset+(size_t)ETARANGEHIGH);

Only full blocks of MAXINDEX data words are copied. This means that only data up to the last full block of MAXINDEX numbers is converted.

Definition at line 10 of file EventEtDensity.cxx.

12 {
13  // check consistency
14  static const size_t nn((size_t)MAXINDEX);
15  if ( (lindx+1) * nn > lparm.size() )
16  {
17  this->clear();
18  return false;
19  }
20 
21  // pick up
22  rhoValue = lparm[lindx+(size_t)RHOVALUE];
23  rhoSigma = lparm[lindx+(size_t)RHOSIGMA];
24  areaValue = lparm[lindx+(size_t)AREAVALUE];
25  etaRangeLow = lparm[lindx+(size_t)ETARANGELOW];
26  etaRangeHigh = lparm[lindx+(size_t)ETARANGEHIGH];
27  return true;
28 }

◆ createStore()

EventEtDensity EventEtDensity::createStore ( const std::vector< double > &  lparm,
size_t  lindx = 0 
)
inlinestatic

Create EventEtDensity store.

Definition at line 242 of file EventEtDensity.h.

244 { EventEtDensity data; copyData(lparm,data,lindx); return data; }

◆ extractData() [1/2]

bool EventEtDensity::extractData ( const EventEtDensity data,
std::vector< double > &  lparm,
size_t  lindx = 0 
)
inlinestatic

Definition at line 247 of file EventEtDensity.h.

249 { return data.extractData(lparm,lindx); }

◆ extractData() [2/2]

bool EventEtDensity::extractData ( std::vector< double > &  lparm,
size_t  lindx = 0 
) const

Definition at line 30 of file EventEtDensity.cxx.

31 {
32  static const size_t nn((size_t)MAXINDEX);
33  if ( nn*(lindx+1) > lparm.size() ) lparm.resize(nn*(lindx+1));
34  lparm[lindx+(size_t)RHOVALUE] = rhoValue;
35  lparm[lindx+(size_t)RHOSIGMA] = rhoSigma;
36  lparm[lindx+(size_t)AREAVALUE] = areaValue;
37  lparm[lindx+(size_t)ETARANGELOW] = etaRangeLow;
38  lparm[lindx+(size_t)ETARANGEHIGH] = etaRangeHigh;
39  return true;
40 }

◆ inRange()

bool EventEtDensity::inRange ( double  eta) const
inline

Definition at line 260 of file EventEtDensity.h.

261 { return eta >= etaRangeLow && eta <= etaRangeHigh; }

◆ range() [1/2]

fastjet::RangeDefinition EventEtDensity::range ( ) const
inline

Convert \( \eta \) range into fastjet::RangeDefinition.

Definition at line 229 of file EventEtDensity.h.

230 { return fastjet::RangeDefinition(etaRangeLow,etaRangeHigh); }

◆ range() [2/2]

fastjet::RangeDefinition EventEtDensity::range ( const EventEtDensity data)
inlinestatic

Convert \( \eta \) range into fastjet::RangeDefinition.

Definition at line 232 of file EventEtDensity.h.

234 { return data.range(); }

◆ reset() [1/2]

void EventEtDensity::reset ( )

Definition at line 52 of file EventEtDensity.cxx.

53 {
54  double nullVal(EventShapeConstants::nullValue());
55  rhoValue = nullVal;
56  rhoSigma = nullVal;
57  areaValue = nullVal;
58  etaRangeLow = nullVal;
59  etaRangeHigh = nullVal;
60 }

◆ reset() [2/2]

void EventEtDensity::reset ( EventEtDensity data)
inlinestatic

Definition at line 257 of file EventEtDensity.h.

258 { data.reset(); }

Member Data Documentation

◆ areaValue

double EventEtDensity::areaValue

Access to total area occupied by \( p_T > 0. \) probe jets.

Definition at line 80 of file EventEtDensity.h.

◆ etaRangeHigh

double EventEtDensity::etaRangeHigh

Access to upper \( \eta \) range limit.

Definition at line 84 of file EventEtDensity.h.

◆ etaRangeLow

double EventEtDensity::etaRangeLow

Access to lower \( \eta \) range limit.

Definition at line 82 of file EventEtDensity.h.

◆ rhoSigma

double EventEtDensity::rhoSigma

Access to spread of transverse energy density \( \sigma \).

Definition at line 78 of file EventEtDensity.h.

◆ rhoValue

double EventEtDensity::rhoValue

Access to event transverse energy density \( \rho \).

Definition at line 76 of file EventEtDensity.h.


The documentation for this class was generated from the following files:
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
EventShapeConstants::nullValue
static double nullValue()
Definition: StaticConstants.h:24
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
EventShapeConstants::invalidValue
static double invalidValue()
Definition: StaticConstants.h:22
EventEtDensity::range
fastjet::RangeDefinition range() const
Convert range into fastjet::RangeDefinition.
Definition: EventEtDensity.h:229
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
area
double area(double R)
Definition: ConvertStaveServices.cxx:42
fitman.rho
rho
Definition: fitman.py:532
EventEtDensity::AREAVALUE
@ AREAVALUE
Definition: EventEtDensity.h:69