ATLAS Offline Software
Loading...
Searching...
No Matches
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.
 EventEtDensity (double rho, double sigma=0., double area=40.0 *M_PI_2, double etaLow=-5., double etaHigh=5.)
 Constructor.
 EventEtDensity (double rho, double sigma, double area, const fastjet::RangeDefinition &range)
 Constructor.
 ~EventEtDensity ()
 Destructor.
fastjet::RangeDefinition range () const
 Convert \( \eta \) range into fastjet::RangeDefinition.
bool copyData (const std::vector< double > &lparm, size_t lindx=0)
 Fill this EventEtDensity from a vector.
bool extractData (std::vector< double > &lparm, size_t lindx=0) const
void clear ()
 Clear this EventEtDensity store.
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.
static bool copyData (const std::vector< double > &lparm, EventEtDensity &data, size_t lindx=0)
 Fill EventEtDensity from a vector.
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.
static void clear (EventEtDensity &data)
 Clear EventEtDensity store.
static void reset (EventEtDensity &data)

Public Attributes

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

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.

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}
#define M_PI
double etaRangeLow
Access to lower range limit.
double etaRangeHigh
Access to upper range limit.
double rhoSigma
Access to spread of transverse energy density .
double rhoValue
Access to event transverse energy density .
double areaValue
Access to total area occupied by probe jets.

◆ 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}
double area(double R)

◆ 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}
fastjet::RangeDefinition range() const
Convert range into fastjet::RangeDefinition.

◆ ~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}
static double invalidValue()

◆ 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(); }
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11

◆ 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}
void clear()
Clear this EventEtDensity store.

◆ 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; }
EventEtDensity()
Constructor.
static bool copyData(const std::vector< double > &lparm, EventEtDensity &data, size_t lindx=0)
Fill EventEtDensity from a vector.

◆ 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; }
Scalar eta() const
pseudorapidity method

◆ 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}
static double nullValue()

◆ 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: