ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
LVL1::Run2TriggerTowerMaker Class Reference

#include <Run2TriggerTowerMaker.h>

Inheritance diagram for LVL1::Run2TriggerTowerMaker:
Collaboration diagram for LVL1::Run2TriggerTowerMaker:

Public Member Functions

 Run2TriggerTowerMaker (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~Run2TriggerTowerMaker ()
 
 Run2TriggerTowerMaker (const Run2TriggerTowerMaker &)=delete
 
Run2TriggerTowerMakeroperator= (const Run2TriggerTowerMaker &)=delete
 
StatusCode initialize ()
 
StatusCode execute ()
 Checks that the Cell Type is supported (terminates with errors if not) and calls relevant routine to look for the cells. More...
 
StatusCode finalize ()
 
void handle (const Incident &)
 Best if initialisation which uses COOL-derived values is done here rather than in initialize() More...
 
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, V, H > &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

enum  CellTypes { CELL =1, TRIGGERTOWERS =2, TTL1 =3, SIZE =4 }
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

L1CaloCoolChannelId channelId (double eta, double phi, int layer)
 Compute L1CaloCoolChannelId (including support for old geometries) More...
 
StatusCode getTriggerTowers ()
 gets collection of input TriggerTowers for reprocessing More...
 
StatusCode getCaloTowers ()
 fetch Calorimeter Towers More...
 
void digitize (const EventContext &ctx)
 Convert analogue pulses to digits. More...
 
StatusCode preProcess (int bcid, float mu)
 Simulate PreProcessing on analogue amplitudes. More...
 
StatusCode preProcessTower (int bcid, float mu, xAOD::TriggerTower *tower)
 
virtual StatusCode addOverlay (int bcid, float mu)
 Add overlay data. More...
 
virtual StatusCode addOverlay (int bcid, float mu, xAOD::TriggerTower *sigTT, xAOD::TriggerTower *ovTT)
 Add the overlay TriggerTower to the signal TriggerTower. More...
 
StatusCode preProcessTower_getLutIn (int bcid, float mu, xAOD::TriggerTower *tower, const L1CaloPprChanCalib *db, const std::vector< int > &digits, std::vector< int > &output)
 PreProcess up to LUT in. More...
 
StatusCode calcLutOutCP (const std::vector< int > &sigLutIn, const L1CaloPprChanCalib *sigDB, const std::vector< int > &ovLutIn, const L1CaloPprChanCalib *ovDB, std::vector< int > &output)
 calculate LUT out More...
 
StatusCode calcLutOutJEP (const std::vector< int > &sigLutIn, const L1CaloPprChanCalib *sigDB, const std::vector< int > &ovLutIn, const L1CaloPprChanCalib *ovDB, std::vector< int > &output)
 
void calcCombinedLUT (const std::vector< int > &sigIN, const int sigSlope, const int sigOffset, const std::vector< int > &ovIN, const int ovSlope, const int ovOffset, const int ovNoiseCut, std::vector< int > &output)
 
bool IsDeadChannel (const L1CaloPpmDeadChannels *db) const
 Database helper functions for dead and disabled towers. More...
 
bool IsDisabledChannel (const L1CaloDisabledTowers *db) const
 
bool IsGoodTower (const xAOD::TriggerTower *tt, const L1CaloPpmDeadChannelsContainer *dead, const L1CaloDisabledTowersContainer *disabled) const
 
void normaliseDigits (const std::vector< int > &sigDigits, const std::vector< int > &ovDigits, std::vector< int > &normDigits)
 normalise the number of ADC digits for overlay More...
 
StatusCode store ()
 Stores Trigger Towers in the TES, at a location defined in m_outputLocation. More...
 
void processLArTowers (const LArTTL1Container *)
 extract amplitudes from TTL1 More...
 
void processTileTowers (const TileTTL1Container *)
 
double IDeta (const Identifier &id, const CaloLVL1_ID *caloId)
 functions to extract eta, phi coordinates from calo tower identifiers More...
 
double IDphi (const Identifier &id, const CaloLVL1_ID *caloId)
 
std::vector< int > ADC (CLHEP::HepRandomEngine *rndmADCs, L1CaloCoolChannelId channel, const std::vector< double > &amps) const
 Functions to simulate processing of tower signals. More...
 
int EtRange (int et, unsigned short bcidEnergyRangeLow, unsigned short bcidEnergyRangeHigh) const
 
int etaToElement (float feta, int layer) const
 
int non_linear_lut (int lutin, unsigned short offset, unsigned short slope, unsigned short noiseCut, unsigned short scale, short par1, short par2, short par3, short par4)
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

std::string m_digiEngine
 
int m_cellType
 
double m_adcVar
 
double m_adcStep
 
double m_gainCorr
 
bool m_decorateFIR
 
bool m_ZeroSuppress
 
bool m_requireAllCalos
 
SG::ReadCondHandleKey< L1CaloPprChanCalibContainerm_chanCalibKey {this,"ChanCalibFolderKey","/TRIGGER/L1Calo/V2/Calibration/Physics/PprChanCalib","PprChanCalib key"}
 
SG::ReadCondHandleKey< L1CaloPprChanDefaultsContainerm_chanDefaultsKey {this,"ChanDefaultsFolderKey","/TRIGGER/L1Calo/V2/Configuration/PprChanDefaults","PprChanDefaults key"}
 
SG::ReadCondHandleKey< L1CaloDisabledTowersContainerm_disabledTowersKey {this,"DisabledTowersFolderKey","/TRIGGER/L1Calo/V2/Conditions/DisabledTowers","DisabledTowers key"}
 
SG::ReadCondHandleKey< L1CaloPpmDeadChannelsContainerm_deadChannelsKey {this,"DeadChannelsFolderKey","/TRIGGER/L1Calo/V2/Calibration/PpmDeadChannels","PpmDeadChannels key"}
 
std::string m_chanCalibKeyoverlay
 
std::string m_chanDefaultsKeyoverlay
 
std::string m_disabledTowersKeyoverlay
 
std::string m_deadChannelsKeyoverlay
 
ServiceHandle< IAthRNGSvcm_rngSvc
 
ATHRNG::RNGWrapperm_rndmADCs
 
ToolHandle< IL1TriggerTowerToolm_TTtool {this,"TTTool","LVL1::L1TriggerTowerTool/L1TriggerTowerTool", "The trigger tower tool"}
 
ToolHandle< IL1CaloMappingToolm_mappingTool
 
ToolHandle< LVL1BS::ITrigT1CaloDataAccessV2m_bstowertool
 
const CaloLVL1_IDm_caloId
 
double m_cpLutScale
 
double m_jepLutScale
 
double m_TileToMeV
 
double m_TileTTL1Ped
 
bool m_isDataReprocessing
 
bool m_doOverlay
 
bool m_isReco
 
const L1CaloPprChanCalibContainerm_chanCalibContainer = nullptr
 
const L1CaloDisabledTowersContainerm_disabledTowersContainer = nullptr
 
const L1CaloPpmDeadChannelsContainerm_deadChannelsContainer = nullptr
 
L1CaloPprChanDefaults m_chanDefaults
 
L1CaloPprChanCalibContainerm_chanCalibContaineroverlay = nullptr
 
L1CaloDisabledTowersContainerm_disabledTowersContaineroverlay = nullptr
 
L1CaloPpmDeadChannelsContainerm_deadChannelsContaineroverlay = nullptr
 
L1CaloPprChanDefaults m_chanDefaultsoverlay
 
std::unique_ptr< xAOD::TriggerTowerContainerm_xaodTowers
 
std::unique_ptr< xAOD::TriggerTowerAuxContainerm_xaodTowersAux
 
std::vector< std::vector< double > > m_xaodTowersAmps
 
std::size_t m_curIndex = 0u
 
std::array< double, m_maxIetaBinsm_sinThetaHash
 instead of calculating the expression: double theta =2. More...
 
SG::ReadHandleKey< xAOD::EventInfom_xaodevtKey
 
SG::ReadDecorHandleKey< xAOD::EventInfom_actMuKey { this, "actualInteractionsPerCrossingKey", "EventInfo.actualInteractionsPerCrossing", "Decoration for actual interactions per crossing" }
 
SG::ReadHandleKey< xAOD::TriggerTowerContainerm_inputTTLocation
 
SG::WriteHandleKey< xAOD::TriggerTowerContainerm_outputLocation
 
SG::WriteHandleKey< xAOD::TriggerTowerContainerm_outputLocationRerun
 
SG::ReadHandleKey< LArTTL1Containerm_EmTTL1ContainerName
 
SG::ReadHandleKey< LArTTL1Containerm_HadTTL1ContainerName
 
SG::ReadHandleKey< TileTTL1Containerm_TileTTL1ContainerName
 
SG::ReadHandleKey< TrigConf::L1Menum_L1MenuKey { this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu", "L1 Menu" }
 
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

constexpr static int s_FIRLENGTH = 5
 
constexpr static int s_MEV = 1000
 
constexpr static unsigned int m_maxIetaBins = 51
 

Detailed Description

Definition at line 89 of file Run2TriggerTowerMaker.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ CellTypes

Enumerator
CELL 
TRIGGERTOWERS 
TTL1 
SIZE 

Definition at line 118 of file Run2TriggerTowerMaker.h.

118 {CELL=1, TRIGGERTOWERS=2, TTL1=3, SIZE=4};

Constructor & Destructor Documentation

◆ Run2TriggerTowerMaker() [1/2]

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

Definition at line 81 of file Run2TriggerTowerMaker.cxx.

82  : AthAlgorithm(name, pSvcLocator),
83  m_rngSvc("AthRNGSvc", name),
84  m_rndmADCs(0),
85  m_mappingTool("LVL1::PpmMappingTool/PpmMappingTool", this),
86  m_bstowertool("LVL1BS__TrigT1CaloDataAccessV2/TrigT1CaloDataAccessV2", this),
87  m_caloId(0),
88  m_cpLutScale(1.),
89  m_jepLutScale(1.),
90  m_TileToMeV(s_MEV/4.1), // Scale for converting ET -> counts
91  m_TileTTL1Ped(0.), // TileTTL1 pedestal value - need to subtract if set non-zero
92  m_isDataReprocessing(false),
93  m_doOverlay(false), m_isReco(false)
94  {
95  declareProperty("xAODEventInfoKey", m_xaodevtKey=std::string{"EventInfo"});
96  declareProperty("RngSvc", m_rngSvc, "Random number service");
97  declareProperty("DigiEngine", m_digiEngine = "TrigT1CaloSim_Digitization");
98 
99  declareProperty("L1TriggerTowerTool", m_TTtool);
100  declareProperty("PpmMappingTool", m_mappingTool);
101 
103  declareProperty("EmTTL1ContainerName",m_EmTTL1ContainerName= "LArTTL1EM");
104  declareProperty("HadTTL1ContainerName",m_HadTTL1ContainerName= "LArTTL1HAD");
105  declareProperty("TileTTL1ContainerName",m_TileTTL1ContainerName= "TileTTL1Cnt");
106  declareProperty("RequireAllCalos",m_requireAllCalos=true,"Should EM,Had and Tile all be available?");
107 
110  declareProperty("CellType", m_cellType = TTL1);
111 
112  // ADC simulation
113  declareProperty("ADCStep", m_adcStep=250.);
114  declareProperty("ADCNoise", m_adcVar=0.65);
115  declareProperty("CalibrationUncertainty", m_gainCorr=0.);
116 
117  declareProperty("DoOverlay",m_doOverlay = false);
118  declareProperty("IsReco",m_isReco = false);
119 
120  declareProperty("DecorateFIR", m_decorateFIR = false, "Add FIR values to the xAOD::TriggerTowers");
121 
122  declareProperty("ZeroSuppress", m_ZeroSuppress = true, "Do not save towers with 0 energy");
123 
124  declareProperty("ChanCalibFolderKeyoverlay",m_chanCalibKeyoverlay = "/TRIGGER/L1Calo/V2overlay/Calibration/Physics/PprChanCalib","PprChanCalib key for overlay");
125  declareProperty("ChanDefaultsFolderKeyoverlay",m_chanDefaultsKeyoverlay = "/TRIGGER/L1Calo/V2overlay/Configuration/PprChanDefaults","PprChanDefaults key for overlay");
126  declareProperty("DisabledTowersFolderKeyoverlay",m_disabledTowersKeyoverlay = "/TRIGGER/L1Calo/V2overlay/Conditions/DisabledTowers","DisabledTowers key for overlay");
127  declareProperty("DeadChannelsFolderKeyoverlay",m_deadChannelsKeyoverlay = "/TRIGGER/L1Calo/V2overlay/Calibration/PpmDeadChannels","PpmDeadChannels key for overlay");
128 
129  // Create hash table for E->ET conversions
130  /* Fill table with dummy values */
131  m_sinThetaHash.fill(-1.);
132 
133  /* set values for barrel region with granularity of 0.1*/
134  for(unsigned int i = 0; i < 25; i++) {
135  m_sinThetaHash[i] = 1.0/cosh((i+0.5)* 0.1);
136  }
137 
138  /* set values for EndCap with granularity of 0.2 except tt by |3.2|
139  eta values are are: 2.6, 2.8, 3.0, 3.15 */
140  m_sinThetaHash[26] = 1.0/cosh(2.6);
141  m_sinThetaHash[28] = 1.0/cosh(2.8);
142  m_sinThetaHash[30] = 1.0/cosh(3.0);
143  m_sinThetaHash[31] = 1.0/cosh(3.15);
144 
145  /* fcal granularity is 0.425 */
146  m_sinThetaHash[ (unsigned int)(32 + (0.5*0.425)*10.) ] = 1.0/cosh(3.2 + 0.5*0.425);
147  m_sinThetaHash[ (unsigned int)(32 + (1.5*0.425)*10.) ] = 1.0/cosh(3.2 + 1.5*0.425);
148  m_sinThetaHash[ (unsigned int)(32 + (2.5*0.425)*10.) ] = 1.0/cosh(3.2 + 2.5*0.425);
149  m_sinThetaHash[ (unsigned int)(32 + (3.5*0.425)*10.) ] = 1.0/cosh(3.2 + 3.5*0.425);
150  }

◆ ~Run2TriggerTowerMaker()

LVL1::Run2TriggerTowerMaker::~Run2TriggerTowerMaker ( )
virtual

Definition at line 152 of file Run2TriggerTowerMaker.cxx.

152 {}

◆ Run2TriggerTowerMaker() [2/2]

LVL1::Run2TriggerTowerMaker::Run2TriggerTowerMaker ( const Run2TriggerTowerMaker )
delete

Member Function Documentation

◆ ADC()

std::vector< int > LVL1::Run2TriggerTowerMaker::ADC ( CLHEP::HepRandomEngine *  rndmADCs,
L1CaloCoolChannelId  channel,
const std::vector< double > &  amps 
) const
private

Functions to simulate processing of tower signals.

Definition at line 1150 of file Run2TriggerTowerMaker.cxx.

1152  {
1153  auto* chanCalib = m_chanCalibContainer->pprChanCalib(channel);
1154  if(!chanCalib) { ATH_MSG_WARNING("No database entry for tower " << channel.id()); return {}; }
1155  double ped = chanCalib->pedMean();
1156 
1157  // dice the calibration uncertainty if requested
1158  double adcCal = (m_gainCorr > 0.) ? CLHEP::RandGaussZiggurat::shoot(rndmADCs, 1., m_gainCorr) : 1.;
1159 
1160  std::vector<int> digits;
1161  const int nSamples = amps.size();
1162  digits.reserve(nSamples);
1163  for(int i = 0; i < nSamples; ++i) {
1164  // dice the adc noise if requested
1165  double adcNoise = (m_adcVar > 0.) ? CLHEP::RandGaussZiggurat::shoot(rndmADCs,0.,m_adcVar) : 0.;
1166 
1167  int digit = int((amps[i]*adcCal/m_adcStep) + ped + adcNoise);
1168  if(digit > ADCMAX) digit = ADCMAX;
1169  if(digit < 0) digit = 0;
1170  digits.push_back(digit);
1171  }
1172  return digits;
1173  }

◆ addOverlay() [1/2]

StatusCode LVL1::Run2TriggerTowerMaker::addOverlay ( int  bcid,
float  mu 
)
privatevirtual

Add overlay data.

Definition at line 398 of file Run2TriggerTowerMaker.cxx.

399  {
400  // Get the overlay data TTs from Bytestream
402  xAOD::TriggerTowerAuxContainer overlayDataTTsAux;
403  overlayDataTTs->setStore( &overlayDataTTsAux );
404  ATH_CHECK( m_bstowertool->loadTriggerTowers(*overlayDataTTs) ); // use L1Calo tool to fill xAOD::TriggerTowerContainer from BS
405 
406  // put the overlay data TTs into a map
407  std::unordered_map<uint32_t,xAOD::TriggerTower*> overlayMap;
409 
410  // decorate the overlay TTs to indicate if they have been used or not
411  char decor_ttNotUsedInOverlay = 0;
412  char decor_ttUsedInOverlay = 1;
413  static const SG::Decorator<char> decor ("addedToSignal");
414  for (auto tt:*overlayDataTTs) {
415  // Let's exclude all dead and disabled towers
417  decor(*tt) = decor_ttNotUsedInOverlay;
418  overlayMap.insert( std::make_pair( tt->coolId() , tt ) );
419  }
420  }
421 
422  // What is the size of the primary LUT readout?
423  bool findSizeOfPrimaryLUT(true);
424  unsigned int sizeOfPrimaryLUT(0);
425  uint8_t peakOfPrimary(0);
426 
427  // Loop over primary TTs, match overlay TTs, and add LUT values
428  for (auto tt:*m_xaodTowers) {
429 
430  // find size of primary LUT readout for first TT
431  if (findSizeOfPrimaryLUT) {
432  findSizeOfPrimaryLUT = false;
433  sizeOfPrimaryLUT = tt->lut_cp().size();
434  peakOfPrimary = tt->peak();
435  }
436 
437  // Do we have a matching overlay tower?
438  Itr match = overlayMap.find( tt->coolId() );
439  if (match != overlayMap.end()) {
440 
441  ATH_CHECK( addOverlay(bcid,mu,tt,(*match).second) );
442 
443  // Let the overlay TT know that it has been used
444  decor(*match->second) = decor_ttUsedInOverlay;
445 
446  } // end of match
447  } // end of loop over primary TTs
448 
449  // Now we need to add all overlay TTs that have not been used so far
450  for (Itr i=overlayMap.begin();i!=overlayMap.end();++i) {
451  xAOD::TriggerTower* tt = (*i).second;
452  if (decor(*tt) == decor_ttNotUsedInOverlay) {
453  // Ensure that LUT vectors are the same size as the primary TTs
454  std::vector<uint8_t> overlay_lut_cp(sizeOfPrimaryLUT,0.);
455  std::vector<uint8_t> overlay_lut_jep(sizeOfPrimaryLUT,0.);
456 
457  // Fill the LUT vectors
458  overlay_lut_cp.at(peakOfPrimary) = tt->cpET();
459  overlay_lut_jep.at(peakOfPrimary) = tt->jepET();
460 
461  // Set the LUT vectors and peak
462  tt->setPeak( peakOfPrimary );
463  tt->setLut_cp( overlay_lut_cp );
464  tt->setLut_jep( overlay_lut_jep );
465 
466  // add the overlay TT to the primary TT
467  m_xaodTowers->push_back( tt );
468  }
469  }
470 
471  // Should be done!!!
472  return StatusCode::SUCCESS;
473  }

◆ addOverlay() [2/2]

StatusCode LVL1::Run2TriggerTowerMaker::addOverlay ( int  bcid,
float  mu,
xAOD::TriggerTower sigTT,
xAOD::TriggerTower ovTT 
)
privatevirtual

Add the overlay TriggerTower to the signal TriggerTower.

Definition at line 476 of file Run2TriggerTowerMaker.cxx.

477  {
478  // Get the relevant databases
481 
482  if (!sigDB) {
483  ATH_MSG_ERROR("Cannot find signal DB for tower 0x"<<std::hex<<sigTT->coolId()<<std::dec<<" Aborting...");
484  return StatusCode::FAILURE;
485  }
486 
487  if (!ovDB) {
488  ATH_MSG_ERROR("Cannot find overlay DB for tower 0x"<<std::hex<<ovTT->coolId()<<std::dec<<" Aborting...");
489  return StatusCode::FAILURE;
490  }
491 
492  // Let's begin with the same number of ADC samples
493  // retrieve signal and overlay digits
494  std::vector<int> sigDigits( std::begin(sigTT->adc()) , std::end(sigTT->adc()) );
495  std::vector<int> ovDigits( std::begin(ovTT->adc()) , std::end(ovTT->adc()) );
496  std::vector<int> normOverlayDigits;
497  normaliseDigits(sigDigits,ovDigits,normOverlayDigits);
498 
499  // Get LUT input
500  std::vector<int> sigLutIn,ovLutIn;
501  ATH_CHECK( preProcessTower_getLutIn(bcid,mu,sigTT,sigDB,sigDigits,sigLutIn) );
502  ATH_CHECK( preProcessTower_getLutIn(bcid,mu,ovTT,ovDB,normOverlayDigits,ovLutIn) );
503 
504  // LUT ouput
505  std::vector<int> lutOut_cp,lutOut_jep;
506  ATH_CHECK( calcLutOutCP(sigLutIn,sigDB,ovLutIn,ovDB,lutOut_cp) );
507  ATH_CHECK( calcLutOutJEP(sigLutIn,sigDB,ovLutIn,ovDB,lutOut_jep) );
508 
509  // Not doing BCID yet.. can be added at a later date
510 
511  std::size_t peak = lutOut_jep.size()/2; // both cp & jep have the same length
512  std::vector<uint_least8_t> etResultVectorCp { uint8_t(lutOut_cp[peak]) };
513  std::vector<uint_least8_t> etResultVectorJep { uint8_t(lutOut_jep[peak]) };
514 
515  sigTT->setLut_cp(std::move(etResultVectorCp));
516  sigTT->setLut_jep(std::move(etResultVectorJep));
517 
518  return StatusCode::SUCCESS;
519  }

◆ calcCombinedLUT()

void LVL1::Run2TriggerTowerMaker::calcCombinedLUT ( const std::vector< int > &  sigIN,
const int  sigSlope,
const int  sigOffset,
const std::vector< int > &  ovIN,
const int  ovSlope,
const int  ovOffset,
const int  ovNoiseCut,
std::vector< int > &  output 
)
private

Definition at line 563 of file Run2TriggerTowerMaker.cxx.

565  {
566  // Modified version of TrigT1CaloTools/src/L1TriggerTowerTool
567 
568  // (1) Calculate the Et conversion for the signal and the overlay
569  // (2) Combine the Et's
570  // (3) apply noise cut on combined Et sum
571  // (4) apply bitshift
572 
573  output.clear();
574  output.reserve(sigIN.size()); // avoid frequent reallocations
575 
576  for (unsigned int i=0;i<sigIN.size();++i) {
577  int out(0);
578  int signal = sigIN[i];
579  int overlay = ovIN[i];
580 
581  int outSig = signal*sigSlope - sigOffset; // Et conversion for signal
582  int outOv = overlay*ovSlope - ovOffset; // Et conversion for overlay
583  int outTmp = outSig + outOv; // Combined Et
584 
585  // Noise cut from overlay
586  if (outTmp >= ovNoiseCut) {
587  out = (outSig + outOv + 2048)>>12; // pedestal and bitshift
588  }
589 
590  // keep things in range
591  if (out < 0) out = 0;
592  if (out > 255) out = 255;
593 
594  output.push_back( out );
595  }
596  }

◆ calcLutOutCP()

StatusCode LVL1::Run2TriggerTowerMaker::calcLutOutCP ( const std::vector< int > &  sigLutIn,
const L1CaloPprChanCalib sigDB,
const std::vector< int > &  ovLutIn,
const L1CaloPprChanCalib ovDB,
std::vector< int > &  output 
)
private

calculate LUT out

Definition at line 521 of file Run2TriggerTowerMaker.cxx.

522  {
523  if (sigDB->lutCpStrategy() > 2 || ovDB->lutCpStrategy() > 2) {
524  ATH_MSG_ERROR("Cannot process calcLutOutCP as lutCpStrategy > 2");
525  return StatusCode::FAILURE;
526  }
527 
528  double sigScale = (sigDB->lutCpStrategy() == 0) ? 1. : m_cpLutScale;
529  double sigSlope = sigScale * sigDB->lutCpSlope();
530  double sigOffset = sigScale * sigDB->lutCpOffset();
531 
532  double ovScale = (ovDB->lutCpStrategy() == 0) ? 1. : m_cpLutScale;
533  double ovSlope = ovScale * ovDB->lutCpSlope();
534  double ovOffset = ovScale * ovDB->lutCpOffset();
535  double ovNoiseCut = ovScale * ovDB->lutCpNoiseCut();
536 
537  calcCombinedLUT(sigLutIn,sigSlope,sigOffset,ovLutIn,ovSlope,ovOffset,ovNoiseCut,output);
538 
539  return StatusCode::SUCCESS;
540  }

◆ calcLutOutJEP()

StatusCode LVL1::Run2TriggerTowerMaker::calcLutOutJEP ( const std::vector< int > &  sigLutIn,
const L1CaloPprChanCalib sigDB,
const std::vector< int > &  ovLutIn,
const L1CaloPprChanCalib ovDB,
std::vector< int > &  output 
)
private

Definition at line 542 of file Run2TriggerTowerMaker.cxx.

543  {
544  if (sigDB->lutJepStrategy() > 2 || ovDB->lutJepStrategy() > 2) {
545  ATH_MSG_ERROR("Cannot process calcLutOutJEP as lutJepStrategy > 2");
546  return StatusCode::FAILURE;
547  }
548 
549  double sigScale = (sigDB->lutJepStrategy() == 0) ? 1. : m_jepLutScale;
550  double sigSlope = sigScale * sigDB->lutJepSlope();
551  double sigOffset = sigScale * sigDB->lutJepOffset();
552 
553  double ovScale = (ovDB->lutCpStrategy() == 0) ? 1. : m_jepLutScale;
554  double ovSlope = ovScale * ovDB->lutJepSlope();
555  double ovOffset = ovScale * ovDB->lutJepOffset();
556  double ovNoiseCut = ovScale * ovDB->lutJepNoiseCut();
557 
558  calcCombinedLUT(sigLutIn,sigSlope,sigOffset,ovLutIn,ovSlope,ovOffset,ovNoiseCut,output);
559 
560  return StatusCode::SUCCESS;
561  }

◆ channelId()

L1CaloCoolChannelId LVL1::Run2TriggerTowerMaker::channelId ( double  eta,
double  phi,
int  layer 
)
private

Compute L1CaloCoolChannelId (including support for old geometries)

Function to compute L1CaloCoolChannelId from eta/phi/layer.

Unlike L1TriggerTowerTool::channelID this function can cope with old geometries (hence the hard-coded numbers). So don't remove this until all ATLAS-CSC datasets are irrevokably deprecated

Definition at line 1218 of file Run2TriggerTowerMaker.cxx.

1219  {
1220  int crate, module, channel;
1221  m_mappingTool->mapping(eta, phi, layer, crate, module, channel);
1222  int slot = module + 5;
1223  int pin = channel % 16;
1224  int asic = channel / 16;
1225  return L1CaloCoolChannelId(crate, L1CaloModuleType::Ppm, slot, pin, asic, false);
1226  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

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

◆ 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; }

◆ digitize()

void LVL1::Run2TriggerTowerMaker::digitize ( const EventContext &  ctx)
private

Convert analogue pulses to digits.

Digitize pulses and store results back in xAOD::TriggerTowers.

Definition at line 1136 of file Run2TriggerTowerMaker.cxx.

1137  {
1138  CLHEP::HepRandomEngine* rndmADCs = m_rndmADCs->getEngine (ctx);
1139 
1140  // Loop over all existing towers and digitize pulses
1141  for(auto tower : *m_xaodTowers) {
1142  // First process EM layer
1143  L1CaloCoolChannelId id(tower->coolId());
1144  std::vector<int> digits = ADC(rndmADCs, id, m_xaodTowersAmps[tower->index()]); // ADC simulation
1145  tower->setAdc(std::vector<uint16_t>(std::begin(digits), std::end(digits)));
1146  tower->setAdcPeak(digits.size()/2);
1147  }
1148  }

◆ etaToElement()

int LVL1::Run2TriggerTowerMaker::etaToElement ( float  feta,
int  layer 
) const
private

Get integer eta bin

Definition at line 1228 of file Run2TriggerTowerMaker.cxx.

1229  {
1230  constexpr static int NELEMENTS = 33;
1232  float shiftedEta = feta + 4.9;
1233  uint eta = (uint)floor(shiftedEta*10.0);
1234  if(fabs(shiftedEta*10.0 - (uint)(eta+1)) < 0.01) eta++;
1235  if(fabs(shiftedEta) < 0.01) eta = 0;
1236 
1237  constexpr int nBins = 16;
1238  constexpr uint map[nBins] = {2,6,10,14,17,19,21,23,75,77,79,80,83,87,91,95};
1239  int element = -1;
1240  if(eta > 23 && eta < 74) {
1241  element = eta - 16;
1242  } else {
1243  for(int i = 0; i < nBins; i++) {
1244  if(eta == map[i]) {
1245  if(i < 8) element = i;
1246  else element = i + 50;
1247  break;
1248  }
1249  }
1250  }
1251  if (layer == 1 && (element == 0 || element == 64)) element = 1; // FCal2-2
1252  else if (layer == 1 && (element == 1 || element == 65)) element = 0; // FCal3-2
1253  else if (layer == 1 && (element == 2 || element == 62)) element = 3; // FCal2-1
1254  else if (layer == 1 && (element == 3 || element == 63)) element = 2; // FCal3-1
1255  else if (element > 32) element = 65-element;
1256 
1257  // element 29 = FCal2-1, element 30 = FCal3-1, element 31 = FCal2-2, element 32 = FCal3-2
1258  element = NELEMENTS-element-1;
1259 
1260  return element;
1261  }

◆ EtRange()

int LVL1::Run2TriggerTowerMaker::EtRange ( int  et,
unsigned short  bcidEnergyRangeLow,
unsigned short  bcidEnergyRangeHigh 
) const
private

Definition at line 1175 of file Run2TriggerTowerMaker.cxx.

1176  {
1177  if(et < bcidEnergyRangeLow) return 0;
1178  if(et < bcidEnergyRangeHigh) return 1;
1179  return 2;
1180  }

◆ 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 LVL1::Run2TriggerTowerMaker::execute ( )

Checks that the Cell Type is supported (terminates with errors if not) and calls relevant routine to look for the cells.

Definition at line 309 of file Run2TriggerTowerMaker.cxx.

309  {
310  ATH_MSG_VERBOSE("Executing");
311 
312  if (m_isReco && m_doOverlay) return StatusCode::SUCCESS; // nothing to to, since we did overlay and made towers during digi
313 
314 
315  // retrieve conditions
317  CHECK(pprCalibCont.isValid());
318  m_chanCalibContainer = (*pprCalibCont);
320  CHECK(pprDisabledTowers.isValid());
321  m_disabledTowersContainer = (*pprDisabledTowers);
323  CHECK(pprDeadTowers.isValid());
324  m_deadChannelsContainer = (*pprDeadTowers);
326  CHECK(pprChanDefaults.isValid());
327  auto* defaults = pprChanDefaults->pprChanDefaults(0); // non-owning ptr
328  if(!defaults) {
329  ATH_MSG_ERROR("Could not retrieve channel 0 PprChanDefaults folder. Aborting ...");
330  throw std::runtime_error("Run2TriggerTowerMaker: channel 0 of PprChanDefaults not accesible");
331  }
333 
334  const EventContext& ctx = Gaudi::Hive::currentContext();
336 
339  m_xaodTowers->setStore(m_xaodTowersAux.get());
340  m_xaodTowers->resize(7168); // avoid frequent reallocations
341  m_curIndex = 0u;
342 
343  switch(m_cellType) {
344  case TRIGGERTOWERS:
345  ATH_MSG_VERBOSE("Looking for TriggerTower input");
347  break;
348  case TTL1:
349  ATH_MSG_VERBOSE("Looking for calo towers");
351  digitize(ctx); // digitisation
352  break;
353  default:
354  ATH_MSG_ERROR("Unsupported Cell Type!!!!!!"); return StatusCode::FAILURE;
355  }
356 
359  ATH_CHECK(evt.isValid());
360  ATH_CHECK(muDecor.isPresent());
361  const float mu = muDecor(0);
362 
363  ATH_CHECK(preProcess(evt->bcid(), mu)); // FIR, BCID etc
364 
365  if (m_doOverlay) {
366  ATH_CHECK( addOverlay(evt->bcid(), mu) );
367  }
368 
369  // store them thar trigger towers
370  ATH_CHECK(store());
371 
372  return StatusCode::SUCCESS;
373  }

◆ 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 LVL1::Run2TriggerTowerMaker::finalize ( )

Definition at line 301 of file Run2TriggerTowerMaker.cxx.

301  {
302  ATH_MSG_DEBUG("Finalizing");
303  return StatusCode::SUCCESS;
304  }

◆ getCaloTowers()

StatusCode LVL1::Run2TriggerTowerMaker::getCaloTowers ( )
private

fetch Calorimeter Towers

fetches LAr & Tile calorimeter towers

If < 7168 towers in input data will be unallocated pointers in vector.

Definition at line 967 of file Run2TriggerTowerMaker.cxx.

968  {
969  // Find LAr towers in TES
970  StatusCode sc1 = StatusCode::SUCCESS;
972  if(!EMTowers.isValid()){
973  ATH_MSG_WARNING("EM LArTTL1Container not found");
974  sc1 = StatusCode::FAILURE;
975  }
976 
977  StatusCode sc2 = StatusCode::SUCCESS;
979  if(!HECTowers.isValid()){
980  ATH_MSG_WARNING("Had LArTTL1Container not found");
981  sc2 = StatusCode::FAILURE;
982  }
983 
984  // Find Tile towers in TES
985  StatusCode sc3 = StatusCode::SUCCESS;
987  if(!TileTowers.isValid()){
988  ATH_MSG_WARNING("Tile LArTTL1Container not found");
989  sc3 = StatusCode::FAILURE;
990  }
991 
992  if(m_requireAllCalos && ((sc1==StatusCode::FAILURE) ||
993  (sc2==StatusCode::FAILURE) ||
994  (sc3==StatusCode::FAILURE))) {
995  ATH_MSG_ERROR("Can't find calo towers - stopping processing" << endmsg
996  << "Found Em LArTTL1 : "<<sc1 << endmsg
997  << "Found Had LArTTL1 : "<<sc2 << endmsg
998  << "Found TileTTL1 : "<<sc3<< endmsg
999  );
1000  return StatusCode::FAILURE;
1001  }
1002 
1003  // lets now try to create some trigger towers
1004  if(sc1 == StatusCode::SUCCESS) {
1005  processLArTowers(EMTowers.cptr());
1006  }
1007  if(sc2 == StatusCode::SUCCESS) {
1008  processLArTowers(HECTowers.cptr());
1009  }
1010  if(sc3 == StatusCode::SUCCESS) {
1011  processTileTowers(TileTowers.cptr());
1012  }
1013 
1015  // /// So clean-up m_xaodTowers before these cause problems later.
1016  m_xaodTowers->erase(std::remove_if(m_xaodTowers->begin(), m_xaodTowers->end(),
1017  [](const xAOD::TriggerTower* tt){return (tt == 0);}),
1018  m_xaodTowers->end());
1019 
1020  // Remove dead and disabled towers
1021  m_xaodTowers->erase(std::remove_if(m_xaodTowers->begin(), m_xaodTowers->end(),
1022  [this](const xAOD::TriggerTower* tt){return !IsGoodTower(tt,m_deadChannelsContainer,m_disabledTowersContainer);}),
1023  m_xaodTowers->end());
1024 
1025  return StatusCode::SUCCESS;
1026  }

◆ getTriggerTowers()

StatusCode LVL1::Run2TriggerTowerMaker::getTriggerTowers ( )
private

gets collection of input TriggerTowers for reprocessing

gets TriggerTowers from input collection and copies ADC digits into xAOD::TriggerTowers for reprocessing

If < 7168 towers in input data will be unallocated pointers in vector.

Definition at line 940 of file Run2TriggerTowerMaker.cxx.

941  {
942  ATH_MSG_INFO("Retrieve input TriggerTowers " << m_inputTTLocation.key());
944  ATH_CHECK(inputTTs.isValid());
945  ATH_MSG_INFO("Found " << inputTTs->size() << " input TriggerTowers");
946 
947  for(const xAOD::TriggerTower* tower : *inputTTs) {
948  xAOD::TriggerTower* t = (*m_xaodTowers)[m_curIndex++] = new xAOD::TriggerTower;
949  *t = *tower;
950  }
951 
953  // /// So clean-up m_xaodTowers before these cause problems later.
954  m_xaodTowers->erase(std::remove_if(m_xaodTowers->begin(), m_xaodTowers->end(),
955  [](const xAOD::TriggerTower* tt){return (tt == 0);}),
956  m_xaodTowers->end());
957 
958  // Remove dead and disabled towers
959  m_xaodTowers->erase(std::remove_if(m_xaodTowers->begin(), m_xaodTowers->end(),
960  [this](const xAOD::TriggerTower* tt){return !IsGoodTower(tt,m_deadChannelsContainer,m_disabledTowersContainer);}),
961  m_xaodTowers->end());
962 
963  return StatusCode::SUCCESS;
964  } // end of getTriggerTowers()

◆ handle()

void LVL1::Run2TriggerTowerMaker::handle ( const Incident &  inc)

Best if initialisation which uses COOL-derived values is done here rather than in initialize()

Get global scales from configSvc

globalScale is number of GeV/count. As code is already written to use MeV/count, safest thing here is to convert:

Definition at line 214 of file Run2TriggerTowerMaker.cxx.

215  {
216  if(inc.type() != "BeginRun") return;
218 
219  auto l1Menu = SG::makeHandle( m_L1MenuKey );
220  try {
221  m_cpLutScale = l1Menu->thrExtraInfo().EM().emScale();
222  m_jepLutScale = l1Menu->thrExtraInfo().JET().jetScale();
223  } catch(const std::out_of_range&) {
224  ATH_MSG_DEBUG("No Legacy triggers in menu, using default scales");
225  m_cpLutScale = 2;
226  m_jepLutScale = 1;
227  }
228 
229  ATH_MSG_INFO("REGTEST CP scale = " << m_cpLutScale << " count/GeV");
230  ATH_MSG_INFO("REGTEST JEP scale = " << m_jepLutScale << " count/GeV");
231 
234 
235 
236 
237 
238  if (m_doOverlay) {
239 
240  throw std::runtime_error("Overlay no longer supported in Run2TriggerTowerMaker");
241 
242  // Leaving this code commented here as a reminder of what functionality might need to be added to L1CaloCondAlg
243  // if we want to restart supporting overlay
244 
245 // if (! m_condSvc->retrieve(m_chanCalibContaineroverlay, m_chanCalibKeyoverlay).isSuccess()){ATH_MSG_ERROR("failed!");}
246 // ATH_MSG_INFO("Loading "<<m_chanCalibKeyoverlay<<" into m_chanCalibContaineroverlay");
247 // if (! m_condSvc->retrieve(m_disabledTowersContaineroverlay, m_disabledTowersKeyoverlay).isSuccess()){ATH_MSG_ERROR("failed!");}
248 // if (! m_condSvc->retrieve(m_deadChannelsContaineroverlay, m_deadChannelsKeyoverlay).isSuccess()){ATH_MSG_ERROR("failed!");}
249 // L1CaloPprChanDefaultsContainer *cDCoverlay = nullptr;
250 // if (! m_condSvc->retrieve(cDCoverlay, m_chanDefaultsKeyoverlay).isSuccess()){ATH_MSG_ERROR("failed!");}
251 // if(!m_chanCalibContaineroverlay || !cDCoverlay ||
252 // !m_disabledTowersContaineroverlay || !m_deadChannelsContaineroverlay) {
253 // ATH_MSG_ERROR("Could not retrieve database containers for overlay. Aborting ...");
254 // throw std::runtime_error("Run2TriggerTowerMaker: database container for overlay not accesible");
255 // }
256 //
257 // auto* defaultsoverlay = cDCoverlay->pprChanDefaults(0); // non-owning ptr
258 // if(!defaultsoverlay) {
259 // ATH_MSG_ERROR("Could not retrieve channel 0 PprChanDefaults folder for overlay. Aborting ...");
260 // throw std::runtime_error("Run2TriggerTowerMaker: channel 0 of PprChanDefaults for overlay not accesible");
261 // }
262 // m_chanDefaultsoverlay = *defaultsoverlay;
263 
264  }
265 
266  const TileInfo* tileInfo = nullptr;
267  if(detStore()->retrieve(tileInfo, "TileInfo").isFailure()) {
268  ATH_MSG_ERROR("Failed to find TileInfo");
269  m_TileToMeV = s_MEV/4.1;
270  }
271 
272  m_TileToMeV = s_MEV/tileInfo->TTL1Calib({});
273  ATH_MSG_DEBUG("Tile TTL1 calibration scale = " << tileInfo->TTL1Calib({}));
274  m_TileTTL1Ped = tileInfo->TTL1Ped({});
275  ATH_MSG_DEBUG("Tile TTL1 pedestal value = " << m_TileTTL1Ped);
276 
277  // try to determine wheter we run on data or on simulation
278  const xAOD::EventInfo* evtinfo{nullptr};
279  if(evtStore()->retrieve(evtinfo)!=StatusCode::SUCCESS) {
280  ATH_MSG_WARNING("Could not determine if input file is data or simulation. Will assume simulation.");
281  }
282  else {
283  bool isData = !(evtinfo->eventTypeBitmask()&xAOD::EventInfo::IS_SIMULATION);
284  m_isDataReprocessing = isData;
286  ATH_MSG_INFO("Detected data reprocessing. Will take pedestal correction values from input trigger towers.");
287  } else {
288  ATH_MSG_VERBOSE("No data reprocessing - running normal simulation.");
289  }
290  }
291 
292  // If this is an overlay job, we will handle this in a different way
293  if (m_doOverlay) {
294  m_isDataReprocessing = false;
295  ATH_MSG_INFO("L1Calo overlay job - setting m_isDataReprocessing to false");
296  }
297 
298 
299  }

◆ IDeta()

double LVL1::Run2TriggerTowerMaker::IDeta ( const Identifier id,
const CaloLVL1_ID caloId 
)
private

functions to extract eta, phi coordinates from calo tower identifiers

Definition at line 1182 of file Run2TriggerTowerMaker.cxx.

1183  {
1184  int region = l1id->region(id);
1185  int ieta = l1id->eta(id);
1186  int sign = l1id->pos_neg_z(id);
1187 
1188  double gran[4] = {0.1, 0.2, 0.1, 0.425};
1189  double offset[4] = {0., 2.5, 3.1, 3.2};
1190  double eta;
1191 
1192  if(region>=0 && region<=3) {
1193  eta = sign* (((ieta+0.5) * gran[region]) + offset[region]);
1194  }
1195  else {
1196  eta = 0.;
1197  }
1198 
1199  return eta;
1200  }

◆ IDphi()

double LVL1::Run2TriggerTowerMaker::IDphi ( const Identifier id,
const CaloLVL1_ID caloId 
)
private

Definition at line 1203 of file Run2TriggerTowerMaker.cxx.

1204  {
1205  Identifier regId = l1id->region_id(id);
1206 
1207  double phiMax = l1id->phi_max(regId);
1208  int iphi = l1id->phi(id);
1209  double phi = (iphi+0.5)*2*M_PI/(phiMax+1);
1210 
1211  return phi;
1212  }

◆ initialize()

StatusCode LVL1::Run2TriggerTowerMaker::initialize ( )

Definition at line 154 of file Run2TriggerTowerMaker.cxx.

155  {
156  ATH_MSG_DEBUG("Initialising");
157 
159  ATH_CHECK(m_mappingTool.retrieve());
160  ATH_CHECK(m_TTtool.retrieve());
161  ATH_CHECK(m_rngSvc.retrieve());
162  ATH_CHECK(m_bstowertool.retrieve());
163 
164  m_rndmADCs = m_rngSvc->getEngine(this, m_digiEngine);
165  if(!m_rndmADCs) {
166  ATH_MSG_ERROR("Failed to retrieve random engine");
167  return StatusCode::FAILURE;
168  }
169 
170  // Listen for BeginRun
171  ServiceHandle<IIncidentSvc> incSvc("IncidentSvc",name());
172  ATH_CHECK(incSvc.retrieve());
173  incSvc->addListener(this, "BeginRun");
174 
175  // reserve enough storage for the amps
176  m_xaodTowersAmps.assign(7168, std::vector<double>());
177 
179  ATH_CHECK(m_actMuKey.initialize());
180 
181  ATH_CHECK(m_inputTTLocation.initialize());
182 
185  ATH_CHECK(m_TileTTL1ContainerName.initialize());
186  ATH_CHECK(m_outputLocation.initialize());
187 
188  ATH_CHECK(m_outputLocationRerun.initialize());
189 
190  //Rerun on trigger towers
191  if (m_cellType == TRIGGERTOWERS) {
196  }
197  //Start from RDO inputs
198  else if (m_cellType == TTL1) {
201  }
202 
208 
209  return StatusCode::SUCCESS;
210  }

◆ 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.

◆ IsDeadChannel()

bool LVL1::Run2TriggerTowerMaker::IsDeadChannel ( const L1CaloPpmDeadChannels db) const
private

Database helper functions for dead and disabled towers.

Definition at line 376 of file Run2TriggerTowerMaker.cxx.

377  {
378  if (!db) return false; // No DB entry - assume that this is not a dead channel
379  if (db->errorCode() > 0 || db->noiseCut() > 0) return true; // We do not want these
380  return false;
381  }

◆ IsDisabledChannel()

bool LVL1::Run2TriggerTowerMaker::IsDisabledChannel ( const L1CaloDisabledTowers db) const
private

Definition at line 383 of file Run2TriggerTowerMaker.cxx.

384  {
385  if (!db) return false; // No DB entry - assume that this is not a disabled channel
386  if (db->disabledBits() > 0) return true; // We do not want these
387  return false;
388  }

◆ IsGoodTower()

bool LVL1::Run2TriggerTowerMaker::IsGoodTower ( const xAOD::TriggerTower tt,
const L1CaloPpmDeadChannelsContainer dead,
const L1CaloDisabledTowersContainer disabled 
) const
private

Definition at line 390 of file Run2TriggerTowerMaker.cxx.

391  {
392  bool isDead = IsDeadChannel(dead->ppmDeadChannels(tt->coolId()));
393  bool isDisabled = IsDisabledChannel(disabled->disabledTowers(tt->coolId()));
394  if (!isDead && !isDisabled) return true;
395  return false;
396  }

◆ 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  }

◆ non_linear_lut()

int LVL1::Run2TriggerTowerMaker::non_linear_lut ( int  lutin,
unsigned short  offset,
unsigned short  slope,
unsigned short  noiseCut,
unsigned short  scale,
short  par1,
short  par2,
short  par3,
short  par4 
)
private

Definition at line 1267 of file Run2TriggerTowerMaker.cxx.

1267  {
1268  // turn shorts into double (database fields are shorts ... )
1269 
1270  // turn shorts into double
1271  double nll_slope = 0.001 * scale;
1272  double nll_offset = 0.001 * par1;
1273  double nll_ampl = 0.001 * par2;
1274  double nll_expo = 0.;
1275  if(par3) {
1276  nll_expo = -1. / (4096 * 0.001*par3);
1277  } else {
1278  nll_ampl = 0.;
1279  }
1280  double nll_noise = 0.001 * par4;
1281 
1282  // noise cut
1283  if (lutin * slope < offset + nll_noise * noiseCut) {
1284  return 0;
1285  }
1286 
1287  // actual calculation
1288  int output = int((((int)(2048 + nll_slope * (lutin * slope - offset)))>>12) + nll_offset + nll_ampl * std::exp(nll_expo * (lutin * slope - offset)));
1289  if(output >= 255) return 255;
1290  if(output < 0) return 0;
1291  return output;
1292  }

◆ normaliseDigits()

void LVL1::Run2TriggerTowerMaker::normaliseDigits ( const std::vector< int > &  sigDigits,
const std::vector< int > &  ovDigits,
std::vector< int > &  normDigits 
)
private

normalise the number of ADC digits for overlay

Definition at line 648 of file Run2TriggerTowerMaker.cxx.

649  {
650 
651  // 3 possible cases:
652  // Case 1.) Signal MC and overlay data have same number of digits - easy peasy lemon squeezy
653  // Case 2.) Signal MC is larger - pad the overlay digits
654  // Case 3.) Signal MC is smaller - crop the overlay digits
655 
656  // Case 1.)
657  if (sigDigits.size() == ovDigits.size()) {
658  for (auto x:ovDigits) normDigits.push_back( x );
659  }
660 
661  // Case 2.)
662  if (sigDigits.size() > ovDigits.size()) {
663  unsigned int pad = (sigDigits.size() - ovDigits.size()) / 2;
664  for (unsigned int x=0;x<pad;++x) normDigits.push_back( 32 );
665  for (auto x:ovDigits) normDigits.push_back( x );
666  for (unsigned int x=0;x<pad;++x) normDigits.push_back( 32 );
667  }
668 
669 
670  // Case 3.)
671  if (sigDigits.size() < ovDigits.size()) {
672  unsigned int offset = (ovDigits.size() - sigDigits.size()) / 2;
673  for (unsigned int x=0;x<sigDigits.size();++x) {
674  unsigned int pos = x + offset;
675  normDigits.push_back( ovDigits[pos] );
676  }
677  }
678 
679  }

◆ operator=()

Run2TriggerTowerMaker& LVL1::Run2TriggerTowerMaker::operator= ( const Run2TriggerTowerMaker )
delete

◆ 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.

◆ preProcess()

StatusCode LVL1::Run2TriggerTowerMaker::preProcess ( int  bcid,
float  mu 
)
private

Simulate PreProcessing on analogue amplitudes.

Emulate FIR filter, bunch-crossing identification & LUT, and create & fill TriggerTowers.

Definition at line 684 of file Run2TriggerTowerMaker.cxx.

685  {
686  // Loop over all existing towers and simulate preprocessor functions
687  for(auto tower : *m_xaodTowers) {
689  }
690  return StatusCode::SUCCESS;
691  }

◆ preProcessTower()

StatusCode LVL1::Run2TriggerTowerMaker::preProcessTower ( int  bcid,
float  mu,
xAOD::TriggerTower tower 
)
private

retrieve digits

process tower – digitial filter

dynamic pedestal correction

BCID algorithms (only possible if 7 slices readout)

In simulation external BCID is always zero, but for consistency with data we need to add it to the TriggerTower objects

Definition at line 693 of file Run2TriggerTowerMaker.cxx.

694  {
695 
696  const L1CaloPprChanCalib* chanCalib = m_chanCalibContainer->pprChanCalib(tower->coolId());
697 
698  if (!chanCalib) {
699  ATH_MSG_ERROR("Tower with coolId 0x"<<std::hex<<tower->coolId()<<std::dec<<" Not in database! Aborting ...");
700  return StatusCode::FAILURE;
701  }
702 
703  // pedestal correction
704  int pedCorrectionStrategy(0);
705  // Regular job - no overlay
706  if (!m_doOverlay) {
707  if (chanCalib->pedFirSum() && !m_isDataReprocessing) pedCorrectionStrategy = 1; // simulation
708  if (chanCalib->pedFirSum() && m_isDataReprocessing) pedCorrectionStrategy = 2; // data reprocessing
709  }
710  if (m_doOverlay) {
711  pedCorrectionStrategy = chanCalib->lutCpStrategy();
712  }
713 
715  std::vector<int> digits(std::begin(tower->adc()), std::end(tower->adc()));
716 
718  std::vector<int> fir;
719  m_TTtool->fir(digits,
720  { chanCalib->firCoeff5(), chanCalib->firCoeff4(), chanCalib->firCoeff3(),
721  chanCalib->firCoeff2(), chanCalib->firCoeff1() }, // reverse order in database
722  fir);
723 
725  std::vector<int16_t> correction;
726  // a few cases follow
727  // 1.) simulation and pedestal correction enabled
728  // 2.) data reprocessing and pedestal correction enabled
729  // 3.) pedestal correction disabled
730 
731  // old method - now deprecated
732 // if(chanCalib->pedFirSum() && !m_isDataReprocessing) {
733 
734  // new method
735  if (pedCorrectionStrategy == 1) {
736  // case 1.) (database "abuses" pedFirSum to steer pedestal correction)
737  // apply the parameterized pedestal correction
738  int firPed = (chanCalib->firCoeff5() + chanCalib->firCoeff4() + chanCalib->firCoeff3() +
739  chanCalib->firCoeff2() + chanCalib->firCoeff1()) * int(chanCalib->pedMean() + 0.5);
740  m_TTtool->pedestalCorrection(fir,
741  firPed,
742  etaToElement(tower->eta(), tower->layer()),
743  tower->layer(),
744  bcid,
745  mu,
746  correction);
747  }
748 
749  // old method - now deprecated
750  //else if(chanCalib->pedFirSum() && m_isDataReprocessing) {
751  if (pedCorrectionStrategy == 2) {
752 
753  // case 2.) (database "abuses" pedFirSum to steer pedestal correction)
754  // apply the recorded pedestal correction
755  if(!tower->correctionEnabled().empty() && tower->correctionEnabled().front()) {
756  std::size_t offset = (fir.size() - tower->correction().size())/2;
757 
758  for(std::size_t i = offset, e = fir.size() - offset; i != e; ++i) {
759  correction.push_back(tower->correction()[i-offset]);
760  fir[i] -= tower->correction()[i-offset];
761  }
762  ATH_MSG_VERBOSE("::correction: (from data");
763  printVec(this->msg(MSG::VERBOSE), correction);
764  } // in case the correction wasn't enabled in the readout nothing has to be done
765  }
766 
767  // Case 3.) not yet implemented (will it ever be....??)
768 
769  std::vector<int> lutIn;
770  m_TTtool->dropBits(fir, chanCalib->firStartBit(), lutIn);
771 
772  // linear LUTs - CP
773  std::vector<int> lutOut_cp;
774  ATH_MSG_VERBOSE("::cp-lut: strategy: " << chanCalib->lutCpStrategy());
775  if(chanCalib->lutCpStrategy() < 3) {
776  // for new strategy lutSlope, lutOffset and lutNoiseCut are in units of LUTOut
777  // and need to be multiplied by the scale factor
778  double scale = (chanCalib->lutCpStrategy() == 0) ? 1. : m_cpLutScale;
779 
780  m_TTtool->lut(lutIn,
781  scale * chanCalib->lutCpSlope(),
782  scale * chanCalib->lutCpOffset(),
783  scale * chanCalib->lutCpNoiseCut(),
784  32 /* unused */,
785  chanCalib->lutCpStrategy() > 0,
786  false, // TODO - disabled?
787  lutOut_cp);
788  } else if(chanCalib->lutCpStrategy() == 3) {
789  for(auto l : lutIn) lutOut_cp.push_back(non_linear_lut(l, chanCalib->lutCpOffset(), chanCalib->lutCpSlope(), chanCalib->lutCpNoiseCut(), chanCalib->lutCpScale(), chanCalib->lutCpPar1(), chanCalib->lutCpPar2(), chanCalib->lutCpPar3(), chanCalib->lutCpPar4()));
790  }
791  ATH_MSG_VERBOSE("::cp-lut: lut:");
792  printVec(this->msg(MSG::VERBOSE), lutOut_cp);
793 
794 
795  // linear LUTs - JEP
796  std::vector<int> lutOut_jep;
797  ATH_MSG_VERBOSE("::jep-lut: strategy: " << chanCalib->lutJepStrategy());
798  if(chanCalib->lutJepStrategy() < 3) {
799  // for new strategy lutSlope, lutOffset and lutNoiseCut are in units of LUTOut
800  // and need to be multiplied by the scale factor
801  double scale = (chanCalib->lutJepStrategy() == 0) ? 1. : m_jepLutScale;
802 
803  m_TTtool->lut(lutIn,
804  scale * chanCalib->lutJepSlope(),
805  scale * chanCalib->lutJepOffset(),
806  scale * chanCalib->lutJepNoiseCut(),
807  32 /* unused */,
808  chanCalib->lutJepStrategy() > 0,
809  false, // TODO - disabled?
810  lutOut_jep);
811  } else if(chanCalib->lutJepStrategy() == 3) {
812  for(auto l : lutIn) lutOut_jep.push_back(non_linear_lut(l, chanCalib->lutJepOffset(), chanCalib->lutJepSlope(), chanCalib->lutJepNoiseCut(), chanCalib->lutJepScale(), chanCalib->lutJepPar1(), chanCalib->lutJepPar2(), chanCalib->lutJepPar3(), chanCalib->lutJepPar4()));
813  }
814  ATH_MSG_VERBOSE("::jep-lut: lut:");
815  printVec(this->msg(MSG::VERBOSE), lutOut_jep);
816 
817 
819  std::vector<int> BCIDOut;
820  if(!m_isDataReprocessing || tower->adc().size() >= 7) {
821  m_TTtool->bcid(fir, digits,
823  chanCalib->satBcidThreshLow(),
824  chanCalib->satBcidThreshHigh(),
825  chanCalib->satBcidLevel(),
826  BCIDOut);
827  } else {
828  // in data reprocessing with less than 7 slices take decision from data
829  BCIDOut.assign(tower->bcidVec().begin(), tower->bcidVec().end());
830  ATH_MSG_VERBOSE("::bcidOut: (from data):");
831  printVec(this->msg(MSG::VERBOSE), BCIDOut);
832  }
833 
834  std::size_t peak = lutOut_jep.size()/2; // both cp & jep have the same length
835  std::vector<uint_least8_t> etResultVectorCp { uint8_t(lutOut_cp[peak]) };
836  ATH_MSG_VERBOSE("::etResultVector: cp:");
837  printVec(this->msg(MSG::VERBOSE), etResultVectorCp);
838  std::vector<uint_least8_t> etResultVectorJep { uint8_t(lutOut_jep[peak]) };
839  ATH_MSG_VERBOSE("::etResultVector: jep:");
840  printVec(this->msg(MSG::VERBOSE), etResultVectorJep);
841 
842  // identify BCID range
843  int range;
844  if(!(m_chanDefaults.decisionSource() & 0x1)) {
845  range = EtRange(digits[digits.size()/2], chanCalib->bcidEnergyRangeLow(), chanCalib->bcidEnergyRangeHigh());
846  } else {
847  range = EtRange(fir[fir.size()/2], chanCalib->bcidEnergyRangeLow(), chanCalib->bcidEnergyRangeHigh());
848  }
849  ATH_MSG_VERBOSE("::range: " << range);
850 
851  // correct BCID for this range?
852  std::array<int, 3> bcidDecision {
854  };
855  ATH_MSG_VERBOSE("::bcidDecision:");
856  printVec(this->msg(MSG::VERBOSE), bcidDecision);
857 
858  std::array<int, 3> satOverride {
860  };
861  ATH_MSG_VERBOSE("::satOverride:");
862  printVec(this->msg(MSG::VERBOSE), satOverride);
863 
864  if((bcidDecision[range]) & (0x1 << (BCIDOut[BCIDOut.size()/2]))) {
865  if((satOverride[range]) & 0x1) {
866  // return saturation if set
867  etResultVectorCp[0] = SATURATIONVALUE;
868  etResultVectorJep[0] = SATURATIONVALUE;
869  }
870  } else {
871  // zero if fail BCID
872  etResultVectorCp[0] = 0;
873  etResultVectorJep[0] = 0;
874  }
875 
876  // Overlay protection
877  if (m_inputTTLocation.key() == "NoneForOverlay") return StatusCode::SUCCESS;
878 
879  tower->setLut_cp(std::move(etResultVectorCp));
880  tower->setLut_jep(std::move(etResultVectorJep));
881  tower->setBcidVec({uint8_t(BCIDOut[BCIDOut.size()/2])});
882  ATH_MSG_VERBOSE("::set bcidVec:");
883  printVec(this->msg(MSG::VERBOSE), tower->bcidVec());
884  tower->setPeak(0u); // we only added one item to etResultVector
885  if(m_decorateFIR) firDecorator(*tower) = fir[fir.size()/2];
886 
889  tower->setBcidExt(std::vector<uint8_t>(tower->adc().size(), 0u));
890 
891  // fill the pedestal correction
892  if(chanCalib->pedFirSum()) {
893  // online database abuses pedFirSum to steer pedestal correction
894  tower->setCorrectionEnabled(std::vector<uint8_t>(tower->lut_cp().size(), 1u));
895  tower->setCorrection(std::vector<int16_t>(tower->lut_cp().size(),
896  correction[correction.size()/2]));
897  ATH_MSG_VERBOSE("::set correction:");
898  printVec(this->msg(MSG::VERBOSE), tower->correction());
899  } else {
900  tower->setCorrectionEnabled(std::vector<uint8_t>(tower->lut_cp().size(), 0u));
901  tower->setCorrection(std::vector<int16_t>(tower->lut_cp().size(), 0u));
902  }
903  return StatusCode::SUCCESS;
904  }

◆ preProcessTower_getLutIn()

StatusCode LVL1::Run2TriggerTowerMaker::preProcessTower_getLutIn ( int  bcid,
float  mu,
xAOD::TriggerTower tower,
const L1CaloPprChanCalib db,
const std::vector< int > &  digits,
std::vector< int > &  output 
)
private

PreProcess up to LUT in.

Definition at line 598 of file Run2TriggerTowerMaker.cxx.

599  {
600  // factorised version of Run2TriggerTowerMaker::preProcessTower
601 
602  // process tower -- digital filter
603  std::vector<int> fir;
604  m_TTtool->fir(digits,
605  {db->firCoeff5(),db->firCoeff4(),db->firCoeff3(),db->firCoeff2(),db->firCoeff1()}, // reverse order in database
606  fir);
607 
608  // pedestal correction
609  int pedCorrectionStrategy = db->lutCpStrategy();
610  std::vector<int16_t> correction;
611 
612  // 1.) simulation and pedestal correction enabled
613  if (pedCorrectionStrategy == 1) {
614 // cout<<"Using Simulation pedCorrectionStrategy"<<endl;
615  // case 1.) (database "abuses" pedFirSum to steer pedestal correction)
616  // apply the parameterized pedestal correction
617  int firPed = (db->firCoeff5() + db->firCoeff4() + db->firCoeff3() +
618  db->firCoeff2() + db->firCoeff1()) * int(db->pedMean() + 0.5);
619  m_TTtool->pedestalCorrection(fir,
620  firPed,
621  etaToElement(tower->eta(), tower->layer()),
622  tower->layer(),
623  bcid,
624  mu,
625  correction);
626  }
627 
628  // 2.) data reprocessing and pedestal correction enabled
629  if (pedCorrectionStrategy == 2) {
630 // cout<<"Using data pedCorrectionStrategy"<<endl;
631  // case 2.) (database "abuses" pedFirSum to steer pedestal correction)
632  // apply the recorded pedestal correction
633  if(!tower->correctionEnabled().empty() && tower->correctionEnabled().front()) {
634  std::size_t offset = (fir.size() - tower->correction().size())/2;
635 
636  for(std::size_t i = offset, e = fir.size() - offset; i != e; ++i) {
637  correction.push_back(tower->correction()[i-offset]);
638  fir[i] -= tower->correction()[i-offset];
639  }
640  }
641  }
642 
643  m_TTtool->dropBits(fir, db->firStartBit(), output);
644 
645  return StatusCode::SUCCESS;
646  }

◆ processLArTowers()

void LVL1::Run2TriggerTowerMaker::processLArTowers ( const LArTTL1Container towers)
private

extract amplitudes from TTL1

steps over Calo towers and creates/fills trigger towers

Definition at line 1029 of file Run2TriggerTowerMaker.cxx.

1030  {
1031  int towerNumber=0;
1032  for(const LArTTL1* tower : *towers){
1033  ATH_MSG_VERBOSE("Looking at retrieved tower number "<<towerNumber++<<" ***********");
1034 
1035  // Obtain identifier
1036  Identifier id = tower->ttOfflineID();
1037  double eta = IDeta(id, m_caloId);
1038  double phi = IDphi(id, m_caloId);
1039  int layer = int(m_caloId->sampling(id) != 0);
1040  L1CaloCoolChannelId coolId = channelId(eta, phi, layer);
1041 
1042  // Tower amplitudes and type
1043  int nsamples = tower->nsamples();
1044  std::vector<float> tower_amps = tower->samples();
1045 
1046  // Now calibrate tower_amps then fill TriggerTower amplitude vector
1047  // TTL1 should have 7 samples, but this little kludge handles other
1048  // eventualities, provided peak is in centre of the pulse
1049  int offset = (nsamples - (s_FIRLENGTH+2))/2;
1050  std::vector<double> amps(s_FIRLENGTH+2);
1051 
1052  ATH_MSG_VERBOSE("nsamples = " << nsamples << " offset = " << offset);
1053 
1054  for(int i = 0; i < s_FIRLENGTH+2; i++) {
1055  int j = i + offset;
1056  if(j >= 0 && j < nsamples) {
1057  amps[i] = tower_amps[j];
1058  }
1059  else {
1060  amps[i] = 0.;
1061  }
1062  ATH_MSG_VERBOSE("amps[" << i << "] = " << amps[i]);
1063  }
1064 
1065  // Create TriggerTower
1066  xAOD::TriggerTower* t = (*m_xaodTowers)[m_curIndex++] = new xAOD::TriggerTower;
1067  t->setCoolId(coolId.id());
1068  t->setEta(eta);
1069  t->setPhi(phi);
1070  m_xaodTowersAmps[t->index()] = std::move(amps);
1071  } // end for loop
1072  }

◆ processTileTowers()

void LVL1::Run2TriggerTowerMaker::processTileTowers ( const TileTTL1Container towers)
private

Definition at line 1074 of file Run2TriggerTowerMaker.cxx.

1075  {
1076  // Step over all towers
1077  int towerNumber=0;
1078  for(const TileTTL1* tower : *towers) {
1079  ATH_MSG_VERBOSE("Looking at retrieved tower number "<<towerNumber++<<" ***********");
1080 
1081  // Obtain identifier
1082  Identifier id = tower->TTL1_ID();
1083  double cal = m_TileToMeV;//calib(id, m_caloId)*m_TileToMeV;
1084 
1085  // Check this tower is used by the trigger
1086  // don't use gap or mbias scinitllators
1087  if(m_caloId->is_tile(id)) {
1088  double tower_eta = IDeta(id, m_caloId);
1089  double tower_phi = IDphi(id, m_caloId);
1090 
1091  // need to convert tower energy to E_t later
1092  unsigned Ieta = unsigned(fabs(tower_eta)*10.0);
1093  if(Ieta >= m_maxIetaBins){
1094  ATH_MSG_WARNING("TileTTL1 with invalid index for m_sinThetaHash: Ieta = " << Ieta);
1095  Ieta = 0u;
1096  }
1097 
1098  /* Extract amplitudes and rescale according to tower eta */
1099  int nsamples = tower->nsamples();
1100  std::vector<float> tower_amps = tower->fsamples();
1101 
1102  /* Debug message */
1103  ATH_MSG_VERBOSE(" nsamples = " << nsamples);
1104 
1105  // Want 7 samples, but this little kludge allows us to accept other
1106  // numbers, provided peak is in centre of the pulse
1107  int offset = (nsamples - (s_FIRLENGTH+2))/2;
1108  std::vector<double> amps(s_FIRLENGTH+2);
1109  for(int i = 0; i < 7; i++) {
1110  int j = i + offset;
1111  if(j >= 0 && j < nsamples) {
1112  amps[i] = (tower_amps[j]-m_TileTTL1Ped)*m_sinThetaHash[Ieta]*cal; // rescale to MeV
1113  }
1114  else {
1115  amps[i] = 0.;
1116  }
1117  /* Debug message */
1118  ATH_MSG_VERBOSE("amps[" << i << "] = " << amps[i]);
1119  }
1120 
1121  // Create TriggerTower
1122  // m_xaodTowers->push_back(new xAOD::TriggerTower);
1123  // auto t = m_xaodTowers->back();
1124  xAOD::TriggerTower* t = (*m_xaodTowers)[m_curIndex++] = new xAOD::TriggerTower;
1125  t->setCoolId(channelId(tower_eta, tower_phi, 1).id());
1126  t->setEta(tower_eta);
1127  t->setPhi(tower_phi);
1128  m_xaodTowersAmps[t->index()] = std::move(amps);
1129  } // end check on whether tower is used
1130  } // end for loop
1131 
1132  return;
1133  }

◆ 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  }

◆ store()

StatusCode LVL1::Run2TriggerTowerMaker::store ( )
private

Stores Trigger Towers in the TES, at a location defined in m_outputLocation.

Returns FAILURE if the towers could not be saved.

Returns FAILURE if the towers could not be saved.

Definition at line 911 of file Run2TriggerTowerMaker.cxx.

912  {
913  ATH_MSG_DEBUG("Storing TTs in DataVector");
914  if(m_ZeroSuppress) {
915  // remove trigger towers whose energy is 0
916  m_xaodTowers->erase(std::remove_if(m_xaodTowers->begin(), m_xaodTowers->end(),
917  [](const xAOD::TriggerTower* tt){
918  return tt->cpET() == 0 && tt->jepET() == 0;
919  }),
920  m_xaodTowers->end());
921  }
922 
923 
924 
925  if (m_cellType == TRIGGERTOWERS) {
927  ATH_CHECK(output.record(std::move(m_xaodTowers), std::move(m_xaodTowersAux)));
928  }
929  else if (m_cellType == TTL1) {
931  ATH_CHECK(output.record(std::move(m_xaodTowers), std::move(m_xaodTowersAux)));
932  }
933 
934  return StatusCode::SUCCESS;
935  } // end of LVL1::Run2TriggerTowerMaker::store(){

◆ 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_actMuKey

SG::ReadDecorHandleKey<xAOD::EventInfo> LVL1::Run2TriggerTowerMaker::m_actMuKey { this, "actualInteractionsPerCrossingKey", "EventInfo.actualInteractionsPerCrossing", "Decoration for actual interactions per crossing" }
private

Definition at line 266 of file Run2TriggerTowerMaker.h.

◆ m_adcStep

double LVL1::Run2TriggerTowerMaker::m_adcStep
private

Definition at line 131 of file Run2TriggerTowerMaker.h.

◆ m_adcVar

double LVL1::Run2TriggerTowerMaker::m_adcVar
private

Definition at line 128 of file Run2TriggerTowerMaker.h.

◆ m_bstowertool

ToolHandle<LVL1BS::ITrigT1CaloDataAccessV2> LVL1::Run2TriggerTowerMaker::m_bstowertool
private

Definition at line 157 of file Run2TriggerTowerMaker.h.

◆ m_caloId

const CaloLVL1_ID* LVL1::Run2TriggerTowerMaker::m_caloId
private

Definition at line 159 of file Run2TriggerTowerMaker.h.

◆ m_cellType

int LVL1::Run2TriggerTowerMaker::m_cellType
private

Definition at line 125 of file Run2TriggerTowerMaker.h.

◆ m_chanCalibContainer

const L1CaloPprChanCalibContainer* LVL1::Run2TriggerTowerMaker::m_chanCalibContainer = nullptr
private

Definition at line 177 of file Run2TriggerTowerMaker.h.

◆ m_chanCalibContaineroverlay

L1CaloPprChanCalibContainer* LVL1::Run2TriggerTowerMaker::m_chanCalibContaineroverlay = nullptr
private

Definition at line 181 of file Run2TriggerTowerMaker.h.

◆ m_chanCalibKey

SG::ReadCondHandleKey<L1CaloPprChanCalibContainer> LVL1::Run2TriggerTowerMaker::m_chanCalibKey {this,"ChanCalibFolderKey","/TRIGGER/L1Calo/V2/Calibration/Physics/PprChanCalib","PprChanCalib key"}
private

Definition at line 142 of file Run2TriggerTowerMaker.h.

◆ m_chanCalibKeyoverlay

std::string LVL1::Run2TriggerTowerMaker::m_chanCalibKeyoverlay
private

Definition at line 146 of file Run2TriggerTowerMaker.h.

◆ m_chanDefaults

L1CaloPprChanDefaults LVL1::Run2TriggerTowerMaker::m_chanDefaults
private

Definition at line 180 of file Run2TriggerTowerMaker.h.

◆ m_chanDefaultsKey

SG::ReadCondHandleKey<L1CaloPprChanDefaultsContainer> LVL1::Run2TriggerTowerMaker::m_chanDefaultsKey {this,"ChanDefaultsFolderKey","/TRIGGER/L1Calo/V2/Configuration/PprChanDefaults","PprChanDefaults key"}
private

Definition at line 143 of file Run2TriggerTowerMaker.h.

◆ m_chanDefaultsKeyoverlay

std::string LVL1::Run2TriggerTowerMaker::m_chanDefaultsKeyoverlay
private

Definition at line 147 of file Run2TriggerTowerMaker.h.

◆ m_chanDefaultsoverlay

L1CaloPprChanDefaults LVL1::Run2TriggerTowerMaker::m_chanDefaultsoverlay
private

Definition at line 184 of file Run2TriggerTowerMaker.h.

◆ m_cpLutScale

double LVL1::Run2TriggerTowerMaker::m_cpLutScale
private

Definition at line 162 of file Run2TriggerTowerMaker.h.

◆ m_curIndex

std::size_t LVL1::Run2TriggerTowerMaker::m_curIndex = 0u
private

Definition at line 189 of file Run2TriggerTowerMaker.h.

◆ m_deadChannelsContainer

const L1CaloPpmDeadChannelsContainer* LVL1::Run2TriggerTowerMaker::m_deadChannelsContainer = nullptr
private

Definition at line 179 of file Run2TriggerTowerMaker.h.

◆ m_deadChannelsContaineroverlay

L1CaloPpmDeadChannelsContainer* LVL1::Run2TriggerTowerMaker::m_deadChannelsContaineroverlay = nullptr
private

Definition at line 183 of file Run2TriggerTowerMaker.h.

◆ m_deadChannelsKey

SG::ReadCondHandleKey<L1CaloPpmDeadChannelsContainer> LVL1::Run2TriggerTowerMaker::m_deadChannelsKey {this,"DeadChannelsFolderKey","/TRIGGER/L1Calo/V2/Calibration/PpmDeadChannels","PpmDeadChannels key"}
private

Definition at line 145 of file Run2TriggerTowerMaker.h.

◆ m_deadChannelsKeyoverlay

std::string LVL1::Run2TriggerTowerMaker::m_deadChannelsKeyoverlay
private

Definition at line 149 of file Run2TriggerTowerMaker.h.

◆ m_decorateFIR

bool LVL1::Run2TriggerTowerMaker::m_decorateFIR
private

Definition at line 133 of file Run2TriggerTowerMaker.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_digiEngine

std::string LVL1::Run2TriggerTowerMaker::m_digiEngine
private

Definition at line 122 of file Run2TriggerTowerMaker.h.

◆ m_disabledTowersContainer

const L1CaloDisabledTowersContainer* LVL1::Run2TriggerTowerMaker::m_disabledTowersContainer = nullptr
private

Definition at line 178 of file Run2TriggerTowerMaker.h.

◆ m_disabledTowersContaineroverlay

L1CaloDisabledTowersContainer* LVL1::Run2TriggerTowerMaker::m_disabledTowersContaineroverlay = nullptr
private

Definition at line 182 of file Run2TriggerTowerMaker.h.

◆ m_disabledTowersKey

SG::ReadCondHandleKey<L1CaloDisabledTowersContainer> LVL1::Run2TriggerTowerMaker::m_disabledTowersKey {this,"DisabledTowersFolderKey","/TRIGGER/L1Calo/V2/Conditions/DisabledTowers","DisabledTowers key"}
private

Definition at line 144 of file Run2TriggerTowerMaker.h.

◆ m_disabledTowersKeyoverlay

std::string LVL1::Run2TriggerTowerMaker::m_disabledTowersKeyoverlay
private

Definition at line 148 of file Run2TriggerTowerMaker.h.

◆ m_doOverlay

bool LVL1::Run2TriggerTowerMaker::m_doOverlay
private

Definition at line 173 of file Run2TriggerTowerMaker.h.

◆ m_EmTTL1ContainerName

SG::ReadHandleKey<LArTTL1Container> LVL1::Run2TriggerTowerMaker::m_EmTTL1ContainerName
private

Definition at line 276 of file Run2TriggerTowerMaker.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_gainCorr

double LVL1::Run2TriggerTowerMaker::m_gainCorr
private

Definition at line 132 of file Run2TriggerTowerMaker.h.

◆ m_HadTTL1ContainerName

SG::ReadHandleKey<LArTTL1Container> LVL1::Run2TriggerTowerMaker::m_HadTTL1ContainerName
private

Definition at line 277 of file Run2TriggerTowerMaker.h.

◆ m_inputTTLocation

SG::ReadHandleKey<xAOD::TriggerTowerContainer> LVL1::Run2TriggerTowerMaker::m_inputTTLocation
private

Definition at line 269 of file Run2TriggerTowerMaker.h.

◆ m_isDataReprocessing

bool LVL1::Run2TriggerTowerMaker::m_isDataReprocessing
private

Definition at line 171 of file Run2TriggerTowerMaker.h.

◆ m_isReco

bool LVL1::Run2TriggerTowerMaker::m_isReco
private

Definition at line 174 of file Run2TriggerTowerMaker.h.

◆ m_jepLutScale

double LVL1::Run2TriggerTowerMaker::m_jepLutScale
private

Definition at line 163 of file Run2TriggerTowerMaker.h.

◆ m_L1MenuKey

SG::ReadHandleKey<TrigConf::L1Menu> LVL1::Run2TriggerTowerMaker::m_L1MenuKey { this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu", "L1 Menu" }
private

Definition at line 280 of file Run2TriggerTowerMaker.h.

◆ m_mappingTool

ToolHandle<IL1CaloMappingTool> LVL1::Run2TriggerTowerMaker::m_mappingTool
private

Definition at line 156 of file Run2TriggerTowerMaker.h.

◆ m_maxIetaBins

constexpr static unsigned int LVL1::Run2TriggerTowerMaker::m_maxIetaBins = 51
staticconstexprprivate

Definition at line 115 of file Run2TriggerTowerMaker.h.

◆ m_outputLocation

SG::WriteHandleKey<xAOD::TriggerTowerContainer> LVL1::Run2TriggerTowerMaker::m_outputLocation
private

Definition at line 271 of file Run2TriggerTowerMaker.h.

◆ m_outputLocationRerun

SG::WriteHandleKey<xAOD::TriggerTowerContainer> LVL1::Run2TriggerTowerMaker::m_outputLocationRerun
private

Definition at line 273 of file Run2TriggerTowerMaker.h.

◆ m_requireAllCalos

bool LVL1::Run2TriggerTowerMaker::m_requireAllCalos
private

Definition at line 139 of file Run2TriggerTowerMaker.h.

◆ m_rndmADCs

ATHRNG::RNGWrapper* LVL1::Run2TriggerTowerMaker::m_rndmADCs
private

Definition at line 153 of file Run2TriggerTowerMaker.h.

◆ m_rngSvc

ServiceHandle<IAthRNGSvc> LVL1::Run2TriggerTowerMaker::m_rngSvc
private

Definition at line 152 of file Run2TriggerTowerMaker.h.

◆ m_sinThetaHash

std::array<double, m_maxIetaBins> LVL1::Run2TriggerTowerMaker::m_sinThetaHash
private

instead of calculating the expression: double theta =2.

*atan(exp(-fabs(cell_eta))); cell_energy=sin(theta)*cell_energy; for each em and had TT again, we will use a hash table

Definition at line 197 of file Run2TriggerTowerMaker.h.

◆ m_TileToMeV

double LVL1::Run2TriggerTowerMaker::m_TileToMeV
private

Definition at line 165 of file Run2TriggerTowerMaker.h.

◆ m_TileTTL1ContainerName

SG::ReadHandleKey<TileTTL1Container> LVL1::Run2TriggerTowerMaker::m_TileTTL1ContainerName
private

Definition at line 278 of file Run2TriggerTowerMaker.h.

◆ m_TileTTL1Ped

double LVL1::Run2TriggerTowerMaker::m_TileTTL1Ped
private

Definition at line 167 of file Run2TriggerTowerMaker.h.

◆ m_TTtool

ToolHandle<IL1TriggerTowerTool> LVL1::Run2TriggerTowerMaker::m_TTtool {this,"TTTool","LVL1::L1TriggerTowerTool/L1TriggerTowerTool", "The trigger tower tool"}
private

Definition at line 155 of file Run2TriggerTowerMaker.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_xaodevtKey

SG::ReadHandleKey<xAOD::EventInfo> LVL1::Run2TriggerTowerMaker::m_xaodevtKey
private

Definition at line 265 of file Run2TriggerTowerMaker.h.

◆ m_xaodTowers

std::unique_ptr<xAOD::TriggerTowerContainer> LVL1::Run2TriggerTowerMaker::m_xaodTowers
private

Definition at line 186 of file Run2TriggerTowerMaker.h.

◆ m_xaodTowersAmps

std::vector<std::vector<double> > LVL1::Run2TriggerTowerMaker::m_xaodTowersAmps
private

Definition at line 188 of file Run2TriggerTowerMaker.h.

◆ m_xaodTowersAux

std::unique_ptr<xAOD::TriggerTowerAuxContainer> LVL1::Run2TriggerTowerMaker::m_xaodTowersAux
private

Definition at line 187 of file Run2TriggerTowerMaker.h.

◆ m_ZeroSuppress

bool LVL1::Run2TriggerTowerMaker::m_ZeroSuppress
private

Definition at line 136 of file Run2TriggerTowerMaker.h.

◆ s_FIRLENGTH

constexpr static int LVL1::Run2TriggerTowerMaker::s_FIRLENGTH = 5
staticconstexprprivate

Definition at line 113 of file Run2TriggerTowerMaker.h.

◆ s_MEV

constexpr static int LVL1::Run2TriggerTowerMaker::s_MEV = 1000
staticconstexprprivate

Definition at line 114 of file Run2TriggerTowerMaker.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
xAOD::TriggerTower_v2::correctionEnabled
const std::vector< uint8_t > & correctionEnabled() const
get correctionEnabled
LVL1::Run2TriggerTowerMaker::m_deadChannelsContainer
const L1CaloPpmDeadChannelsContainer * m_deadChannelsContainer
Definition: Run2TriggerTowerMaker.h:179
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
LVL1::Run2TriggerTowerMaker::m_curIndex
std::size_t m_curIndex
Definition: Run2TriggerTowerMaker.h:189
ATHRNG::RNGWrapper::setSeed
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Definition: RNGWrapper.h:169
LVL1::Run2TriggerTowerMaker::calcLutOutCP
StatusCode calcLutOutCP(const std::vector< int > &sigLutIn, const L1CaloPprChanCalib *sigDB, const std::vector< int > &ovLutIn, const L1CaloPprChanCalib *ovDB, std::vector< int > &output)
calculate LUT out
Definition: Run2TriggerTowerMaker.cxx:521
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:215
LVL1::Run2TriggerTowerMaker::store
StatusCode store()
Stores Trigger Towers in the TES, at a location defined in m_outputLocation.
Definition: Run2TriggerTowerMaker.cxx:911
test_pyathena.eta
eta
Definition: test_pyathena.py:10
LVL1::Run2TriggerTowerMaker::m_adcStep
double m_adcStep
Definition: Run2TriggerTowerMaker.h:131
LVL1::Run2TriggerTowerMaker::preProcess
StatusCode preProcess(int bcid, float mu)
Simulate PreProcessing on analogue amplitudes.
Definition: Run2TriggerTowerMaker.cxx:684
et
Extra patterns decribing particle interation process.
LVL1::Run2TriggerTowerMaker::m_EmTTL1ContainerName
SG::ReadHandleKey< LArTTL1Container > m_EmTTL1ContainerName
Definition: Run2TriggerTowerMaker.h:276
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
LVL1::Run2TriggerTowerMaker::processLArTowers
void processLArTowers(const LArTTL1Container *)
extract amplitudes from TTL1
Definition: Run2TriggerTowerMaker.cxx:1029
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:558
LVL1::Run2TriggerTowerMaker::m_chanDefaultsKeyoverlay
std::string m_chanDefaultsKeyoverlay
Definition: Run2TriggerTowerMaker.h:147
L1CaloPprChanCalib::lutCpStrategy
unsigned short lutCpStrategy() const
Definition: L1CaloPprChanCalib.h:39
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
L1CaloPprChanCalib::satBcidThreshLow
unsigned short satBcidThreshLow() const
Definition: L1CaloPprChanCalib.h:28
L1CaloPprChanCalib::lutCpSlope
unsigned short lutCpSlope() const
Definition: L1CaloPprChanCalib.h:42
xAOD::TriggerTower_v2::lut_cp
const std::vector< uint8_t > & lut_cp() const
get lut_cp
LVL1::Run2TriggerTowerMaker::addOverlay
virtual StatusCode addOverlay(int bcid, float mu)
Add overlay data.
Definition: Run2TriggerTowerMaker.cxx:398
CaloCondBlobAlgs_fillNoiseFromASCII.db
db
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:42
L1CaloPprChanCalib::lutCpPar2
short lutCpPar2() const
Definition: L1CaloPprChanCalib.h:44
L1CaloPprChanDefaults::bcidDecision1
int bcidDecision1() const
Definition: L1CaloPprChanDefaults.h:23
LVL1::Run2TriggerTowerMaker::ADC
std::vector< int > ADC(CLHEP::HepRandomEngine *rndmADCs, L1CaloCoolChannelId channel, const std::vector< double > &amps) const
Functions to simulate processing of tower signals.
Definition: Run2TriggerTowerMaker.cxx:1150
AthCommonDataStore< AthCommonMsg< Algorithm > >::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
LVL1::Run2TriggerTowerMaker::normaliseDigits
void normaliseDigits(const std::vector< int > &sigDigits, const std::vector< int > &ovDigits, std::vector< int > &normDigits)
normalise the number of ADC digits for overlay
Definition: Run2TriggerTowerMaker.cxx:648
L1CaloPprChanCalib::firCoeff3
short firCoeff3() const
Definition: L1CaloPprChanCalib.h:36
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
L1CaloPprChanCalib::pedFirSum
unsigned int pedFirSum() const
Definition: L1CaloPprChanCalib.h:26
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:70
TileTTL1
Definition: TileTTL1.h:26
M_PI
#define M_PI
Definition: ActiveFraction.h:11
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
L1CaloPprChanCalib::lutJepNoiseCut
unsigned short lutJepNoiseCut() const
Definition: L1CaloPprChanCalib.h:50
xAOD::TriggerTower_v2::correction
const std::vector< int16_t > & correction() const
get correction
LVL1::Run2TriggerTowerMaker::m_doOverlay
bool m_doOverlay
Definition: Run2TriggerTowerMaker.h:173
xAOD::TriggerTower_v2::setBcidVec
void setBcidVec(const std::vector< uint8_t > &)
set bcidVec
LVL1::Run2TriggerTowerMaker::preProcessTower
StatusCode preProcessTower(int bcid, float mu, xAOD::TriggerTower *tower)
Definition: Run2TriggerTowerMaker.cxx:693
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:157
LVL1::Run2TriggerTowerMaker::calcLutOutJEP
StatusCode calcLutOutJEP(const std::vector< int > &sigLutIn, const L1CaloPprChanCalib *sigDB, const std::vector< int > &ovLutIn, const L1CaloPprChanCalib *ovDB, std::vector< int > &output)
Definition: Run2TriggerTowerMaker.cxx:542
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
LVL1::Run2TriggerTowerMaker::m_rndmADCs
ATHRNG::RNGWrapper * m_rndmADCs
Definition: Run2TriggerTowerMaker.h:153
TileInfo
Definition: TileInfo.h:49
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
checkRpcDigits.digit
digit
Definition: checkRpcDigits.py:186
LVL1::Run2TriggerTowerMaker::m_xaodTowersAmps
std::vector< std::vector< double > > m_xaodTowersAmps
Definition: Run2TriggerTowerMaker.h:188
LVL1::Run2TriggerTowerMaker::m_jepLutScale
double m_jepLutScale
Definition: Run2TriggerTowerMaker.h:163
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
LVL1::Run2TriggerTowerMaker::s_FIRLENGTH
constexpr static int s_FIRLENGTH
Definition: Run2TriggerTowerMaker.h:113
LVL1::Run2TriggerTowerMaker::m_TileTTL1ContainerName
SG::ReadHandleKey< TileTTL1Container > m_TileTTL1ContainerName
Definition: Run2TriggerTowerMaker.h:278
yodamerge_tmp.scale
scale
Definition: yodamerge_tmp.py:138
xAOD::EventInfo_v1::IS_SIMULATION
@ IS_SIMULATION
true: simulation, false: data
Definition: EventInfo_v1.h:151
x
#define x
L1CaloPprChanCalib::bcidEnergyRangeLow
unsigned short bcidEnergyRangeLow() const
Definition: L1CaloPprChanCalib.h:31
xAOD::TriggerTower_v2::bcidVec
const std::vector< uint8_t > & bcidVec() const
get bcidVec
xAOD::unsigned
unsigned
Definition: RingSetConf_v1.cxx:662
LVL1::Run2TriggerTowerMaker::m_TileTTL1Ped
double m_TileTTL1Ped
Definition: Run2TriggerTowerMaker.h:167
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
LVL1::Run2TriggerTowerMaker::EtRange
int EtRange(int et, unsigned short bcidEnergyRangeLow, unsigned short bcidEnergyRangeHigh) const
Definition: Run2TriggerTowerMaker.cxx:1175
LVL1::Run2TriggerTowerMaker::TRIGGERTOWERS
@ TRIGGERTOWERS
Definition: Run2TriggerTowerMaker.h:118
L1CaloPprChanCalib::lutJepPar1
short lutJepPar1() const
Definition: L1CaloPprChanCalib.h:52
L1CaloPprChanDefaults::peakFinderCond
int peakFinderCond() const
Definition: L1CaloPprChanDefaults.h:29
LVL1::Run2TriggerTowerMaker::preProcessTower_getLutIn
StatusCode preProcessTower_getLutIn(int bcid, float mu, xAOD::TriggerTower *tower, const L1CaloPprChanCalib *db, const std::vector< int > &digits, std::vector< int > &output)
PreProcess up to LUT in.
Definition: Run2TriggerTowerMaker.cxx:598
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:92
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
LVL1::Run2TriggerTowerMaker::m_TTtool
ToolHandle< IL1TriggerTowerTool > m_TTtool
Definition: Run2TriggerTowerMaker.h:155
LVL1::Run2TriggerTowerMaker::channelId
L1CaloCoolChannelId channelId(double eta, double phi, int layer)
Compute L1CaloCoolChannelId (including support for old geometries)
Definition: Run2TriggerTowerMaker.cxx:1218
L1CaloPprChanCalib::lutJepPar3
short lutJepPar3() const
Definition: L1CaloPprChanCalib.h:54
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
L1CaloPprChanCalib::firCoeff4
short firCoeff4() const
Definition: L1CaloPprChanCalib.h:37
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:274
tools.zlumi_mc_cf.correction
def correction(mu, runmode, campaign, run=None)
Definition: zlumi_mc_cf.py:4
LVL1::Run2TriggerTowerMaker::m_disabledTowersKeyoverlay
std::string m_disabledTowersKeyoverlay
Definition: Run2TriggerTowerMaker.h:148
python.PyAthena.module
module
Definition: PyAthena.py:131
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
L1CaloPprChanCalib::satBcidThreshHigh
unsigned short satBcidThreshHigh() const
Definition: L1CaloPprChanCalib.h:29
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
L1CaloPprChanCalib::lutCpOffset
unsigned short lutCpOffset() const
Definition: L1CaloPprChanCalib.h:40
LVL1::Run2TriggerTowerMaker::m_L1MenuKey
SG::ReadHandleKey< TrigConf::L1Menu > m_L1MenuKey
Definition: Run2TriggerTowerMaker.h:280
LVL1::Run2TriggerTowerMaker::IsDisabledChannel
bool IsDisabledChannel(const L1CaloDisabledTowers *db) const
Definition: Run2TriggerTowerMaker.cxx:383
LVL1::Run2TriggerTowerMaker::m_xaodTowersAux
std::unique_ptr< xAOD::TriggerTowerAuxContainer > m_xaodTowersAux
Definition: Run2TriggerTowerMaker.h:187
LVL1::Run2TriggerTowerMaker::s_MEV
constexpr static int s_MEV
Definition: Run2TriggerTowerMaker.h:114
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
LVL1::Run2TriggerTowerMaker::m_chanDefaults
L1CaloPprChanDefaults m_chanDefaults
Definition: Run2TriggerTowerMaker.h:180
xAOD::TriggerTower_v2::setPeak
void setPeak(uint8_t)
set peak
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
LVL1::Run2TriggerTowerMaker::m_chanCalibKey
SG::ReadCondHandleKey< L1CaloPprChanCalibContainer > m_chanCalibKey
Definition: Run2TriggerTowerMaker.h:142
LVL1::Run2TriggerTowerMaker::IDeta
double IDeta(const Identifier &id, const CaloLVL1_ID *caloId)
functions to extract eta, phi coordinates from calo tower identifiers
Definition: Run2TriggerTowerMaker.cxx:1182
LVL1::Run2TriggerTowerMaker::m_isDataReprocessing
bool m_isDataReprocessing
Definition: Run2TriggerTowerMaker.h:171
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition: StoreGate/StoreGate/ReadDecorHandle.h:94
SG::Decorator< char >
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
LVL1::Run2TriggerTowerMaker::m_deadChannelsKeyoverlay
std::string m_deadChannelsKeyoverlay
Definition: Run2TriggerTowerMaker.h:149
L1CaloPprChanCalib::lutJepPar4
short lutJepPar4() const
Definition: L1CaloPprChanCalib.h:55
LVL1::Run2TriggerTowerMaker::m_xaodevtKey
SG::ReadHandleKey< xAOD::EventInfo > m_xaodevtKey
Definition: Run2TriggerTowerMaker.h:265
L1CaloPpmDeadChannelsContainer::ppmDeadChannels
const L1CaloPpmDeadChannels * ppmDeadChannels(unsigned int channelId) const
Definition: L1CaloPpmDeadChannelsContainer.cxx:72
lumiFormat.i
int i
Definition: lumiFormat.py:85
L1CaloPprChanCalib::firCoeff2
short firCoeff2() const
Definition: L1CaloPprChanCalib.h:35
L1CaloPprChanCalib::lutJepOffset
unsigned short lutJepOffset() const
Definition: L1CaloPprChanCalib.h:49
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LVL1::Run2TriggerTowerMaker::IsDeadChannel
bool IsDeadChannel(const L1CaloPpmDeadChannels *db) const
Database helper functions for dead and disabled towers.
Definition: Run2TriggerTowerMaker.cxx:376
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
xAOD::TriggerTower_v2::layer
int layer() const
get layer ( 0 = EM, 1 = Had, 2 = FCAL23) - to be confirmed
Definition: TriggerTower_v2.cxx:121
L1CaloPprChanCalib::firCoeff5
short firCoeff5() const
Definition: L1CaloPprChanCalib.h:38
xAOD::TriggerTower_v2
Description of TriggerTower_v2.
Definition: TriggerTower_v2.h:49
L1CaloPprChanCalib::satBcidLevel
unsigned short satBcidLevel() const
Definition: L1CaloPprChanCalib.h:30
TileInfo::TTL1Ped
double TTL1Ped(const Identifier &) const
Returns the pedestal (in mV) for TTL1 adcs.
Definition: TileInfo.h:139
xAOD::TriggerTower_v2::eta
virtual double eta() const final
The pseudorapidity ( ) of the particle.
Definition: TriggerTower_v2.cxx:210
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:194
LVL1::Run2TriggerTowerMaker::m_digiEngine
std::string m_digiEngine
Definition: Run2TriggerTowerMaker.h:122
L1CaloCoolChannelId::id
unsigned int id() const
Definition: L1CaloCoolChannelId.h:32
sign
int sign(int a)
Definition: TRT_StrawNeighbourSvc.h:107
L1CaloPprChanDefaults::bcidDecision3
int bcidDecision3() const
Definition: L1CaloPprChanDefaults.h:27
L1CaloPprChanDefaults::satOverride2
int satOverride2() const
Definition: L1CaloPprChanDefaults.h:26
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
xAOD::TriggerTower_v2::coolId
uint32_t coolId() const
Tower identifiers.
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
LVL1::Run2TriggerTowerMaker::m_actMuKey
SG::ReadDecorHandleKey< xAOD::EventInfo > m_actMuKey
Definition: Run2TriggerTowerMaker.h:266
SCT_Monitoring::disabled
@ disabled
Definition: SCT_MonitoringNumbers.h:60
L1CaloPprChanCalib::lutCpScale
unsigned short lutCpScale() const
Definition: L1CaloPprChanCalib.h:47
L1CaloPprChanCalib::lutJepSlope
unsigned short lutJepSlope() const
Definition: L1CaloPprChanCalib.h:51
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
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
xAOD::TriggerTowerAuxContainer_v2
AuxContainer for TriggerTower_v2.
Definition: TriggerTowerAuxContainer_v2.h:28
LVL1::Run2TriggerTowerMaker::TTL1
@ TTL1
Definition: Run2TriggerTowerMaker.h:118
L1CaloPprChanCalib
Folder <-> Object mapping for /TRIGGER/L1Calo/V2/Calibration/Physics/PprChanCalib .
Definition: L1CaloPprChanCalib.h:17
LVL1::Run2TriggerTowerMaker::SIZE
@ SIZE
Definition: Run2TriggerTowerMaker.h:118
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
xAOD::TriggerTower_v2::setCorrection
void setCorrection(const std::vector< int16_t > &)
set correction
LVL1::Run2TriggerTowerMaker::m_cpLutScale
double m_cpLutScale
Definition: Run2TriggerTowerMaker.h:162
L1CaloPprChanCalib::firCoeff1
short firCoeff1() const
Definition: L1CaloPprChanCalib.h:34
LVL1::Run2TriggerTowerMaker::IDphi
double IDphi(const Identifier &id, const CaloLVL1_ID *caloId)
Definition: Run2TriggerTowerMaker.cxx:1203
LVL1::Run2TriggerTowerMaker::etaToElement
int etaToElement(float feta, int layer) const
Definition: Run2TriggerTowerMaker.cxx:1228
L1CaloPprChanCalib::bcidEnergyRangeHigh
unsigned short bcidEnergyRangeHigh() const
Definition: L1CaloPprChanCalib.h:32
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge.output
output
Definition: merge.py:16
L1CaloPprChanCalib::lutCpPar1
short lutCpPar1() const
Definition: L1CaloPprChanCalib.h:43
xAOD::TriggerTowerContainer
TriggerTowerContainer_v2 TriggerTowerContainer
Define the latest version of the TriggerTower container.
Definition: TriggerTowerContainer.h:15
dumpTgcDigiJitter.nBins
list nBins
Definition: dumpTgcDigiJitter.py:29
LVL1::Run2TriggerTowerMaker::m_TileToMeV
double m_TileToMeV
Definition: Run2TriggerTowerMaker.h:165
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
L1CaloPprChanCalib::lutCpNoiseCut
unsigned short lutCpNoiseCut() const
Definition: L1CaloPprChanCalib.h:41
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:239
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
LVL1::Run2TriggerTowerMaker::non_linear_lut
int non_linear_lut(int lutin, unsigned short offset, unsigned short slope, unsigned short noiseCut, unsigned short scale, short par1, short par2, short par3, short par4)
Definition: Run2TriggerTowerMaker.cxx:1267
LVL1::Run2TriggerTowerMaker::m_rngSvc
ServiceHandle< IAthRNGSvc > m_rngSvc
Definition: Run2TriggerTowerMaker.h:152
LVL1::Run2TriggerTowerMaker::getTriggerTowers
StatusCode getTriggerTowers()
gets collection of input TriggerTowers for reprocessing
Definition: Run2TriggerTowerMaker.cxx:940
L1CaloPprChanCalib::firStartBit
unsigned short firStartBit() const
Definition: L1CaloPprChanCalib.h:33
L1CaloPprChanCalib::lutJepScale
unsigned short lutJepScale() const
Definition: L1CaloPprChanCalib.h:56
LVL1::Run2TriggerTowerMaker::m_xaodTowers
std::unique_ptr< xAOD::TriggerTowerContainer > m_xaodTowers
Definition: Run2TriggerTowerMaker.h:186
LVL1::Run2TriggerTowerMaker::m_mappingTool
ToolHandle< IL1CaloMappingTool > m_mappingTool
Definition: Run2TriggerTowerMaker.h:156
LVL1::Run2TriggerTowerMaker::m_caloId
const CaloLVL1_ID * m_caloId
Definition: Run2TriggerTowerMaker.h:159
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
Base_Fragment.defaults
dictionary defaults
This includes now the top quark, the leptons and the bosons.
Definition: GeneratorFilters/share/common/Base_Fragment.py:79
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
Cut::signal
@ signal
Definition: SUSYToolsAlg.cxx:67
xAOD::TriggerTower_v2::setLut_cp
void setLut_cp(const std::vector< uint8_t > &)
set lut_cp
LVL1::TrigT1CaloDefs::xAODTriggerTowerLocation
static const std::string xAODTriggerTowerLocation
Definition: TrigT1CaloDefs.h:36
ATHRNG::RNGWrapper::getEngine
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition: RNGWrapper.h:134
xAOD::TriggerTower_v2::setLut_jep
void setLut_jep(const std::vector< uint8_t > &)
set lut_jep
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:16
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
Example_ReadSampleNoise.ped
ped
Definition: Example_ReadSampleNoise.py:45
LVL1::Run2TriggerTowerMaker::processTileTowers
void processTileTowers(const TileTTL1Container *)
Definition: Run2TriggerTowerMaker.cxx:1074
LVL1::Run2TriggerTowerMaker::m_disabledTowersContaineroverlay
L1CaloDisabledTowersContainer * m_disabledTowersContaineroverlay
Definition: Run2TriggerTowerMaker.h:182
L1CaloPprChanCalibContainer::pprChanCalib
const L1CaloPprChanCalib * pprChanCalib(unsigned int channelId) const
Definition: L1CaloPprChanCalibContainer.cxx:170
ReadOfcFromCool.nsamples
nsamples
Definition: ReadOfcFromCool.py:115
LVL1::Run2TriggerTowerMaker::m_sinThetaHash
std::array< double, m_maxIetaBins > m_sinThetaHash
instead of calculating the expression: double theta =2.
Definition: Run2TriggerTowerMaker.h:197
L1CaloCoolChannelId
Definition: L1CaloCoolChannelId.h:10
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:73
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
LVL1::Run2TriggerTowerMaker::m_outputLocation
SG::WriteHandleKey< xAOD::TriggerTowerContainer > m_outputLocation
Definition: Run2TriggerTowerMaker.h:271
LVL1::Run2TriggerTowerMaker::m_isReco
bool m_isReco
Definition: Run2TriggerTowerMaker.h:174
L1CaloModuleType::Ppm
@ Ppm
Definition: L1CaloModuleType.h:17
LVL1::Run2TriggerTowerMaker::calcCombinedLUT
void calcCombinedLUT(const std::vector< int > &sigIN, const int sigSlope, const int sigOffset, const std::vector< int > &ovIN, const int ovSlope, const int ovOffset, const int ovNoiseCut, std::vector< int > &output)
Definition: Run2TriggerTowerMaker.cxx:563
a
TList * a
Definition: liststreamerinfos.cxx:10
L1CaloPprChanCalib::lutJepStrategy
unsigned short lutJepStrategy() const
Definition: L1CaloPprChanCalib.h:48
h
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
LVL1::Run2TriggerTowerMaker::m_disabledTowersContainer
const L1CaloDisabledTowersContainer * m_disabledTowersContainer
Definition: Run2TriggerTowerMaker.h:178
RunTileMonitoring.towers
towers
Definition: RunTileMonitoring.py:133
LVL1::Run2TriggerTowerMaker::m_decorateFIR
bool m_decorateFIR
Definition: Run2TriggerTowerMaker.h:133
LVL1::Run2TriggerTowerMaker::getCaloTowers
StatusCode getCaloTowers()
fetch Calorimeter Towers
Definition: Run2TriggerTowerMaker.cxx:967
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
LVL1::Run2TriggerTowerMaker::m_adcVar
double m_adcVar
Definition: Run2TriggerTowerMaker.h:128
L1CaloPprChanCalib::lutCpPar4
short lutCpPar4() const
Definition: L1CaloPprChanCalib.h:46
LVL1::Run2TriggerTowerMaker::m_chanCalibContaineroverlay
L1CaloPprChanCalibContainer * m_chanCalibContaineroverlay
Definition: Run2TriggerTowerMaker.h:181
xAOD::TriggerTower_v2::setCorrectionEnabled
void setCorrectionEnabled(const std::vector< uint8_t > &)
set correctionEnabled
AthCommonMsg< Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
LVL1::Run2TriggerTowerMaker::m_deadChannelsKey
SG::ReadCondHandleKey< L1CaloPpmDeadChannelsContainer > m_deadChannelsKey
Definition: Run2TriggerTowerMaker.h:145
LVL1::Run2TriggerTowerMaker::m_disabledTowersKey
SG::ReadCondHandleKey< L1CaloDisabledTowersContainer > m_disabledTowersKey
Definition: Run2TriggerTowerMaker.h:144
CaloLVL1_ID::sampling
int sampling(const Identifier id) const
return sampling according to :
Definition: CaloLVL1_ID.h:641
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
LVL1::Run2TriggerTowerMaker::m_chanCalibKeyoverlay
std::string m_chanCalibKeyoverlay
Definition: Run2TriggerTowerMaker.h:146
LVL1::Run2TriggerTowerMaker::m_cellType
int m_cellType
Definition: Run2TriggerTowerMaker.h:125
L1CaloPprChanCalib::lutCpPar3
short lutCpPar3() const
Definition: L1CaloPprChanCalib.h:45
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
LVL1::Run2TriggerTowerMaker::m_chanCalibContainer
const L1CaloPprChanCalibContainer * m_chanCalibContainer
Definition: Run2TriggerTowerMaker.h:177
LArDigits2NtupleDumper.nSamples
nSamples
Definition: LArDigits2NtupleDumper.py:85
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
LVL1::Run2TriggerTowerMaker::m_requireAllCalos
bool m_requireAllCalos
Definition: Run2TriggerTowerMaker.h:139
L1CaloPprChanDefaults::satOverride3
int satOverride3() const
Definition: L1CaloPprChanDefaults.h:28
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
L1CaloPprChanDefaults::decisionSource
int decisionSource() const
Definition: L1CaloPprChanDefaults.h:30
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
xAOD::TriggerTower_v2::setBcidExt
void setBcidExt(const std::vector< uint8_t > &)
set bcidExt
LVL1::Run2TriggerTowerMaker::m_maxIetaBins
constexpr static unsigned int m_maxIetaBins
Definition: Run2TriggerTowerMaker.h:115
L1CaloPprChanCalib::lutJepPar2
short lutJepPar2() const
Definition: L1CaloPprChanCalib.h:53
LVL1::Run2TriggerTowerMaker::m_bstowertool
ToolHandle< LVL1BS::ITrigT1CaloDataAccessV2 > m_bstowertool
Definition: Run2TriggerTowerMaker.h:157
LVL1::Run2TriggerTowerMaker::digitize
void digitize(const EventContext &ctx)
Convert analogue pulses to digits.
Definition: Run2TriggerTowerMaker.cxx:1136
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:51
LVL1::Run2TriggerTowerMaker::m_HadTTL1ContainerName
SG::ReadHandleKey< LArTTL1Container > m_HadTTL1ContainerName
Definition: Run2TriggerTowerMaker.h:277
overlay
bool overlay
Definition: listroot.cxx:42
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
TileDCSDataPlotter.tt
tt
Definition: TileDCSDataPlotter.py:876
LVL1::TrigT1CaloDefs::xAODTriggerTowerRerunLocation
static const std::string xAODTriggerTowerRerunLocation
Definition: TrigT1CaloDefs.h:37
LVL1::Run2TriggerTowerMaker::m_ZeroSuppress
bool m_ZeroSuppress
Definition: Run2TriggerTowerMaker.h:136
LVL1::Run2TriggerTowerMaker::IsGoodTower
bool IsGoodTower(const xAOD::TriggerTower *tt, const L1CaloPpmDeadChannelsContainer *dead, const L1CaloDisabledTowersContainer *disabled) const
Definition: Run2TriggerTowerMaker.cxx:390
LArTTL1
Liquid Argon TT L1 sum class.
Definition: LArTTL1.h:29
LVL1::Run2TriggerTowerMaker::m_deadChannelsContaineroverlay
L1CaloPpmDeadChannelsContainer * m_deadChannelsContaineroverlay
Definition: Run2TriggerTowerMaker.h:183
LVL1::Run2TriggerTowerMaker::m_inputTTLocation
SG::ReadHandleKey< xAOD::TriggerTowerContainer > m_inputTTLocation
Definition: Run2TriggerTowerMaker.h:269
match
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition: hcg.cxx:356
LVL1::Run2TriggerTowerMaker::m_gainCorr
double m_gainCorr
Definition: Run2TriggerTowerMaker.h:132
fitman.k
k
Definition: fitman.py:528
xAOD::TriggerTower
TriggerTower_v2 TriggerTower
Define the latest version of the TriggerTower class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/TriggerTower.h:16
LVL1::Run2TriggerTowerMaker::m_chanDefaultsKey
SG::ReadCondHandleKey< L1CaloPprChanDefaultsContainer > m_chanDefaultsKey
Definition: Run2TriggerTowerMaker.h:143
LVL1::Run2TriggerTowerMaker::m_outputLocationRerun
SG::WriteHandleKey< xAOD::TriggerTowerContainer > m_outputLocationRerun
Definition: Run2TriggerTowerMaker.h:273
xAOD::TriggerTower_v2::adc
const std::vector< uint16_t > & adc() const
get adc
L1CaloPprChanDefaults::bcidDecision2
int bcidDecision2() const
Definition: L1CaloPprChanDefaults.h:25
ServiceHandle< IIncidentSvc >
L1CaloPprChanCalib::pedMean
double pedMean() const
Definition: L1CaloPprChanCalib.h:24
TileInfo::TTL1Calib
double TTL1Calib(const Identifier &) const
Returns the factor which converts amplitude in pCb to mV in TTL1.
Definition: TileInfo.h:112
L1CaloPprChanDefaults::satOverride1
int satOverride1() const
Definition: L1CaloPprChanDefaults.h:24
Identifier
Definition: IdentifierFieldParser.cxx:14