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

◆ ~LArTTL1Maker()

LArTTL1Maker::~LArTTL1Maker ( )
virtual

destructor

Definition at line 146 of file LArTTL1Maker.cxx.

146 {}

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 1077 of file LArTTL1Maker.cxx.

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

◆ 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 860 of file LArTTL1Maker.cxx.

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

◆ 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 1748 of file LArTTL1Maker.cxx.

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

◆ 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 298 of file LArTTL1Maker.cxx.

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

◆ 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 841 of file LArTTL1Maker.cxx.

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

◆ handle()

void LArTTL1Maker::handle ( const Incident &  )
overridevirtual

Definition at line 286 of file LArTTL1Maker.cxx.

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

◆ initialize()

StatusCode LArTTL1Maker::initialize ( )
overridevirtual

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

Definition at line 148 of file LArTTL1Maker.cxx.

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

◆ 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 1232 of file LArTTL1Maker.cxx.

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

◆ 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
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
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
run.infile
string infile
Definition: run.py:13
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
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
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
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:1232
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:79
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
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:860
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:1748
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
ATHRNG::RNGWrapper::SeedingDefault
@ SeedingDefault
Definition: RNGWrapper.h:101
skel.it
it
Definition: skel.GENtoEVGEN.py:423
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
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
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:134
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
LArTTL1Maker::computeNoise
std::vector< float > computeNoise(const Identifier towerId, const int Ieta, std::vector< float > &inputV, CLHEP::HepRandomEngine *rndmEngine)
Definition: LArTTL1Maker.cxx:1077
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:92
LArTTL1Maker::m_fcalHelper
const LArFCAL_ID * m_fcalHelper
pointer to the offline FCAL helper
Definition: LArTTL1Maker.h:143
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
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
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
defineDB.ichan
int ichan
Definition: JetTagCalibration/share/defineDB.py:28
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
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:76
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:362
LArTTL1Maker::s_MAXSAMPLES
static const short s_MAXSAMPLES
max number of samples in pulse shape
Definition: LArTTL1Maker.h:155
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
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:574
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:534
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:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
PlotCalibFromCool.ngain
ngain
Definition: PlotCalibFromCool.py:565
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
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:14
hitTime
float hitTime(const AFP_SIDSimHit &hit)
Definition: AFP_SIDSimHit.h:39
IdentifierHash
Definition: IdentifierHash.h:38
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
readCCLHist.float
float
Definition: readCCLHist.py:83
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
ServiceHandle< ICondSvc >
LArTTL1Maker::m_calibCoeffHec
std::vector< float > m_calibCoeffHec
auxiliary HEC data: calibration coefficients
Definition: LArTTL1Maker.h:195
LArTTL1Maker::m_autoCorrFcal
std::vector< float > m_autoCorrFcal
auxiliary FCAL data: auto-correlation matrix
Definition: LArTTL1Maker.h:221