CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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.)
 insert an entry More...
 
 L3CalibBlock (const int numberOfElements, const int keventweight=1)
 ctor More...
 
void reset ()
 reset the calib objects More...
 
int solve (int usingBlockSolver, double min, double max)
 get the coefficients More...
 
 ~L3CalibBlock ()
 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

Date:
2009/02/11 15:46:48
Revision:
1.4
Id:
L3CalibBlock.h,v 1.4 2009/02/11 15:46:48 presotto Exp
Author
Author:
presotto

Definition at line 28 of file L3CalibBlock.h.

Constructor & Destructor Documentation

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

ctor

Date:
2008/11/14 11:40:34
Revision:
1.4
Id:
L3CalibBlock.cc,v 1.4 2008/11/14 11:40:34 presotto Exp
Author
Author:
presotto

Definition at line 17 of file L3CalibBlock.cc.

References reset().

18  :
19  VEcalCalibBlock (numberOfElements),
20  m_L3AlgoUniv (new MinL3AlgoUniv<unsigned int>(keventweight))
21 {
22  reset () ;
23 }
MinL3AlgoUniv< unsigned int > * m_L3AlgoUniv
the L3 algo
Definition: L3CalibBlock.h:56
void reset()
reset the calib objects
Definition: L3CalibBlock.cc:78
VEcalCalibBlock(int numberOfElements)
ctor
L3CalibBlock::~L3CalibBlock ( )

dtor

Definition at line 29 of file L3CalibBlock.cc.

References m_L3AlgoUniv.

30 {
31  delete m_L3AlgoUniv ;
32 }
MinL3AlgoUniv< unsigned int > * m_L3AlgoUniv
the L3 algo
Definition: L3CalibBlock.h:56

Member Function Documentation

double L3CalibBlock::at ( int  )

To retrieve the coefficients.

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

insert an entry

Implements VEcalCalibBlock.

Definition at line 39 of file L3CalibBlock.cc.

References MinL3AlgoUniv< IDdet >::addEvent(), relval_parameters_module::energy, m_L3AlgoUniv, position, and hitfit::return.

44 {
45  // to feed the L3 algo
46  std::vector<float> energy ;
47  std::vector<unsigned int> position ;
48  // loop over the energies map
49  for (std::map<int,double>::const_iterator itMap = MapBegin ;
50  itMap != MapEnd ;
51  ++itMap)
52  {
53  // translation into vectors for the L3 algo
54  position.push_back (itMap->first) ;
55  energy.push_back (itMap->second) ;
56  } // loop over the energies map
57  m_L3AlgoUniv->addEvent (energy, position, pTk-pSubtract) ;
58 
59  return ;
60 }
MinL3AlgoUniv< unsigned int > * m_L3AlgoUniv
the L3 algo
Definition: L3CalibBlock.h:56
void addEvent(const std::vector< float > &myCluster, const std::vector< IDdet > &idCluster, const float &energy)
add event to the calculation of the calibration vector
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
void L3CalibBlock::reset ( void  )
virtual

reset the calib objects

Implements VEcalCalibBlock.

Definition at line 78 of file L3CalibBlock.cc.

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

Referenced by MatrixReader.MatrixReader::__init__(), BeautifulSoup.BeautifulStoneSoup::__init__(), L3CalibBlock(), and MatrixReader.MatrixReader::showRaw().

79 {
80  //PG FIXME could it be it is not wanted to be reset?
82  return ;
83 }
MinL3AlgoUniv< unsigned int > * m_L3AlgoUniv
the L3 algo
Definition: L3CalibBlock.h:56
void resetSolution()
reset for new iteration
int L3CalibBlock::solve ( int  usingBlockSolver,
double  min,
double  max 
)
virtual

get the coefficients

Implements VEcalCalibBlock.

Definition at line 67 of file L3CalibBlock.cc.

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

68 {
70  return 0 ;
71 }
MinL3AlgoUniv< unsigned int > * m_L3AlgoUniv
the L3 algo
Definition: L3CalibBlock.h:56
std::map< unsigned int, float > m_coefficients
map of coefficients
IDmap getSolution(const bool resetsolution=true)

Member Data Documentation

MinL3AlgoUniv<unsigned int>* L3CalibBlock::m_L3AlgoUniv
private

the L3 algo

the universal L3 algo

Definition at line 56 of file L3CalibBlock.h.

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