|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "CoralBase/Blob.h"
8 #include "GaudiKernel/MsgStream.h"
19 #include <TGraphErrors.h>
23 m_l1CaloRampDataContainerKey(
""),
24 m_energyScanResultsContainer(0),
25 m_energyScanRunInfoContainer(0)
40 return StatusCode::SUCCESS;
45 return StatusCode::SUCCESS;
61 std::vector<double>
x, ex,
y, ey;
62 boost::scoped_ptr<TGraphErrors> graph(0);
63 boost::scoped_ptr<TF1> func(
new TF1(
"func",
"pol1", 5., 255.));
66 for(;
it != itEnd; ++
it) {
67 x.clear(); ex.clear();
y.clear(); ey.clear();
68 func->SetParameters(0., 1.);
71 for(
unsigned int step = 0;
step <
it->second.getNSteps(); ++
step) {
82 if(
step &&
it->second.getLevel1(
step)->mean() <
x.back()) {
88 x.push_back(
it->second.getLevel1(
step)->mean());
90 ex.push_back(sqrt(
it->second.getLevel1(
step)->rms()*
it->second.getLevel1(
step)->rms() + 0.0052083333333333348));
91 y.push_back(
it->second.getCalo(
step)->mean());
92 ey.push_back(
it->second.getCalo(
step)->rms());
94 graph.reset(
new TGraphErrors(
x.size(), &
x.front(), &
y.front(), &ex.front(), &ey.front()));
96 if(graph->Fit(func.get(),
"QRF0") != 0) {
109 func->GetParameter(0),
110 func->GetParameter(1),
111 func->GetChisquare(),
121 msg(MSG::WARNING) <<
"Decreasing step energy - ignoring. ("
122 << errCount <<
" occurances)" <<
endmsg;
140 return StatusCode::SUCCESS;
const_iterator begin() const
virtual ~L1CaloLinearCalibration()
unsigned int runNumber() const
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
const_iterator end() const
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
This class is a collection of AttributeLists where each one is associated with a channel number....
Class that holds transient information about the calibration for trigger towers.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
boost::scoped_ptr< L1CaloEnergyScanResultsContainer > m_energyScanResultsContainer
::StatusCode StatusCode
StatusCode definition for legacy code.
L1CaloRampDataMap::const_iterator const_iterator
An AttributeList represents a logical row of attributes in a metadata table. The name and type of eac...
Container of L1CaloRampData objects.
std::string m_l1CaloRampDataContainerKey
std::string gainStrategy() const
boost::scoped_ptr< L1CaloEnergyScanRunInfoContainer > m_energyScanRunInfoContainer
Container of L1CaloEnergyScanResults objects, inherit from the abstract base class AbstractL1CaloCond...
Container of L1CaloEnergyScanRunInfo metadata, inherit from the abstract base class AbstractL1CaloCon...
ChanFitErrorCode stores information about the calibration fit quality.
L1CaloLinearCalibration(const std::string &name, ISvcLocator *pSvcLocator)