CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
hcaldqm::ContainerCompact Class Reference

#include <ContainerCompact.h>

Public Member Functions

 ContainerCompact ()
 
virtual void dump (Container1D *, bool)
 
virtual void fill (HcalDetId const &, double)
 
virtual ~ContainerCompact ()
 

Protected Attributes

Compact _data [SUBDET_NUM][IPHI_NUM][IETA_NUM][DEPTH_NUM]
 

Detailed Description

Definition at line 27 of file ContainerCompact.h.

Constructor & Destructor Documentation

hcaldqm::ContainerCompact::ContainerCompact ( )
inline

Definition at line 30 of file ContainerCompact.h.

30 {}
virtual hcaldqm::ContainerCompact::~ContainerCompact ( )
inlinevirtual

Definition at line 31 of file ContainerCompact.h.

31 {}

Member Function Documentation

void hcaldqm::ContainerCompact::dump ( Container1D c,
bool  q 
)
virtual

Definition at line 26 of file ContainerCompact.cc.

References hcaldqm::Compact::_entries, hcaldqm::Compact::_sum, hcaldqm::Compact::_sum2, ztail::d, hcaldqm::constants::DEPTH_NUM, hcaldqm::Container1D::fill(), HB, HcalBarrel, HcalEmpty, HcalEndcap, HcalForward, HcalOuter, HE, hcaldqm::constants::HO, hcaldqm::constants::IETA_MIN, hcaldqm::constants::IETA_NUM, hcaldqm::constants::IPHI_NUM, timingPdfMaker::mean, plotscripts::rms(), mathSSE::sqrt(), hcaldqm::constants::SUBDET_NUM, and tmp.

Referenced by LaserTask::_dump(), LEDTask::_dump(), and PedestalTask::_dump().

27  {
28  for (int idet=0; idet<SUBDET_NUM; idet++)
29  {
31  if (idet+1==HB)
32  subd = HcalBarrel;
33  else if (idet+1==HE)
34  subd = HcalEndcap;
35  else if (idet+1==HO)
36  subd = HcalOuter;
37  else
38  subd = HcalForward;
39  for (int iiphi=0; iiphi<IPHI_NUM; iiphi++)
40  for (int iieta=0; iieta<IETA_NUM; iieta++)
41  for (int id=0; id<DEPTH_NUM; id++)
42  {
43  Compact tmp(_data[idet][iiphi][iieta][id]);
44  if (tmp._entries<=0)
45  continue;
46 
47  int iphi = iiphi+1;
48  int ieta = iieta<IETA_NUM/2 ? -(iieta+IETA_MIN) :
49  iieta-IETA_NUM/2+IETA_MIN;
50  int d = id+1;
51  HcalDetId did(subd, ieta, iphi, d);
52  double mean= tmp._sum/tmp._entries;
53  double rms = sqrt(tmp._sum2/tmp._entries -
54  mean*mean);
55  if (q)
56  c->fill(did, mean);
57  else
58  c->fill(did, rms);
59  }
60  }
61  }
int const IPHI_NUM
Definition: Constants.h:100
int const SUBDET_NUM
Definition: Constants.h:87
int const IETA_NUM
Definition: Constants.h:111
int const IETA_MIN
Definition: Constants.h:108
tuple d
Definition: ztail.py:151
T sqrt(T t)
Definition: SSEVec.h:18
HcalSubdetector
Definition: HcalAssistant.h:31
int const DEPTH_NUM
Definition: Constants.h:128
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
int const HO
Definition: Constants.h:85
Compact _data[SUBDET_NUM][IPHI_NUM][IETA_NUM][DEPTH_NUM]
void hcaldqm::ContainerCompact::fill ( HcalDetId const &  did,
double  x 
)
virtual

Definition at line 10 of file ContainerCompact.cc.

References funct::abs(), HcalDetId::depth(), hcaldqm::constants::GARBAGE_VALUE, HcalDetId::ieta(), hcaldqm::constants::IETA_MIN, hcaldqm::constants::IETA_NUM, HcalDetId::iphi(), and HcalDetId::subdet().

Referenced by LaserTask::_process(), LEDTask::_process(), and PedestalTask::_process().

11  {
12  if (x==GARBAGE_VALUE)
13  return;
14 
15  int isubdet = did.subdet()-1;
16  int iiphi = did.iphi()-1;
17  int iieta = did.ieta()<0 ? abs(did.ieta())-IETA_MIN :
18  did.ieta()-IETA_MIN+IETA_NUM/2;
19  int idepth = did.depth()-1;
20 
21  _data[isubdet][iiphi][iieta][idepth]._sum += x;
22  _data[isubdet][iiphi][iieta][idepth]._sum2 += x*x;
23  _data[isubdet][iiphi][iieta][idepth]._entries++;
24  }
int const IETA_NUM
Definition: Constants.h:111
int const IETA_MIN
Definition: Constants.h:108
unsigned int _entries
int const GARBAGE_VALUE
Definition: Constants.h:168
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Compact _data[SUBDET_NUM][IPHI_NUM][IETA_NUM][DEPTH_NUM]

Member Data Documentation

Compact hcaldqm::ContainerCompact::_data[SUBDET_NUM][IPHI_NUM][IETA_NUM][DEPTH_NUM]
protected