![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
16 #include "GaudiKernel/MsgStream.h"
17 #include "GaudiKernel/StatusCode.h"
26 #include "CaloDetDescr/CaloDetDescrElement.h"
34 #include "Identifier/Identifier.h"
57 const std::string &
name,
60 m_ttTool(
"LVL1::L1TriggerTowerTool/L1TriggerTowerTool"),
61 m_errorTool(
"LVL1::TrigT1CaloMonErrorTool/TrigT1CaloMonErrorTool"),
62 m_histTool(
"LVL1::TrigT1CaloLWHistogramTool/TrigT1CaloLWHistogramTool"),
63 m_ttIdTools(
"LVL1::L1CaloTTIdTools/L1CaloTTIdTools"),
64 m_tileBadChanTool(
"TileBadChanTool"),
98 if (
sc.isFailure())
return sc;
101 if (
sc.isFailure()) {
102 msg(MSG::ERROR) <<
"Unable to locate tool L1CaloTTIdTools" <<
endmsg;
107 if (
sc.isFailure()) {
108 msg(MSG::ERROR) <<
"Unable to locate tool L1TriggerTowerTool" <<
endmsg;
113 if(
sc.isFailure() ) {
114 msg(MSG::ERROR) <<
"Unable to locate Tool TrigT1CaloMonErrorTool"
120 if (
sc.isFailure()) {
121 msg(MSG::ERROR) <<
"Unable to locate Tool TrigT1CaloLWHistogramTool"
127 if (
sc.isFailure()) {
128 msg(MSG::ERROR) <<
"Unable to retrieve TileHWID helper from DetectorStore" <<
endmsg;
132 if (
sc.isFailure()) {
133 msg(MSG::ERROR) <<
"Could not access tileBadChanTool" <<
endmsg;
139 return StatusCode::SUCCESS;
147 return StatusCode::SUCCESS;
171 run, attr,
"",
"lowerLB" );
173 run, attr,
"",
"lowerLB" );
179 "had_PMTScore",
"Tile PMT Gain Score");
182 "had_PMTScore_a",
"Tile PMT Gain Score A Layer");
184 "had_PMTScore_bc",
"Tile PMT Gain Score BC Layers");
186 "had_PMTScore_d",
"Tile PMT Gain Score D Layer");
191 "had_disabled",
"Tile Disabled Towers");
198 if(!
sc.isSuccess()) {
199 msg(MSG::WARNING) <<
"Conditions not retrieved " <<
endmsg;
203 return StatusCode::SUCCESS;
211 if (
m_events > 0)
return StatusCode::SUCCESS;
220 return StatusCode::SUCCESS;
227 return StatusCode::SUCCESS;
236 if(!
sc.isSuccess() || !caloCellContainer) {
237 msg(MSG::WARNING) <<
"No CaloCellContainer found at AllCalo" <<
endmsg;
238 return StatusCode::SUCCESS;
252 for (; CaloCellIterator != CaloCellIteratorEnd; ++CaloCellIterator) {
254 const CaloCell* caloCell(*CaloCellIterator);
256 if (!caloDDE->
is_tile())
continue;
265 if (ttId1 != invalidId) {
278 if (ttId2 != invalidId) {
296 if(
sc==StatusCode::FAILURE || !triggerTowerTES) {
297 msg(MSG::INFO) <<
"No xAODTriggerTower found in TES at "
299 return StatusCode::SUCCESS;
303 triggerTowerTES->
begin();
305 triggerTowerTES->
end();
309 for (; ttIterator != ttIteratorEnd; ++ttIterator) {
311 double eta = (*ttIterator)->eta();
312 if (fabs(
eta) > 1.5)
continue;
313 double phi = (*ttIterator)->phi();
316 bool had_disabled =
m_ttTool->disabledChannel(had_coolId);
320 return StatusCode::SUCCESS;
330 return StatusCode::SUCCESS;
353 if (!tileCell)
return 0.0;
362 float score(0.0),multiplier(1.0);
363 bool adc1_noGainL1(
false),adc1_halfGainL1(
false);
364 bool pmt2Valid(
false),adc2_noGainL1(
false),adc2_halfGainL1(
false);
388 if(adc1_noGainL1 ==
true && adc1_halfGainL1 ==
true){adc1_halfGainL1 =
false;}
389 if(adc2_noGainL1 ==
true && adc2_halfGainL1 ==
true){adc2_halfGainL1 =
false;}
391 if(pmt2Valid ==
false){multiplier = 2.0;}
392 if(adc1_halfGainL1 ==
true){
score += 0.25;}
393 if(adc1_noGainL1 ==
true){
score += 0.5;}
394 if(adc2_halfGainL1 ==
true){
score += 0.25;}
395 if(adc2_noGainL1 ==
true){
score += 0.5;}
397 return score * multiplier;
virtual StatusCode procHistograms()
An inheriting class should either override this function or finalHists().
IdentifierHash onl2() const
cell online identifier 2
Const iterator class for DataVector/DataList.
ToolHandle< LVL1::IL1CaloMatchCell2Tower > m_cellMatch
CaloCell to TriggerTower matching tool.
virtual ~L1CaloPMTScoresMon()
Scalar phi() const
phi method
Scalar eta() const
pseudorapidity method
ToolHandle< ITileBadChanTool > m_tileBadChanTool
Tool for PMT gain status.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
TH2F_LW * m_h_hadDisabled
Tile Disabled Towers.
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Class holding bad channel problems.
virtual StatusCode initialize()
bool msgLvl(const MSG::Level lvl) const
ToolHandle< LVL1::IL1CaloTTIdTools > m_ttIdTools
Tool for Identifier to eta/phi mappings.
L1CaloPMTScoresMon(const std::string &type, const std::string &name, const IInterface *parent)
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
std::string m_caloCellContainerName
CaloCellContainer StoreGate key.
IdentifierHash onl1() const
cell online identifier 1
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
std::string m_PathInRootFile
Root histograms directory.
std::string m_xAODTriggerTowerContainerName
xAODTriggerTower collection StoreGate key
::StatusCode StatusCode
StatusCode definition for legacy code.
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
ToolHandle< LVL1::IL1TriggerTowerTool > m_ttTool
Tool for identifiers and disabled channels.
bool m_histBooked
Histograms booked flag.
const TileHWID * m_tileHWID
Tile identifier helper.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
int gain1(void) const
get gain of first PMT
bool is_tile() const
cell belongs to Tile
std::vector< TH2F_LW * > m_v_hadPMTScores
Tile PMT Gain Scores by layer.
StatusCode initialize(bool used=true)
static const int s_numPMTPlots
Number of layers.
Container class for CaloCell.
static const std::string xAODTriggerTowerLocation
bool isHalfGainL1() const
virtual StatusCode bookHistogramsRecurrent()
An inheriting class should either override this function, bookHists() or bookHistograms().
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
HWIdentifier adc_id(int ros, int drawer, int channel, int adc) const
adc HWIdentifer
virtual StatusCode fillHistograms()
An inheriting class should either override this function or fillHists().
int gain2(void) const
get gain of second PMT
Data object for each calorimeter readout cell.
CaloCell_ID::CaloSample getSampling() const
cell sampling
double tileNonNominal(const CaloCell *cell)
Return Tile PMT Gain score for a cell.
ToolHandle< TrigT1CaloLWHistogramTool > m_histTool
Histogram helper tool.
int m_events
Event counter.
TH2F_LW * m_h_hadPMTScore
Tile PMT Gain Scores.
virtual StatusCode finalize()
ToolHandle< ITrigT1CaloMonErrorTool > m_errorTool
Event veto tool.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.