Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
The L1CaloRampMaker creates a set of L1CaloRampData objects.
More...
#include <L1CaloRampMaker.h>
|
| L1CaloRampMaker (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~L1CaloRampMaker () |
|
StatusCode | initialize () |
|
StatusCode | execute () |
|
StatusCode | finalize () |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
std::string | m_triggerTowerContainerName |
|
std::string | m_outputFolderName |
|
std::string | m_gainStrategyFolder |
|
std::map< int, int > | m_specialChannelRange |
|
bool | m_doLAr |
|
bool | m_doTile |
|
bool | m_isGain1 |
|
bool | m_isOvEmb |
|
bool | m_isOvEmec |
|
bool | m_isFcalLowEta |
|
bool | m_isFcalHighEta |
|
bool | m_checkProvenance |
|
unsigned int | m_nEventsPerStep |
|
unsigned int | m_nSteps |
|
int | m_fadcSaturationCut |
|
double | m_tileSaturationCut |
|
ToolHandle< LVL1::IL1TriggerTowerToolRun3 > | m_ttTool |
|
ToolHandle< LVL1::IL1CaloxAODOfflineTriggerTowerTools > | m_xAODTTTools |
|
ToolHandle< LVL1::IL1CaloOfflineTriggerTowerTools > | m_jmTools |
|
unsigned int | m_nEvent |
|
bool | m_firstEvent |
|
unsigned int | m_nTTs |
|
const CaloLVL1_ID * | m_lvl1Helper |
|
std::unique_ptr< L1CaloRampDataContainer > | m_rampDataContainer |
|
std::map< unsigned int, std::pair< unsigned int, double > > | m_mapBadOFCIteration |
|
SG::ReadCondHandleKey< CondAttrListCollection > | m_strategy { this, "TRIGGER", "/TRIGGER/Receivers/Conditions/Strategy", "Strategy" } |
|
SG::ReadCondHandleKey< L1CaloPprChanCalibContainer > | m_pprChanCalibContainer { this, "InputKeyCond", "L1CaloPprChanCalibContainer"} |
|
SG::ReadCondHandleKey< L1CaloPprDisabledChannelContainerRun2 > | m_pprDisabledChannelContainer { this, "InputKeyDisabledChannel", "L1CaloPprDisabledChannelContainerRun2"} |
|
SG::ReadCondHandleKey< LArOnOffIdMapping > | m_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"} |
|
SG::ReadHandleKey< CaloCellContainer > | m_caloCellsKey { this, "CaloCellsKey", "AllCalo", "CaloCellContainer key" } |
|
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 |
|
◆ StoreGateSvc_t
◆ L1CaloRampMaker()
L1CaloRampMaker::L1CaloRampMaker |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
Definition at line 42 of file L1CaloRampMaker.cxx.
59 m_ttTool(
"LVL1::L1TriggerTowerToolRun3/L1TriggerTowerToolRun3"),
60 m_xAODTTTools(
"LVL1::L1CaloxAODOfflineTriggerTowerTools/L1CaloxAODOfflineTriggerTowerTools",
this),
61 m_jmTools(
"LVL1::L1CaloOfflineTriggerTowerTools/L1CaloOfflineTriggerTowerTools",
this),
◆ ~L1CaloRampMaker()
L1CaloRampMaker::~L1CaloRampMaker |
( |
| ) |
|
|
virtual |
◆ checkProvenance()
Definition at line 384 of file L1CaloRampMaker.cxx.
391 (
cell->time()*oneOverNCells))));
394 if(!(
cell->provenance() & 0x100)) {
395 it->second.first += 1;
397 it->second.second += (
cell->time()*oneOverNCells);
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode L1CaloRampMaker::execute |
( |
| ) |
|
Definition at line 117 of file L1CaloRampMaker.cxx.
124 <<
" events, skipping the rest" );
127 return StatusCode::SUCCESS;
135 return StatusCode::SUCCESS;
140 if(!
sc.isSuccess()) {
143 return StatusCode::RECOVERABLE;
147 const EventContext& ctx = getContext();
151 const unsigned evt=ctx.eventID().event_number();
168 std::string gainStrategy(
"");
174 bool consistent(
true);
175 for (; itr != itrE; ++itr) {
176 const unsigned int channel = itr->first;
179 const std::string
strategy(attrList[
"name"].data<std::string>());
180 const std::string
status(attrList[
"status"].data<std::string>());
183 <<
", status = " <<
status );
184 if (gainStrategy ==
"") gainStrategy =
strategy;
185 else if (gainStrategy !=
strategy) consistent =
false;
187 std::string newStrategy(
"");
188 if (
runNumber == 219978) newStrategy =
"GainOneOvEmecFcalLowEta";
189 if (
runNumber == 219979) newStrategy =
"GainOneOvEmbFcalHighEta";
190 if (
runNumber == 219980) newStrategy =
"CalibGainsEt";
191 if (
runNumber == 220013) newStrategy =
"GainOneOvEmecFcalLowEta";
192 if (
runNumber == 220014) newStrategy =
"GainOneOvEmbFcalHighEta";
193 if (
runNumber == 220015) newStrategy =
"CalibGainsEt";
194 if (
runNumber == 222871) newStrategy =
"GainOne";
195 if (
runNumber == 222872) newStrategy =
"GainOne";
196 if (
runNumber == 222873) newStrategy =
"GainOne";
197 if (
runNumber == 223073) newStrategy =
"GainOne";
198 if (
runNumber == 223074) newStrategy =
"GainOne";
199 if (
runNumber == 223075) newStrategy =
"GainOne";
200 if (newStrategy !=
"") {
201 ATH_MSG_INFO(
"Changing Gain Strategy to " << newStrategy);
202 gainStrategy = newStrategy;
204 if (gainStrategy !=
"" && consistent) {
205 m_isGain1 = (gainStrategy.find(
"GainOne") != std::string::npos);
206 m_isOvEmb = (gainStrategy.find(
"OvEmb") != std::string::npos);
207 m_isOvEmec = (gainStrategy.find(
"OvEmec") != std::string::npos);
208 m_isFcalLowEta = (gainStrategy.find(
"FcalLowEta") != std::string::npos);
209 m_isFcalHighEta = (gainStrategy.find(
"FcalHighEta") != std::string::npos);
210 }
else if (gainStrategy ==
"") {
233 <<
": old=" <<
m_nTTs <<
", new=" << tts->
size());
235 unsigned int nmiss = 0;
236 for(
auto*
tt: *tts) {
256 for(
auto *
tt : *tts) {
258 if(
tt->isJepSaturated())
continue;
261 auto max = std::max_element(
tt->adc().begin(),
tt->adc().end());
265 if(
m_ttTool->disabledChannel(
tt->coolId()))
continue;
278 if(specialChannelIt == specialChannelRangeEnd || level1Energy < specialChannelIt->
second) {
279 ATH_MSG_DEBUG(
"Adding Energy for " <<
tt->coolId() <<
":" << caloEnergy <<
" vs. " << level1Energy);
283 specialChannelIt->second = -1000;
291 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
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.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode L1CaloRampMaker::finalize |
( |
| ) |
|
Definition at line 405 of file L1CaloRampMaker.cxx.
410 std::ofstream bad_ofciter(
"bad-ofciter.txt");
413 bad_ofciter <<
"0x" << std::hex <<
it->first <<
" "
420 return StatusCode::SUCCESS;
◆ getCaloEnergy()
Definition at line 307 of file L1CaloRampMaker.cxx.
310 auto id =
m_ttTool->identifier(
tt->eta(),
tt->phi(),
tt->sampling());
313 if(
tt->sampling() == 0) {
318 std::vector<float> etRec =
m_jmTools->hadTTCellsEtByReceiver(&
T);
319 if (etRec.size() == 2) {
322 else et = etRec[0] + etRec[1];
323 }
else if (etRec.size() == 1)
et = etRec[0];
329 std::vector<float> energyRec =
m_jmTools->emTTCellsEnergyByReceiver(&
T);
330 if (energyRec.size() == 2) {
333 else energy = energyRec[1];
335 }
else et = energyRec[0] / std::cosh(
tt->eta());
337 et = ttCellsEnergy(*
tt) / std::cosh(
tt->eta());
◆ getTriggerTowerEnergy()
Definition at line 345 of file L1CaloRampMaker.cxx.
347 auto max = std::max_element(
tt->adc().begin(),
tt->adc().end());
349 if(!pprChanCalib->pprChanCalib(
tt->coolId())) {
351 << std::hex <<
tt->coolId() << std::dec <<
"!");
355 double energy = (*
max -
int( pprChanCalib->pprChanCalib(
tt->coolId())->pedValue())) * 0.25;
356 ATH_MSG_DEBUG(
"PedValue " <<
tt->coolId() <<
":" <<
int( pprChanCalib->pprChanCalib(
tt->coolId())->pedValue()) );
365 auto id =
m_ttTool->identifier(
tt->eta(),
tt->phi(),
tt->sampling());
368 if(fabs(
tt->eta()) > 2.5) {
370 }
else if(fabs(
tt->eta()) > 1.9) {
◆ initialize()
StatusCode L1CaloRampMaker::initialize |
( |
| ) |
|
Definition at line 92 of file L1CaloRampMaker.cxx.
102 return StatusCode::FAILURE;
114 return StatusCode::SUCCESS;
◆ inputHandles()
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.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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.
◆ renounce()
◆ renounceArray()
◆ setupRampDataContainer()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ validTower()
bool L1CaloRampMaker::validTower |
( |
const bool & |
isTile | ) |
|
|
private |
◆ m_cablingKey
◆ m_caloCellsKey
◆ m_checkProvenance
bool L1CaloRampMaker::m_checkProvenance |
|
private |
◆ m_detStore
◆ m_doLAr
bool L1CaloRampMaker::m_doLAr |
|
private |
◆ m_doTile
bool L1CaloRampMaker::m_doTile |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_fadcSaturationCut
int L1CaloRampMaker::m_fadcSaturationCut |
|
private |
◆ m_firstEvent
bool L1CaloRampMaker::m_firstEvent |
|
private |
◆ m_gainStrategyFolder
std::string L1CaloRampMaker::m_gainStrategyFolder |
|
private |
◆ m_isFcalHighEta
bool L1CaloRampMaker::m_isFcalHighEta |
|
private |
◆ m_isFcalLowEta
bool L1CaloRampMaker::m_isFcalLowEta |
|
private |
◆ m_isGain1
bool L1CaloRampMaker::m_isGain1 |
|
private |
◆ m_isOvEmb
bool L1CaloRampMaker::m_isOvEmb |
|
private |
◆ m_isOvEmec
bool L1CaloRampMaker::m_isOvEmec |
|
private |
◆ m_jmTools
◆ m_lvl1Helper
◆ m_mapBadOFCIteration
std::map<unsigned int, std::pair<unsigned int, double> > L1CaloRampMaker::m_mapBadOFCIteration |
|
private |
◆ m_nEvent
unsigned int L1CaloRampMaker::m_nEvent |
|
private |
◆ m_nEventsPerStep
unsigned int L1CaloRampMaker::m_nEventsPerStep |
|
private |
◆ m_nSteps
unsigned int L1CaloRampMaker::m_nSteps |
|
private |
◆ m_nTTs
unsigned int L1CaloRampMaker::m_nTTs |
|
private |
◆ m_outputFolderName
std::string L1CaloRampMaker::m_outputFolderName |
|
private |
◆ m_pprChanCalibContainer
◆ m_pprDisabledChannelContainer
◆ m_rampDataContainer
◆ m_specialChannelRange
std::map<int, int> L1CaloRampMaker::m_specialChannelRange |
|
private |
◆ m_strategy
◆ m_tileSaturationCut
double L1CaloRampMaker::m_tileSaturationCut |
|
private |
◆ m_triggerTowerContainerName
std::string L1CaloRampMaker::m_triggerTowerContainerName |
|
private |
◆ m_ttTool
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_xAODTTTools
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
bool validTower(const bool &isTile)
const_iterator end() const
Extra patterns decribing particle interation process.
SG::ReadCondHandleKey< CondAttrListCollection > m_strategy
bool is_fcal(const Identifier id) const
Test wether given tower or layer is part of the FCAL.
const CaloLVL1_ID * m_lvl1Helper
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
bool is_barrel_end(const Identifier id) const
Test wether given tower or layer is part of the EM barrel END.
std::map< unsigned int, std::pair< unsigned int, double > > m_mapBadOFCIteration
This class is a collection of AttributeLists where each one is associated with a channel number....
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
bool is_hec(const Identifier id) const
Test wether given tower or layer is part of the HEC.
void checkProvenance(const xAOD::TriggerTower *tt)
std::map< int, int > m_specialChannelRange
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
SG::ReadCondHandleKey< L1CaloPprDisabledChannelContainerRun2 > m_pprDisabledChannelContainer
virtual StatusCode sysInitialize() override
Override sysInitialize.
This class initializes the Calo (LAr and Tile) offline identifiers.
SG::ReadHandleKey< CaloCellContainer > m_caloCellsKey
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
double m_tileSaturationCut
::StatusCode StatusCode
StatusCode definition for legacy code.
const CaloLVL1_ID * getLVL1_ID(void) const
#define CHECK(...)
Evaluate an expression and check for errors.
Container of L1CaloRampData objects.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
double getTriggerTowerEnergy(const xAOD::TriggerTower *tt, SG::ReadCondHandle< L1CaloPprChanCalibContainer > pprCond)
ToolHandle< LVL1::IL1TriggerTowerToolRun3 > m_ttTool
SG::ReadCondHandleKey< L1CaloPprChanCalibContainer > m_pprChanCalibContainer
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Trigger towers are the inputs to all other parts of the calorimeter trigger.
StatusCode initialize(bool used=true)
std::string m_outputFolderName
Container class for CaloCell.
std::string m_gainStrategyFolder
static const std::string xAODTriggerTowerLocation
Class describing the basic event information.
void setupRampDataContainer(const xAOD::TriggerTowerContainer *triggerTowerContainer)
DataObjIDColl m_extendedExtraObjects
std::unique_ptr< L1CaloRampDataContainer > m_rampDataContainer
#define ATH_MSG_WARNING(x)
ChanAttrListMap::const_iterator const_iterator
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
AthAlgorithm()
Default constructor:
ToolHandle< LVL1::IL1CaloxAODOfflineTriggerTowerTools > m_xAODTTTools
unsigned int m_nEventsPerStep
bool is_tile(const Identifier id) const
Test wether given tower or layer is part of the Tile Calorimeter.
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
ToolHandle< LVL1::IL1CaloOfflineTriggerTowerTools > m_jmTools
double getCaloEnergy(const xAOD::TriggerTower *tt)
Transient class to store the RampData calculated from calibration runs.
The TriggerTowerKey object provides the key for each trigger tower depending on its eta-phi coords.
std::string m_triggerTowerContainerName