|
ATLAS Offline Software
|
Go to the documentation of this file.
17 #include "GaudiKernel/MsgStream.h"
18 #include "GaudiKernel/StatusCode.h"
65 ATH_MSG_FATAL(
"ManagedMonitorToolBase::initialize() - Failed" );
91 if (evtInfo.isValid()) {
92 return evtInfo->lumiBlock();
103 return StatusCode::SUCCESS;
114 std::string
hname = hname_prefix + nameOfEgammaType;
115 std::string htitle = htitle_prefix +
" (" + nameOfEgammaType +
")";
121 h =
new TH2F(
hname.c_str(),htitle.c_str(),nbinsx,xlow,xhigh,nbinsy,ylow,yhigh);
125 void egammaMonToolBase::bookTH2F(
TH2* &
h,
MonGroup& mygroup,
const std::string& hname_prefix,
const std::string& htitle_prefix,
int nbinsx,
float xlow,
float xhigh,
int nbinsy,
float ylow,
float yhigh, std::string &nameOfEgammaType)
127 std::string
hname = hname_prefix + nameOfEgammaType;
128 std::string htitle = htitle_prefix +
" (" + nameOfEgammaType +
")";
129 bookTH2F(
h, mygroup,
hname, htitle, nbinsx, xlow, xhigh, nbinsy, ylow, yhigh);
144 for(
unsigned int ir=min_region;
ir<=max_region;
ir++) {
154 void egammaMonToolBase::bookTH1FperRegion(std::vector<TH1*> &vhist,
MonGroup& mygroup,
const std::string& hname_prefix,
const std::string& htitle_prefix,
int nbins,
float low,
float high,
unsigned int min_region,
unsigned int max_region, std::string &nameOfEgammaType)
156 std::string
hname = hname_prefix + nameOfEgammaType;
157 std::string htitle = htitle_prefix +
" (" + nameOfEgammaType +
")";
161 void egammaMonToolBase::bookTH2FperRegion(std::vector<TH2*> &vhist,
MonGroup& mygroup,
const std::string&
hname,
const std::string& htitle,
int nbinsx,
float xlow,
float xhigh,
int nbinsy,
float ylow,
float yhigh,
unsigned int min_region,
unsigned int max_region)
167 for(
unsigned int ir=min_region;
ir<=max_region;
ir++) {
171 TH2 *
h =
new TH2F(
name.c_str(),
title.c_str(),nbinsx,xlow,xhigh,nbinsy,ylow,yhigh);
177 void egammaMonToolBase::bookTH2FperRegion(std::vector<TH2*> &vhist,
MonGroup& mygroup,
const std::string& hname_prefix,
const std::string& htitle_prefix,
int nbinsx,
float xlow,
float xhigh,
int nbinsy,
float ylow,
float yhigh,
unsigned int min_region,
unsigned int max_region, std::string &nameOfEgammaType)
179 std::string
hname = hname_prefix + nameOfEgammaType;
180 std::string htitle = htitle_prefix +
" (" + nameOfEgammaType +
")";
181 bookTH2FperRegion(vhist, mygroup,
hname, htitle, nbinsx, xlow, xhigh, nbinsy, ylow, yhigh, min_region, max_region);
186 unsigned int size = vhist.size();
194 unsigned int size = vhist.size();
202 float aeta = fabs(
eta);
203 if( aeta < 3.2 )
return ENDCAP;
209 float aeta = fabs(
eta);
211 if( aeta < 1.37 )
return BARREL;
213 if( aeta > 1.52)
return ENDCAP;
224 return StatusCode::SUCCESS;
232 if (
sc.isFailure()) {
261 return StatusCode::SUCCESS;
266 int nbins =
h->GetNbinsX();
267 if(href->GetNbinsX()!=
nbins) {
268 ATH_MSG_WARNING(
"egammaMonToolBase::FillEfficiencies(): histograms have different number of bins, can not divide!");
272 ATH_MSG_DEBUG(
"egammaMonToolBase::FillEfficiencies(): start new computation");
279 double A =
h->GetBinContent(
i);
281 err = sqrt(eps*(1-eps)/Yref);
289 h->SetBinContent(
i,eps);
290 h->SetBinError(
i,
err);
297 ATH_MSG_DEBUG(
"No Trigger request for that monitoring tool");
302 bool triggerfound =
false;
316 const std::vector<std::string>&
vec =
m_trigdec->getListOfTriggers();
318 for (
const auto &
i :
vec) {
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< size_t > vec
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
@ LAr
The LAr calorimeter.
@ Error
The sub-detector issued an error.
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.
def TProfile(*args, **kwargs)
::StatusCode StatusCode
StatusCode definition for legacy code.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
EventFlagErrorState
States that a given sub-detector could be in.
double GetBinContent(int) const
Class describing the basic event information.
int ir
counter of the current depth
#define ATH_MSG_WARNING(x)
EventFlagErrorState errorState(EventFlagSubDet subDet) const
Get the error state for a particular sub-detector.
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)