ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1::Run2TriggerTowerMaker Class Reference

#include <Run2TriggerTowerMaker.h>

Inheritance 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 (const EventContext &ctx)
 Checks that the Cell Type is supported (terminates with errors if not) and calls relevant routine to look for the cells.
StatusCode finalize ()
void handle (const Incident &)
 Best if initialisation which uses COOL-derived values is done here rather than in initialize().
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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.

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).
StatusCode getTriggerTowers ()
 gets collection of input TriggerTowers for reprocessing
StatusCode getCaloTowers ()
 fetch Calorimeter Towers
void digitize (const EventContext &ctx)
 Convert analogue pulses to digits.
StatusCode preProcess (int bcid, float mu)
 Simulate PreProcessing on analogue amplitudes.
StatusCode preProcessTower (int bcid, float mu, xAOD::TriggerTower *tower)
virtual StatusCode addOverlay (int bcid, float mu)
 Add overlay data.
virtual StatusCode addOverlay (int bcid, float mu, xAOD::TriggerTower *sigTT, xAOD::TriggerTower *ovTT)
 Add the overlay TriggerTower to the signal TriggerTower.
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.
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
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.
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
StatusCode store ()
 Stores Trigger Towers in the TES, at a location defined in m_outputLocation.
void processLArTowers (const LArTTL1Container *)
 extract amplitudes from TTL1
void processTileTowers (const TileTTL1Container *)
double IDeta (const Identifier &id, const CaloLVL1_ID *caloId)
 functions to extract eta, phi coordinates from calo tower identifiers
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.
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>

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.
SG::ReadHandleKey< xAOD::EventInfom_xaodevtKey {this, "xAODEventInfoKey", "EventInfo"}
SG::ReadDecorHandleKey< xAOD::EventInfom_actMuKey { this, "actualInteractionsPerCrossingKey", m_xaodevtKey, "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
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Static Private Attributes

static constexpr int s_FIRLENGTH = 5
static constexpr int s_MEV = 1000
static constexpr 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< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ CellTypes

Constructor & Destructor Documentation

◆ Run2TriggerTowerMaker() [1/2]

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

Definition at line 80 of file Run2TriggerTowerMaker.cxx.

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

◆ ~Run2TriggerTowerMaker()

LVL1::Run2TriggerTowerMaker::~Run2TriggerTowerMaker ( )
virtual

Definition at line 150 of file Run2TriggerTowerMaker.cxx.

150{}

◆ 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 1147 of file Run2TriggerTowerMaker.cxx.

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

◆ addOverlay() [1/2]

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

Add overlay data.

Definition at line 395 of file Run2TriggerTowerMaker.cxx.

396 {
397 // Get the overlay data TTs from Bytestream
399 xAOD::TriggerTowerAuxContainer overlayDataTTsAux;
400 overlayDataTTs->setStore( &overlayDataTTsAux );
401 ATH_CHECK( m_bstowertool->loadTriggerTowers(*overlayDataTTs) ); // use L1Calo tool to fill xAOD::TriggerTowerContainer from BS
402
403 // put the overlay data TTs into a map
404 std::unordered_map<uint32_t,xAOD::TriggerTower*> overlayMap;
405 typedef std::unordered_map<uint32_t,xAOD::TriggerTower*>::iterator Itr;
406
407 // decorate the overlay TTs to indicate if they have been used or not
408 char decor_ttNotUsedInOverlay = 0;
409 char decor_ttUsedInOverlay = 1;
410 static const SG::Decorator<char> decor ("addedToSignal");
411 for (auto tt:*overlayDataTTs) {
412 // Let's exclude all dead and disabled towers
414 decor(*tt) = decor_ttNotUsedInOverlay;
415 overlayMap.insert( std::make_pair( tt->coolId() , tt ) );
416 }
417 }
418
419 // What is the size of the primary LUT readout?
420 bool findSizeOfPrimaryLUT(true);
421 unsigned int sizeOfPrimaryLUT(0);
422 uint8_t peakOfPrimary(0);
423
424 // Loop over primary TTs, match overlay TTs, and add LUT values
425 for (auto tt:*m_xaodTowers) {
426
427 // find size of primary LUT readout for first TT
428 if (findSizeOfPrimaryLUT) {
429 findSizeOfPrimaryLUT = false;
430 sizeOfPrimaryLUT = tt->lut_cp().size();
431 peakOfPrimary = tt->peak();
432 }
433
434 // Do we have a matching overlay tower?
435 Itr match = overlayMap.find( tt->coolId() );
436 if (match != overlayMap.end()) {
437
438 ATH_CHECK( addOverlay(bcid,mu,tt,(*match).second) );
439
440 // Let the overlay TT know that it has been used
441 decor(*match->second) = decor_ttUsedInOverlay;
442
443 } // end of match
444 } // end of loop over primary TTs
445
446 // Now we need to add all overlay TTs that have not been used so far
447 for (Itr i=overlayMap.begin();i!=overlayMap.end();++i) {
448 xAOD::TriggerTower* tt = (*i).second;
449 if (decor(*tt) == decor_ttNotUsedInOverlay) {
450 // Ensure that LUT vectors are the same size as the primary TTs
451 std::vector<uint8_t> overlay_lut_cp(sizeOfPrimaryLUT,0.);
452 std::vector<uint8_t> overlay_lut_jep(sizeOfPrimaryLUT,0.);
453
454 // Fill the LUT vectors
455 overlay_lut_cp.at(peakOfPrimary) = tt->cpET();
456 overlay_lut_jep.at(peakOfPrimary) = tt->jepET();
457
458 // Set the LUT vectors and peak
459 tt->setPeak( peakOfPrimary );
460 tt->setLut_cp( overlay_lut_cp );
461 tt->setLut_jep( overlay_lut_jep );
462
463 // add the overlay TT to the primary TT
464 m_xaodTowers->push_back( tt );
465 }
466 }
467
468 // Should be done!!!
469 return StatusCode::SUCCESS;
470 }
#define ATH_CHECK
Evaluate an expression and check for errors.
L1CaloDisabledTowersContainer * m_disabledTowersContaineroverlay
L1CaloPpmDeadChannelsContainer * m_deadChannelsContaineroverlay
bool IsGoodTower(const xAOD::TriggerTower *tt, const L1CaloPpmDeadChannelsContainer *dead, const L1CaloDisabledTowersContainer *disabled) const
std::unique_ptr< xAOD::TriggerTowerContainer > m_xaodTowers
virtual StatusCode addOverlay(int bcid, float mu)
Add overlay data.
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition hcg.cxx:359
SG::Decorator< T, ALLOC > Decorator
Helper class to provide type-safe access to aux data, specialized for JaggedVecElt.
Definition AuxElement.h:576
TriggerTowerContainer_v2 TriggerTowerContainer
Define the latest version of the TriggerTower container.
TriggerTower_v2 TriggerTower
Define the latest version of the TriggerTower class.
TriggerTowerAuxContainer_v2 TriggerTowerAuxContainer
Define the latest version of the TriggerTower auxiliary container.

◆ 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 473 of file Run2TriggerTowerMaker.cxx.

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

◆ 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 560 of file Run2TriggerTowerMaker.cxx.

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

◆ 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 518 of file Run2TriggerTowerMaker.cxx.

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

◆ 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 539 of file Run2TriggerTowerMaker.cxx.

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

◆ 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 1215 of file Run2TriggerTowerMaker.cxx.

1216 {
1217 int crate, module, channel;
1218 m_mappingTool->mapping(eta, phi, layer, crate, module, channel);
1219 int slot = module + 5;
1220 int pin = channel % 16;
1221 int asic = channel / 16;
1222 return L1CaloCoolChannelId(crate, L1CaloModuleType::Ppm, slot, pin, asic, false);
1223 }
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::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 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::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 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

◆ 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 1133 of file Run2TriggerTowerMaker.cxx.

1134 {
1135 CLHEP::HepRandomEngine* rndmADCs = m_rndmADCs->getEngine (ctx);
1136
1137 // Loop over all existing towers and digitize pulses
1138 for(auto tower : *m_xaodTowers) {
1139 // First process EM layer
1140 L1CaloCoolChannelId id(tower->coolId());
1141 std::vector<int> digits = ADC(rndmADCs, id, m_xaodTowersAmps[tower->index()]); // ADC simulation
1142 tower->setAdc(std::vector<uint16_t>(std::begin(digits), std::end(digits)));
1143 tower->setAdcPeak(digits.size()/2);
1144 }
1145 }
std::vector< std::vector< double > > m_xaodTowersAmps
std::vector< int > ADC(CLHEP::HepRandomEngine *rndmADCs, L1CaloCoolChannelId channel, const std::vector< double > &amps) const
Functions to simulate processing of tower signals.

◆ etaToElement()

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

Get integer eta bin

Definition at line 1225 of file Run2TriggerTowerMaker.cxx.

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

◆ EtRange()

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

Definition at line 1172 of file Run2TriggerTowerMaker.cxx.

1173 {
1174 if(et < bcidEnergyRangeLow) return 0;
1175 if(et < bcidEnergyRangeHigh) return 1;
1176 return 2;
1177 }
float et(const xAOD::jFexSRJetRoI *j)

◆ evtStore()

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

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

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode LVL1::Run2TriggerTowerMaker::execute ( const EventContext & ctx)
virtual

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

Implements AthAlgorithm.

Definition at line 307 of file Run2TriggerTowerMaker.cxx.

307 {
308 ATH_MSG_VERBOSE("Executing");
309
310 if (m_isReco && m_doOverlay) return StatusCode::SUCCESS; // nothing to to, since we did overlay and made towers during digi
311
312
313 // retrieve conditions
314 SG::ReadCondHandle<L1CaloPprChanCalibContainer> pprCalibCont(m_chanCalibKey, ctx);
315 CHECK(pprCalibCont.isValid());
316 m_chanCalibContainer = (*pprCalibCont);
317 SG::ReadCondHandle<L1CaloDisabledTowersContainer> pprDisabledTowers(m_disabledTowersKey, ctx);
318 CHECK(pprDisabledTowers.isValid());
319 m_disabledTowersContainer = (*pprDisabledTowers);
320 SG::ReadCondHandle<L1CaloPpmDeadChannelsContainer> pprDeadTowers(m_deadChannelsKey, ctx);
321 CHECK(pprDeadTowers.isValid());
322 m_deadChannelsContainer = (*pprDeadTowers);
323 SG::ReadCondHandle<L1CaloPprChanDefaultsContainer> pprChanDefaults(m_chanDefaultsKey, ctx);
324 CHECK(pprChanDefaults.isValid());
325 auto* defaults = pprChanDefaults->pprChanDefaults(0); // non-owning ptr
326 if(!defaults) {
327 ATH_MSG_ERROR("Could not retrieve channel 0 PprChanDefaults folder. Aborting ...");
328 throw std::runtime_error("Run2TriggerTowerMaker: channel 0 of PprChanDefaults not accesible");
329 }
331
332 m_rndmADCs->setSeed (m_digiEngine, ctx);
333
336 m_xaodTowers->setStore(m_xaodTowersAux.get());
337 m_xaodTowers->resize(7168); // avoid frequent reallocations
338 m_curIndex = 0u;
339
340 switch(m_cellType) {
341 case TRIGGERTOWERS:
342 ATH_MSG_VERBOSE("Looking for TriggerTower input");
344 break;
345 case TTL1:
346 ATH_MSG_VERBOSE("Looking for calo towers");
348 digitize(ctx); // digitisation
349 break;
350 default:
351 ATH_MSG_ERROR("Unsupported Cell Type!!!!!!"); return StatusCode::FAILURE;
352 }
353
354 SG::ReadHandle<xAOD::EventInfo> evt(m_xaodevtKey, ctx);
355 SG::ReadDecorHandle<xAOD::EventInfo,float> muDecor(m_actMuKey, ctx);
356 ATH_CHECK(evt.isValid());
357 ATH_CHECK(muDecor.isPresent());
358 const float mu = muDecor(0);
359
360 ATH_CHECK(preProcess(evt->bcid(), mu)); // FIR, BCID etc
361
362 if (m_doOverlay) {
363 ATH_CHECK( addOverlay(evt->bcid(), mu) );
364 }
365
366 // store them thar trigger towers
367 ATH_CHECK(store());
368
369 return StatusCode::SUCCESS;
370 }
#define ATH_MSG_VERBOSE(x)
#define CHECK(...)
Evaluate an expression and check for errors.
SG::ReadCondHandleKey< L1CaloPpmDeadChannelsContainer > m_deadChannelsKey
SG::ReadCondHandleKey< L1CaloPprChanCalibContainer > m_chanCalibKey
L1CaloPprChanDefaults m_chanDefaults
SG::ReadHandleKey< xAOD::EventInfo > m_xaodevtKey
const L1CaloPpmDeadChannelsContainer * m_deadChannelsContainer
StatusCode getTriggerTowers()
gets collection of input TriggerTowers for reprocessing
StatusCode getCaloTowers()
fetch Calorimeter Towers
void digitize(const EventContext &ctx)
Convert analogue pulses to digits.
SG::ReadDecorHandleKey< xAOD::EventInfo > m_actMuKey
SG::ReadCondHandleKey< L1CaloDisabledTowersContainer > m_disabledTowersKey
std::unique_ptr< xAOD::TriggerTowerAuxContainer > m_xaodTowersAux
StatusCode preProcess(int bcid, float mu)
Simulate PreProcessing on analogue amplitudes.
StatusCode store()
Stores Trigger Towers in the TES, at a location defined in m_outputLocation.
const L1CaloDisabledTowersContainer * m_disabledTowersContainer
SG::ReadCondHandleKey< L1CaloPprChanDefaultsContainer > m_chanDefaultsKey
@ u
Enums for curvilinear frames.
Definition ParamDefs.h:77

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::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 & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode LVL1::Run2TriggerTowerMaker::finalize ( )

Definition at line 299 of file Run2TriggerTowerMaker.cxx.

299 {
300 ATH_MSG_DEBUG("Finalizing");
301 return StatusCode::SUCCESS;
302 }
#define ATH_MSG_DEBUG(x)

◆ 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 964 of file Run2TriggerTowerMaker.cxx.

965 {
966 // Find LAr towers in TES
967 StatusCode sc1 = StatusCode::SUCCESS;
968 SG::ReadHandle<LArTTL1Container> EMTowers(m_EmTTL1ContainerName);
969 if(!EMTowers.isValid()){
970 ATH_MSG_WARNING("EM LArTTL1Container not found");
971 sc1 = StatusCode::FAILURE;
972 }
973
974 StatusCode sc2 = StatusCode::SUCCESS;
975 SG::ReadHandle<LArTTL1Container> HECTowers(m_HadTTL1ContainerName);
976 if(!HECTowers.isValid()){
977 ATH_MSG_WARNING("Had LArTTL1Container not found");
978 sc2 = StatusCode::FAILURE;
979 }
980
981 // Find Tile towers in TES
982 StatusCode sc3 = StatusCode::SUCCESS;
983 SG::ReadHandle<TileTTL1Container> TileTowers(m_TileTTL1ContainerName);
984 if(!TileTowers.isValid()){
985 ATH_MSG_WARNING("Tile LArTTL1Container not found");
986 sc3 = StatusCode::FAILURE;
987 }
988
989 if(m_requireAllCalos && ((sc1==StatusCode::FAILURE) ||
990 (sc2==StatusCode::FAILURE) ||
991 (sc3==StatusCode::FAILURE))) {
992 ATH_MSG_ERROR("Can't find calo towers - stopping processing" << endmsg
993 << "Found Em LArTTL1 : "<<sc1 << endmsg
994 << "Found Had LArTTL1 : "<<sc2 << endmsg
995 << "Found TileTTL1 : "<<sc3<< endmsg
996 );
997 return StatusCode::FAILURE;
998 }
999
1000 // lets now try to create some trigger towers
1001 if(sc1 == StatusCode::SUCCESS) {
1002 processLArTowers(EMTowers.cptr());
1003 }
1004 if(sc2 == StatusCode::SUCCESS) {
1005 processLArTowers(HECTowers.cptr());
1006 }
1007 if(sc3 == StatusCode::SUCCESS) {
1008 processTileTowers(TileTowers.cptr());
1009 }
1010
1012 // /// So clean-up m_xaodTowers before these cause problems later.
1013 m_xaodTowers->erase(std::remove_if(m_xaodTowers->begin(), m_xaodTowers->end(),
1014 [](const xAOD::TriggerTower* tt){return (tt == 0);}),
1015 m_xaodTowers->end());
1016
1017 // Remove dead and disabled towers
1018 m_xaodTowers->erase(std::remove_if(m_xaodTowers->begin(), m_xaodTowers->end(),
1019 [this](const xAOD::TriggerTower* tt){return !IsGoodTower(tt,m_deadChannelsContainer,m_disabledTowersContainer);}),
1020 m_xaodTowers->end());
1021
1022 return StatusCode::SUCCESS;
1023 }
#define endmsg
void processLArTowers(const LArTTL1Container *)
extract amplitudes from TTL1
void processTileTowers(const TileTTL1Container *)
::StatusCode StatusCode
StatusCode definition for legacy code.
DataModel_detail::iterator< DVL > remove_if(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end, Predicate pred)
Specialization of remove_if for DataVector/List.

◆ 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 937 of file Run2TriggerTowerMaker.cxx.

938 {
939 ATH_MSG_INFO("Retrieve input TriggerTowers " << m_inputTTLocation.key());
940 SG::ReadHandle<xAOD::TriggerTowerContainer> inputTTs(m_inputTTLocation);
941 ATH_CHECK(inputTTs.isValid());
942 ATH_MSG_INFO("Found " << inputTTs->size() << " input TriggerTowers");
943
944 for(const xAOD::TriggerTower* tower : *inputTTs) {
945 xAOD::TriggerTower* t = (*m_xaodTowers)[m_curIndex++] = new xAOD::TriggerTower;
946 *t = *tower;
947 }
948
950 // /// So clean-up m_xaodTowers before these cause problems later.
952 [](const xAOD::TriggerTower* tt){return (tt == 0);}),
953 m_xaodTowers->end());
954
955 // Remove dead and disabled towers
957 [this](const xAOD::TriggerTower* tt){return !IsGoodTower(tt,m_deadChannelsContainer,m_disabledTowersContainer);}),
958 m_xaodTowers->end());
959
960 return StatusCode::SUCCESS;
961 } // end of getTriggerTowers()
#define ATH_MSG_INFO(x)

◆ 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 212 of file Run2TriggerTowerMaker.cxx.

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

◆ 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 1179 of file Run2TriggerTowerMaker.cxx.

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

◆ IDphi()

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

Definition at line 1200 of file Run2TriggerTowerMaker.cxx.

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

◆ initialize()

StatusCode LVL1::Run2TriggerTowerMaker::initialize ( )

Definition at line 152 of file Run2TriggerTowerMaker.cxx.

153 {
154 ATH_MSG_DEBUG("Initialising");
155
156 ATH_CHECK(detStore()->retrieve(m_caloId));
157 ATH_CHECK(m_mappingTool.retrieve());
158 ATH_CHECK(m_TTtool.retrieve());
159 ATH_CHECK(m_rngSvc.retrieve());
160 ATH_CHECK(m_bstowertool.retrieve());
161
162 m_rndmADCs = m_rngSvc->getEngine(this, m_digiEngine);
163 if(!m_rndmADCs) {
164 ATH_MSG_ERROR("Failed to retrieve random engine");
165 return StatusCode::FAILURE;
166 }
167
168 // Listen for BeginRun
169 ServiceHandle<IIncidentSvc> incSvc("IncidentSvc",name());
170 ATH_CHECK(incSvc.retrieve());
171 incSvc->addListener(this, "BeginRun");
172
173 // reserve enough storage for the amps
174 m_xaodTowersAmps.assign(7168, std::vector<double>());
175
176 ATH_CHECK(m_xaodevtKey.initialize());
177 ATH_CHECK(m_actMuKey.initialize());
178
179 ATH_CHECK(m_inputTTLocation.initialize());
180
181 ATH_CHECK(m_EmTTL1ContainerName.initialize());
182 ATH_CHECK(m_HadTTL1ContainerName.initialize());
184 ATH_CHECK(m_outputLocation.initialize());
185
186 ATH_CHECK(m_outputLocationRerun.initialize());
187
188 //Rerun on trigger towers
189 if (m_cellType == TRIGGERTOWERS) {
194 }
195 //Start from RDO inputs
196 else if (m_cellType == TTL1) {
199 }
200
201 ATH_CHECK( m_L1MenuKey.initialize() );
202 ATH_CHECK( m_chanCalibKey.initialize() );
203 ATH_CHECK( m_chanDefaultsKey.initialize() );
204 ATH_CHECK( m_disabledTowersKey.initialize() );
205 ATH_CHECK( m_deadChannelsKey.initialize() );
206
207 return StatusCode::SUCCESS;
208 }
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)

◆ inputHandles()

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

Return this algorithm's input handles.

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

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ IsDeadChannel()

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

Database helper functions for dead and disabled towers.

Definition at line 373 of file Run2TriggerTowerMaker.cxx.

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

◆ IsDisabledChannel()

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

Definition at line 380 of file Run2TriggerTowerMaker.cxx.

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

◆ IsGoodTower()

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

Definition at line 387 of file Run2TriggerTowerMaker.cxx.

388 {
389 bool isDead = IsDeadChannel(dead->ppmDeadChannels(tt->coolId()));
390 bool isDisabled = IsDisabledChannel(disabled->disabledTowers(tt->coolId()));
391 if (!isDead && !isDisabled) return true;
392 return false;
393 }
const L1CaloPpmDeadChannels * ppmDeadChannels(unsigned int channelId) const
bool IsDeadChannel(const L1CaloPpmDeadChannels *db) const
Database helper functions for dead and disabled towers.
bool IsDisabledChannel(const L1CaloDisabledTowers *db) const

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ return false; }

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< Gaudi::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 1264 of file Run2TriggerTowerMaker.cxx.

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

◆ 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 645 of file Run2TriggerTowerMaker.cxx.

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

◆ operator=()

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

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::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 681 of file Run2TriggerTowerMaker.cxx.

682 {
683 // Loop over all existing towers and simulate preprocessor functions
684 for(auto tower : *m_xaodTowers) {
685 ATH_CHECK(preProcessTower(bcid,mu,tower));
686 }
687 return StatusCode::SUCCESS;
688 }
StatusCode preProcessTower(int bcid, float mu, xAOD::TriggerTower *tower)

◆ 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 690 of file Run2TriggerTowerMaker.cxx.

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

◆ 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 595 of file Run2TriggerTowerMaker.cxx.

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

◆ 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 1026 of file Run2TriggerTowerMaker.cxx.

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

◆ processTileTowers()

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

Definition at line 1071 of file Run2TriggerTowerMaker.cxx.

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

◆ 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< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ 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 908 of file Run2TriggerTowerMaker.cxx.

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

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::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< Gaudi::Algorithm > >.

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

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::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< Gaudi::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) {
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", m_xaodevtKey, "actualInteractionsPerCrossing", "Decoration for actual interactions per crossing" }
private

Definition at line 266 of file Run2TriggerTowerMaker.h.

266{ this, "actualInteractionsPerCrossingKey", m_xaodevtKey, "actualInteractionsPerCrossing", "Decoration for actual interactions per crossing" };

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

142{this,"ChanCalibFolderKey","/TRIGGER/L1Calo/V2/Calibration/Physics/PprChanCalib","PprChanCalib key"};

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

143{this,"ChanDefaultsFolderKey","/TRIGGER/L1Calo/V2/Configuration/PprChanDefaults","PprChanDefaults key"};

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

145{this,"DeadChannelsFolderKey","/TRIGGER/L1Calo/V2/Calibration/PpmDeadChannels","PpmDeadChannels key"};

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

144{this,"DisabledTowersFolderKey","/TRIGGER/L1Calo/V2/Conditions/DisabledTowers","DisabledTowers key"};

◆ 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< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.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.

280{ this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu", "L1 Menu" };

◆ m_mappingTool

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

Definition at line 156 of file Run2TriggerTowerMaker.h.

◆ m_maxIetaBins

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.

155{this,"TTTool","LVL1::L1TriggerTowerTool/L1TriggerTowerTool", "The trigger tower tool"};

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_xaodevtKey

SG::ReadHandleKey<xAOD::EventInfo> LVL1::Run2TriggerTowerMaker::m_xaodevtKey {this, "xAODEventInfoKey", "EventInfo"}
private

Definition at line 265 of file Run2TriggerTowerMaker.h.

265{this, "xAODEventInfoKey", "EventInfo"};

◆ 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

int LVL1::Run2TriggerTowerMaker::s_FIRLENGTH = 5
staticconstexprprivate

Definition at line 113 of file Run2TriggerTowerMaker.h.

◆ s_MEV

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: