Skip to content
Snippets Groups Projects
Commit 3aa99b55 authored by Adam Edward Barton's avatar Adam Edward Barton :speech_balloon:
Browse files

Merge branch 'master-tile-mon-tb-cell-over-thr' into 'master'

TileMonitoring: Add Tile Event energy vs number of cells over threshold histogram

See merge request !47640
parents 29b8734f 99771969
5 merge requests!69091Fix correlated smearing bug in JER in JetUncertainties in 22.0,!58791DataQualityConfigurations: Modify L1Calo config for web display,!51674Fixing hotSpotInHIST for Run3 HIST,!50012RecExConfig: Adjust log message levels from GetRunNumber and GetLBNumber,!47640TileMonitoring: Add Tile Event energy vs number of cells over threshold histogram
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
// ********************************************************************
......@@ -18,12 +18,11 @@
class TileDQstatus;
#include <vector>
#include <string>
/** @class TileDigitsNoiseMonTool
* @brief Class for TileCal noise monitoring at digits level
/** @class TileTBMonTool
* @brief Class for TileCal TB monitoring
*/
class TileTBMonTool : public TileFatherMonTool {
......@@ -53,13 +52,14 @@ class TileTBMonTool : public TileFatherMonTool {
TProfile2D* m_tileTBHitMapLBC01;
TProfile2D* m_tileTBHitMapEBC02;
TH2F* m_tileEventEnergyVsCellsNumber;
bool m_isFirstEvent;
unsigned char m_maskedChannels[276][48]; // max drawerIdx = 276 and max channel = 48
std::vector<std::string> m_masked;
double m_maxTotalEnergy;
double m_cellEnergyThreshold;
};
#endif
......@@ -39,11 +39,13 @@
/*---------------------------------------------------------*/
TileTBMonTool::TileTBMonTool(const std::string & type, const std::string & name, const IInterface* parent)
: TileFatherMonTool(type, name, parent)
, m_tileTotalEventEnergy(0)
, m_tileTBHitMapLBC01(0)
, m_tileTBHitMapEBC02(0)
, m_tileTotalEventEnergy(nullptr)
, m_tileTBHitMapLBC01(nullptr)
, m_tileTBHitMapEBC02(nullptr)
, m_tileEventEnergyVsCellsNumber(nullptr)
, m_isFirstEvent(true)
, m_maskedChannels{{0}}
, m_cellEnergyThreshold(0.0)
/*---------------------------------------------------------*/
{
......@@ -51,6 +53,7 @@ TileTBMonTool::TileTBMonTool(const std::string & type, const std::string & name,
declareProperty("CellContainer", m_cellContainer = "AllCalo"); //SG Cell Container
declareProperty("Masked", m_masked); // Masked channels in the following format: "LBA01 1,2,3,4,5"
declareProperty("MaxTotalEnergy", m_maxTotalEnergy = 150.0); // Maximum energy on the histogram
declareProperty("CellEnergyThreshold", m_cellEnergyThreshold = 0.1); // Cell energy threshold
m_path = "/Tile/TestBeam"; //ROOT File relative directory
}
......@@ -148,8 +151,11 @@ StatusCode TileTBMonTool::fillHistograms() {
if (cell_container->empty()) return StatusCode::SUCCESS;
double energy_pC(0.0);
double total_energy(0.0);
bool onlyLBC04(true);
int nCellsOverThreshold(0);
double totalEnergySideC(0.0);
for (const CaloCell* cell : *cell_container) {
// Identifier id = cell->ID();
......@@ -162,10 +168,8 @@ StatusCode TileTBMonTool::fillHistograms() {
int tower = m_tileID->tower(cell->ID());
int sample = m_tileID->sample(cell->ID());
double energy = 0.0;
const CaloDetDescrElement* caloDDE = cell->caloDDE();
IdentifierHash hash1 = caloDDE->onl1();
......@@ -210,14 +214,24 @@ StatusCode TileTBMonTool::fillHistograms() {
}
total_energy += energy * 0.001; // keep energy in pC
energy_pC = energy * 0.001; // keep energy in pC
total_energy += energy_pC;
if (side < 0) {
totalEnergySideC += energy_pC;
if (energy_pC > m_cellEnergyThreshold) {
++nCellsOverThreshold;
}
}
fillHitMap(side, section, module, tower, sample, energy);
}
if (!onlyLBC04)
if (!onlyLBC04) {
m_tileTotalEventEnergy->Fill(total_energy);
m_tileEventEnergyVsCellsNumber->Fill(nCellsOverThreshold, totalEnergySideC);
}
return StatusCode::SUCCESS;
}
......@@ -312,6 +326,13 @@ void TileTBMonTool::initFirstEvent() {
m_tileTotalEventEnergy->GetXaxis()->SetTitle("Event Energy [pC]");
m_tileEventEnergyVsCellsNumber = book2F("", "TileTBCellsNumberVsTotalEnergy",
"Run " + runNumber + ": TileCal Event energy [C side] vs # cells with energy > " +
std::to_string(m_cellEnergyThreshold) + "[pC]",
25, 0, 25, m_maxTotalEnergy, 0.0, m_maxTotalEnergy);
m_tileEventEnergyVsCellsNumber->GetXaxis()->SetTitle("# Cells");
m_tileEventEnergyVsCellsNumber->GetYaxis()->SetTitle("Event Energy [pC]");
double* xBinsEB = new double [19] {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
double* yBinsEB = new double [6] {0,1,2,3,4,5};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment