![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
17 #include "GaudiKernel/ISvcLocator.h"
39 #include "TFitResult.h"
40 #include "TFitResultPtr.h"
41 #include "TMatrixDSym.h"
42 #include "TGraphErrors.h"
43 #include "TClonesArray.h"
200 float binwidth[2] = { 0.125, 0.25 };
203 std::ostringstream sStr;
206 for (
int rc = 0; rc <
RCnum; ++rc) {
212 sStr <<
"Amplitudes_RC_" << rc <<
"_Part_" <<
ros <<
"_Drawer_" <<
drawer <<
"_Ch_" <<
ch <<
"_Gain_" <<
g;
224 float cellbin[2] = { 80., 2.5 };
230 for (
int tower = 0; tower <
NTOWERS; tower++) {
233 sStr <<
"CellAmplitude_Side_" <<
side <<
"_Drawer_" <<
drawer <<
"_Sample_" <<
sample <<
"_Tower_" << tower <<
"_Gains_" << gg;
267 return StatusCode::SUCCESS;
292 if (cnvSvc.retrieve().isFailure()) {
301 ATH_MSG_ERROR(
" Can't get TileBeamElemContByteStreamCnv " );
311 return StatusCode::SUCCESS;
318 const EventContext& ctx = Gaudi::Hive::currentContext();
327 bool calibMode = (dqStatus->
calibMode() == 1);
355 return StatusCode::SUCCESS;
387 std::ostringstream sStr;
388 std::string trig_str;
399 sStr <<
m_file <<
"_" <<
m_run <<
"_" << trig_str <<
".root";
405 TFile*
fout =
new TFile(
m_file.c_str(),
"recreate");
408 TTree*
t =
new TTree(
m_ntupleID.c_str(),
"Tile_RC_NoiseCalib-Ntuple");
410 t->Branch(
"RunNumber", &
m_run,
"RunNumber/I");
412 t->Branch(
"Time", &
m_time,
"Time/I");
413 t->Branch(
"Year", &
m_year,
"Year/I");
414 t->Branch(
"Month", &
m_month,
"Month/I");
415 t->Branch(
"Day", &
m_day,
"Day/I");
416 t->Branch(
"YDay", &
m_yday,
"YDay/I");
417 t->Branch(
"Hour", &
m_hour,
"Hour/I");
418 t->Branch(
"Min", &
m_min,
"Min/I");
419 t->Branch(
"nEvt", &
m_evtNr,
"nEvt/I");
420 t->Branch(
"EvtNr", &
m_evtNr,
"EvtNr/I");
421 t->Branch(
"EvtGood", *
m_evt,
"Evt[5][64][48][2]/I");
424 t->Branch(
"ros", *
m_ros,
"ros[5][64][48][2]/b");
425 t->Branch(
"drawer", *
m_drawer,
"drawer[5][64][48][2]/b");
426 t->Branch(
"channel", *
m_channel,
"channel[5][64][48][2]/b");
427 t->Branch(
"gain", *
m_gain,
"gain[5][64][48][2]/O");
429 t->Branch(
"efit_mean",*(
m_rc_mean[
Fit]),
"efit_mean[5][64][48][2]/F");
430 t->Branch(
"efit_av",*(
m_rc_av[
Fit]),
"efit_av[5][64][48][2]/F");
431 t->Branch(
"efit_rms",*(
m_rc_rms[
Fit]),
"efit_rms[5][64][48][2]/F");
432 t->Branch(
"efit_sigma",*(
m_rc_sigma[
Fit]),
"efit_sigma[5][64][48][2]/F");
433 t->Branch(
"efit_mean_err",*(
m_rc_mean_err[
Fit]),
"efit_mean_err[5][64][48][2]/F");
435 t->Branch(
"efit_kurtosis",*(
m_rc_kurtosis[
Fit]),
"efit_kurtosis[5][64][48][2]/F");
436 t->Branch(
"efit_skewness",*(
m_rc_skewness[
Fit]),
"efit_skewness[5][64][48][2]/F");
437 t->Branch(
"efit_chi2",*(
m_rc_chi2[
Fit]),
"efit_chi2[5][64][48][2]/F");
438 t->Branch(
"efit_ndf",*(
m_rc_ndf[
Fit]),
"efit_ndf[5][64][48][2]/F");
439 t->Branch(
"efit_probC2",*(
m_rc_probC2[
Fit]),
"efit_probC2[5][64][48][2]/F");
441 t->Branch(
"efit_gsigma1",*(
m_rc_gsigma1[
Fit]),
"efit_gsigma1[5][64][48][2]/F");
442 t->Branch(
"efit_gsigma2",*(
m_rc_gsigma2[
Fit]),
"efit_gsigma2[5][64][48][2]/F");
443 t->Branch(
"efit_gnorm",*(
m_rc_gnorm[
Fit]),
"efit_gnorm[5][64][48][2]/F");
444 t->Branch(
"efit_gchi2",*(
m_rc_gchi2[
Fit]),
"efit_gchi2[5][64][48][2]/F");
446 t->Branch(
"efit_gerrnorm",*(
m_rc_gerrnorm[
Fit]),
"efit_gerrnorm[5][64][48][2]/F");
451 t->Branch(
"efixed_mean",*(
m_rc_mean[
Fixed]),
"efixed_mean[5][64][48][2]/F");
452 t->Branch(
"efixed_av",*(
m_rc_av[
Fixed]),
"efixed_av[5][64][48][2]/F");
453 t->Branch(
"efixed_rms",*(
m_rc_rms[
Fixed]),
"efixed_rms[5][64][48][2]/F");
454 t->Branch(
"efixed_sigma",*(
m_rc_sigma[
Fixed]),
"efixed_sigma[5][64][48][2]/F");
459 t->Branch(
"efixed_chi2",*(
m_rc_chi2[
Fixed]),
"efixed_chi2[5][64][48][2]/F");
460 t->Branch(
"efixed_ndf",*(
m_rc_ndf[
Fixed]),
"efixed_ndf[5][64][48][2]/F");
461 t->Branch(
"efixed_probC2",*(
m_rc_probC2[
Fixed]),
"efixed_probC2[5][64][48][2]/F");
465 t->Branch(
"efixed_gnorm",*(
m_rc_gnorm[
Fixed]),
"efixed_gnorm[5][64][48][2]/F");
466 t->Branch(
"efixed_gchi2",*(
m_rc_gchi2[
Fixed]),
"efixed_gchi2[5][64][48][2]/F");
473 t->Branch(
"eopt_mean",*(
m_rc_mean[
Opt]),
"eopt_mean[5][64][48][2]/F");
474 t->Branch(
"eopt_av",*(
m_rc_av[
Opt]),
"eopt_av[5][64][48][2]/F");
475 t->Branch(
"eopt_rms",*(
m_rc_rms[
Opt]),
"eopt_rms[5][64][48][2]/F");
476 t->Branch(
"eopt_sigma",*(
m_rc_sigma[
Opt]),
"eopt_sigma[5][64][48][2]/F");
477 t->Branch(
"eopt_mean_err",*(
m_rc_mean_err[
Opt]),
"eopt_mean_err[5][64][48][2]/F");
479 t->Branch(
"eopt_kurtosis",*(
m_rc_kurtosis[
Opt]),
"eopt_kurtosis[5][64][48][2]/F");
480 t->Branch(
"eopt_skewness",*(
m_rc_skewness[
Opt]),
"eopt_skewness[5][64][48][2]/F");
481 t->Branch(
"eopt_chi2",*(
m_rc_chi2[
Opt]),
"eopt_chi2[5][64][48][2]/F");
482 t->Branch(
"eopt_ndf",*(
m_rc_ndf[
Opt]),
"eopt_ndf[5][64][48][2]/F");
483 t->Branch(
"eopt_probC2",*(
m_rc_probC2[
Opt]),
"eopt_probC2[5][64][48][2]/F");
485 t->Branch(
"eopt_gsigma1",*(
m_rc_gsigma1[
Opt]),
"eopt_gsigma1[5][64][48][2]/F");
486 t->Branch(
"eopt_gsigma2",*(
m_rc_gsigma2[
Opt]),
"eopt_gsigma2[5][64][48][2]/F");
487 t->Branch(
"eopt_gnorm",*(
m_rc_gnorm[
Opt]),
"eopt_gnorm[5][64][48][2]/F");
488 t->Branch(
"eopt_gchi2",*(
m_rc_gchi2[
Opt]),
"eopt_gchi2[5][64][48][2]/F");
490 t->Branch(
"eopt_gerrnorm",*(
m_rc_gerrnorm[
Opt]),
"eopt_gerrnorm[5][64][48][2]/F");
495 t->Branch(
"edsp_mean",*(
m_rc_mean[
Dsp]),
"edsp_mean[5][64][48][2]/F");
496 t->Branch(
"edsp_av",*(
m_rc_av[
Dsp]),
"edsp_av[5][64][48][2]/F");
497 t->Branch(
"edsp_rms",*(
m_rc_rms[
Dsp]),
"edsp_rms[5][64][48][2]/F");
498 t->Branch(
"edsp_sigma",*(
m_rc_sigma[
Dsp]),
"edsp_sigma[5][64][48][2]/F");
499 t->Branch(
"edsp_mean_err",*(
m_rc_mean_err[
Dsp]),
"edsp_mean_err[5][64][48][2]/F");
501 t->Branch(
"edsp_kurtosis",*(
m_rc_kurtosis[
Dsp]),
"edsp_kurtosis[5][64][48][2]/F");
502 t->Branch(
"edsp_skewness",*(
m_rc_skewness[
Dsp]),
"edsp_skewness[5][64][48][2]/F");
503 t->Branch(
"edsp_chi2",*(
m_rc_chi2[
Dsp]),
"edsp_chi2[5][64][48][2]/F");
504 t->Branch(
"edsp_ndf",*(
m_rc_ndf[
Dsp]),
"edsp_ndf[5][64][48][2]/F");
505 t->Branch(
"edsp_probC2",*(
m_rc_probC2[
Dsp]),
"edsp_probC2[5][64][48][2]/F");
507 t->Branch(
"edsp_gsigma1",*(
m_rc_gsigma1[
Dsp]),
"edsp_gsigma1[5][64][48][2]/F");
508 t->Branch(
"edsp_gsigma2",*(
m_rc_gsigma2[
Dsp]),
"edsp_gsigma2[5][64][48][2]/F");
509 t->Branch(
"edsp_gnorm",*(
m_rc_gnorm[
Dsp]),
"edsp_gnorm[5][64][48][2]/F");
510 t->Branch(
"edsp_gchi2",*(
m_rc_gchi2[
Dsp]),
"edsp_gchi2[5][64][48][2]/F");
512 t->Branch(
"edsp_gerrnorm",*(
m_rc_gerrnorm[
Dsp]),
"edsp_gerrnorm[5][64][48][2]/F");
517 t->Branch(
"eOF1_mean",*(
m_rc_mean[
OF1]),
"eOF1_mean[5][64][48][2]/F");
518 t->Branch(
"eOF1_av",*(
m_rc_av[
OF1]),
"eOF1_av[5][64][48][2]/F");
519 t->Branch(
"eOF1_rms",*(
m_rc_rms[
OF1]),
"eOF1_rms[5][64][48][2]/F");
520 t->Branch(
"eOF1_sigma",*(
m_rc_sigma[
OF1]),
"eOF1_sigma[5][64][48][2]/F");
521 t->Branch(
"eOF1_mean_err",*(
m_rc_mean_err[
OF1]),
"eOF1_mean_err[5][64][48][2]/F");
523 t->Branch(
"eOF1_kurtosis",*(
m_rc_kurtosis[
OF1]),
"eOF1_kurtosis[5][64][48][2]/F");
524 t->Branch(
"eOF1_skewness",*(
m_rc_skewness[
OF1]),
"eOF1_skewness[5][64][48][2]/F");
525 t->Branch(
"eOF1_chi2",*(
m_rc_chi2[
OF1]),
"eOF1_chi2[5][64][48][2]/F");
526 t->Branch(
"eOF1_ndf",*(
m_rc_ndf[
OF1]),
"eOF1_ndf[5][64][48][2]/F");
527 t->Branch(
"eOF1_probC2",*(
m_rc_probC2[
OF1]),
"eOF1_probC2[5][64][48][2]/F");
529 t->Branch(
"eOF1_gsigma1",*(
m_rc_gsigma1[
OF1]),
"eOF1_gsigma1[5][64][48][2]/F");
530 t->Branch(
"eOF1_gsigma2",*(
m_rc_gsigma2[
OF1]),
"eOF1_gsigma2[5][64][48][2]/F");
531 t->Branch(
"eOF1_gnorm",*(
m_rc_gnorm[
OF1]),
"eOF1_gnorm[5][64][48][2]/F");
532 t->Branch(
"eOF1_gchi2",*(
m_rc_gchi2[
OF1]),
"eOF1_gchi2[5][64][48][2]/F");
534 t->Branch(
"eOF1_gerrnorm",*(
m_rc_gerrnorm[
OF1]),
"eOF1_gerrnorm[5][64][48][2]/F");
539 t->Branch(
"eMF_mean",*(
m_rc_mean[
MF]),
"eMF_mean[5][64][48][2]/F");
540 t->Branch(
"eMF_av",*(
m_rc_av[
MF]),
"eMF_av[5][64][48][2]/F");
541 t->Branch(
"eMF_rms",*(
m_rc_rms[
MF]),
"eMF_rms[5][64][48][2]/F");
542 t->Branch(
"eMF_sigma",*(
m_rc_sigma[
MF]),
"eMF_sigma[5][64][48][2]/F");
543 t->Branch(
"eMF_mean_err",*(
m_rc_mean_err[
MF]),
"eMF_mean_err[5][64][48][2]/F");
544 t->Branch(
"eMF_sigma_err",*(
m_rc_sigma_err[
MF]),
"eMF_sigma_err[5][64][48][2]/F");
545 t->Branch(
"eMF_kurtosis",*(
m_rc_kurtosis[
MF]),
"eMF_kurtosis[5][64][48][2]/F");
546 t->Branch(
"eMF_skewness",*(
m_rc_skewness[
MF]),
"eMF_skewness[5][64][48][2]/F");
547 t->Branch(
"eMF_chi2",*(
m_rc_chi2[
MF]),
"eMF_chi2[5][64][48][2]/F");
548 t->Branch(
"eMF_ndf",*(
m_rc_ndf[
MF]),
"eMF_ndf[5][64][48][2]/F");
549 t->Branch(
"eMF_probC2",*(
m_rc_probC2[
MF]),
"eMF_probC2[5][64][48][2]/F");
551 t->Branch(
"eMF_gsigma1",*(
m_rc_gsigma1[
MF]),
"eMF_gsigma1[5][64][48][2]/F");
552 t->Branch(
"eMF_gsigma2",*(
m_rc_gsigma2[
MF]),
"eMF_gsigma2[5][64][48][2]/F");
553 t->Branch(
"eMF_gnorm",*(
m_rc_gnorm[
MF]),
"eMF_gnorm[5][64][48][2]/F");
554 t->Branch(
"eMF_gchi2",*(
m_rc_gchi2[
MF]),
"eMF_gchi2[5][64][48][2]/F");
556 t->Branch(
"eMF_gerrnorm",*(
m_rc_gerrnorm[
MF]),
"eMF_gerrnorm[5][64][48][2]/F");
561 t->Branch(
"ecell_av",*(
m_ecell_av),
"ecell_av[2][64][4][17][6]/F");
562 t->Branch(
"ecell_rms",*(
m_ecell_rms),
"ecell_rms[2][64][4][17][6]/F");
563 t->Branch(
"ecell_hash",*(
m_ecell_hash),
"ecell_hash[2][64][4][17]/i");
564 t->Branch(
"ecell_gsigma1",*(
m_gsigma1),
"ecell_gsigma1[2][64][4][17][6]/F");
565 t->Branch(
"ecell_gsigma2",*(
m_gsigma2),
"ecell_gsigma2[2][64][4][17][6]/F");
566 t->Branch(
"ecell_gnorm",*(
m_gnorm),
"ecell_gnorm[2][64][4][17][6]/F");
567 t->Branch(
"ecell_gchi2",*(
m_gchi2),
"ecell_gchi2[2][64][4][17][6]/F");
568 t->Branch(
"ecell_gerrsigma1",*(
m_gerrsigma1),
"ecell_gerrsigma1[2][64][4][17][6]/F");
569 t->Branch(
"ecell_gerrnorm",*(
m_gerrnorm),
"ecell_gerrnorm[2][64][4][17][6]/F");
570 t->Branch(
"ecell_gerrsigma2",*(
m_gerrsigma2),
"ecell_gerrsigma2[2][64][4][17][6]/F");
571 t->Branch(
"ecell_gcorrsigma1sigma2",*(
m_gcorrsigma1sigma2),
"ecell_gcorrsigma1sigma2[2][64][4][17][6]/F");
574 t->Branch(
"side", *
m_side,
"side[2][64][4][17][6]/O");
575 t->Branch(
"phi", *
m_phi,
"phi[2][64][4][17][6]/b");
576 t->Branch(
"sample", *
m_sample,
"sample[2][64][4][17][6]/b");
577 t->Branch(
"tower", *
m_tower,
"tower[2][64][4][17][6]/b");
578 t->Branch(
"gaingain", *
m_gg,
"gaingain[2][64][4][17][6]/b");
587 for (
int rc = 0; rc <
RCnum; ++rc) {
611 for (
int tower = 0; tower <
NTOWERS; ++tower) {
626 return StatusCode::SUCCESS;
640 ATH_MSG_WARNING(
"TileRawChNoiseCalibAlg::StoreRunInfo : dqStatus pointer is null");
674 ATH_MSG_ERROR(
"No EventInfo object found! Can't read run number!" );
691 localtime_r(&t_time, &
t);
721 return StatusCode::FAILURE;
729 for (; collItr != lastColl; ++collItr) {
734 for (; chItr != lastCh; ++chItr) {
751 <<
" ADC: " <<
gain <<
" due to DQ error found." );
759 <<
" channel: " <<
channel <<
" due to DQ error found." );
791 return StatusCode::SUCCESS;
800 TF1 * fit_gaus =
new TF1(
"g",
"gaus");
877 <<
" in fillCell() because channel is bad in DB." );
919 if (TMath::Abs(amp) > 1.
e-5) {
937 if (TMath::Abs(amp) > 1.
e-5) {
955 for (
int tower = 0; tower < 17; ++tower) {
956 for (
int gg = 0; gg < 6; ++gg) {
996 float xmin =
h->GetBinCenter(1);
997 float xmax =
h->GetBinCenter(
h->GetNbinsX());
998 TF1* total =
new TF1(
"total",
"gaus(0)+gaus(3)",
xmin,
xmax);
999 total->SetLineColor(2);
1002 float rms =
h->GetRMS();
1003 float bin =
h->GetBinWidth(0);
1013 total->SetParameters(
par);
1015 float lim1 =
bin / 2.;
1020 if (lim1 < 0.5) limN1 /= (2. * lim1);
1022 if (lim2 < 0.5) limN2 /= (2. * lim2);
1024 total->SetParLimits(0, 0., limN1);
1025 total->FixParameter(1, 0.);
1026 total->SetParLimits(2, lim1, lim2);
1027 total->SetParLimits(3, 0., limN2);
1028 total->FixParameter(4, 0.);
1029 total->SetParLimits(5, lim2, lim3);
1031 TFitResultPtr resfit =
h->Fit(total,
"BLQRS");
1033 float par0 = total->GetParameter(0);
1034 float par3 = total->GetParameter(3);
1036 float sigma1 = total->GetParameter(2);
1037 float sigma2 = total->GetParameter(5);
1040 float errpar0 = total->GetParError(0);
1041 float errpar3 = total->GetParError(3);
1043 float errsigma1 = total->GetParError(2);
1044 float errsigma2 = total->GetParError(5);
1046 float norm = par3 / par0;
1048 if (invert &&
norm > 1.) {
1055 gp[5] = sqrt((errpar0 * errpar0) + (errpar3 * errpar3) * (par0 * par0) / (par3 * par3)) / par3;
1065 gp[5] = sqrt((errpar3 * errpar3) + (errpar0 * errpar0) * (par3 * par3) / (par0 * par0)) / par0;
1070 if (total->GetNDF() > 0) {
1071 gp[3] = total->GetChisquare() / total->GetNDF();
1077 TMatrixDSym corr = resfit->GetCorrelationMatrix();
1093 for (
int tower = 0; tower < 17; ++tower) {
1099 if (TMath::Abs(ene) > 1.
e-5) {
1120 for (
int rc = 0; rc <
RCnum; ++rc) {
1136 for (
int tower = 0; tower < 17; ++tower) {
1137 for (
int gg = 0; gg < 6; gg++) {
bool validBeamFrag() const
def retrieve(aClass, aKey=None)
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerDspKey
static constexpr int NSIDES
float(* m_rc_gsigma2)[Tile::MAX_ROS][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
Const iterator class for DataVector/DataList.
float(* m_ecell_rms)[Tile::MAX_DRAWER][NSAMPLES][NTOWERS][NCELLGAINS]
float(* m_rc_av)[Tile::MAX_ROS][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
float(* m_gerrsigma2)[Tile::MAX_DRAWER][NSAMPLES][NTOWERS][NCELLGAINS]
TH1F *(* m_histCellAmp)[Tile::MAX_DRAWER][NSAMPLES][NTOWERS][NCELLGAINS]
float(* m_gsigma2)[Tile::MAX_DRAWER][NSAMPLES][NTOWERS][NCELLGAINS]
std::string m_digitsContainer
void fillCellHist()
fillCellHist is called during execute It fill the HGHG and LGLG combination of the cell energies
float(* m_rc_sigma)[Tile::MAX_ROS][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
static const TileCablingService * getInstance()
get pointer to service instance
bool isChanDQgood(int partition, int drawer, int ch) const
returns status of single channel (if bigain, returns AND of ADCs' status
float(* m_gcorrsigma1sigma2)[Tile::MAX_DRAWER][NSAMPLES][NTOWERS][NCELLGAINS]
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::string m_beamElemContainer
const uint32_t * m_cispar
void StoreRunInfo(const TileDQstatus *dqStatus)
StoreRunInfo is called only during the first event.
ToolHandle< ITileBadChanTool > m_tileBadChanTool
uint32_t calibMode() const
Calibration mode.
TileBeamElemContByteStreamCnv * m_beamCnv
@ IS_CALIBRATION
true: calibration, false: physics
int side(const Identifier &id) const
uint8_t(* m_drawer)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
static constexpr int NPARS
const eformat::ROBFragment< const uint32_t * > * robFragment() const
int sample(const Identifier &id) const
void deleteHist()
deleteHist is called at finalize to ensure that no histogram goes into any output root file delete []...
bool(* m_side)[Tile::MAX_DRAWER][NSAMPLES][NTOWERS][NCELLGAINS]
float(* m_gchi2)[Tile::MAX_DRAWER][NSAMPLES][NTOWERS][NCELLGAINS]
virtual StatusCode finalize() override
The output ntuple is created in finalize method.
float(* m_gerrsigma1)[Tile::MAX_DRAWER][NSAMPLES][NTOWERS][NCELLGAINS]
int tower(const Identifier &id) const
float(* m_rc_sigma_err)[Tile::MAX_ROS][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
float(* m_gsigma1)[Tile::MAX_DRAWER][NSAMPLES][NTOWERS][NCELLGAINS]
float(* m_rc_mean_err)[Tile::MAX_ROS][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
HWIdentifier adc_HWID(void) const
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerOF1Key
static int isChEmpty(int partition, int drawer, int ch)
True if channel is not fully implemented.
float(* m_rc_gchi2)[Tile::MAX_ROS][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
void fillCell(TileRawChannelUnit::UNIT RChUnit, const TileRawChannel *rch)
uint32_t runNumber() const
The current event's run number.
int(* m_cell_nch)[Tile::MAX_DRAWER][NSAMPLES][NTOWERS][Tile::MAX_GAIN]
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
static const unsigned int MAX_DRAWER
Number of drawers in ROS 1-4.
static constexpr int NTOWERS
float(* m_ecell_av)[Tile::MAX_DRAWER][NSAMPLES][NTOWERS][NCELLGAINS]
float(* m_rc_gnorm)[Tile::MAX_ROS][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
float(* m_rc_probC2)[Tile::MAX_ROS][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
Class that holds Data Quality fragment information and provides functions to extract the data quality...
bool isRun2PlusCabling() const
void finalRawCh(int rctype)
finalDigits is called during finalize Here the average Ped, lfn, hfn and covariance are calculated.
float amplitude(int ind=0) const
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerMFKey
virtual StatusCode initialize() override
Only array initialization is done here All the helpers initialization is done at the first event.
msgSvc
Provide convenience handles for various services.
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerOptKey
ToolHandle< TileCondIdTransforms > m_tileIdTrans
::StatusCode StatusCode
StatusCode definition for legacy code.
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerFitKey
const TileCablingService * m_cabling
Default, invalid implementation of ClassID_traits.
virtual StatusCode execute() override
Main method.
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerFixedKey
float(* m_rc_gerrsigma2)[Tile::MAX_ROS][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
uint32_t(* m_ecell_hash)[Tile::MAX_DRAWER][NSAMPLES][NTOWERS]
float(* m_gnorm)[Tile::MAX_DRAWER][NSAMPLES][NTOWERS][NCELLGAINS]
#define CHECK(...)
Evaluate an expression and check for errors.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
static const unsigned int MAX_ROS
Number of ROSs
float(* m_ggpar)[Tile::MAX_DRAWER][NSAMPLES][NTOWERS][NCELLGAINS][NPARS]
float(* m_gerrnorm)[Tile::MAX_DRAWER][NSAMPLES][NTOWERS][NCELLGAINS]
This AthConstConverter class provides conversion from ByteStream to TileBeamElemContainer.
float(* m_rc_gsigma1)[Tile::MAX_ROS][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
virtual bool isValid() override final
Can the handle be successfully dereferenced?
bool isAdcDQgood(int partition, int drawer, int ch, int gain) const
returns status of single ADC returns False if there are any errors
void finalCell()
finalCell is called during finalize Here the cell variables of the ntuple are filled.
uint8_t(* m_sample)[Tile::MAX_DRAWER][NSAMPLES][NTOWERS][NCELLGAINS]
Helpers for checking error return status codes and reporting errors.
StatusCode fillRawChannels(const TileDQstatus *dqStatus, const SG::ReadHandleKey< TileRawChannelContainer > &rawChannelContainerKey, RCtype rctype)
const uint32_t * cispar() const
CIS parameters.
static constexpr int NCELLGAINS
TH1F *(* m_histAmp)[Tile::MAX_ROS][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
ToolHandle< TileCondToolEmscale > m_tileToolEmscale
float(* m_rc_ndf)[Tile::MAX_ROS][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
int(* m_evt)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
TileRawChNoiseCalibAlg(const std::string &name, ISvcLocator *pSvcLocator)
int digiChannel2PMT(int ros, int chan)
static std::string getDrawerString(unsigned int ros, unsigned int drawer)
Return the drawer name, e.g.
uint8_t(* m_phi)[Tile::MAX_DRAWER][NSAMPLES][NTOWERS][NCELLGAINS]
SG::ReadHandleKey< TileDQstatus > m_dqStatusKey
float(* m_ecell_ene)[Tile::MAX_DRAWER][NSAMPLES][NTOWERS][Tile::MAX_GAIN]
uint8_t(* m_tower)[Tile::MAX_DRAWER][NSAMPLES][NTOWERS][NCELLGAINS]
StatusCode FirstEvt_initialize()
Initialization done at the first event.
static bool C10_connected(int module)
Identifier cell_ID_index(int &index, int &pmt) const
#define ATH_MSG_WARNING(x)
virtual ~TileRawChNoiseCalibAlg()
float(* m_rc_gcorrsigma1sigma2)[Tile::MAX_ROS][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
double GetEntries(TH1D *h, int ilow, int ihi)
uint8_t(* m_gg)[Tile::MAX_DRAWER][NSAMPLES][NTOWERS][NCELLGAINS]
float(* m_rc_rms)[Tile::MAX_ROS][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
uint32_t timeStamp() const
POSIX time in seconds from 1970. January 1st.
static constexpr int NSAMPLES
bool(* m_gain)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
static void doFit(TH1F *h, float *gp, bool invert=true)
doFit performs the double gaussian fit of the amplitude
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
IdentifierHash cell_hash(const Identifier &cell_id) const
fast conversion from ID to hash for cells
const TileHWID * m_tileHWID
Handle class for reading from StoreGate.
static const unsigned int MAX_CHAN
Number of channels in drawer.
float(* m_rc_kurtosis)[Tile::MAX_ROS][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
float(* m_rc_ggpar)[Tile::MAX_ROS][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN][NPARS]
float(* m_rc_chi2)[Tile::MAX_ROS][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
uint8_t(* m_ros)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
float(* m_rc_mean)[Tile::MAX_ROS][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
float(* m_rc_gerrnorm)[Tile::MAX_ROS][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
float(* m_rc_skewness)[Tile::MAX_ROS][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
int E1_merged_with_run2plus(int ros, int module) const
float(* m_rc_gerrsigma1)[Tile::MAX_ROS][Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
bool eventType(EventType type) const
Check for one particular bitmask value.
static const unsigned int MAX_GAIN
Number of gains per channel
uint8_t(* m_channel)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]