Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
LArTTL1Maker Class Reference

The aim of this algorithm is the simulation of the LAr analogue trigger tower sums. More...

#include <LArTTL1Maker.h>

Inheritance diagram for LArTTL1Maker:
Collaboration diagram for LArTTL1Maker:

Public Member Functions

 LArTTL1Maker (const std::string &name, ISvcLocator *pSvcLocator)
 constructor More...
 
virtual ~LArTTL1Maker ()
 destructor More...
 
virtual StatusCode initialize () override
 Read ascii files for auxiliary data (puslse shapes, noise, etc...) More...
 
virtual StatusCode execute () override
 Create LArTTL1 object save in TES (2 containers: 1 EM, 1 hadronic) More...
 
virtual StatusCode finalize () override
 
virtual void handle (const Incident &) override
 
virtual bool isClonable () const override final
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

std::vector< float > computeSignal (const Identifier towerId, const int Ieta, const int specialCase, std::vector< float > visEnergy, const int refTime) const
 initialize hit map More...
 
std::vector< float > computeNoise (const Identifier towerId, const int Ieta, std::vector< float > &inputV, CLHEP::HepRandomEngine *rndmEngine)
 
StatusCode readAuxiliary ()
 method called at the begining of execute() to fill the hit map More...
 
int decodeInverse (int region, int eta)
 
void setSeed (const std::string &algName, const EventContext &ctx)
 
void setSeed (const std::string &algName, uint64_t ev, uint64_t run)
 
void setSeed (size_t seed)
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

IChronoStatSvc * m_chronSvc
 
ServiceHandle< IAthRNGSvcm_RandomSvc {this, "RndmSvc", "AthRNGSvc", ""}
 
Gaudi::Property< std::string > m_randomStreamName {this, "RandomStreamName", "LArTTL1Maker", ""}
 
Gaudi::Property< uint32_t > m_randomSeedOffset {this, "RandomSeedOffset", 2, ""}
 
Gaudi::Property< bool > m_useLegacyRandomSeeds
 
bool m_useTriggerTime
 Alorithm property: use trigger time or not. More...
 
ToolHandle< ITriggerTimem_triggerTimeTool
 Alorithm property: name of the TriggerTimeTool. More...
 
int m_BeginRunPriority
 
ToolHandle< CaloTriggerTowerServicem_ttSvc
 
const CaloLVL1_IDm_lvl1Helper
 pointer to the offline TT helper More...
 
const LArEM_IDm_emHelper
 pointer to the offline EM helper More...
 
const LArHEC_IDm_hecHelper
 pointer to the offline HEC helper More...
 
const LArFCAL_IDm_fcalHelper
 pointer to the offline FCAL helper More...
 
const CaloCell_IDm_OflHelper = nullptr
 pointer to the offline id helper
More...
 
SG::ReadCondHandleKey< ILArfSamplm_fSamplKey
 Sampling fractions retrieved from DB. More...
 
std::vector< float > m_refEnergyEm
 auxiliary EM data: reference energies for saturation simulation More...
 
std::vector< std::vector< float > > m_pulseShapeEm
 auxiliary EM data: pulse shapes More...
 
std::vector< std::vector< float > > m_pulseShapeDerEm
 auxiliary EM data: pulse shape derivative More...
 
std::vector< float > m_autoCorrEm
 auxiliary EM data: auto-correlation matrix More...
 
std::vector< float > m_sinThetaEmb
 auxiliary EMBarrel data: sin(theta) More...
 
std::vector< float > m_calibCoeffEmb
 auxiliary EMBarrel data: calibration coefficient More...
 
std::vector< float > m_noiseRmsEmb
 auxiliary EMBarrel data: noise rms More...
 
std::vector< float > m_sinThetaEmec
 auxiliary EMEC data: sin(theta)
More...
 
std::vector< float > m_calibCoeffEmec
 auxiliary EMEC data: calibration coeeficient More...
 
std::vector< float > m_noiseRmsEmec
 auxiliary EMEC data: noise rms More...
 
std::vector< float > m_pulseShapeHec
 auxiliary HEC data: pulse shape More...
 
std::vector< float > m_pulseShapeDerHec
 auxiliary HEC data: pulse shape derivative More...
 
std::vector< float > m_calibCoeffHec
 auxiliary HEC data: calibration coefficients More...
 
std::vector< float > m_sinThetaHec
 auxiliary HEC data: sin(theta) More...
 
std::vector< float > m_satEnergyHec
 auxiliary HEC data: saturation energy More...
 
std::vector< float > m_noiseRmsHec
 auxiliary HEC data: noise rms More...
 
std::vector< std::vector< float > > m_autoCorrHec
 auxiliary HEC data: auto-correlation matrix More...
 
std::vector< float > m_cellRelGainFcal
 auxiliary FCAL data: relative gains More...
 
std::vector< std::vector< float > > m_pulseShapeFcal
 auxiliary FCAL data: pulse shapes More...
 
std::vector< std::vector< float > > m_pulseShapeDerFcal
 auxiliary FCAL data: pulse shape derivatives More...
 
std::vector< std::vector< float > > m_calibCoeffFcal
 auxiliary FCAL data: calibration coefficients More...
 
std::vector< float > m_calibCoeffFcalEm
 auxiliary FCAL data: calibration coefficients More...
 
std::vector< float > m_calibCoeffFcalHad
 auxiliary FCAL data: calibration coefficients More...
 
std::vector< std::vector< float > > m_noiseRmsFcal
 auxiliary FCAL data: noise rms More...
 
std::vector< float > m_autoCorrFcal
 auxiliary FCAL data: auto-correlation matrix More...
 
SG::ReadHandleKey< LArHitEMapm_hitMapKey {this,"LArHitEMapKey","LArHitEMap"}
 hit map More...
 
SG::WriteHandleKey< LArTTL1Containerm_EmTTL1ContainerName
 algorithm property: container name for the EM TTL1s More...
 
SG::WriteHandleKey< LArTTL1Containerm_HadTTL1ContainerName
 algorithm property: container name for the HAD TTL1s More...
 
std::array< SG::ReadHandleKey< LArHitContainer >, 4 > m_xxxHitContainerName
 
bool m_NoiseOnOff
 algorithm property: noise (in all sub-detectors) is on if true
More...
 
bool m_PileUp
 algorithm property: pile up or not More...
 
bool m_noEmCalibMode
 algorithm property: no calibration mode for EM towers More...
 
bool m_noHadCalibMode
 algorithm property: no calibration mode for had towers More...
 
float m_debugThresh
 algorithm property: debug threshold More...
 
bool m_chronoTest
 algorithm property: switch chrono on More...
 
std::string m_truthHitsContainer
 key for saving truth More...
 
DataObjIDColl m_extendedExtraObjects
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Static Private Attributes

static const short s_NBDEPTHS = 4
 number of sampling (in depth) More...
 
static const short s_NBSAMPLES = 7
 number of samples in TTL1s More...
 
static const short s_MAXSAMPLES = 24
 max number of samples in pulse shape More...
 
static const short s_PEAKPOS = 3
 peak position
More...
 
static const short s_NBETABINS = 15
 number of eta bins More...
 
static const short s_NBENERGIES = 12
 number of energies at which saturation is described (em) More...
 

Detailed Description

The aim of this algorithm is the simulation of the LAr analogue trigger tower sums.

It includes correct allocation of cells to towers, pulse profile as a function of time, saturation, appropriate noise addition, pile-up.
The resulting signals are an input to the Preprocessor (which in turn performs digitization, filtering, bunch crossing id., noise suppression,...)
Since it needs hits, the simulation only takes "simul" datasets as input, NOT digitized datasets.

Warning
although the output is not digitized, LArTTL1Maker is part of the digitization simulation.
Author
F. Ledroit (LPSC-Grenoble)

Definition at line 60 of file LArTTL1Maker.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ LArTTL1Maker()

LArTTL1Maker::LArTTL1Maker ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

constructor

Definition at line 54 of file LArTTL1Maker.cxx.

55  : AthAlgorithm(name, pSvcLocator),
56  m_ttSvc("CaloTriggerTowerService"),
57  m_fSamplKey("LArfSamplSym"),
58  m_EmTTL1ContainerName{"LArTTL1EM"},
59  m_HadTTL1ContainerName{"LArTTL1HAD"},
64 
65 // + -------------------------------------------------------------------- +
66 // + Author ........: F. Ledroit +
67 // + Creation date .: 09/01/2003 +
68 // + Subject: TTL1 Maker constructor +
69 // + -------------------------------------------------------------------- +
70 {
71  //
72  // ........ default values of private data
73  //
74  m_chronSvc = nullptr;
75  m_useTriggerTime = false;
76  // m_triggerTimeToolName = "CosmicTriggerTimeTool";
77  // p_triggerTimeTool = 0;
78 
79  m_BeginRunPriority = 100;
80 
81  m_lvl1Helper = nullptr;
82  m_emHelper = nullptr;
83  m_hecHelper = nullptr;
84  m_fcalHelper = nullptr;
85 
86  m_NoiseOnOff = true;
87  m_PileUp = false;
88  m_noEmCalibMode = false;
89  m_noHadCalibMode = false;
90  m_chronoTest = false;
91  m_debugThresh = 5000.;
92 
96  for (int ieta = 0; ieta < s_NBETABINS; ieta++) {
97  m_calibCoeffEmb[ieta] = 1.;
98  m_calibCoeffEmec[ieta] = 1.;
99  m_calibCoeffHec[ieta] = 1.;
100  }
101  const int nEta = 4;
102  m_calibCoeffFcalEm.resize(nEta);
103  m_calibCoeffFcalHad.resize(nEta);
104  for (int ieta = 0; ieta < nEta; ieta++) {
105  m_calibCoeffFcalEm[ieta] = .03;
106  m_calibCoeffFcalHad[ieta] = .03;
107  }
108 
109  //
110  // ........ declare the private data as properties
111  //
112 
113  declareProperty("EmBarrelHitContainerName", m_xxxHitContainerName[0]);
114  declareProperty("EmEndCapHitContainerName", m_xxxHitContainerName[1]);
115  declareProperty("HecHitContainerName", m_xxxHitContainerName[2]);
116  declareProperty("ForWardHitContainerName", m_xxxHitContainerName[3]);
117 
118  declareProperty("EmTTL1ContainerName", m_EmTTL1ContainerName);
119  declareProperty("HadTTL1ContainerName", m_HadTTL1ContainerName);
120 
121  declareProperty("NoiseOnOff", m_NoiseOnOff);
122 
123  declareProperty("PileUp", m_PileUp);
124  declareProperty("UseTriggerTime", m_useTriggerTime);
125  declareProperty("TriggerTimeToolName", m_triggerTimeTool);
126 
127  declareProperty("EmBarrelCalibrationCoeffs", m_calibCoeffEmb);
128  declareProperty("EmEndCapCalibrationCoeffs", m_calibCoeffEmec);
129  declareProperty("HECCalibrationCoeffs", m_calibCoeffHec);
130  declareProperty("EmFcalCalibrationCoeffs", m_calibCoeffFcalEm);
131  declareProperty("HadFcalCalibrationCoeffs", m_calibCoeffFcalHad);
132 
133  declareProperty("NoEmCalibrationMode", m_noEmCalibMode);
134  declareProperty("NoHadCalibrationMode", m_noHadCalibMode);
135  declareProperty("ChronoTest", m_chronoTest);
136  declareProperty("DebugThreshold", m_debugThresh);
137 
138  declareProperty("TruthHitsContainer", m_truthHitsContainer = "",
139  "Specify a value to get a pair of LArTTL1 containers with "
140  "the truth hits in them");
141  declareProperty("LArfSamplKey", m_fSamplKey);
142 
143  //
144  return;
145 }

◆ ~LArTTL1Maker()

LArTTL1Maker::~LArTTL1Maker ( )
virtual

destructor

Definition at line 147 of file LArTTL1Maker.cxx.

147 {}

Member Function Documentation

◆ computeNoise()

std::vector< float > LArTTL1Maker::computeNoise ( const Identifier  towerId,
const int  Ieta,
std::vector< float > &  inputV,
CLHEP::HepRandomEngine *  rndmEngine 
)
private

Definition at line 1078 of file LArTTL1Maker.cxx.

1080  {
1081 
1082  // +======================================================================+
1083  // + +
1084  // + Author: F. Ledroit +
1085  // + Creation date: 2003/01/13 +
1086  // + +
1087  // +======================================================================+
1088 
1089  std::vector<float> outputV(s_NBSAMPLES);
1090 
1091  //
1092  // .... first retrieve auto-correlation matrix and noise rms
1093  //
1094 
1095  float sigmaNoise = 0;
1096  std::vector<float>* autoC = nullptr;
1097  std::vector<float> noiseRms(4);
1098 
1099  bool emb = m_lvl1Helper->is_emb(towerId);
1100  bool barrelEnd = m_lvl1Helper->is_barrel_end(towerId);
1101  bool emec = m_lvl1Helper->is_emec(towerId);
1102  //
1103  // ..... case EM
1104  //
1105  if (emb || barrelEnd || emec) {
1106  //
1107  // ..... retrieve noise info for the tower
1108  //
1109  autoC = &(m_autoCorrEm);
1110  if (emb) {
1111  sigmaNoise = m_noiseRmsEmb[Ieta - 1];
1112  } else if (emec) {
1113  sigmaNoise = m_noiseRmsEmec[Ieta - 1];
1114  } else { // barrelEnd
1115  sigmaNoise = sqrt(m_noiseRmsEmb[14] * m_noiseRmsEmb[14] +
1116  m_noiseRmsEmec[0] * m_noiseRmsEmec[0]);
1117  ATH_MSG_VERBOSE(" LArTTL1Maker: barrelEnd noise rms" << sigmaNoise);
1118  }
1119  } // end case EM
1120  //
1121  // ..... case HEC
1122  //
1123  else if (m_lvl1Helper->is_hec(towerId)) {
1124 
1125  autoC = &(m_autoCorrHec[Ieta - 1]);
1126  sigmaNoise = m_noiseRmsHec[Ieta - 1];
1127  }
1128  //
1129  // ..... case FCAL
1130  //
1131  else if (m_lvl1Helper->is_fcal(towerId)) {
1132 
1133  int emOrHad = m_lvl1Helper->sampling(towerId);
1134  int module = emOrHad + 1;
1135  if (emOrHad && (Ieta == 3 || Ieta == 4)) {
1136  module += 1; // FCAL3
1137  }
1138  autoC = &m_autoCorrFcal;
1139  // sigmaNoise = m_noiseRmsFcal[module-1];
1140  noiseRms = m_noiseRmsFcal[module - 1];
1141  sigmaNoise = noiseRms[Ieta - 1];
1142  ATH_MSG_VERBOSE(" LArTTL1Maker: noise FCAL= "
1143  << sigmaNoise << " module= " << module << "Ieta= " << Ieta);
1144  } else {
1145  ATH_MSG_WARNING(" LArTTL1Maker: computeNoise unknown towerId "
1146  << m_lvl1Helper->show_to_string(towerId));
1147  return inputV;
1148  }
1149 
1150  if (fabs((*autoC)[0]) < 0.001) {
1151  ATH_MSG_WARNING(" No autocorrelation matrix found for tower "
1152  << m_emHelper->show_to_string(towerId) << " "
1153  << "setting default values 1.00 0.10 -0.30 -0.20 "
1154  "-0.05 -0.01 -0.01 ");
1155  (*autoC)[0] = 1.00;
1156  (*autoC)[1] = 0.10;
1157  (*autoC)[2] = -0.30;
1158  (*autoC)[3] = -0.20;
1159  (*autoC)[4] = -0.05;
1160  (*autoC)[5] = -0.01;
1161  (*autoC)[6] = -0.01;
1162  }
1163  if (sigmaNoise < 0.001) {
1164  ATH_MSG_WARNING(" No noise rms value found for tower "
1165  << m_emHelper->show_to_string(towerId) << " "
1166  << "setting default value 300 MeV ");
1167  sigmaNoise = 300.;
1168  }
1169 
1170  //
1171  // .... now compute the noise 'signal'
1172  //
1173 
1174  const float c11 = sigmaNoise * (*autoC)[0];
1175  const float c21 = sigmaNoise * (*autoC)[1];
1176  const float c31 = sigmaNoise * (*autoC)[2];
1177  const float c41 = sigmaNoise * (*autoC)[3];
1178  const float c51 = sigmaNoise * (*autoC)[4];
1179  const float c61 = sigmaNoise * (*autoC)[5];
1180  const float c71 = sigmaNoise * (*autoC)[6];
1181  //
1182  const float c22 = sqrt(c11 * c11 - c21 * c21);
1183  const float inv_c22 = 1. / c22;
1184  const float c32 = (c21 * c11 - c21 * c31) * inv_c22;
1185  const float c33 = sqrt(c11 * c11 - c31 * c31 - c32 * c32);
1186  const float inv_c33 = 1. / c33;
1187  const float c42 = (c31 * c11 - c21 * c41) * inv_c22;
1188  const float c43 = (c21 * c11 - c31 * c41 - c32 * c42) * inv_c33;
1189  const float c44 = sqrt(c11 * c11 - c41 * c41 - c42 * c42 - c43 * c43);
1190  const float inv_c44 = 1. / c44;
1191  const float c52 = (c41 * c11 - c21 * c51) * inv_c22;
1192  const float c53 = (c31 * c11 - c31 * c51 - c32 * c52) * inv_c33;
1193  const float c54 = (c21 * c11 - c41 * c51 - c42 * c52 - c43 * c53) * inv_c44;
1194  const float c55 =
1195  sqrt(c11 * c11 - c51 * c51 - c52 * c52 - c53 * c53 - c54 * c54);
1196  const float inv_c55 = 1. / c55;
1197  const float c62 = (c51 * c11 - c21 * c61) * inv_c22;
1198  const float c63 = (c41 * c11 - c31 * c61 - c32 * c62) * inv_c33;
1199  const float c64 = (c31 * c11 - c41 * c61 - c42 * c62 - c43 * c63) * inv_c44;
1200  const float c65 =
1201  (c21 * c11 - c51 * c61 - c52 * c62 - c53 * c63 - c54 * c64) * inv_c55;
1202  const float c66 = sqrt(c11 * c11 - c61 * c61 - c62 * c62 - c63 * c63 -
1203  c64 * c64 - c65 * c65);
1204  const float c72 = (c61 * c11 - c21 * c71) * inv_c22;
1205  const float c73 = (c51 * c11 - c31 * c71 - c32 * c72) * inv_c33;
1206  const float c74 = (c41 * c11 - c41 * c71 - c42 * c72 - c43 * c73) * inv_c44;
1207  const float c75 =
1208  (c31 * c11 - c51 * c71 - c52 * c72 - c53 * c73 - c54 * c74) * inv_c55;
1209  const float c76 =
1210  (c21 * c11 - c61 * c71 - c62 * c72 - c63 * c73 - c64 * c74 - c65 * c75) /
1211  c66;
1212  const float c77 = sqrt(c11 * c11 - c71 * c71 - c72 * c72 - c73 * c73 -
1213  c74 * c74 - c75 * c75 - c76 * c76);
1214 
1215  double rndm[s_NBSAMPLES];
1216  RandGaussZiggurat::shootArray(rndmEngine, static_cast<int>(s_NBSAMPLES), rndm,
1217  0., 1.);
1218  outputV[0] = inputV[0] + c11 * rndm[0];
1219  outputV[1] = inputV[1] + c21 * rndm[0] + c22 * rndm[1];
1220  outputV[2] = inputV[2] + c31 * rndm[0] + c32 * rndm[1] + c33 * rndm[2];
1221  outputV[3] =
1222  inputV[3] + c41 * rndm[0] + c42 * rndm[1] + c43 * rndm[2] + c44 * rndm[3];
1223  outputV[4] = inputV[4] + c51 * rndm[0] + c52 * rndm[1] + c53 * rndm[2] +
1224  c54 * rndm[3] + c55 * rndm[4];
1225  outputV[5] = inputV[5] + c61 * rndm[0] + c62 * rndm[1] + c63 * rndm[2] +
1226  c64 * rndm[3] + c65 * rndm[4] + c66 * rndm[5];
1227  outputV[6] = inputV[6] + c71 * rndm[0] + c72 * rndm[1] + c73 * rndm[2] +
1228  c74 * rndm[3] + c75 * rndm[4] + c76 * rndm[5] + c77 * rndm[6];
1229 
1230  return outputV;
1231 }

◆ computeSignal()

std::vector< float > LArTTL1Maker::computeSignal ( const Identifier  towerId,
const int  Ieta,
const int  specialCase,
std::vector< float >  visEnergy,
const int  refTime 
) const
private

initialize hit map

Definition at line 861 of file LArTTL1Maker.cxx.

867 {
868  // +======================================================================+
869  // + +
870  // + Author: F. Ledroit +
871  // + Creation date: 2003/01/13 +
872  // + +
873  // +======================================================================+
874  //
875 
876  std::vector<float> bareSignal(s_NBSAMPLES);
877  std::vector<float> pulseShape(s_MAXSAMPLES);
878  std::vector<float> pulseShapeDer(s_MAXSAMPLES);
879 
880  bool emb = m_lvl1Helper->is_emb(towerId);
881  bool barrelEnd = m_lvl1Helper->is_barrel_end(towerId);
882  bool emec = m_lvl1Helper->is_emec(towerId);
883 
884  int visEvecSize = std::ssize(ttSumEnergy);
885  ATH_MSG_VERBOSE("computeSignal: special case = " << specialCase);
886 
887  //
888  // ..... case EM
889  //
890  if (emb || barrelEnd || emec) {
891  //
892  // ..... retrieve calib coeffs for the tower
893  //
894  float calibCoeff = 0.;
895  if (emb) {
896  calibCoeff = m_calibCoeffEmb[Ieta - 1];
897  } else if (emec) {
898  calibCoeff = m_calibCoeffEmec[Ieta - 1];
899  } else { // barrelEnd
900  if (!specialCase) {
901  calibCoeff = m_calibCoeffEmb[14];
902  } else {
903  calibCoeff = m_calibCoeffEmec[0];
904  }
905  }
906  if (calibCoeff < 0.001) {
907  ATH_MSG_WARNING(" No calibration coefficient value found for tower "
908  << m_emHelper->show_to_string(towerId)
909  << " setting default value 6. ");
910  calibCoeff = 6.;
911  }
912 
913  //
914  // ... loop on time samples
915  //
916  for (int iTime = 0; iTime < visEvecSize; iTime++) {
917  if (fabs(ttSumEnergy[iTime]) > 0.) {
918  if (!m_noEmCalibMode) {
919  // apply calibration coefficient
920  ttSumEnergy[iTime] *= calibCoeff;
922  " ComputeSignal: applied EM calibration coefficient (iTime) "
923  << calibCoeff << " (" << iTime << ") ");
924  }
925 
926  // with respect to saturation
927  // to compute the amplitude
928  float theEnergy = ttSumEnergy[iTime];
929  if (ttSumEnergy[iTime] > m_refEnergyEm[0]) {
931  }
932  // to determine the shape
933  if (ttSumEnergy[iTime] > m_refEnergyEm[s_NBENERGIES - 1]) {
934  // don't know the shape after highest energy point -> stick to 'last'
935  // shape
936  ttSumEnergy[iTime] = m_refEnergyEm[s_NBENERGIES - 1];
937  }
938 
939  //
940  // ... determine regime: linear(iene=0) or saturation
941  //
942  for (int iene = 0; iene < s_NBENERGIES; iene++) {
943  if (ttSumEnergy[iTime] <= m_refEnergyEm[iene]) {
944  pulseShape = m_pulseShapeEm[iene];
945  pulseShapeDer = m_pulseShapeDerEm[iene];
946 
947  // make samples
948  for (int iSamp = 0; iSamp < s_NBSAMPLES; iSamp++) {
949  if (!m_PileUp) {
950  // go back to signed value of time
951  int hitTime = iTime - refTime;
952  // go to 25 ns sampling
953  // int time = (int)(hitTime/25.+0.5) ;
954  int time =
955  static_cast<int>(floor(hitTime * crossingRate + 0.5));
956  // ....determine fine shift within 25ns
957  float dTime = (float)(hitTime - crossingTime * time);
958  int j = iSamp - time;
959  if (j >= 0 && j < s_MAXSAMPLES) {
960  bareSignal[iSamp] +=
961  (pulseShape[j] - pulseShapeDer[j] * dTime) * theEnergy;
962  }
963  } else {
964  int j = iSamp - iTime + refTime;
965  if (j >= 0 && j < s_MAXSAMPLES) {
966  bareSignal[iSamp] += pulseShape[j] * theEnergy;
967  }
968  }
969  } // end loop on samples
970 
971  break;
972  }
973  } // end of loop on reference energies
974  } // end condition visE>0
975  } // end loop on times
976  } // end case EM
977  //
978  // ..... case HEC
979  //
980  else if (m_lvl1Helper->is_hec(towerId)) {
981  pulseShape = m_pulseShapeHec;
982  pulseShapeDer = m_pulseShapeDerHec;
983  //
984  // ... loop on time samples
985  //
986  for (int iTime = 0; iTime < visEvecSize; iTime++) {
987  float theEnergy = ttSumEnergy[iTime];
988  if (!m_noHadCalibMode) {
989  // apply calibration coefficient
990  theEnergy *= m_calibCoeffHec[Ieta - 1];
991  }
992 
993  float satEt = m_satEnergyHec[Ieta - 1];
994  for (int iSamp = 0; iSamp < s_NBSAMPLES; iSamp++) {
995  if (!m_PileUp) {
996  // go back to signed value of time
997  int hitTime = iTime - refTime;
998  // go to 25 ns sampling
999  // int time = (int)(hitTime/25.+0.5) ;
1000  int time = static_cast<int>(floor(hitTime * crossingRate + 0.5));
1001  // ....determine fine shift within 25ns
1002  float dTime = (float)(hitTime - crossingTime * time);
1003  int j = iSamp - time;
1004  if (j >= 0 && j < s_MAXSAMPLES) {
1005  bareSignal[iSamp] +=
1006  (pulseShape[j] - pulseShapeDer[j] * dTime) * theEnergy;
1007  }
1008  } else {
1009  int j = iSamp - iTime + refTime;
1010  if (j >= 0 && j < s_MAXSAMPLES) {
1011  bareSignal[iSamp] += pulseShape[j] * theEnergy;
1012  }
1013  }
1014  // saturation
1015  if (bareSignal[iSamp] > satEt) {
1016  bareSignal[iSamp] = satEt;
1017  }
1018  }
1019  }
1020  }
1021  //
1022  // ..... case FCAL
1023  //
1024  else if (m_lvl1Helper->is_fcal(towerId)) {
1025 
1026  int emOrHad = m_lvl1Helper->sampling(towerId);
1027  int module = emOrHad + 1;
1028  std::vector<float> calibCoeff2 = m_calibCoeffFcal[module - 1];
1029  if (emOrHad && (Ieta == 3 || Ieta == 4)) {
1030  module += 1; // FCAL3
1031  }
1032  pulseShape = m_pulseShapeFcal[module - 1];
1033  pulseShapeDer = m_pulseShapeDerFcal[module - 1];
1034 
1035  //
1036  // ... loop on time samples (only one if no pile-up)
1037  //
1038  for (int iTime = 0; iTime < visEvecSize; iTime++) {
1039  float theEnergy = ttSumEnergy[iTime];
1040  if ((!m_noEmCalibMode && module == 1) ||
1041  (!m_noHadCalibMode && module > 1)) {
1042  // apply calibration coefficient
1043  theEnergy *= calibCoeff2[Ieta - 1];
1044  }
1045 
1046  // make samples
1047  for (int iSamp = 0; iSamp < s_NBSAMPLES; iSamp++) {
1048  if (!m_PileUp) {
1049  // go back to signed value of time
1050  int hitTime = iTime - refTime;
1051  // go to 25 ns sampling
1052  // int time = (int)(hitTime/25.+0.5) ;
1053  int time = static_cast<int>(floor(hitTime * crossingRate + 0.5));
1054  // ....determine fine shift within 25ns
1055  float dTime = (float)(hitTime - crossingTime * time);
1056  int j = iSamp - time;
1057  if (j >= 0 && j < s_MAXSAMPLES) {
1058  bareSignal[iSamp] +=
1059  (pulseShape[j] - pulseShapeDer[j] * dTime) * theEnergy;
1060  }
1061  } else {
1062  int j = iSamp - iTime + refTime;
1063  if (j >= 0 && j < s_MAXSAMPLES) {
1064  bareSignal[iSamp] += pulseShape[j] * theEnergy;
1065  }
1066  }
1067  }
1068  }
1069  } else {
1070  ATH_MSG_WARNING(" LArTTL1Maker: computeSignal unknown towerId "
1071  << m_lvl1Helper->show_to_string(towerId));
1072  return bareSignal;
1073  }
1074 
1075  return bareSignal;
1076 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ decodeInverse()

int LArTTL1Maker::decodeInverse ( int  region,
int  eta 
)
private

Definition at line 1749 of file LArTTL1Maker.cxx.

1749  {
1750  //===========================================================================
1751  // Maps [ region , eta ] to [ Ieta]
1752  // ==========================================================================
1753  // Problem: this is NOT a bijection, because of the "barrel end" zone.
1754  // Convention: only the barrel part of the identifying fields is
1755  // returned
1756  //===========================================================================
1757 
1758  int Ieta = 0;
1759  if (region == 0) { // Barrel + EC-OW
1760  if (eta <= 14) {
1761  Ieta = eta + 1;
1762  } else {
1763  Ieta = eta - 13;
1764  }
1765  } else if (region == 1 || region == 2) { // EC-IW
1766  if (region == 1) {
1767  Ieta = eta + 12;
1768  } else {
1769  Ieta = 15;
1770  }
1771  } else if (region == 3) { // FCAL
1772  Ieta = eta + 1;
1773  }
1774  return Ieta;
1775 }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode LArTTL1Maker::execute ( )
overridevirtual

Create LArTTL1 object save in TES (2 containers: 1 EM, 1 hadronic)

Definition at line 299 of file LArTTL1Maker.cxx.

299  {
300  // +======================================================================+
301  // + +
302  // + Author: F. Ledroit +
303  // + Creation date: 2003/01/13 +
304  // + Subject: Make the TTL1s and put them into the container +
305  // + +
306  // +======================================================================+
307 
308  ATH_MSG_DEBUG("Begining of execution");
309 
310  // Prepare RNG Service
311  ATHRNG::RNGWrapper* rngWrapper =
312  m_RandomSvc->getEngine(this, m_randomStreamName);
316  rngWrapper->setSeedLegacy(m_randomStreamName, Gaudi::Hive::currentContext(),
317  m_randomSeedOffset, seedingmode);
318  CLHEP::HepRandomEngine* rndmEngine = *rngWrapper;
319 
320  //
321  // ....... fill the LArHitEMap
322  //
323  if (m_chronoTest) {
324  m_chronSvc->chronoStart("fill LArHitEMap ");
325  }
326 
328  const ILArfSampl* fSampl = *fSamplhdl;
329 
331 
332  if (m_chronoTest) {
333  m_chronSvc->chronoStop("fill LArHitEMap ");
334  m_chronSvc->chronoPrint("fill LArHitEMap ");
335  }
336 
337  //
338  // .....get the trigger time if requested
339  //
340  double trigtime = 0;
341  if (m_useTriggerTime) {
342  trigtime = m_triggerTimeTool->time();
343  }
344  ATH_MSG_DEBUG("Trigger time used : " << trigtime);
345 
346  //
347  // ....... create the LAr TTL1 Containers
348  //
349 
351  ATH_CHECK(ttL1ContainerEm.record(std::make_unique<LArTTL1Container>()));
352 
354  ATH_CHECK(ttL1ContainerHad.record(std::make_unique<LArTTL1Container>()));
355 
356  std::unique_ptr<LArTTL1Container> truth_ttL1ContainerEm;
357  std::unique_ptr<LArTTL1Container> truth_ttL1ContainerHad;
358  if (!m_truthHitsContainer.empty()) {
359  truth_ttL1ContainerEm = std::make_unique<LArTTL1Container>();
360  truth_ttL1ContainerHad = std::make_unique<LArTTL1Container>();
361  }
362 
363  // ... initialise vectors for sums of energy in each TT
364  //
365  unsigned int nbTT = (unsigned int)m_lvl1Helper->tower_hash_max();
366  ATH_MSG_DEBUG("Max number of LAr Trigger Towers= " << nbTT);
367  std::vector<std::vector<float> >
368  sumEnergy; // inner index = time slot (from 0 to visEvecSize-1)
369  std::vector<std::vector<float> >
370  sumEnergy2; // to allow barrel/endcap separation in 15th TT + FCAL2/3
371  sumEnergy.resize(nbTT);
372  sumEnergy2.resize(nbTT);
373  std::vector<float> ttSumE;
374  int ttSumEvecSize = 0;
375  int refTime = 0;
376  if (!m_PileUp) {
377  ttSumEvecSize = 2 * crossingTime - 1;
378  refTime = crossingTime - 1;
379  } else {
380  ttSumEvecSize = s_MAXSAMPLES + s_NBSAMPLES - 1;
381  refTime = s_MAXSAMPLES - 1;
382  }
383  ATH_MSG_DEBUG("Number of time slots considered= "
384  << ttSumEvecSize << " reference time= " << refTime);
385  ttSumE.resize(ttSumEvecSize);
386  for (unsigned int iTT = 0; iTT < nbTT; iTT++) {
387  sumEnergy[iTT] = ttSumE;
388  sumEnergy2[iTT] = ttSumE;
389  }
390 
391  m_chronSvc->chronoStart("LArTTL1Mk hit loop ");
392 
393  int it = 0;
394  int it_end = hitmap->GetNbCells();
395  ATH_MSG_DEBUG("Size of the hit map= " << it_end);
396 
397  //
398  // .... loop on hit lists in the map
399  // .... and fill sumEnergy vector according to hit membership to TT
400  // .... (one sum per time slot for each TT)
401  //
402  float outOfTimeE = 0.;
403  int nOutOfTime = 0;
404  float inTimeE = 0.;
405  int nInTime = 0;
406  float printEthresh = 20.;
407  int nMissingGain = 0;
408  for (; it != it_end; ++it) {
409  const LArHitList& hitlist = hitmap->GetCell(it);
410  const std::vector<std::pair<float, float> >& timeE = hitlist.getData();
411  if (!timeE.empty()) {
413  int specialCase = 0;
414  bool skipCell = false;
415  //
416  // ... skip cells not summed up in LVL1 (end of barrel PS and 4th
417  // compartment of HEC)
418  //
419  if (!m_ttSvc->is_in_lvl1(cellId))
420  skipCell = true;
421 
422  if (!skipCell) {
423  //
424  // ...determine to which TT this channel belongs
425  //
426  Identifier ttId = m_ttSvc->whichTTID(cellId);
427 
428  if (m_chronoTest) {
429  m_chronSvc->chronoStart("retrieve RG ");
430  }
431 
432  //
433  // ....... determine the sampling fraction
434  //........ and the relative (layer) gains for this cellId
435  //
436  const float cellSampFraction = fSampl->FSAMPL(cellId);
437  const float inv_cellSampFraction = 1. / cellSampFraction;
438  // std::cout << "cellid, SF= " <<
439  // m_lvl1Helper->show_to_string(cellId) << " " << cellSampFraction <<
440  // std::endl;
441  float relGain = 0.;
442  float sinTheta = 0.;
443 
444  int region = m_lvl1Helper->region(ttId);
445  int eta = m_lvl1Helper->eta(ttId);
446  int Ieta = decodeInverse(region, eta);
447 
448  // case EM cell
449  if (m_lvl1Helper->is_lar_em(cellId)) {
450  bool barrelEnd = m_lvl1Helper->is_barrel_end(ttId);
451  std::vector<float> vecRG;
452  if (m_emHelper->is_em_barrel(cellId)) {
453  // Barrel
454  sinTheta = m_sinThetaEmb[Ieta - 1]; // Ieta starts at 1
455  } else {
456  // End-Cap
457  if (!barrelEnd) {
458  sinTheta = m_sinThetaEmec[Ieta - 1];
459  } else {
460  // patching the fact that TT offline ID is ambiguous
461  // decodeInverse(eta,region) returns 15 (ok barrel) instead of 1
462  // (ec value).
463  sinTheta = m_sinThetaEmec[0];
464  specialCase = 1;
465  ATH_MSG_VERBOSE(" special case "
466  << m_emHelper->show_to_string(ttId));
467  }
468  }
469  relGain = 1.; // no relative gain for EMB and EMEC
470  }
471 
472  // case HEC cell
473  else if (m_lvl1Helper->is_lar_hec(cellId)) {
474  sinTheta = m_sinThetaHec[Ieta - 1]; // Ieta starts at 1
475  relGain = 1.;
476  }
477 
478  // case FCAL cell
479  else if (m_lvl1Helper->is_lar_fcal(cellId)) {
480  IdentifierHash fcalHash = m_fcalHelper->channel_hash(cellId);
481  relGain = m_cellRelGainFcal[fcalHash];
482  if (relGain < 0.001) {
483  nMissingGain++;
484  ATH_MSG_WARNING(" No relative gain value found for FCAL cell "
485  << m_emHelper->show_to_string(cellId) << " (index "
486  << fcalHash << "), setting default value 1. ");
487  relGain = 1.;
488  }
489  sinTheta = 1.; // this factor is included in the relative gain
490  }
491  if (m_chronoTest) {
492  m_chronSvc->chronoStop("retrieve RG ");
493  m_chronSvc->chronoPrint("retrieve RG ");
494  }
495 
496  IdentifierHash ttHash = m_lvl1Helper->tower_hash(ttId);
497 
498  //
499  // .... loop on hits in hit list
500  //
501  // std::vector<std::pair<float,float> >::const_iterator first =
502  // timeEbegin(); std::vector<std::pair<float,float> >::const_iterator
503  // last = timeE->end(); while (first != last) {
504  for (const auto& first : timeE) {
505  float hitEnergy = first.first;
506  float hitTime = first.second - trigtime;
507  if (hitTime > 99000.) {
508  if (hitEnergy > printEthresh) {
509  ATH_MSG_WARNING(" Found pathological hit time, cellId= "
510  << m_emHelper->show_to_string(cellId)
511  << " time= " << hitTime
512  << " energy= " << hitEnergy);
513  }
514  // provisionally fix a bug in PileUpEvent. Normally not needed
515  // starting from 10.5.0
516  hitTime -= 100000.;
517  }
518  // remove pathological energies (found in some Grid simulated DC2/Rome
519  // samples)
520  if (fabs(hitEnergy) > 1e+9) {
521  ATH_MSG_WARNING(" Pathological energy ignored cellId= "
522  << m_emHelper->show_to_string(cellId)
523  << " energy= " << hitEnergy);
524  hitEnergy = 0.;
525  hitTime = 0.;
526  }
527  //
528  // ....determine time with respect to ref shape
529  //
530  int iShift = 0;
531  if (!m_PileUp) {
532  // keep 1ns granularity
533  // iShift = (int)(hitTime+0.5);
534  iShift = static_cast<int>(floor(hitTime + 0.5));
535  } else {
536  // round to 25ns
537  // iShift = (int)(hitTime/25.+0.5);
538  iShift = static_cast<int>(floor(hitTime * crossingRate + 0.5));
539  }
540  //
541  // ....make time positive to allow using it as an index
542  //
543  int iTime = iShift + refTime;
544  //
545  // .... keep only hits in the timing window
546  //
547  if (iTime >= 0 && iTime < ttSumEvecSize) {
548 
549  if (!specialCase) {
550  // standard case
551  // ....... make the energy sum
552  ttSumE = sumEnergy[ttHash];
553  ttSumE[iTime] +=
554  hitEnergy * inv_cellSampFraction * sinTheta * relGain;
555  sumEnergy[ttHash] = ttSumE;
556  } else {
557  // ec part of barrel-end or FCAL3
558  // ....... make the energy sum
559  ttSumE = sumEnergy2[ttHash];
560  ttSumE[iTime] +=
561  hitEnergy * inv_cellSampFraction * sinTheta * relGain;
562  sumEnergy2[ttHash] = ttSumE;
563  }
564  // msglog << MSG::VERBOSE << "applied relative layer gain "
565  //<< relGain
566  // << " to a hit of cell " <<
567  // m_emHelper->show_to_string(cellId) << endmsg;
568  inTimeE += hitEnergy;
569  nInTime++;
570  } // only hits in timing window
571  else {
572  outOfTimeE += hitEnergy;
573  nOutOfTime++;
574  if (hitEnergy > printEthresh) {
575  if (!m_PileUp) {
576  ATH_MSG_DEBUG("Found a hit out of the timing window, hitTime= "
577  << hitTime << " with more than " << printEthresh
578  << " MeV: hitEnergy= " << hitEnergy << " MeV");
579  } else {
581  "Found a hit out of the timing window, hitTime= "
582  << hitTime << " with more than " << printEthresh
583  << " MeV: hitEnergy= " << hitEnergy << " MeV");
584  }
585  }
586  }
587  } // end of loop on hits in the list
588  } // skip cell condition
589  } // check timeE->size() > 0
590 
591  } // end of loop on hit lists
592 
593  ATH_MSG_DEBUG("Number of missing relative FCAL gains for this event = "
594  << nMissingGain);
595  if (inTimeE == 0 || nInTime == 0)
596  ATH_MSG_VERBOSE("No in time energy");
597  else
598  ATH_MSG_VERBOSE("Out of time energy = "
599  << outOfTimeE << " MeV"
600  << " represents " << 100. * outOfTimeE / inTimeE
601  << " % of in time energy for " << nOutOfTime << " ("
602  << 100. * nOutOfTime / nInTime << " %) hits");
603  if (outOfTimeE > 0.02 * inTimeE) {
604  ATH_MSG_WARNING("Out of time energy = "
605  << outOfTimeE << " MeV"
606  << " larger than 2% of in time energy = " << inTimeE
607  << " MeV; nb of out of time hits = " << nInTime << " ("
608  << (nInTime > 0 ? 100. * nOutOfTime / nInTime : 0)
609  << " %)");
610  }
611 
612  if (m_chronoTest) {
613  m_chronSvc->chronoStop("LArTTL1Mk hit loop ");
614  m_chronSvc->chronoPrint("LArTTL1Mk hit loop ");
615  m_chronSvc->chronoStart("LArTTL1Mk TT loop ");
616  }
617 
618  std::vector<std::string> emHadString(2);
619  emHadString[0] = "ElectroMagnetic";
620  emHadString[1] = "Hadronic";
621 
622  std::vector<Identifier>::const_iterator itTt = m_lvl1Helper->tower_begin();
623  std::vector<Identifier>::const_iterator itEnd = m_lvl1Helper->tower_end();
624 
625  //
626  // ....... loop on Trigger Towers
627  // ....... and build signals using pulse shape and noise for each TT
628  //
629  ATH_MSG_DEBUG(" Starting loop on Trigger Towers ");
630  for (; itTt != itEnd; ++itTt) {
631 
632  Identifier towerId = (*itTt);
633 
634  //
635  // ........ skip Tile cal
636  //
637  if (!m_lvl1Helper->is_tile(towerId)) {
638 
639  int emHad = m_lvl1Helper->sampling(towerId);
640  // convert offline id to hash id
641  IdentifierHash ttHash = m_lvl1Helper->tower_hash(towerId);
642  int region = m_lvl1Helper->region(towerId);
643  int eta = m_lvl1Helper->eta(towerId);
644  int Ieta = decodeInverse(region, eta);
645 
646  //
647  // .... compute the signal for current trigger tower
648  //
649  if (m_chronoTest) {
650  m_chronSvc->chronoStart("compute signal ");
651  }
652  std::vector<float> analogSum(s_NBSAMPLES);
653  std::vector<float> analogSum2(s_NBSAMPLES);
654  std::vector<float> sumTTE = sumEnergy[ttHash];
655  std::vector<float> sumTTE2 = sumEnergy2[ttHash];
656  int nSpecialCase = 0;
657 
658  bool hasE = false;
659  for (unsigned int i = 0; i < sumTTE.size(); ++i) {
660  if (fabs(sumTTE[i]) > 0.) {
661  hasE = true;
662  break;
663  }
664  }
665 
666  bool hasE2 = false;
667  for (unsigned int i = 0; i < sumTTE2.size(); ++i) {
668  if (fabs(sumTTE2[i]) > 0.) {
669  hasE2 = true;
670  break;
671  }
672  }
673 
674  // if ( fabs(sumTTE[refTime]) > 0.|| fabs(sumTTE2[refTime]) > 0. ) {
675  if (hasE || hasE2) {
676 
677  // if(fabs(sumTTE[refTime]) > 0.) {
678  if (hasE) {
679  analogSum = computeSignal(towerId, Ieta, 0, sumTTE, refTime);
680  }
681 
682  // treat special case of ec part of the "barrel end" and special case of
683  // FCAL2/FCAL3 fix me !! this way, we double the saturation energy in
684  // this tower...(because it is cut into 2 pieces)
685  // if(fabs(sumTTE2[refTime]) > 0.) {
686  if (hasE2) {
687  nSpecialCase += 1;
688  if (nSpecialCase > 1) {
690  " more than 1 special case, current Trigger Tower is "
691  << emHadString[emHad] << ": "
692  << m_emHelper->show_to_string(towerId) << " ");
693  }
694  analogSum2 = computeSignal(towerId, Ieta, 1, sumTTE2, refTime);
695  for (int isamp = 0; isamp < s_NBSAMPLES; isamp++) {
696  analogSum[isamp] += analogSum2[isamp];
697  }
698  }
699 
700  if (sumTTE[refTime] > m_debugThresh) {
701  ATH_MSG_DEBUG(" current Trigger Tower is "
702  << emHadString[emHad] << ": "
703  << m_emHelper->show_to_string(towerId) << " ");
705  " transverse E (i.e. sum E / sampling fraction * sin_theta * rel "
706  "gain)= (at ref. time, before calib)"
707  << sumTTE[refTime] << " + " << sumTTE2[refTime]
708  << " (special cases) ");
709  } else if (sumTTE[refTime] > 0.) {
710  ATH_MSG_VERBOSE(" current Trigger Tower is "
711  << emHadString[emHad] << ": "
712  << m_emHelper->show_to_string(towerId) << " ");
714  " [very low] transverse E (i.e. sum E / sampling fraction * "
715  "sin_theta * rel gain)= (at ref. time, before calib)"
716  << sumTTE[refTime] << " + " << sumTTE2[refTime]
717  << " (special cases) ");
718  }
719  }
720  if (m_chronoTest) {
721  m_chronSvc->chronoStop("compute signal ");
722  m_chronSvc->chronoPrint("compute signal ");
723  }
724 
725  //
726  // ........ add the noise
727  //
728  if (m_chronoTest) {
729  m_chronSvc->chronoStart("adding noise ");
730  }
731  std::vector<float> fullSignal(s_NBSAMPLES);
732  if (m_NoiseOnOff) {
733  fullSignal = computeNoise(towerId, Ieta, analogSum, rndmEngine);
734  } else {
735  fullSignal = analogSum;
736  }
737 
738  if (m_chronoTest) {
739  m_chronSvc->chronoStop("adding noise ");
740  m_chronSvc->chronoPrint("adding noise ");
741  }
742 
743  if (sumTTE[refTime] > m_debugThresh) {
744  ATH_MSG_DEBUG(" uncalibrated amplitudes around peak (+-3 time slots): "
745  << sumTTE[refTime - 3] << ", " << sumTTE[refTime - 2]
746  << ", " << sumTTE[refTime - 1] << ", " << sumTTE[refTime]
747  << ", " << sumTTE[refTime + 1] << ", "
748  << sumTTE[refTime + 2] << ", " << sumTTE[refTime + 3]);
749  ATH_MSG_DEBUG(" calibrated signal is "
750  << analogSum[0] << ", " << analogSum[1] << ", "
751  << analogSum[2] << ", " << analogSum[3] << ", "
752  << analogSum[4] << ", " << analogSum[5] << ", "
753  << analogSum[6]);
754  ATH_MSG_DEBUG(" shape of calibrated signal is "
755  << analogSum[0] / analogSum[3] << ", "
756  << analogSum[1] / analogSum[3] << ", "
757  << analogSum[2] / analogSum[3] << ", "
758  << analogSum[3] / analogSum[3] << ", "
759  << analogSum[4] / analogSum[3] << ", "
760  << analogSum[5] / analogSum[3] << ", "
761  << analogSum[6] / analogSum[3]);
762  ATH_MSG_DEBUG(" after adding noise, full signal is "
763  << fullSignal[0] << ", " << fullSignal[1] << ", "
764  << fullSignal[2] << ", " << fullSignal[3] << ", "
765  << fullSignal[4] << ", " << fullSignal[5] << ", "
766  << fullSignal[6]);
767  if (msgLvl(MSG::VERBOSE)) {
768  for (unsigned int iTime = 0; iTime < sumTTE.size(); iTime++) {
769  ATH_MSG_VERBOSE(" iTime [range=0-28 or 0-299] = "
770  << iTime << " hit energy = " << sumTTE[iTime]);
771  }
772  }
773  } else if (sumTTE[refTime] > 0.) {
775  " uncalibrated amplitudes around peak (+-3 time slots): "
776  << sumTTE[refTime - 3] << ", " << sumTTE[refTime - 2] << ", "
777  << sumTTE[refTime - 1] << ", " << sumTTE[refTime] << ", "
778  << sumTTE[refTime + 1] << ", " << sumTTE[refTime + 2] << ", "
779  << sumTTE[refTime + 3]);
780  ATH_MSG_VERBOSE(" calibrated signal is "
781  << analogSum[0] << ", " << analogSum[1] << ", "
782  << analogSum[2] << ", " << analogSum[3] << ", "
783  << analogSum[4] << ", " << analogSum[5] << ", "
784  << analogSum[6]);
785  ATH_MSG_VERBOSE(" shape of calibrated signal is "
786  << analogSum[0] / analogSum[3] << ", "
787  << analogSum[1] / analogSum[3] << ", "
788  << analogSum[2] / analogSum[3] << ", "
789  << analogSum[3] / analogSum[3] << ", "
790  << analogSum[4] / analogSum[3] << ", "
791  << analogSum[5] / analogSum[3] << ", "
792  << analogSum[6] / analogSum[3]);
793  ATH_MSG_VERBOSE(" after adding noise, full signal is "
794  << fullSignal[0] << ", " << fullSignal[1] << ", "
795  << fullSignal[2] << ", " << fullSignal[3] << ", "
796  << fullSignal[4] << ", " << fullSignal[5] << ", "
797  << fullSignal[6]);
798  }
799 
800  if (fabs(fullSignal[s_PEAKPOS]) > 0.) {
801  //
802  // ...... create the LArTTL1 and push it into the appropriate TTL1
803  // container
804  //
805  LArTTL1* ttL1;
806  HWIdentifier ttChannel;
807  ttL1 = new LArTTL1(ttChannel, towerId, fullSignal);
808  if (emHad) {
809  ttL1ContainerHad->push_back(ttL1);
810  } else {
811  ttL1ContainerEm->push_back(ttL1);
812  }
813 
814  if (!m_truthHitsContainer.empty()) {
815  std::vector<float> et(3);
816  et[0] = sumTTE[refTime - 1];
817  et[1] = sumTTE[refTime];
818  et[2] = sumTTE[refTime + 1];
819  LArTTL1* truth_ttL1 = new LArTTL1(ttChannel, towerId, et);
820  if (emHad) {
821  truth_ttL1ContainerHad->push_back(truth_ttL1);
822  } else {
823  truth_ttL1ContainerEm->push_back(truth_ttL1);
824  }
825  }
826  }
827 
828  } // end excluding Tile cal
829  } // end of for loop on TT
830  if (m_chronoTest) {
831  m_chronSvc->chronoStop("LArTTL1Mk TT loop ");
832  m_chronSvc->chronoPrint("LArTTL1Mk TT loop ");
833  }
834 
835  ATH_MSG_DEBUG("number of created TTL1s (Em, Had) = "
836  << ttL1ContainerEm->size() << " , "
837  << ttL1ContainerHad->size());
838 
839  return StatusCode::SUCCESS;
840 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ finalize()

StatusCode LArTTL1Maker::finalize ( )
overridevirtual

Definition at line 842 of file LArTTL1Maker.cxx.

842  {
843  // +======================================================================+
844  // + +
845  // + Author: F. Ledroit +
846  // + Creation date: 2003/01/13 +
847  // + +
848  // +======================================================================+
849  //
850  // ......... declaration
851  //
852 
853  ATH_MSG_INFO(" LArTTL1Maker finalize completed successfully");
854 
855  m_chronSvc->chronoPrint("LArTTL1Mk hit loop ");
856  m_chronSvc->chronoPrint("LArTTL1Mk TT loop ");
857 
858  return StatusCode::SUCCESS;
859 }

◆ handle()

void LArTTL1Maker::handle ( const Incident &  )
overridevirtual

Definition at line 287 of file LArTTL1Maker.cxx.

287  {
288  ATH_MSG_DEBUG("LArTTL1Maker handle()");
289 
290  // ...... Read auxiliary data files
291  //
292  if (this->readAuxiliary() == StatusCode::FAILURE) {
293  ATH_MSG_ERROR(" Error from readAuxiliary() ");
294  }
295 
296  return;
297 }

◆ initialize()

StatusCode LArTTL1Maker::initialize ( )
overridevirtual

Read ascii files for auxiliary data (puslse shapes, noise, etc...)

Definition at line 149 of file LArTTL1Maker.cxx.

149  {
150  // +======================================================================+
151  // + +
152  // + Author ........: F. Ledroit +
153  // + Creation date .: 09/01/2003 +
154  // + +
155  // +======================================================================+
156  //
157  // ......... declaration
158  //
159  m_chronSvc = chronoSvc();
160 
161  ATH_MSG_INFO("***********************************************");
162  ATH_MSG_INFO("* Steering options for LArTTL1Maker algorithm *");
163  ATH_MSG_INFO("***********************************************");
164  //
165  // ......... print the noise flag
166  //
167  if (m_NoiseOnOff) {
168  ATH_MSG_INFO(
169  "Electronic noise will be added in each TT for selected "
170  "sub-detectors.");
171  } else {
172  ATH_MSG_INFO("No electronic noise added.");
173  }
174 
175  //
176  // ......... print the pile-up flag
177  //
178  if (m_PileUp) {
179  ATH_MSG_INFO("processing pile-up events");
180  } else {
181  ATH_MSG_INFO("no pile up");
182  }
183 
184  //
185  // ......... print the trigger time flag
186  //
187  if (m_useTriggerTime) {
188  ATH_MSG_INFO("use Trigger Time service " << m_triggerTimeTool);
189  } else {
190  ATH_MSG_INFO("no Trigger Time used");
191  }
192 
193  //
194  // ......... print the calibration flags
195  //
196  // currently the calib modes are not used anymore -> turning INFO logs into
197  // DEBUG
198  if (m_noEmCalibMode) {
200  "NO calibration mode chosen for EM towers "
201  << " == technical option. Should not be used for physics !!! ");
202  } else {
203  ATH_MSG_DEBUG("standard calibration chosen for EM towers");
204  }
205 
206  if (m_noHadCalibMode) {
208  "NO calibration mode chosen for HEC towers "
209  << " == technical option. Should not be used for physics !!! ");
210  } else {
211  ATH_MSG_DEBUG("standard calibration mode chosen for HEC towers ");
212  }
213 
214  //
215  // .........retrieve tool computing trigger time if requested
216  //
217  if (m_useTriggerTime && m_PileUp) {
218  ATH_MSG_INFO(
219  " In case of pileup, the trigger time subtraction is done in "
220  "PileUpSvc ");
221  ATH_MSG_INFO(" => LArTTL1Maker will not apply Trigger Time ");
222  m_useTriggerTime = false;
223  }
224 
225  if (m_useTriggerTime) {
226  ATH_CHECK(m_triggerTimeTool.retrieve());
227  } else {
228  m_triggerTimeTool.disable();
229  }
230 
231  //
232  // ..... need LAr and CaloIdManager to retrieve all needed helpers
233  //
234  const CaloIdManager* caloMgr = nullptr;
235  ATH_CHECK(detStore()->retrieve(caloMgr));
236  ATH_CHECK(detStore()->retrieve(m_OflHelper, "CaloCell_ID"));
237  //
238  //..... need of course the LVL1 helper
239  //
240  m_lvl1Helper = caloMgr->getLVL1_ID();
241  if (!m_lvl1Helper) {
242  ATH_MSG_ERROR("Could not access CaloLVL1_ID helper");
243  return StatusCode::FAILURE;
244  } else {
245  ATH_MSG_DEBUG("Successfully accessed CaloLVL1_ID helper");
246  }
247 
248  //..... also need the LArEM helper (e.g. to deal with the barrel end part)
250  ATH_MSG_DEBUG("Successfully retrieved LArEM helper from DetectorStore");
251 
252  //..... also need the LArHEC helper to avoid adding up energy from 4th
253  // compartment
255  ATH_MSG_DEBUG("Successfully retrieved LArHEC helper from DetectorStore");
256 
257  //..... also need the LArFCAL helper to use hash ids to store all gains
259  ATH_MSG_DEBUG("Successfully retrieved LArFCAL helper from DetectorStore");
260 
261  ATH_CHECK(m_ttSvc.retrieve());
262 
263  // Incident Service:
264  SmartIF<IIncidentSvc> incSvc{service("IncidentSvc")};
265  ATH_CHECK(incSvc.isValid());
266  // start listening to "BeginRun"
267  incSvc->addListener(this, "BeginRun", m_BeginRunPriority);
268 
269  ATH_CHECK(m_RandomSvc.retrieve());
270 
272 
273  // Initialize read-handle keys
274  for (auto& dhk : m_xxxHitContainerName) {
275  ATH_CHECK(dhk.initialize(!m_PileUp));
276  }
277 
280 
282 
283  ATH_MSG_DEBUG("Initialization completed successfully");
284  return StatusCode::SUCCESS;
285 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

virtual bool LArTTL1Maker::isClonable ( ) const
inlinefinaloverridevirtual

Definition at line 85 of file LArTTL1Maker.h.

85 { return true; }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ readAuxiliary()

StatusCode LArTTL1Maker::readAuxiliary ( )
private

method called at the begining of execute() to fill the hit map

method called at initialization to read auxiliary data from ascii files

Definition at line 1233 of file LArTTL1Maker.cxx.

1233  {
1234  //
1235  // ...... Read auxiliary data file for EM (barrel and EC)
1236  //
1237 
1238  ATH_MSG_DEBUG("executing readAuxiliary()");
1239 
1240  float refEnergy;
1241  std::vector<float> pulseShape(s_MAXSAMPLES);
1242  std::vector<float> pulseShapeDer(s_MAXSAMPLES);
1243  std::string barrel_endcap;
1244  int Ieta;
1245  float sinTheta = 0.;
1246  std::vector<float> layerRelGain(s_NBDEPTHS);
1247  std::vector<float> noiseRms(3);
1248  std::vector<float> noiseRms4(4);
1249  std::vector<float> autoCorr(s_NBSAMPLES);
1250 
1251  std::string pulsedataname =
1252  PathResolver::find_file("LArEmLvl1.data", "DATAPATH");
1253  if (pulsedataname.empty()) {
1254  ATH_MSG_ERROR("Could not locate LArEmLvl1.data file");
1255  return StatusCode::FAILURE;
1256  }
1257  const char* pulsedatafile = pulsedataname.c_str();
1258  std::ifstream infile(pulsedatafile);
1259 
1260  if (!infile) {
1261  ATH_MSG_ERROR(" cannot open EM file ");
1262  return StatusCode::FAILURE;
1263  } else {
1264  ATH_MSG_DEBUG(" EM file opened ");
1265  }
1266 
1267  // first read the pulse shape for all energies
1268  // valid for both barrel and endcap (from Xavier de la Broise)
1269  for (int iene = 0; iene < s_NBENERGIES; iene++) {
1270  infile >> refEnergy >> pulseShape[0] >> pulseShape[1] >> pulseShape[2] >>
1271  pulseShape[3] >> pulseShape[4] >> pulseShape[5] >> pulseShape[6] >>
1272  pulseShape[7] >> pulseShape[8] >> pulseShape[9] >> pulseShape[10] >>
1273  pulseShape[11] >> pulseShape[12] >> pulseShape[13] >> pulseShape[14] >>
1274  pulseShape[15] >> pulseShape[16] >> pulseShape[17] >> pulseShape[18] >>
1275  pulseShape[19] >> pulseShape[20] >> pulseShape[21] >> pulseShape[22] >>
1276  pulseShape[23];
1277  m_refEnergyEm.push_back(refEnergy);
1278  m_pulseShapeEm.push_back(pulseShape);
1279  infile >> pulseShapeDer[0] >> pulseShapeDer[1] >> pulseShapeDer[2] >>
1280  pulseShapeDer[3] >> pulseShapeDer[4] >> pulseShapeDer[5] >>
1281  pulseShapeDer[6] >> pulseShapeDer[7] >> pulseShapeDer[8] >>
1282  pulseShapeDer[9] >> pulseShapeDer[10] >> pulseShapeDer[11] >>
1283  pulseShapeDer[12] >> pulseShapeDer[13] >> pulseShapeDer[14] >>
1284  pulseShapeDer[15] >> pulseShapeDer[16] >> pulseShapeDer[17] >>
1285  pulseShapeDer[18] >> pulseShapeDer[19] >> pulseShapeDer[20] >>
1286  pulseShapeDer[21] >> pulseShapeDer[22] >> pulseShapeDer[23];
1287  m_pulseShapeDerEm.push_back(pulseShapeDer);
1288  }
1289 
1290  // then read autocorrelation function valid for barrel and endcap
1291  // ("default" auto-correlation function)
1292  m_autoCorrEm.resize(s_NBSAMPLES);
1293  infile >> m_autoCorrEm[0] >> m_autoCorrEm[1] >> m_autoCorrEm[2] >>
1294  m_autoCorrEm[3] >> m_autoCorrEm[4] >> m_autoCorrEm[5] >> m_autoCorrEm[6];
1295 
1296  // then read the separator for barrel
1297  infile >> barrel_endcap;
1298 
1299  for (int ieta = 0; ieta < s_NBETABINS; ieta++) {
1300  // then read the calibration factor (from MC)
1301  // and the noise rms (from Bill Cleland) for each eta bin, in barrel
1302  infile >> Ieta >> sinTheta;
1303  m_sinThetaEmb.push_back(sinTheta);
1304  infile >> noiseRms[0] >> noiseRms[1] >> noiseRms[2];
1305  m_noiseRmsEmb.push_back(noiseRms[2]);
1306  // if later we want to disentangle between pre-sum and summing electronic
1307  // noise...
1308  // m_noiseRmsEmb.push_back(noiseRms);
1309  }
1310 
1311  // now read the separator for endcap
1312  infile >> barrel_endcap;
1313 
1314  for (int ieta = 0; ieta < s_NBETABINS; ieta++) {
1315  // then read the calibration coefficient (from MC)
1316  // and the noise rms (from Bill Cleland) for each eta bin, in barrel
1317  infile >> Ieta >> sinTheta;
1318  m_sinThetaEmec.push_back(sinTheta);
1319  infile >> noiseRms[0] >> noiseRms[1] >> noiseRms[2];
1320  m_noiseRmsEmec.push_back(noiseRms[2]);
1321  // if later we want to disentangle between pre-sum and summing electronic
1322  // noise...
1323  // m_noiseRmsEmec.push_back(noiseRms);
1324  }
1325 
1326  infile.close();
1327  ATH_MSG_DEBUG(" EM file closed ");
1328 
1329  ATH_MSG_INFO(" 1 pulse shape per energy for EMB+EMEC : ");
1330  for (int iene = 0; iene < s_NBENERGIES; iene++) {
1331  ATH_MSG_INFO(
1332  m_refEnergyEm[iene]
1333  << " MeV: " << (m_pulseShapeEm[iene])[0] << ", "
1334  << (m_pulseShapeEm[iene])[1] << ", " << (m_pulseShapeEm[iene])[2]
1335  << ", " << (m_pulseShapeEm[iene])[3] << ", "
1336  << (m_pulseShapeEm[iene])[4] << ", " << (m_pulseShapeEm[iene])[5]
1337  << ", " << (m_pulseShapeEm[iene])[6] << ", "
1338  << (m_pulseShapeEm[iene])[7] << ", " << (m_pulseShapeEm[iene])[8]
1339  << ", " << (m_pulseShapeEm[iene])[9] << ", "
1340  << (m_pulseShapeEm[iene])[10] << ", " << (m_pulseShapeEm[iene])[11]
1341  << ", " << (m_pulseShapeEm[iene])[12] << ", "
1342  << (m_pulseShapeEm[iene])[13] << ", " << (m_pulseShapeEm[iene])[14]
1343  << ", " << (m_pulseShapeEm[iene])[15] << ", "
1344  << (m_pulseShapeEm[iene])[16] << ", " << (m_pulseShapeEm[iene])[17]
1345  << ", " << (m_pulseShapeEm[iene])[18] << ", "
1346  << (m_pulseShapeEm[iene])[19] << ", " << (m_pulseShapeEm[iene])[20]
1347  << ", " << (m_pulseShapeEm[iene])[21] << ", "
1348  << (m_pulseShapeEm[iene])[22] << ", " << (m_pulseShapeEm[iene])[23]
1349  << ", ");
1350  }
1351  ATH_MSG_INFO(" 1 auto-corr matrix for EMB+EMEC : "
1352  << m_autoCorrEm[0] << ", " << m_autoCorrEm[1] << ", "
1353  << m_autoCorrEm[2] << ", " << m_autoCorrEm[3] << ", "
1354  << m_autoCorrEm[4] << ", " << m_autoCorrEm[5] << ", "
1355  << m_autoCorrEm[6]);
1356 
1357  ATH_MSG_DEBUG(
1358  " Finished reading 1 calib coeff + 1 noise value per eta bin for EM: ");
1359  for (int ieta = 0; ieta < s_NBETABINS; ieta++) {
1360  // currently the calib coeffs are all set to 1 -> turning INFO logs into
1361  // DEBUG
1362  ATH_MSG_DEBUG("Ieta= " << ieta + 1
1363  << ", calib coeff EMB: " << m_calibCoeffEmb[ieta]
1364  << ", calib coeff EMEC: " << m_calibCoeffEmec[ieta]);
1365  ATH_MSG_INFO("Ieta= " << ieta + 1 << ", noise rms EMB: "
1366  << m_noiseRmsEmb[ieta] << " MeV"
1367  << ", noise rms EMEC: " << m_noiseRmsEmec[ieta]
1368  << " MeV");
1369  }
1370 
1371  //
1372  // ...... Read auxiliary data file for HEC
1373  //
1374 
1375  pulsedataname = PathResolver::find_file("LArHecLvl1.data", "DATAPATH");
1376  if (pulsedataname.empty()) {
1377  ATH_MSG_ERROR("Could not locate LArHecLvl1.data file");
1378  return StatusCode::FAILURE;
1379  }
1380  pulsedatafile = pulsedataname.c_str();
1381  infile.open(pulsedatafile);
1382 
1383  if (!infile) {
1384  ATH_MSG_ERROR(" cannot open HEC file ");
1385  return StatusCode::FAILURE;
1386  } else {
1387  ATH_MSG_DEBUG(" HEC file opened ");
1388  }
1389 
1390  // first read the pulse shape for each eta bin (from Leonid Kurchaninov)
1391  m_pulseShapeHec.resize(s_MAXSAMPLES);
1395  m_pulseShapeHec[9] >> m_pulseShapeHec[10] >> m_pulseShapeHec[11] >>
1396  m_pulseShapeHec[12] >> m_pulseShapeHec[13] >> m_pulseShapeHec[14] >>
1397  m_pulseShapeHec[15] >> m_pulseShapeHec[16] >> m_pulseShapeHec[17] >>
1398  m_pulseShapeHec[18] >> m_pulseShapeHec[19] >> m_pulseShapeHec[20] >>
1400 
1413 
1414  m_satEnergyHec.resize(s_NBETABINS);
1415  m_sinThetaHec.resize(s_NBETABINS);
1416  m_noiseRmsHec.resize(s_NBETABINS);
1417  m_autoCorrHec.push_back(autoCorr);
1418  for (int ieta = 1; ieta < s_NBETABINS; ieta++) {
1419  // now read for each eta bin:
1420  // - the calibration factor (determined from MC)
1421  // - the transverse saturating energies (same in all eta bins but Ieta=15)
1422  // - the value of sin_theta
1423  // - the noise rms
1424  infile >> Ieta >> m_satEnergyHec[ieta] >> m_sinThetaHec[ieta] >>
1425  m_noiseRmsHec[ieta];
1426 
1427  // and the autocorrelation function for each eta bin (from Leonid
1428  // Kurchaninov)
1429  infile >> autoCorr[0] >> autoCorr[1] >> autoCorr[2] >> autoCorr[3] >>
1430  autoCorr[4] >> autoCorr[5] >> autoCorr[6];
1431  m_autoCorrHec.push_back(autoCorr);
1432  }
1433  infile.close();
1434  ATH_MSG_DEBUG(" HEC file closed ");
1435  ATH_MSG_INFO(" 1 pulse shape for HEC : "
1436  << m_pulseShapeHec[0] << ", " << m_pulseShapeHec[1] << ", "
1437  << m_pulseShapeHec[2] << ", " << m_pulseShapeHec[3] << ", "
1438  << m_pulseShapeHec[4] << ", " << m_pulseShapeHec[5] << ", "
1439  << m_pulseShapeHec[5] << ", " << m_pulseShapeHec[6] << ", "
1440  << m_pulseShapeHec[7] << ", " << m_pulseShapeHec[8] << ", "
1441  << m_pulseShapeHec[9] << ", " << m_pulseShapeHec[10] << ", "
1442  << m_pulseShapeHec[11] << ", " << m_pulseShapeHec[12] << ", "
1443  << m_pulseShapeHec[13] << ", " << m_pulseShapeHec[14] << ", "
1444  << m_pulseShapeHec[15] << ", " << m_pulseShapeHec[16] << ", "
1445  << m_pulseShapeHec[17] << ", " << m_pulseShapeHec[18] << ", "
1446  << m_pulseShapeHec[19] << ", " << m_pulseShapeHec[20] << ", "
1447  << m_pulseShapeHec[21] << ", " << m_pulseShapeHec[22] << ", "
1448  << m_pulseShapeHec[23]);
1449  ATH_MSG_DEBUG(
1450  "Finished reading calib coeff, noise rms, sat ene, auto corr for each "
1451  "eta bin for HEC: ");
1452  for (int ieta = 1; ieta < s_NBETABINS; ieta++) {
1453  // currently the calib coeffs are all set to 1 -> turning INFO logs into
1454  // DEBUG
1455  ATH_MSG_DEBUG(" Ieta= " << ieta + 1
1456  << ", calib coeff HEC: " << m_calibCoeffHec[ieta]);
1457  ATH_MSG_INFO(" Ieta= " << ieta + 1 << ", noise rms HEC: "
1458  << m_noiseRmsHec[ieta] << " MeV"
1459  << ", sat ene HEC: " << m_satEnergyHec[ieta]
1460  << " MeV");
1461  ATH_MSG_INFO(" Ieta= " << ieta + 1
1462  << ", auto corr HEC: " << (m_autoCorrHec[ieta])[0]
1463  << ", " << (m_autoCorrHec[ieta])[1] << ", "
1464  << (m_autoCorrHec[ieta])[2] << ", "
1465  << (m_autoCorrHec[ieta])[3] << ", "
1466  << (m_autoCorrHec[ieta])[4] << ", "
1467  << (m_autoCorrHec[ieta])[5] << ", "
1468  << (m_autoCorrHec[ieta])[6] << ", ");
1469  }
1470 
1471  //
1472  // ...... Read auxiliary data files for FCAL
1473  //
1474 
1475  pulsedataname = PathResolver::find_file("LArFcalLvl1.data", "DATAPATH");
1476  if (pulsedataname.empty()) {
1477  ATH_MSG_ERROR("Could not locate LArFcalLvl1.data file");
1478  return StatusCode::FAILURE;
1479  }
1480  pulsedatafile = pulsedataname.c_str();
1481  infile.open(pulsedatafile);
1482 
1483  if (!infile) {
1484  ATH_MSG_ERROR(" cannot open FCAL file ");
1485  return StatusCode::FAILURE;
1486  } else {
1487  ATH_MSG_DEBUG(" FCAL file opened ");
1488  }
1489 
1490  const int nMod = 3;
1491  // m_noiseRmsFcal.resize(nMod);
1492  int imod = 0;
1493 
1494  for (int iMod = 0; iMod < nMod; iMod++) {
1495 
1496  // first read the module number + noise rms (from J. Rutherfoord)
1497  // infile >> imod >> m_noiseRmsFcal[iMod] ;
1498  infile >> imod >> noiseRms4[0] >> noiseRms4[1] >> noiseRms4[2] >>
1499  noiseRms4[3];
1500  m_noiseRmsFcal.push_back(noiseRms4);
1501 
1502  // read the pulse shape for this module (from John Rutherfoord)
1503  infile >> pulseShape[0] >> pulseShape[1] >> pulseShape[2] >>
1504  pulseShape[3] >> pulseShape[4] >> pulseShape[5] >> pulseShape[6] >>
1505  pulseShape[7] >> pulseShape[8] >> pulseShape[9] >> pulseShape[10] >>
1506  pulseShape[11] >> pulseShape[12] >> pulseShape[13] >> pulseShape[14] >>
1507  pulseShape[15] >> pulseShape[16] >> pulseShape[17] >> pulseShape[18] >>
1508  pulseShape[19] >> pulseShape[20] >> pulseShape[21] >> pulseShape[22] >>
1509  pulseShape[23];
1510  m_pulseShapeFcal.push_back(pulseShape);
1511 
1512  // read the pulse shape derivative
1513  infile >> pulseShapeDer[0] >> pulseShapeDer[1] >> pulseShapeDer[2] >>
1514  pulseShapeDer[3] >> pulseShapeDer[4] >> pulseShapeDer[5] >>
1515  pulseShapeDer[6] >> pulseShapeDer[7] >> pulseShapeDer[8] >>
1516  pulseShapeDer[9] >> pulseShapeDer[10] >> pulseShapeDer[11] >>
1517  pulseShapeDer[12] >> pulseShapeDer[13] >> pulseShapeDer[14] >>
1518  pulseShapeDer[15] >> pulseShapeDer[16] >> pulseShapeDer[17] >>
1519  pulseShapeDer[18] >> pulseShapeDer[19] >> pulseShapeDer[20] >>
1520  pulseShapeDer[21] >> pulseShapeDer[22] >> pulseShapeDer[23];
1521  m_pulseShapeDerFcal.push_back(pulseShapeDer);
1522  }
1523 
1524  m_autoCorrFcal.resize(s_NBSAMPLES);
1525  // finally read standard autocorrelation matrix
1526  infile >> m_autoCorrFcal[0] >> m_autoCorrFcal[1] >> m_autoCorrFcal[2] >>
1527  m_autoCorrFcal[3] >> m_autoCorrFcal[4] >> m_autoCorrFcal[5] >>
1528  m_autoCorrFcal[6];
1529 
1530  infile.close();
1531  ATH_MSG_DEBUG(" FCAL file closed ");
1532 
1533  std::vector<float> auxV(3);
1536 
1537  ATH_MSG_DEBUG(
1538  "Finished reading noise, calib coeff and pulse shape for each module for "
1539  "FCAL: ");
1540  for (int iMod = 0; iMod < nMod; iMod++) {
1541 
1542  ATH_MSG_INFO(" iMod= " << iMod << ", noise rms FCAL (eta bin 1,2,3,4): "
1543  << m_noiseRmsFcal[iMod] << " (transverse) MeV ");
1544  if (iMod < 2) {
1545  ATH_MSG_INFO(" iMod= " << iMod << ", calib coeff FCAL (eta bin 1,2,3,4): "
1546  << (m_calibCoeffFcal[iMod])[0] << ", "
1547  << (m_calibCoeffFcal[iMod])[1] << ", "
1548  << (m_calibCoeffFcal[iMod])[2] << ", "
1549  << (m_calibCoeffFcal[iMod])[3]);
1550  }
1551  ATH_MSG_INFO(
1552  " iMod= "
1553  << iMod << ", pulse shape FCAL: " << (m_pulseShapeFcal[iMod])[0] << ", "
1554  << (m_pulseShapeFcal[iMod])[1] << ", " << (m_pulseShapeFcal[iMod])[2]
1555  << ", " << (m_pulseShapeFcal[iMod])[3] << ", "
1556  << (m_pulseShapeFcal[iMod])[4] << ", " << (m_pulseShapeFcal[iMod])[5]
1557  << ", " << (m_pulseShapeFcal[iMod])[6] << ", "
1558  << (m_pulseShapeFcal[iMod])[7] << ", " << (m_pulseShapeFcal[iMod])[8]
1559  << ", " << (m_pulseShapeFcal[iMod])[9] << ", "
1560  << (m_pulseShapeFcal[iMod])[10] << ", " << (m_pulseShapeFcal[iMod])[11]
1561  << ", " << (m_pulseShapeFcal[iMod])[12] << ", "
1562  << (m_pulseShapeFcal[iMod])[13] << ", " << (m_pulseShapeFcal[iMod])[14]
1563  << ", " << (m_pulseShapeFcal[iMod])[15] << ", "
1564  << (m_pulseShapeFcal[iMod])[16] << ", " << (m_pulseShapeFcal[iMod])[17]
1565  << ", " << (m_pulseShapeFcal[iMod])[18] << ", "
1566  << (m_pulseShapeFcal[iMod])[19] << ", " << (m_pulseShapeFcal[iMod])[20]
1567  << ", " << (m_pulseShapeFcal[iMod])[21] << ", "
1568  << (m_pulseShapeFcal[iMod])[22] << ", "
1569  << (m_pulseShapeFcal[iMod])[23]);
1570  }
1571  ATH_MSG_INFO("auto corr FCAL: "
1572  << m_autoCorrFcal[0] << ", " << m_autoCorrFcal[1] << ", "
1573  << m_autoCorrFcal[2] << ", " << m_autoCorrFcal[3] << ", "
1574  << m_autoCorrFcal[4] << ", " << m_autoCorrFcal[5] << ", "
1575  << m_autoCorrFcal[6]);
1576 
1577  // now the relative gains
1578  pulsedataname =
1579  PathResolver::find_file("Fcal_ptweights_table7.data", "DATAPATH");
1580  if (pulsedataname.empty()) {
1581  ATH_MSG_ERROR("Could not locate Fcal_ptweights_table7.data file");
1582  return StatusCode::FAILURE;
1583  }
1584  pulsedatafile = pulsedataname.c_str();
1585  infile.open(pulsedatafile);
1586 
1587  if (!infile) {
1588  ATH_MSG_ERROR(" cannot open FCAL gains file ");
1589  return StatusCode::FAILURE;
1590  } else {
1591  ATH_MSG_DEBUG(" FCAL gains file opened ");
1592  }
1593 
1594  // first read the gain file for all cells (from John Rutherfoord)
1595 
1597  // file structure:
1598  const unsigned int colNum = 14;
1599  // number of cells per 'group' (sharing the same gain)
1600  const unsigned int maxCell = 4;
1601  std::vector<std::string> TTlabel;
1602  TTlabel.resize(colNum);
1603  std::vector<float> gain;
1604  gain.resize(colNum);
1605  int iline = 0;
1606  int ngain = 0;
1607 
1608  while (infile >> TTlabel[0] >> gain[0] >> TTlabel[1] >> gain[1] >>
1609  TTlabel[2] >> gain[2] >> TTlabel[3] >> gain[3] >> TTlabel[4] >>
1610  gain[4] >> TTlabel[5] >> gain[5] >> TTlabel[6] >> gain[6] >>
1611  TTlabel[7] >> gain[7] >> TTlabel[8] >> gain[8] >> TTlabel[9] >>
1612  gain[9] >> TTlabel[10] >> gain[10] >> TTlabel[11] >> gain[11] >>
1613  TTlabel[12] >> gain[12] >> TTlabel[13] >> gain[13]) {
1614 
1615  ATH_MSG_DEBUG(" TTlabel[0], gain[0]= " << TTlabel[0] << ", " << gain[0]);
1616  ATH_MSG_DEBUG(" [...] ");
1617  ATH_MSG_DEBUG(" TTlabel[13], gain[13]= " << TTlabel[13] << ", "
1618  << gain[13]);
1619 
1620  // int barrel_ec_fcal = 2;
1621  // int pos_neg = -2; // C side (neg z)
1622  int detZside = -1;
1623  if (iline < 32) {
1624  detZside = 1;
1625  } // A side (pos z)
1626  // if(iline < 32) {pos_neg = 2;} // A side (pos z)
1627  for (unsigned int icol = 0; icol < colNum; icol++) {
1628 
1629  int em_had = 0; // FCAL1
1630  int layer = 0;
1631  if (icol > 7) {
1632  em_had = 1; // FCAL2+FCAL3
1633  if (icol > 11) {
1634  layer = 1;
1635  }
1636  }
1637  int region = 3; // FCAL
1638 
1639  std::string TTlab = TTlabel[icol];
1640  // int Ieta = int(TTlab[0])-48;
1641  // int Lphi = int(TTlab[1])-64;
1642  int eta = int(TTlab[0]) - 49;
1643  int phi = int(TTlab[1]) - 65;
1644  int nPhi = 16;
1645  if (detZside < 0) {
1646  phi = (phi < nPhi / 2 ? nPhi / 2 - 1 - phi : 3 * nPhi / 2 - 1 - phi);
1647  }
1648 
1649  int group = 1;
1650  if (TTlab.size() > 3) {
1651  group = int(TTlab[3]) - 48;
1652  }
1653 
1654  // added Nov 2009 following introduction of TTCell map "FcalFix"
1655  // modified again Jun 2010 following introduction of TTCell map "FcalFix2"
1656  // (the C side is not symmetric wrt the A side) modified again Jan 2011 in
1657  // an attempt to correctly load the gains to the correct cells (not all
1658  // cells were being assigned gains)
1659  if (em_had) { // FCAL-had only
1660  if ((layer == 1 && detZside > 0) || (layer == 0 && detZside < 0)) {
1661  if (eta == 0 || eta == 2) {
1662  eta += 1;
1663  // group+=1; //- OLD CODE (pre Jan2011 change)
1664 
1665  } else {
1666  if (layer == 1) {
1667  group += 1;
1668  } else {
1669  group += 2;
1670  }
1671  }
1672  } else {
1673  if (eta == 1 || eta == 3) {
1674  eta -= 1;
1675  // group+=2; //- OLD CODE (pre Jan2011 change)
1676  if (layer == 1) {
1677  group += 1;
1678  } else {
1679  group += 2;
1680  }
1681  }
1682  }
1683  }
1684  //
1685  // ... create an offline TT+layer identifier from the labels read in.
1686  //
1687  Identifier ttId =
1688  m_lvl1Helper->layer_id(detZside, em_had, region, eta, phi, layer);
1689  ATH_MSG_DEBUG("ttId= " << m_lvl1Helper->show_to_string(ttId));
1690  //
1691  //... fill a vector with offline identifier of cells belonging to this
1692  // tower (with layer info)
1693  //
1694  std::vector<Identifier> cellIdVec = m_ttSvc->createCellIDvecLayer(ttId);
1695  //
1696  // .... loop on all LAr offline channels belonging to the trigger tower
1697  // (with layer info)
1698  //
1699  std::vector<unsigned int> hashVec;
1700  // number of connected cells in the current tower
1701  unsigned int nCell = 0;
1702  for (unsigned int ichan = 0; ichan < cellIdVec.size(); ichan++) {
1703  Identifier cellId = cellIdVec[ichan];
1704 
1705  int cellPhi = m_fcalHelper->phi(cellId);
1706  if (cellPhi >=
1707  0) { // protection skipping unconnected channels (they have
1708  // eta=phi=-999) - normally, they should not be in the list
1709  nCell++;
1710  //
1711  // .... convert to FCAL hash
1712  //
1713  IdentifierHash fcalHash = m_fcalHelper->channel_hash(cellId);
1714  //
1715  //... save hash indices
1716  //
1717  hashVec.push_back(fcalHash);
1718  } // end condition cellPhi>=0
1719 
1720  } // end of loop on channels in the tower
1721  ATH_MSG_DEBUG("nCell= " << nCell);
1722 
1723  //
1724  //... loop on the 4 cells of the current group and put their gain in the
1725  // gain vector (indexed by hashes)
1726  //
1727  for (unsigned int iCell = 0; iCell < maxCell; iCell++) {
1728  unsigned int index0 = (group - 1) * maxCell + iCell;
1729  if (index0 < nCell) { // unconnected channels have highest hash ids
1730  // (because highest eta values)
1731  unsigned int index = hashVec[index0];
1733  ngain++;
1734  ATH_MSG_DEBUG(" index, gain= " << index << ", " << gain[icol]);
1735  }
1736  }
1737 
1738  } // end of loop on columns
1739  iline++;
1740  } // end of loop on lines
1741 
1742  ATH_MSG_DEBUG(" number of lines found= " << iline);
1743  infile.close();
1744  ATH_MSG_INFO(" FCAL gains file closed, extracted " << ngain << " gains");
1745 
1746  return StatusCode::SUCCESS;
1747 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ setSeed() [1/3]

void LArTTL1Maker::setSeed ( const std::string &  algName,
const EventContext &  ctx 
)
private

◆ setSeed() [2/3]

void LArTTL1Maker::setSeed ( const std::string &  algName,
uint64_t  ev,
uint64_t  run 
)
private

◆ setSeed() [3/3]

void LArTTL1Maker::setSeed ( size_t  seed)
private

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_autoCorrEm

std::vector<float> LArTTL1Maker::m_autoCorrEm
private

auxiliary EM data: auto-correlation matrix

Definition at line 170 of file LArTTL1Maker.h.

◆ m_autoCorrFcal

std::vector<float> LArTTL1Maker::m_autoCorrFcal
private

auxiliary FCAL data: auto-correlation matrix

Definition at line 221 of file LArTTL1Maker.h.

◆ m_autoCorrHec

std::vector< std::vector<float> > LArTTL1Maker::m_autoCorrHec
private

auxiliary HEC data: auto-correlation matrix

Definition at line 203 of file LArTTL1Maker.h.

◆ m_BeginRunPriority

int LArTTL1Maker::m_BeginRunPriority
private

Definition at line 133 of file LArTTL1Maker.h.

◆ m_calibCoeffEmb

std::vector<float> LArTTL1Maker::m_calibCoeffEmb
private

auxiliary EMBarrel data: calibration coefficient

Definition at line 175 of file LArTTL1Maker.h.

◆ m_calibCoeffEmec

std::vector<float> LArTTL1Maker::m_calibCoeffEmec
private

auxiliary EMEC data: calibration coeeficient

Definition at line 184 of file LArTTL1Maker.h.

◆ m_calibCoeffFcal

std::vector< std::vector<float> > LArTTL1Maker::m_calibCoeffFcal
private

auxiliary FCAL data: calibration coefficients

Definition at line 212 of file LArTTL1Maker.h.

◆ m_calibCoeffFcalEm

std::vector<float> LArTTL1Maker::m_calibCoeffFcalEm
private

auxiliary FCAL data: calibration coefficients

Definition at line 214 of file LArTTL1Maker.h.

◆ m_calibCoeffFcalHad

std::vector<float> LArTTL1Maker::m_calibCoeffFcalHad
private

auxiliary FCAL data: calibration coefficients

Definition at line 216 of file LArTTL1Maker.h.

◆ m_calibCoeffHec

std::vector<float> LArTTL1Maker::m_calibCoeffHec
private

auxiliary HEC data: calibration coefficients

Definition at line 195 of file LArTTL1Maker.h.

◆ m_cellRelGainFcal

std::vector<float> LArTTL1Maker::m_cellRelGainFcal
private

auxiliary FCAL data: relative gains

Definition at line 206 of file LArTTL1Maker.h.

◆ m_chronoTest

bool LArTTL1Maker::m_chronoTest
private

algorithm property: switch chrono on

Definition at line 244 of file LArTTL1Maker.h.

◆ m_chronSvc

IChronoStatSvc* LArTTL1Maker::m_chronSvc
private

Definition at line 121 of file LArTTL1Maker.h.

◆ m_debugThresh

float LArTTL1Maker::m_debugThresh
private

algorithm property: debug threshold

Definition at line 242 of file LArTTL1Maker.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_emHelper

const LArEM_ID* LArTTL1Maker::m_emHelper
private

pointer to the offline EM helper

Definition at line 139 of file LArTTL1Maker.h.

◆ m_EmTTL1ContainerName

SG::WriteHandleKey<LArTTL1Container> LArTTL1Maker::m_EmTTL1ContainerName
private

algorithm property: container name for the EM TTL1s

Definition at line 227 of file LArTTL1Maker.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_fcalHelper

const LArFCAL_ID* LArTTL1Maker::m_fcalHelper
private

pointer to the offline FCAL helper

Definition at line 143 of file LArTTL1Maker.h.

◆ m_fSamplKey

SG::ReadCondHandleKey<ILArfSampl> LArTTL1Maker::m_fSamplKey
private

Sampling fractions retrieved from DB.

Definition at line 148 of file LArTTL1Maker.h.

◆ m_HadTTL1ContainerName

SG::WriteHandleKey<LArTTL1Container> LArTTL1Maker::m_HadTTL1ContainerName
private

algorithm property: container name for the HAD TTL1s

Definition at line 229 of file LArTTL1Maker.h.

◆ m_hecHelper

const LArHEC_ID* LArTTL1Maker::m_hecHelper
private

pointer to the offline HEC helper

Definition at line 141 of file LArTTL1Maker.h.

◆ m_hitMapKey

SG::ReadHandleKey<LArHitEMap> LArTTL1Maker::m_hitMapKey {this,"LArHitEMapKey","LArHitEMap"}
private

hit map

Definition at line 224 of file LArTTL1Maker.h.

◆ m_lvl1Helper

const CaloLVL1_ID* LArTTL1Maker::m_lvl1Helper
private

pointer to the offline TT helper

Definition at line 137 of file LArTTL1Maker.h.

◆ m_noEmCalibMode

bool LArTTL1Maker::m_noEmCalibMode
private

algorithm property: no calibration mode for EM towers

Definition at line 238 of file LArTTL1Maker.h.

◆ m_noHadCalibMode

bool LArTTL1Maker::m_noHadCalibMode
private

algorithm property: no calibration mode for had towers

Definition at line 240 of file LArTTL1Maker.h.

◆ m_NoiseOnOff

bool LArTTL1Maker::m_NoiseOnOff
private

algorithm property: noise (in all sub-detectors) is on if true

Definition at line 234 of file LArTTL1Maker.h.

◆ m_noiseRmsEmb

std::vector<float> LArTTL1Maker::m_noiseRmsEmb
private

auxiliary EMBarrel data: noise rms

Definition at line 177 of file LArTTL1Maker.h.

◆ m_noiseRmsEmec

std::vector<float> LArTTL1Maker::m_noiseRmsEmec
private

auxiliary EMEC data: noise rms

Definition at line 186 of file LArTTL1Maker.h.

◆ m_noiseRmsFcal

std::vector< std::vector<float> > LArTTL1Maker::m_noiseRmsFcal
private

auxiliary FCAL data: noise rms

Definition at line 219 of file LArTTL1Maker.h.

◆ m_noiseRmsHec

std::vector<float> LArTTL1Maker::m_noiseRmsHec
private

auxiliary HEC data: noise rms

Definition at line 201 of file LArTTL1Maker.h.

◆ m_OflHelper

const CaloCell_ID* LArTTL1Maker::m_OflHelper = nullptr
private

pointer to the offline id helper

Definition at line 145 of file LArTTL1Maker.h.

◆ m_PileUp

bool LArTTL1Maker::m_PileUp
private

algorithm property: pile up or not

Definition at line 236 of file LArTTL1Maker.h.

◆ m_pulseShapeDerEm

std::vector<std::vector<float> > LArTTL1Maker::m_pulseShapeDerEm
private

auxiliary EM data: pulse shape derivative

Definition at line 168 of file LArTTL1Maker.h.

◆ m_pulseShapeDerFcal

std::vector< std::vector<float> > LArTTL1Maker::m_pulseShapeDerFcal
private

auxiliary FCAL data: pulse shape derivatives

Definition at line 210 of file LArTTL1Maker.h.

◆ m_pulseShapeDerHec

std::vector<float> LArTTL1Maker::m_pulseShapeDerHec
private

auxiliary HEC data: pulse shape derivative

Definition at line 193 of file LArTTL1Maker.h.

◆ m_pulseShapeEm

std::vector<std::vector<float> > LArTTL1Maker::m_pulseShapeEm
private

auxiliary EM data: pulse shapes

Definition at line 166 of file LArTTL1Maker.h.

◆ m_pulseShapeFcal

std::vector< std::vector<float> > LArTTL1Maker::m_pulseShapeFcal
private

auxiliary FCAL data: pulse shapes

Definition at line 208 of file LArTTL1Maker.h.

◆ m_pulseShapeHec

std::vector<float> LArTTL1Maker::m_pulseShapeHec
private

auxiliary HEC data: pulse shape

Definition at line 191 of file LArTTL1Maker.h.

◆ m_randomSeedOffset

Gaudi::Property<uint32_t> LArTTL1Maker::m_randomSeedOffset {this, "RandomSeedOffset", 2, ""}
private

Definition at line 124 of file LArTTL1Maker.h.

◆ m_randomStreamName

Gaudi::Property<std::string> LArTTL1Maker::m_randomStreamName {this, "RandomStreamName", "LArTTL1Maker", ""}
private

Definition at line 123 of file LArTTL1Maker.h.

◆ m_RandomSvc

ServiceHandle<IAthRNGSvc> LArTTL1Maker::m_RandomSvc {this, "RndmSvc", "AthRNGSvc", ""}
private

Definition at line 122 of file LArTTL1Maker.h.

◆ m_refEnergyEm

std::vector<float> LArTTL1Maker::m_refEnergyEm
private

auxiliary EM data: reference energies for saturation simulation

Definition at line 164 of file LArTTL1Maker.h.

◆ m_satEnergyHec

std::vector<float> LArTTL1Maker::m_satEnergyHec
private

auxiliary HEC data: saturation energy

Definition at line 199 of file LArTTL1Maker.h.

◆ m_sinThetaEmb

std::vector<float> LArTTL1Maker::m_sinThetaEmb
private

auxiliary EMBarrel data: sin(theta)

Definition at line 173 of file LArTTL1Maker.h.

◆ m_sinThetaEmec

std::vector<float> LArTTL1Maker::m_sinThetaEmec
private

auxiliary EMEC data: sin(theta)

Definition at line 182 of file LArTTL1Maker.h.

◆ m_sinThetaHec

std::vector<float> LArTTL1Maker::m_sinThetaHec
private

auxiliary HEC data: sin(theta)

Definition at line 197 of file LArTTL1Maker.h.

◆ m_triggerTimeTool

ToolHandle<ITriggerTime> LArTTL1Maker::m_triggerTimeTool
private

Alorithm property: name of the TriggerTimeTool.

Definition at line 131 of file LArTTL1Maker.h.

◆ m_truthHitsContainer

std::string LArTTL1Maker::m_truthHitsContainer
private

key for saving truth

Definition at line 247 of file LArTTL1Maker.h.

◆ m_ttSvc

ToolHandle<CaloTriggerTowerService> LArTTL1Maker::m_ttSvc
private

Definition at line 135 of file LArTTL1Maker.h.

◆ m_useLegacyRandomSeeds

Gaudi::Property<bool> LArTTL1Maker::m_useLegacyRandomSeeds
private
Initial value:
{this, "UseLegacyRandomSeeds", false,
"Use MC16-style random number seeding"}

Definition at line 125 of file LArTTL1Maker.h.

◆ m_useTriggerTime

bool LArTTL1Maker::m_useTriggerTime
private

Alorithm property: use trigger time or not.

Definition at line 129 of file LArTTL1Maker.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_xxxHitContainerName

std::array<SG::ReadHandleKey<LArHitContainer>,4> LArTTL1Maker::m_xxxHitContainerName
private

Definition at line 231 of file LArTTL1Maker.h.

◆ s_MAXSAMPLES

const short LArTTL1Maker::s_MAXSAMPLES = 24
staticprivate

max number of samples in pulse shape

Definition at line 155 of file LArTTL1Maker.h.

◆ s_NBDEPTHS

const short LArTTL1Maker::s_NBDEPTHS = 4
staticprivate

number of sampling (in depth)

Definition at line 151 of file LArTTL1Maker.h.

◆ s_NBENERGIES

const short LArTTL1Maker::s_NBENERGIES = 12
staticprivate

number of energies at which saturation is described (em)

Definition at line 161 of file LArTTL1Maker.h.

◆ s_NBETABINS

const short LArTTL1Maker::s_NBETABINS = 15
staticprivate

number of eta bins

Definition at line 159 of file LArTTL1Maker.h.

◆ s_NBSAMPLES

const short LArTTL1Maker::s_NBSAMPLES = 7
staticprivate

number of samples in TTL1s

Definition at line 153 of file LArTTL1Maker.h.

◆ s_PEAKPOS

const short LArTTL1Maker::s_PEAKPOS = 3
staticprivate

peak position

Definition at line 157 of file LArTTL1Maker.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
LArTTL1Maker::m_sinThetaEmb
std::vector< float > m_sinThetaEmb
auxiliary EMBarrel data: sin(theta)
Definition: LArTTL1Maker.h:173
LArTTL1Maker::m_xxxHitContainerName
std::array< SG::ReadHandleKey< LArHitContainer >, 4 > m_xxxHitContainerName
Definition: LArTTL1Maker.h:231
LArTTL1Maker::s_NBENERGIES
static const short s_NBENERGIES
number of energies at which saturation is described (em)
Definition: LArTTL1Maker.h:161
et
Extra patterns decribing particle interation process.
ATHRNG::RNGWrapper::SeedingOptionType
SeedingOptionType
Options for seeding option=0 is setSeed as in MC20 option=1 is setSeedLegacy as in MC16 option=2 is s...
Definition: RNGWrapper.h:97
LArTTL1Maker::m_noiseRmsHec
std::vector< float > m_noiseRmsHec
auxiliary HEC data: noise rms
Definition: LArTTL1Maker.h:201
LArTTL1Maker::s_PEAKPOS
static const short s_PEAKPOS
peak position
Definition: LArTTL1Maker.h:157
run.infile
string infile
Definition: run.py:13
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
LArTTL1Maker::m_fSamplKey
SG::ReadCondHandleKey< ILArfSampl > m_fSamplKey
Sampling fractions retrieved from DB.
Definition: LArTTL1Maker.h:148
PathResolver::find_file
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
Definition: PathResolver.cxx:251
AtlasDetectorID::is_lar_fcal
bool is_lar_fcal(Identifier id) const
Definition: AtlasDetectorID.h:839
CaloLVL1_ID::is_fcal
bool is_fcal(const Identifier id) const
Test wether given tower or layer is part of the FCAL.
Definition: CaloLVL1_ID.h:710
LArTTL1Maker::readAuxiliary
StatusCode readAuxiliary()
method called at the begining of execute() to fill the hit map
Definition: LArTTL1Maker.cxx:1233
xAOD::et
et
Definition: TrigEMCluster_v1.cxx:25
CaloIDHelper::channel_hash_max
size_type channel_hash_max() const
One more than the largest channel (cell) hash code.
LArTTL1Maker::m_EmTTL1ContainerName
SG::WriteHandleKey< LArTTL1Container > m_EmTTL1ContainerName
algorithm property: container name for the EM TTL1s
Definition: LArTTL1Maker.h:227
LArTTL1Maker::m_autoCorrHec
std::vector< std::vector< float > > m_autoCorrHec
auxiliary HEC data: auto-correlation matrix
Definition: LArTTL1Maker.h:203
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
index
Definition: index.py:1
LArTTL1Maker::computeSignal
std::vector< float > computeSignal(const Identifier towerId, const int Ieta, const int specialCase, std::vector< float > visEnergy, const int refTime) const
initialize hit map
Definition: LArTTL1Maker.cxx:861
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
ATHRNG::RNGWrapper::setSeedLegacy
void setSeedLegacy(const std::string &algName, size_t slot, uint64_t ev, uint64_t run, uint64_t offset, SeedingOptionType seeding, EventContext::ContextEvt_t evt=EventContext::INVALID_CONTEXT_EVT)
Set the random seed using a string (e.g.
Definition: RNGWrapper.cxx:104
LArTTL1Maker::decodeInverse
int decodeInverse(int region, int eta)
Definition: LArTTL1Maker.cxx:1749
defineDB.ichan
ichan
Definition: JetTagCalibration/share/defineDB.py:28
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
ATHRNG::RNGWrapper::SeedingDefault
@ SeedingDefault
Definition: RNGWrapper.h:101
skel.it
it
Definition: skel.GENtoEVGEN.py:407
CaloLVL1_ID::is_emec
bool is_emec(const Identifier id) const
Test wether given tower or layer is part of the EM end-cap.
Definition: CaloLVL1_ID.h:696
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
AthCommonMsg< Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
LArTTL1Maker::m_calibCoeffFcalHad
std::vector< float > m_calibCoeffFcalHad
auxiliary FCAL data: calibration coefficients
Definition: LArTTL1Maker.h:216
LArFCAL_Base_ID::channel_hash
IdentifierHash channel_hash(Identifier channelId) const
Convert a connected channel (cell) Identifier to a hash code.
CaloLVL1_ID::region
int region(const Identifier id) const
return region according to :
Definition: CaloLVL1_ID.h:647
LArTTL1Maker::s_NBSAMPLES
static const short s_NBSAMPLES
number of samples in TTL1s
Definition: LArTTL1Maker.h:153
CaloLVL1_ID::is_barrel_end
bool is_barrel_end(const Identifier id) const
Test wether given tower or layer is part of the EM barrel END.
Definition: CaloLVL1_ID.h:690
LArTTL1Maker::m_calibCoeffEmec
std::vector< float > m_calibCoeffEmec
auxiliary EMEC data: calibration coeeficient
Definition: LArTTL1Maker.h:184
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
LArTTL1Maker::m_NoiseOnOff
bool m_NoiseOnOff
algorithm property: noise (in all sub-detectors) is on if true
Definition: LArTTL1Maker.h:234
SG::ReadHandleKey< LArHitContainer >
HWIdentifier
Definition: HWIdentifier.h:13
LArTTL1Maker::m_sinThetaHec
std::vector< float > m_sinThetaHec
auxiliary HEC data: sin(theta)
Definition: LArTTL1Maker.h:197
LArTTL1Maker::m_debugThresh
float m_debugThresh
algorithm property: debug threshold
Definition: LArTTL1Maker.h:242
CaloLVL1_ID::tower_end
id_iterator tower_end() const
end iterator over towers
Definition: CaloLVL1_ID.h:603
TrigVSI::AlgConsts::nPhi
constexpr int nPhi
Default bin number of phi for vertex map.
Definition: Trigger/TrigTools/TrigVrtSecInclusive/TrigVrtSecInclusive/Constants.h:27
LArTTL1Maker::m_noiseRmsFcal
std::vector< std::vector< float > > m_noiseRmsFcal
auxiliary FCAL data: noise rms
Definition: LArTTL1Maker.h:219
LArTTL1Maker::m_randomSeedOffset
Gaudi::Property< uint32_t > m_randomSeedOffset
Definition: LArTTL1Maker.h:124
atlasStyleMacro.icol
int icol
Definition: atlasStyleMacro.py:13
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
CaloLVL1_ID::is_hec
bool is_hec(const Identifier id) const
Test wether given tower or layer is part of the HEC.
Definition: CaloLVL1_ID.h:703
LArTTL1Maker::m_hitMapKey
SG::ReadHandleKey< LArHitEMap > m_hitMapKey
hit map
Definition: LArTTL1Maker.h:224
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
LArTTL1Maker::m_truthHitsContainer
std::string m_truthHitsContainer
key for saving truth
Definition: LArTTL1Maker.h:247
CaloLVL1_ID::layer_id
Identifier layer_id(int pos_neg_z, int sampling, int region, int eta, int phi, int layer) const
build a layer identifier
Definition: CaloLVL1_ID.h:530
LArHitList::getData
const LARLIST & getData() const
Definition: LArHitList.h:25
python.PyAthena.module
module
Definition: PyAthena.py:131
LArFCAL_Base_ID::phi
int phi(const Identifier id) const
phi [0,15]
LArTTL1Maker::m_pulseShapeFcal
std::vector< std::vector< float > > m_pulseShapeFcal
auxiliary FCAL data: pulse shapes
Definition: LArTTL1Maker.h:208
LArTTL1Maker::m_ttSvc
ToolHandle< CaloTriggerTowerService > m_ttSvc
Definition: LArTTL1Maker.h:135
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
LArTTL1Maker::computeNoise
std::vector< float > computeNoise(const Identifier towerId, const int Ieta, std::vector< float > &inputV, CLHEP::HepRandomEngine *rndmEngine)
Definition: LArTTL1Maker.cxx:1078
AthCommonDataStore
Definition: AthCommonDataStore.h:52
LArTTL1Maker::m_BeginRunPriority
int m_BeginRunPriority
Definition: LArTTL1Maker.h:133
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CaloIdManager
This class initializes the Calo (LAr and Tile) offline identifiers.
Definition: CaloIdManager.h:45
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
lumiFormat.i
int i
Definition: lumiFormat.py:85
LArTTL1Maker::m_fcalHelper
const LArFCAL_ID * m_fcalHelper
pointer to the offline FCAL helper
Definition: LArTTL1Maker.h:143
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArTTL1Maker::m_cellRelGainFcal
std::vector< float > m_cellRelGainFcal
auxiliary FCAL data: relative gains
Definition: LArTTL1Maker.h:206
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ILArfSampl::FSAMPL
virtual const float & FSAMPL(const HWIdentifier &id) const =0
LArTTL1Maker::m_noiseRmsEmb
std::vector< float > m_noiseRmsEmb
auxiliary EMBarrel data: noise rms
Definition: LArTTL1Maker.h:177
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
LArTTL1Maker::m_noEmCalibMode
bool m_noEmCalibMode
algorithm property: no calibration mode for EM towers
Definition: LArTTL1Maker.h:238
python.LArMinBiasAlgConfig.int
int
Definition: LArMinBiasAlgConfig.py:59
LArTTL1Maker::m_pulseShapeDerFcal
std::vector< std::vector< float > > m_pulseShapeDerFcal
auxiliary FCAL data: pulse shape derivatives
Definition: LArTTL1Maker.h:210
LArTTL1Maker::s_NBETABINS
static const short s_NBETABINS
number of eta bins
Definition: LArTTL1Maker.h:159
LArTTL1Maker::m_noHadCalibMode
bool m_noHadCalibMode
algorithm property: no calibration mode for had towers
Definition: LArTTL1Maker.h:240
CaloIdManager::getLVL1_ID
const CaloLVL1_ID * getLVL1_ID(void) const
Definition: CaloIdManager.cxx:75
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LArTTL1Maker::m_pulseShapeHec
std::vector< float > m_pulseShapeHec
auxiliary HEC data: pulse shape
Definition: LArTTL1Maker.h:191
AtlasDetectorID::is_lar_hec
bool is_lar_hec(Identifier id) const
Definition: AtlasDetectorID.h:829
LArTTL1Maker::m_calibCoeffFcal
std::vector< std::vector< float > > m_calibCoeffFcal
auxiliary FCAL data: calibration coefficients
Definition: LArTTL1Maker.h:212
CaloLVL1_ID::is_emb
bool is_emb(const Identifier id) const
Test wether given tower or layer is part of the EM barrel.
Definition: CaloLVL1_ID.h:684
LArTTL1Maker::s_NBDEPTHS
static const short s_NBDEPTHS
number of sampling (in depth)
Definition: LArTTL1Maker.h:151
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
PowhegPythia8EvtGen_jetjet.theEnergy
int theEnergy
Definition: PowhegPythia8EvtGen_jetjet.py:12
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
LArTTL1Maker::m_refEnergyEm
std::vector< float > m_refEnergyEm
auxiliary EM data: reference energies for saturation simulation
Definition: LArTTL1Maker.h:164
LArTTL1Maker::m_satEnergyHec
std::vector< float > m_satEnergyHec
auxiliary HEC data: saturation energy
Definition: LArTTL1Maker.h:199
Trk::index0
@ index0
Definition: BoundarySurfaceFace.h:47
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
LArTTL1Maker::m_pulseShapeEm
std::vector< std::vector< float > > m_pulseShapeEm
auxiliary EM data: pulse shapes
Definition: LArTTL1Maker.h:166
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
LArHitList
Definition: LArHitList.h:9
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
LArTTL1Maker::m_lvl1Helper
const CaloLVL1_ID * m_lvl1Helper
pointer to the offline TT helper
Definition: LArTTL1Maker.h:137
LArTTL1Maker::m_OflHelper
const CaloCell_ID * m_OflHelper
pointer to the offline id helper
Definition: LArTTL1Maker.h:145
CaloLVL1_ID::eta
int eta(const Identifier id) const
return eta according to :
Definition: CaloLVL1_ID.h:653
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
LArTTL1Maker::m_calibCoeffEmb
std::vector< float > m_calibCoeffEmb
auxiliary EMBarrel data: calibration coefficient
Definition: LArTTL1Maker.h:175
LArTTL1Maker::m_emHelper
const LArEM_ID * m_emHelper
pointer to the offline EM helper
Definition: LArTTL1Maker.h:139
LArTTL1Maker::m_useTriggerTime
bool m_useTriggerTime
Alorithm property: use trigger time or not.
Definition: LArTTL1Maker.h:129
CaloCell_Base_ID::cell_id
Identifier cell_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy, const int eta, const int phi) const
Make a cell (== channel) ID from constituting fields and subCalo index; for (Mini)FCAL,...
LArTTL1Maker::m_PileUp
bool m_PileUp
algorithm property: pile up or not
Definition: LArTTL1Maker.h:236
LArTTL1Maker::m_randomStreamName
Gaudi::Property< std::string > m_randomStreamName
Definition: LArTTL1Maker.h:123
LArTTL1Maker::m_autoCorrEm
std::vector< float > m_autoCorrEm
auxiliary EM data: auto-correlation matrix
Definition: LArTTL1Maker.h:170
ReadBchFromCool.nMod
nMod
Definition: ReadBchFromCool.py:436
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:73
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
LArTTL1Maker::m_RandomSvc
ServiceHandle< IAthRNGSvc > m_RandomSvc
Definition: LArTTL1Maker.h:122
DeMoScan.index
string index
Definition: DeMoScan.py:364
LArTTL1Maker::s_MAXSAMPLES
static const short s_MAXSAMPLES
max number of samples in pulse shape
Definition: LArTTL1Maker.h:155
LArTTL1Maker::m_useLegacyRandomSeeds
Gaudi::Property< bool > m_useLegacyRandomSeeds
Definition: LArTTL1Maker.h:125
a
TList * a
Definition: liststreamerinfos.cxx:10
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
LArTTL1Maker::m_noiseRmsEmec
std::vector< float > m_noiseRmsEmec
auxiliary EMEC data: noise rms
Definition: LArTTL1Maker.h:186
h
AtlasDetectorID::show_to_string
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
Definition: AtlasDetectorID.cxx:350
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
LArEM_Base_ID::is_em_barrel
bool is_em_barrel(const Identifier id) const
test if the id belongs to the EM barrel
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
LArTTL1Maker::m_sinThetaEmec
std::vector< float > m_sinThetaEmec
auxiliary EMEC data: sin(theta)
Definition: LArTTL1Maker.h:182
LArTTL1Maker::m_chronoTest
bool m_chronoTest
algorithm property: switch chrono on
Definition: LArTTL1Maker.h:244
DeMoScan.first
bool first
Definition: DeMoScan.py:536
LArTTL1Maker::m_chronSvc
IChronoStatSvc * m_chronSvc
Definition: LArTTL1Maker.h:121
CaloLVL1_ID::tower_hash_max
size_type tower_hash_max(void) const
tower hash table max size
Definition: CaloLVL1_ID.h:560
LArTTL1Maker::m_hecHelper
const LArHEC_ID * m_hecHelper
pointer to the offline HEC helper
Definition: LArTTL1Maker.h:141
LArTTL1Maker::m_calibCoeffFcalEm
std::vector< float > m_calibCoeffFcalEm
auxiliary FCAL data: calibration coefficients
Definition: LArTTL1Maker.h:214
LArTTL1Maker::m_HadTTL1ContainerName
SG::WriteHandleKey< LArTTL1Container > m_HadTTL1ContainerName
algorithm property: container name for the HAD TTL1s
Definition: LArTTL1Maker.h:229
CaloLVL1_ID::tower_begin
id_iterator tower_begin() const
begin iterator over towers
Definition: CaloLVL1_ID.h:597
CaloLVL1_ID::sampling
int sampling(const Identifier id) const
return sampling according to :
Definition: CaloLVL1_ID.h:641
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
PlotCalibFromCool.ngain
ngain
Definition: PlotCalibFromCool.py:565
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
CaloLVL1_ID::tower_hash
IdentifierHash tower_hash(Identifier towerId) const
create hash id from tower id
Definition: CaloLVL1_ID.h:728
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
hitTime
float hitTime(const AFP_SIDSimHit &hit)
Definition: AFP_SIDSimHit.h:39
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
TrigVSI::AlgConsts::nEta
constexpr int nEta
Default bin number of eta for vertex map.
Definition: Trigger/TrigTools/TrigVrtSecInclusive/TrigVrtSecInclusive/Constants.h:26
LArTTL1Maker::m_pulseShapeDerEm
std::vector< std::vector< float > > m_pulseShapeDerEm
auxiliary EM data: pulse shape derivative
Definition: LArTTL1Maker.h:168
CaloLVL1_ID::is_tile
bool is_tile(const Identifier id) const
Test wether given tower or layer is part of the Tile Calorimeter.
Definition: CaloLVL1_ID.h:672
AtlasDetectorID::is_lar_em
bool is_lar_em(Identifier id) const
Definition: AtlasDetectorID.h:818
LArTTL1
Liquid Argon TT L1 sum class.
Definition: LArTTL1.h:29
maxCell
#define maxCell
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
ATHRNG::RNGWrapper::MC16Seeding
@ MC16Seeding
Definition: RNGWrapper.h:99
LArTTL1Maker::m_pulseShapeDerHec
std::vector< float > m_pulseShapeDerHec
auxiliary HEC data: pulse shape derivative
Definition: LArTTL1Maker.h:193
fitman.k
k
Definition: fitman.py:528
LArTTL1Maker::m_triggerTimeTool
ToolHandle< ITriggerTime > m_triggerTimeTool
Alorithm property: name of the TriggerTimeTool.
Definition: LArTTL1Maker.h:131
ILArfSampl
Definition: ILArfSampl.h:14
python.LArMinBiasAlgConfig.float
float
Definition: LArMinBiasAlgConfig.py:65
ServiceHandle< ICondSvc >
LArTTL1Maker::m_calibCoeffHec
std::vector< float > m_calibCoeffHec
auxiliary HEC data: calibration coefficients
Definition: LArTTL1Maker.h:195
Identifier
Definition: IdentifierFieldParser.cxx:14
LArTTL1Maker::m_autoCorrFcal
std::vector< float > m_autoCorrFcal
auxiliary FCAL data: auto-correlation matrix
Definition: LArTTL1Maker.h:221