CMS 3D CMS Logo

Public Member Functions | Private Attributes

L3CalibBlock Class Reference

interface to the L3Univ class for testing More...

#include <L3CalibBlock.h>

Inheritance diagram for L3CalibBlock:
VEcalCalibBlock

List of all members.

Public Member Functions

double at (int)
 To retrieve the coefficients.
void Fill (std::map< int, double >::const_iterator, std::map< int, double >::const_iterator, double pTk, double pSubtract, double sigma=1.)
 insert an entry
 L3CalibBlock (const int numberOfElements, const int keventweight=1)
 ctor
void reset ()
 reset the calib objects
int solve (int usingBlockSolver, double min, double max)
 get the coefficients
 ~L3CalibBlock ()
 dtor

Private Attributes

MinL3AlgoUniv< unsigned int > * m_L3AlgoUniv
 the L3 algo

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().

                                                   :
  VEcalCalibBlock (numberOfElements), 
  m_L3AlgoUniv (new MinL3AlgoUniv<unsigned int>(keventweight))
{
  reset () ;
}
L3CalibBlock::~L3CalibBlock ( )

dtor

Definition at line 29 of file L3CalibBlock.cc.

References m_L3AlgoUniv.

{
  delete m_L3AlgoUniv ;
}

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, and position.

{
  // to feed the L3 algo
  std::vector<float> energy ;
  std::vector<unsigned int> position ;
  // loop over the energies map
  for (std::map<int,double>::const_iterator itMap = MapBegin ; 
       itMap != MapEnd ; 
       ++itMap)
    {
      // translation into vectors for the L3 algo
      position.push_back (itMap->first) ;
      energy.push_back (itMap->second) ;
    } // loop over the energies map
  m_L3AlgoUniv->addEvent (energy, position, pTk-pSubtract) ;

  return ;
}
void L3CalibBlock::reset ( void  ) [virtual]

reset the calib objects

Implements VEcalCalibBlock.

Definition at line 78 of file L3CalibBlock.cc.

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

Referenced by L3CalibBlock().

{
  //PG FIXME could it be it is not wanted to be reset?
  m_L3AlgoUniv->resetSolution () ;
  return ;
}
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.

{
  m_coefficients = m_L3AlgoUniv->getSolution () ;
  return 0 ;
}

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().