CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
EcalCondObjectContainer< T > Class Template Reference

#include <EcalCondObjectContainer.h>

Public Types

typedef std::vector< Item >::const_iterator const_iterator
 
typedef T Item
 
typedef std::vector< ItemItems
 
typedef std::vector< Item >::iterator iterator
 
typedef EcalCondObjectContainer< Tself
 
typedef Item value_type
 

Public Member Functions

const Itembarrel (size_t hashedIndex) const
 
const ItemsbarrelItems () const
 
const_iterator begin () const
 
void clear ()
 
 EcalCondObjectContainer ()
 
const_iterator end () const
 
const Itemendcap (size_t hashedIndex) const
 
const ItemsendcapItems () const
 
const_iterator find (uint32_t rawId) const
 
const selfgetMap () const
 
void insert (std::pair< uint32_t, Item > const &a)
 
Itemoperator[] (uint32_t rawId)
 
Item operator[] (uint32_t rawId) const
 
void setValue (const uint32_t id, const Item &item)
 
size_t size () const
 
void summary (float &arg_mean_x_EB, float &arg_rms_EB, int &arg_num_x_EB, float &arg_mean_x_EE, float &arg_rms_EE, int &arg_num_x_EE) const
 
 ~EcalCondObjectContainer ()
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

EcalContainer< EBDetId, Itemeb_
 
EcalContainer< EEDetId, Itemee_
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

template<typename T>
class EcalCondObjectContainer< T >

Definition at line 13 of file EcalCondObjectContainer.h.

Member Typedef Documentation

◆ const_iterator

template<typename T>
typedef std::vector<Item>::const_iterator EcalCondObjectContainer< T >::const_iterator

Definition at line 19 of file EcalCondObjectContainer.h.

◆ Item

template<typename T>
typedef T EcalCondObjectContainer< T >::Item

Definition at line 15 of file EcalCondObjectContainer.h.

◆ Items

template<typename T>
typedef std::vector<Item> EcalCondObjectContainer< T >::Items

Definition at line 18 of file EcalCondObjectContainer.h.

◆ iterator

template<typename T>
typedef std::vector<Item>::iterator EcalCondObjectContainer< T >::iterator

Definition at line 20 of file EcalCondObjectContainer.h.

◆ self

template<typename T>
typedef EcalCondObjectContainer<T> EcalCondObjectContainer< T >::self

Definition at line 17 of file EcalCondObjectContainer.h.

◆ value_type

template<typename T>
typedef Item EcalCondObjectContainer< T >::value_type

Definition at line 16 of file EcalCondObjectContainer.h.

Constructor & Destructor Documentation

◆ EcalCondObjectContainer()

template<typename T>
EcalCondObjectContainer< T >::EcalCondObjectContainer ( )
inline

Definition at line 22 of file EcalCondObjectContainer.h.

22 {};

◆ ~EcalCondObjectContainer()

template<typename T>
EcalCondObjectContainer< T >::~EcalCondObjectContainer ( )
inline

Definition at line 23 of file EcalCondObjectContainer.h.

23 {};

Member Function Documentation

◆ barrel()

template<typename T>
const Item& EcalCondObjectContainer< T >::barrel ( size_t  hashedIndex) const
inline

◆ barrelItems()

template<typename T>
const Items& EcalCondObjectContainer< T >::barrelItems ( ) const
inline

◆ begin()

template<typename T>
const_iterator EcalCondObjectContainer< T >::begin ( void  ) const
inline

Definition at line 74 of file EcalCondObjectContainer.h.

74 { return eb_.begin(); }

Referenced by EcalTPGParamBuilder::analyze().

◆ clear()

template<typename T>
void EcalCondObjectContainer< T >::clear ( void  )
inline

◆ end()

template<typename T>
const_iterator EcalCondObjectContainer< T >::end ( void  ) const
inline

Definition at line 76 of file EcalCondObjectContainer.h.

76 { return ee_.end(); }

Referenced by EcalTrivialObjectAnalyzer::analyze(), EcalBarrelRecHitsValidation::analyze(), EcalEndcapRecHitsValidation::analyze(), EcalRecHitsValidation::analyze(), EcalTPGParamBuilder::analyze(), EcalClusterLazyToolsBase::BasicClusterTime(), EcalBoundaryInfoCalculator< EBDetId >::boundaryRecHits(), EcalBoundaryInfoCalculator< EBDetId >::checkRecHitHasDeadNeighbour(), Types.LuminosityBlockRange::cppID(), Types.EventRange::cppID(), EcalTools::deadNeighbour(), Pi0FixedMassWindowCalibration::duringLoop(), EcalMIPRecHitFilter::filter(), EcalDeadCellBoundaryEnergyFilter::filter(), EcalLiteDTUCoder::findIntercalibConstant(), EcalCoder::findIntercalibConstant(), EcalLiteDTUCoder::findPedestal(), EcalMixingModuleValidation::findPedestal(), EcalBoundaryInfoCalculator< EBDetId >::gapRecHits(), DCCDataUnpacker::getChannelStatus(), EcalTPGParamBuilder::getCoeff(), EcalTrivialConditionRetriever::getIntercalibConstantsFromConfiguration(), EcalLaserDbService::getLaserCorrection(), edm::DataMixingEMDigiWorker::GetPedestals(), EcalDccWeightBuilder::intercalib(), ECALpedestalPCLHarvester::isGood(), EcalTools::isNextToDead(), EcalTBWeightUncalibRecHitProducer::produce(), EcalRecalibRecHitProducer::produce(), EcalTPSkimmer::produce(), EcalRecHitProducer::produce(), EcalDetIdToBeRecoveredProducer::produce(), EcalRecHitRecalib::produce(), EcalUncalibRecHitWorkerFixedAlphaBetaFit::run(), EcalRecHitWorkerSimple::run(), EcalUncalibRecHitWorkerAnalFit::run(), and EcalFenixLinearizer::setParameters().

◆ endcap()

template<typename T>
const Item& EcalCondObjectContainer< T >::endcap ( size_t  hashedIndex) const
inline

◆ endcapItems()

template<typename T>
const Items& EcalCondObjectContainer< T >::endcapItems ( ) const
inline

◆ find()

template<typename T>
const_iterator EcalCondObjectContainer< T >::find ( uint32_t  rawId) const
inline

Definition at line 53 of file EcalCondObjectContainer.h.

53  {
54  DetId id(rawId);
55  switch (id.subdetId()) {
56  case EcalBarrel: {
57  const_iterator it = eb_.find(rawId);
58  if (it != eb_.end()) {
59  return it;
60  } else {
61  return ee_.end();
62  }
63  } break;
64  case EcalEndcap: {
65  return ee_.find(rawId);
66  } break;
67  default:
68  // FIXME (add throw)
69  return ee_.end();
70  }
71  return ee_.end();
72  }

Referenced by BeautifulSoup.Tag::__getattr__(), EcalTrivialObjectAnalyzer::analyze(), EcalPFRecHitThresholdsMaker::analyze(), EcalBarrelRecHitsValidation::analyze(), EcalEndcapRecHitsValidation::analyze(), EcalRecHitsValidation::analyze(), EcalTPGParamBuilder::analyze(), EcalClusterLazyToolsBase::BasicClusterTime(), ECALpedestalPCLworker::bookHistograms(), EcalBoundaryInfoCalculator< EBDetId >::boundaryRecHits(), EcalBoundaryInfoCalculator< EBDetId >::checkRecHitHasDeadNeighbour(), ECALpedestalPCLHarvester::checkStatusCode(), ECALpedestalPCLHarvester::checkVariation(), EcalTools::deadNeighbour(), ECALpedestalPCLHarvester::dqmEndJob(), Pi0FixedMassWindowCalibration::duringLoop(), ZeeCalibration::duringLoop(), EcalMIPRecHitFilter::filter(), EcalDeadCellBoundaryEnergyFilter::filter(), EcalCoder::findGains(), EcalLiteDTUCoder::findIntercalibConstant(), EcalCoder::findIntercalibConstant(), EcalLiteDTUCoder::findPedestal(), EcalCoder::findPedestal(), EcalMixingModuleValidation::findPedestal(), BeautifulSoup.Tag::firstText(), EcalBoundaryInfoCalculator< EBDetId >::gapRecHits(), DCCDataUnpacker::getChannelStatus(), EcalTPGParamBuilder::getCoeff(), EcalTrivialConditionRetriever::getIntercalibConstantsFromConfiguration(), EcalLaserDbService::getLaserCorrection(), edm::DataMixingEMDigiWorker::GetPedestals(), EcalDccWeightBuilder::intercalib(), ECALpedestalPCLHarvester::isGood(), EcalTools::isNextToDead(), CaloMiscalibMapEcal::print(), EcalTBWeightUncalibRecHitProducer::produce(), EcalRecalibRecHitProducer::produce(), EcalTPSkimmer::produce(), EcalRecHitProducer::produce(), EcalDetIdToBeRecoveredProducer::produce(), EcalRecHitRecalib::produce(), pat::PATIsolatedTrackProducer::produce(), EcalUncalibRecHitWorkerFixedAlphaBetaFit::run(), EcalRecHitWorkerSimple::run(), EcalUncalibRecHitWorkerAnalFit::run(), EcalFenixLinearizer::setParameters(), and EcalSeverityLevelAlgo::severityLevel().

◆ getMap()

template<typename T>
const self& EcalCondObjectContainer< T >::getMap ( ) const
inline

◆ insert()

template<typename T>
void EcalCondObjectContainer< T >::insert ( std::pair< uint32_t, Item > const &  a)
inline

◆ operator[]() [1/2]

template<typename T>
Item& EcalCondObjectContainer< T >::operator[] ( uint32_t  rawId)
inline

Definition at line 85 of file EcalCondObjectContainer.h.

85  {
86  DetId id(rawId);
87  return (id.subdetId() == EcalBarrel) ? eb_[rawId] : ee_[rawId];
88  }

◆ operator[]() [2/2]

template<typename T>
Item EcalCondObjectContainer< T >::operator[] ( uint32_t  rawId) const
inline

Definition at line 90 of file EcalCondObjectContainer.h.

90  {
91  DetId id(rawId);
92  switch (id.subdetId()) {
93  case EcalBarrel: {
94  return eb_[rawId];
95  } break;
96  case EcalEndcap: {
97  return ee_[rawId];
98  } break;
99  default:
100  // FIXME (add throw)
101  // sizeof(Item) <= sizeof(int64_t) for all Items.
102  return Item();
103  }
104  }

◆ serialize()

template<typename T>
template<class Archive >
void EcalCondObjectContainer< T >::serialize ( Archive &  ar,
const unsigned int  version 
)
private

◆ setValue()

template<typename T>
void EcalCondObjectContainer< T >::setValue ( const uint32_t  id,
const Item item 
)
inline

◆ size()

template<typename T>
size_t EcalCondObjectContainer< T >::size ( void  ) const
inline

◆ summary()

template<typename T>
void EcalCondObjectContainer< T >::summary ( float &  arg_mean_x_EB,
float &  arg_rms_EB,
int &  arg_num_x_EB,
float &  arg_mean_x_EE,
float &  arg_rms_EE,
int &  arg_num_x_EE 
) const
inline

calculate mean and sigma

Definition at line 106 of file EcalCondObjectContainer.h.

111  {
112  //std::stringstream ss;
113 
114  const int kSides = 2;
115  const int kBarlRings = EBDetId::MAX_IETA;
116  const int kBarlWedges = EBDetId::MAX_IPHI;
117  const int kEndcWedgesX = EEDetId::IX_MAX;
118  const int kEndcWedgesY = EEDetId::IY_MAX;
119 
121 
122  float mean_x_EB = 0;
123  float mean_xx_EB = 0;
124  int num_x_EB = 0;
125 
126  float mean_x_EE = 0;
127  float mean_xx_EE = 0;
128  int num_x_EE = 0;
129 
130  for (int sign = 0; sign < kSides; sign++) {
131  int thesign = sign == 1 ? 1 : -1;
132 
133  for (int ieta = 0; ieta < kBarlRings; ieta++) {
134  for (int iphi = 0; iphi < kBarlWedges; iphi++) {
135  EBDetId id((ieta + 1) * thesign, iphi + 1);
136 
137  //float x= object()[id.rawId()];
138  float x = eb_[id.rawId()];
139  num_x_EB++;
140  mean_x_EB = mean_x_EB + x;
141  mean_xx_EB = mean_xx_EB + x * x;
142  }
143  }
144 
145  for (int ix = 0; ix < kEndcWedgesX; ix++) {
146  for (int iy = 0; iy < kEndcWedgesY; iy++) {
147  if (!EEDetId::validDetId(ix + 1, iy + 1, thesign))
148  continue;
149 
150  EEDetId id(ix + 1, iy + 1, thesign);
151  //float x=object()[id.rawId()];
152  float x = ee_[id.rawId()];
153  num_x_EE++;
154  mean_x_EE = mean_x_EE + x;
155  mean_xx_EE = mean_xx_EE + x * x;
156 
157  } //iy
158  } //ix
159  }
160 
161  mean_x_EB = mean_x_EB / num_x_EB;
162  mean_x_EE = mean_x_EE / num_x_EE;
163  mean_xx_EB = mean_xx_EB / num_x_EB;
164  mean_xx_EE = mean_xx_EE / num_x_EE;
165  float rms_EB = (mean_xx_EB - mean_x_EB * mean_x_EB);
166  float rms_EE = (mean_xx_EE - mean_x_EE * mean_x_EE);
167 
168  arg_mean_x_EB = mean_x_EB;
169  arg_rms_EB = rms_EB;
170  arg_num_x_EB = num_x_EB;
171 
172  arg_mean_x_EE = mean_x_EE;
173  arg_rms_EE = rms_EE;
174  arg_num_x_EE = num_x_EE;
175 
176  //ss << "ECAL BARREL Mean: "<< mean_x_EB <<" RMS: "<< rms_EB << " Nchan: "<< num_x_EB<< std::endl
177  // << "ECAL Endcap Mean: "<< mean_x_EE <<" RMS: "<< rms_EE << " Nchan: "<< num_x_EE<< std::endl ;
178 
179  //return ss.str();
180  }

Friends And Related Function Documentation

◆ boost::serialization::access

template<typename T>
friend class boost::serialization::access
friend

Definition at line 186 of file EcalCondObjectContainer.h.

◆ cond::serialization::access

template<typename T>
template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 186 of file EcalCondObjectContainer.h.

Member Data Documentation

◆ eb_

template<typename T>
EcalContainer<EBDetId, Item> EcalCondObjectContainer< T >::eb_
private

◆ ee_

template<typename T>
EcalContainer<EEDetId, Item> EcalCondObjectContainer< T >::ee_
private
kBarlRings
static const int kBarlRings
Definition: EcalGeomPhiSymHelper.h:7
EcalContainer::end
const_iterator end() const
Definition: EcalContainer.h:82
EcalContainer::items
const Items & items() const
Definition: EcalContainer.h:36
EcalContainer::item
const Item & item(size_t hashid) const
Definition: EcalContainer.h:34
EcalCondObjectContainer::ee_
EcalContainer< EEDetId, Item > ee_
Definition: EcalCondObjectContainer.h:184
EBDetId
Definition: EBDetId.h:17
Validation_hcalonly_cfi.sign
sign
Definition: Validation_hcalonly_cfi.py:32
DDAxes::x
kEndcWedgesY
static const int kEndcWedgesY
Definition: EcalGeomPhiSymHelper.h:12
EcalBarrel
Definition: EcalSubdetector.h:10
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
DetId
Definition: DetId.h:17
EcalCondObjectContainer::eb_
EcalContainer< EBDetId, Item > eb_
Definition: EcalCondObjectContainer.h:183
EBDetId::MAX_IPHI
static const int MAX_IPHI
Definition: EBDetId.h:137
EEDetId::IY_MAX
static const int IY_MAX
Definition: EEDetId.h:302
EEDetId
Definition: EEDetId.h:14
EcalEndcap
Definition: EcalSubdetector.h:10
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
a
double a
Definition: hdecay.h:119
EcalCondObjectContainer::Item
T Item
Definition: EcalCondObjectContainer.h:15
EcalContainer::clear
void clear()
Definition: EcalContainer.h:27
EEDetId::IX_MAX
static const int IX_MAX
Definition: EEDetId.h:298
EcalContainer::find
const_iterator find(uint32_t rawId) const
Definition: EcalContainer.h:73
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
kSides
static const int kSides
Definition: EcalGeomPhiSymHelper.h:9
kEndcWedgesX
static const int kEndcWedgesX
Definition: EcalGeomPhiSymHelper.h:11
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
EEDetId::validDetId
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
EcalCondObjectContainer::const_iterator
std::vector< Item >::const_iterator const_iterator
Definition: EcalCondObjectContainer.h:19
kBarlWedges
static const int kBarlWedges
Definition: EcalGeomPhiSymHelper.h:8
EcalContainer::insert
void insert(std::pair< uint32_t, Item > const &a)
Definition: EcalContainer.h:32
EcalContainer::begin
const_iterator begin() const
Definition: EcalContainer.h:80
ecalpyutils::hashedIndex
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:38
EcalContainer::size
size_t size() const
Definition: EcalContainer.h:84
EBDetId::MAX_IETA
static const int MAX_IETA
Definition: EBDetId.h:136