ATLAS Offline Software
EventEtDensity.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
7 
9 
10 bool EventEtDensity::copyData(const std::vector<double>& lparm,
11  size_t lindx)
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 }
29 
30 bool EventEtDensity::extractData(std::vector<double>& lparm,size_t lindx) const
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 }
41 
43 {
44  double invVal(EventShapeConstants::invalidValue());
45  rhoValue = invVal;
46  rhoSigma = invVal;
47  areaValue = invVal;
48  etaRangeLow = invVal;
49  etaRangeHigh = invVal;
50 }
51 
53 {
54  double nullVal(EventShapeConstants::nullValue());
55  rhoValue = nullVal;
56  rhoSigma = nullVal;
57  areaValue = nullVal;
58  etaRangeLow = nullVal;
59  etaRangeHigh = nullVal;
60 }
EventEtDensity::etaRangeLow
double etaRangeLow
Access to lower range limit.
Definition: EventEtDensity.h:82
EventEtDensity.h
EventEtDensity::RHOVALUE
@ RHOVALUE
Definition: EventEtDensity.h:67
EventShapeConstants::nullValue
static double nullValue()
Definition: StaticConstants.h:24
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
StaticConstants.h
EventEtDensity::extractData
static bool extractData(const EventEtDensity &data, std::vector< double > &lparm, size_t lindx=0)
Definition: EventEtDensity.h:247
EventShapeConstants::invalidValue
static double invalidValue()
Definition: StaticConstants.h:22
EventEtDensity::reset
void reset()
Definition: EventEtDensity.cxx:52
EventEtDensity::rhoSigma
double rhoSigma
Access to spread of transverse energy density .
Definition: EventEtDensity.h:78
EventEtDensity::ETARANGEHIGH
@ ETARANGEHIGH
Definition: EventEtDensity.h:71
EventEtDensity::AREAVALUE
@ AREAVALUE
Definition: EventEtDensity.h:69