25#include "Gaudi/Property.h"
26#include "GaudiKernel/ISvcLocator.h"
28#include "GaudiKernel/INTupleSvc.h"
30#include "GaudiKernel/SmartDataPtr.h"
79 NTuple::Directory* dir =
nullptr;
80 NTupleFilePtr file1(
ntupleSvc(),
"/NTUPLES/FILE1");
83 if (!(dir =
ntupleSvc()->createDirectory(
"/NTUPLES/FILE1/DIR"))) {
88 return StatusCode::FAILURE;
93 NTuplePtr pnt(
ntupleSvc(),
"/NTUPLES/FILE1/DIR/10");
95 pnt =
ntupleSvc()->book(dir, 10, CLID_ColumnWiseTuple,
"LArLvl1TT");
142 return StatusCode::SUCCESS;
160 std::vector<std::string> containerVec;
161 containerVec.push_back(
"LArTTL1EM");
162 containerVec.push_back(
"LArTTL1HAD");
168 for (
unsigned int iTTL1Container = 0; iTTL1Container < containerVec.size();
173 ATH_MSG_DEBUG(
" asking for: " << containerVec[iTTL1Container]);
177 evtStore()->retrieve(ttl1_container, containerVec[iTTL1Container]));
182 int samp = iTTL1Container;
188 int hecfcal_mostE = 99;
191 int phiMax_mostE = -99;
197 for (
const LArTTL1* ttl1 : *ttl1_container) {
198 ttOffId = ttl1->ttOfflineID();
199 std::vector<float> sampleV = ttl1->samples();
200 float e = sampleV[3] * 1e-3;
212 hecfcal_mostE = hecfcal;
215 phiMax_mostE = phiMax;
256 ATH_MSG_DEBUG(
"number of em/had ttl1s: " << indexem <<
" / " << indexhad);
259 if (hecfcal_mostE > 0) {
266 for (
int i = 0; i < indexem; ++i) {
267 int deltaEta = std::abs(Ieta_mostE -
m_Ietattem[i]);
269 if ((deltaEta <= 1 ||
286 for (
int i = 0; i < indexhad; ++i) {
287 int deltaEta = std::abs(Ieta_mostE -
m_Ietatthad[i]);
289 if ((deltaEta <= 1 || deltaEta >= etaLim) &&
305 return StatusCode::SUCCESS;
316 ATH_MSG_DEBUG(
" LArTTL1Calib finalize completed successfully");
317 return StatusCode::SUCCESS;
334 }
else if (region == 1 || region == 2) {
342 }
else if (region == 3) {
Scalar eta() const
pseudorapidity method
Scalar deltaPhi(const MatrixBase< Derived > &vec) const
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
ServiceHandle< StoreGateSvc > & evtStore()
const ServiceHandle< StoreGateSvc > & detStore() const
DataModel_detail::const_iterator< DataVector > const_iterator
size_type size() const noexcept
Returns the number of elements in the collection.
virtual StatusCode initialize()
NTuple::Item< long > m_Lphi_mostEhad
LArTTL1Calib(const std::string &name, ISvcLocator *pSvcLocator)
constructor
NTuple::Item< float > m_e3x3em
NTuple::Item< long > m_Ieta_mostEem
NTuple::Item< long > m_ntothad
NTuple::Array< long > m_becttem
NTuple::Item< float > m_emosthad
NTuple::Item< long > m_Lphi_mostEem
const CaloLVL1_ID * m_lvl1Helper
NTuple::Item< long > m_emfcal_mostEem
NTuple::Item< long > m_hecfcal_mostEhad
virtual StatusCode finalize()
NTuple::Item< long > m_n3x3had
NTuple::Array< float > m_ettem
NTuple::Item< float > m_etothad
~LArTTL1Calib()
destructor
NTuple::Array< long > m_Lphitthad
NTuple::Array< long > m_Ietattem
NTuple::Item< long > m_bec_mostEem
NTuple::Array< long > m_Lphittem
virtual StatusCode execute()
NTuple::Array< long > m_hecfcaltthad
NTuple::Item< long > m_n3x3em
NTuple::Array< long > m_emfcalttem
NTuple::Item< float > m_etotem
NTuple::Item< long > m_ntthad
NTuple::Array< long > m_Ietatthad
NTuple::Item< long > m_nttem
NTuple::Item< float > m_e3x3had
NTuple::Item< float > m_emostem
NTuple::Item< long > m_ntotem
NTuple::Array< float > m_etthad
NTuple::Item< long > m_Ieta_mostEhad
void decodeInverseTTChannel(int region, int layer, int eta, int &bec, int &emhf, int &Ieta) const
Container class for LArTTL1.
Liquid Argon TT L1 sum class.