CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
L3CalibBlock Class Reference

interface to the L3Univ class for testing
More...

#include <L3CalibBlock.h>

Inheritance diagram for L3CalibBlock:
VEcalCalibBlock

Public Member Functions

double at (int)
 To retrieve the coefficients. More...
 
void Fill (std::map< int, double >::const_iterator, std::map< int, double >::const_iterator, double pTk, double pSubtract, double sigma=1.) override
 insert an entry More...
 
 L3CalibBlock (const int numberOfElements, const int keventweight=1)
 ctor More...
 
void reset () override
 reset the calib objects More...
 
int solve (int usingBlockSolver, double min, double max) override
 get the coefficients More...
 
 ~L3CalibBlock () override
 dtor More...
 
- Public Member Functions inherited from VEcalCalibBlock
float at (const unsigned int index)
 retrieve the coefficients More...
 
 VEcalCalibBlock (int numberOfElements)
 ctor More...
 
virtual ~VEcalCalibBlock ()
 dtor More...
 

Private Attributes

MinL3AlgoUniv< unsigned int > * m_L3AlgoUniv
 the L3 algo More...
 

Additional Inherited Members

- Protected Attributes inherited from VEcalCalibBlock
std::map< unsigned int, float > m_coefficients
 map of coefficients More...
 
unsigned int m_numberOfElements
 The only parameter! More...
 

Detailed Description

interface to the L3Univ class for testing

Definition at line 24 of file L3CalibBlock.h.

Constructor & Destructor Documentation

◆ L3CalibBlock()

L3CalibBlock::L3CalibBlock ( const int  numberOfElements,
const int  keventweight = 1 
)

ctor

Definition at line 11 of file L3CalibBlock.cc.

12  : VEcalCalibBlock(numberOfElements), m_L3AlgoUniv(new MinL3AlgoUniv<unsigned int>(keventweight)) {
13  reset();
14 }

References reset().

◆ ~L3CalibBlock()

L3CalibBlock::~L3CalibBlock ( )
override

dtor

Definition at line 18 of file L3CalibBlock.cc.

18 { delete m_L3AlgoUniv; }

References m_L3AlgoUniv.

Member Function Documentation

◆ at()

double L3CalibBlock::at ( int  )

To retrieve the coefficients.

◆ Fill()

void L3CalibBlock::Fill ( std::map< int, double >::const_iterator  MapBegin,
std::map< int, double >::const_iterator  MapEnd,
double  pTk,
double  pSubtract,
double  sigma = 1. 
)
overridevirtual

insert an entry

Implements VEcalCalibBlock.

Definition at line 22 of file L3CalibBlock.cc.

26  {
27  // to feed the L3 algo
28  std::vector<float> energy;
29  std::vector<unsigned int> position;
30  // loop over the energies map
31  for (std::map<int, double>::const_iterator itMap = MapBegin; itMap != MapEnd; ++itMap) {
32  // translation into vectors for the L3 algo
33  position.push_back(itMap->first);
34  energy.push_back(itMap->second);
35  } // loop over the energies map
36  m_L3AlgoUniv->addEvent(energy, position, pTk - pSubtract);
37 
38  return;
39 }

References MinL3AlgoUniv< IDdet >::addEvent(), HCALHighEnergyHPDFilter_cfi::energy, m_L3AlgoUniv, and position.

◆ reset()

void L3CalibBlock::reset ( void  )
overridevirtual

reset the calib objects

Implements VEcalCalibBlock.

Definition at line 50 of file L3CalibBlock.cc.

50  {
51  //PG FIXME could it be it is not wanted to be reset?
53  return;
54 }

References m_L3AlgoUniv, and MinL3AlgoUniv< IDdet >::resetSolution().

Referenced by MatrixReader.MatrixReader::__init__(), L3CalibBlock(), data_sources.json_list::next(), and MatrixReader.MatrixReader::showRaw().

◆ solve()

int L3CalibBlock::solve ( int  usingBlockSolver,
double  min,
double  max 
)
overridevirtual

get the coefficients

Implements VEcalCalibBlock.

Definition at line 43 of file L3CalibBlock.cc.

43  {
45  return 0;
46 }

References MinL3AlgoUniv< IDdet >::getSolution(), VEcalCalibBlock::m_coefficients, and m_L3AlgoUniv.

Member Data Documentation

◆ m_L3AlgoUniv

MinL3AlgoUniv<unsigned int>* L3CalibBlock::m_L3AlgoUniv
private

the L3 algo

the universal L3 algo

Definition at line 49 of file L3CalibBlock.h.

Referenced by Fill(), reset(), solve(), and ~L3CalibBlock().

MinL3AlgoUniv::getSolution
IDmap getSolution(const bool resetsolution=true)
Definition: MinL3AlgoUniv.h:184
VEcalCalibBlock::VEcalCalibBlock
VEcalCalibBlock(int numberOfElements)
ctor
Definition: VEcalCalibBlock.h:16
L3CalibBlock::reset
void reset() override
reset the calib objects
Definition: L3CalibBlock.cc:50
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
MinL3AlgoUniv::resetSolution
void resetSolution()
reset for new iteration
Definition: MinL3AlgoUniv.h:203
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
VEcalCalibBlock::m_coefficients
std::map< unsigned int, float > m_coefficients
map of coefficients
Definition: VEcalCalibBlock.h:38
MinL3AlgoUniv< unsigned int >
MinL3AlgoUniv::addEvent
void addEvent(const std::vector< float > &myCluster, const std::vector< IDdet > &idCluster, const float &energy)
add event to the calculation of the calibration vector
Definition: MinL3AlgoUniv.h:142
L3CalibBlock::m_L3AlgoUniv
MinL3AlgoUniv< unsigned int > * m_L3AlgoUniv
the L3 algo
Definition: L3CalibBlock.h:49