Skip to content
Snippets Groups Projects
Commit fe1b10c2 authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

Merge branch 'auxdepr.TrigT1CaloCalibTools-20240530' into 'main'

TrigT1CaloCalibTools+TrigT1CaloMonitoring: Use Accessor, etc instead of auxdata().

See merge request !71846
parents a4ac5209 4fe96f91
No related branches found
No related tags found
27 merge requests!78241Draft: FPGATrackSim: GenScan code refactor,!78236Draft: Switching Streams https://its.cern.ch/jira/browse/ATR-27417,!78056AFP monitoring: new synchronization and cleaning,!78041AFP monitoring: new synchronization and cleaning,!77990Updating TRT chip masks for L1TRT trigger simulation - ATR-28372,!77733Draft: add new HLT NN JVT, augmented with additional tracking information,!77731Draft: Updates to ZDC reconstruction,!77728Draft: updates to ZDC reconstruction,!77522Draft: sTGC Pad Trigger Emulator,!76725ZdcNtuple: Fix cppcheck warning.,!76611L1CaloFEXByteStream: Fix out-of-bounds array accesses.,!76475Punchthrough AF3 implementation in FastG4,!76474Punchthrough AF3 implementation in FastG4,!75729New implementation of ZDC nonlinear FADC correction.,!75703Draft: Update to HI han config for HLT jets,!75184Draft: Update file heavyions_run.config,!74430Draft: Fixing upper bound for Delayed Jet Triggers,!73963Changing the path of the histograms to "Expert" area,!73875updating ID ART reference plots,!73874AtlasCLHEP_RandomGenerators: Fix cppcheck warnings.,!73449Add muon detectors to DarkJetPEBTLA partial event building,!73343Draft: [TrigEgamma] Add photon ringer chains on bootstrap mechanism,!72336Fixed TRT calibration crash,!72176Draft: Improving L1TopoOnline chain that now gets no-empty plots. Activating it by default,!72012Draft: Separate JiveXMLConfig.py into Config files,!71876Fix MET trigger name in MissingETMonitoring,!71846TrigT1CaloCalibTools+TrigT1CaloMonitoring: Use Accessor, etc instead of auxdata().
/*
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#include "TrigT1CaloCalibTools/L1CaloPprEtCorrelationPlotManager.h"
......@@ -15,6 +15,7 @@
#include "TrigT1CaloToolInterfaces/IL1TriggerTowerTool.h"
#include "TrigT1CaloEvent/TriggerTower.h"
#include "AthContainers/ConstAccessor.h"
#include "CaloEvent/CaloCellContainer.h"
#include "Identifier/Identifier.h"
......@@ -106,16 +107,20 @@ double L1CaloPprEtCorrelationPlotManager::getMonitoringValue(const xAOD::Trigger
if (ttCpEnergy <= m_EtMin) return -1000.;
if (absEta < 3.2){
if ( trigTower->isAvailable< std::vector<float> > ("CaloCellEnergyByLayer") ) {
for (float e : trigTower->auxdataConst< std::vector<float> > ("CaloCellEnergyByLayer")) {
static const SG::ConstAccessor< std::vector<float> >
CaloCellEnergyByLayerAcc("CaloCellEnergyByLayer");
if ( CaloCellEnergyByLayerAcc.isAvailable(*trigTower) ) {
for (float e : CaloCellEnergyByLayerAcc(*trigTower)) {
caloEnergy += e;
}
caloEnergy = caloEnergy / cosh( trigTower->eta() );
}
}//for central region only
else {
if( trigTower->isAvailable< std::vector<float> > ("CaloCellETByLayer") ){
for (float et : trigTower->auxdataConst< std::vector<float> > ("CaloCellETByLayer")) {
static const SG::ConstAccessor< std::vector<float> >
CaloCellETByLayerAcc("CaloCellETByLayer");
if( CaloCellETByLayerAcc.isAvailable(*trigTower) ){
for (float et : CaloCellETByLayerAcc(*trigTower)) {
caloEnergy += et;
}
}
......
/*
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#include "MistimedStreamMonitorAlgorithm.h"
#include "AthContainers/ConstAccessor.h"
#include <iostream>
#include <vector>
#include <TMath.h>
......@@ -211,7 +212,9 @@ StatusCode MistimedStreamMonitorAlgorithm::fillHistograms( const EventContext& c
std::unique_ptr<xAOD::TriggerTowerAuxContainer> ttContainerAux = std::make_unique<xAOD::TriggerTowerAuxContainer>();
ttContainer->setStore(ttContainerAux.get());
// Creating a new contianer for TT with pulseClasification
static const SG::Accessor<float> pulseClassificationAcc("pulseClassification");
// Creating a new container for TT with pulseClassification
for (const xAOD::TriggerTower* tt : *triggerTowerTES) {
float ttPulseCategory = 0;
......@@ -284,7 +287,7 @@ StatusCode MistimedStreamMonitorAlgorithm::fillHistograms( const EventContext& c
xAOD::TriggerTower* newTT = new xAOD::TriggerTower; //create a new TT object
ttContainer->push_back(newTT); // add the newTT to new output TT container (at the end of it)
*newTT = *(tt);// copy over all information from TT to newTT
newTT->auxdata<float>("pulseClassification") = ttPulseCategory; //decorate
pulseClassificationAcc(*newTT) = ttPulseCategory; //decorate
}
// count all eFex in-time and out-of-time TOBs with at least 5GeV
......@@ -560,7 +563,7 @@ StatusCode MistimedStreamMonitorAlgorithm::fillHistograms( const EventContext& c
//Create the trigger tower objects and calculate scaled phi
for (const xAOD::TriggerTower* tt : *ttContainer) {
ATH_CHECK( makeTowerPPM(tt, vecMonTTDecor) );
ATH_MSG_DEBUG( "tt->pulseClassification :: " << tt->auxdata<float>("pulseClassification"));
ATH_MSG_DEBUG( "tt->pulseClassification :: " << pulseClassificationAcc(*tt));
}
groupName = "EventofInterest_" + std::to_string(eventCounter) + "_";
......@@ -570,7 +573,7 @@ StatusCode MistimedStreamMonitorAlgorithm::fillHistograms( const EventContext& c
for (auto& myTower : vecMonTTDecor) {
ATH_MSG_DEBUG(" looping over TTs");
const int layer = (myTower.tower)->layer();
pulseCat = (myTower.tower)->auxdata<float>("pulseClassification");
pulseCat = pulseClassificationAcc(*myTower.tower);
bcidWord = (myTower.tower)->bcidVec()[0]; // look at the status bit in the central time slice
ATH_MSG_DEBUG("groupName :: " << groupName);
......
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