|
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 |
|
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 377 of file L1CaloRampMaker.cxx.
384 (
cell->time()*oneOverNCells))));
387 if(!(
cell->provenance() & 0x100)) {
388 it->second.first += 1;
390 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 116 of file L1CaloRampMaker.cxx.
123 <<
" events, skipping the rest" );
126 return StatusCode::SUCCESS;
134 return StatusCode::SUCCESS;
139 if(!
sc.isSuccess()) {
142 return StatusCode::RECOVERABLE;
146 const EventContext& ctx = getContext();
150 const unsigned evt=ctx.eventID().event_number();
166 std::string gainStrategy(
"");
172 bool consistent(
true);
173 for (; itr != itrE; ++itr) {
174 const unsigned int channel = itr->first;
177 const std::string
strategy(attrList[
"name"].data<std::string>());
178 const std::string
status(attrList[
"status"].data<std::string>());
181 <<
", status = " <<
status );
182 if (gainStrategy ==
"") gainStrategy =
strategy;
183 else if (gainStrategy !=
strategy) consistent =
false;
185 std::string newStrategy(
"");
186 if (
runNumber == 219978) newStrategy =
"GainOneOvEmecFcalLowEta";
187 if (
runNumber == 219979) newStrategy =
"GainOneOvEmbFcalHighEta";
188 if (
runNumber == 219980) newStrategy =
"CalibGainsEt";
189 if (
runNumber == 220013) newStrategy =
"GainOneOvEmecFcalLowEta";
190 if (
runNumber == 220014) newStrategy =
"GainOneOvEmbFcalHighEta";
191 if (
runNumber == 220015) newStrategy =
"CalibGainsEt";
192 if (
runNumber == 222871) newStrategy =
"GainOne";
193 if (
runNumber == 222872) newStrategy =
"GainOne";
194 if (
runNumber == 222873) newStrategy =
"GainOne";
195 if (
runNumber == 223073) newStrategy =
"GainOne";
196 if (
runNumber == 223074) newStrategy =
"GainOne";
197 if (
runNumber == 223075) newStrategy =
"GainOne";
198 if (newStrategy !=
"") {
199 ATH_MSG_INFO(
"Changing Gain Strategy to " << newStrategy);
200 gainStrategy = newStrategy;
202 if (gainStrategy !=
"" && consistent) {
203 m_isGain1 = (gainStrategy.find(
"GainOne") != std::string::npos);
204 m_isOvEmb = (gainStrategy.find(
"OvEmb") != std::string::npos);
205 m_isOvEmec = (gainStrategy.find(
"OvEmec") != std::string::npos);
206 m_isFcalLowEta = (gainStrategy.find(
"FcalLowEta") != std::string::npos);
207 m_isFcalHighEta = (gainStrategy.find(
"FcalHighEta") != std::string::npos);
208 }
else if (gainStrategy ==
"") {
239 for(
auto *
tt : *tts) {
241 if(
tt->isJepSaturated())
continue;
244 auto max = std::max_element(
tt->adc().begin(),
tt->adc().end());
250 if(
m_ttTool->disabledChannel(
tt->coolId()))
continue;
266 if(specialChannelIt == specialChannelRangeEnd || level1Energy < specialChannelIt->
second) {
267 ATH_MSG_DEBUG(
"Adding Energy for " <<
tt->coolId() <<
":" << caloEnergy <<
" vs. " << level1Energy);
271 specialChannelIt->second = -1000;
279 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 394 of file L1CaloRampMaker.cxx.
399 std::ofstream bad_ofciter(
"bad-ofciter.txt");
402 bad_ofciter <<
"0x" << std::hex <<
it->first <<
" "
409 return StatusCode::SUCCESS;
◆ getCaloEnergy()
Definition at line 300 of file L1CaloRampMaker.cxx.
303 auto id =
m_ttTool->identifier(
tt->eta(),
tt->phi(),
tt->sampling());
306 if(
tt->sampling() == 0) {
311 std::vector<float> etRec =
m_jmTools->hadTTCellsEtByReceiver(&
T);
312 if (etRec.size() == 2) {
315 else et = etRec[0] + etRec[1];
316 }
else if (etRec.size() == 1)
et = etRec[0];
322 std::vector<float> energyRec =
m_jmTools->emTTCellsEnergyByReceiver(&
T);
323 if (energyRec.size() == 2) {
326 else energy = energyRec[1];
328 }
else et = energyRec[0] / std::cosh(
tt->eta());
330 et = ttCellsEnergy(*
tt) / std::cosh(
tt->eta());
◆ getTriggerTowerEnergy()
Definition at line 338 of file L1CaloRampMaker.cxx.
340 auto max = std::max_element(
tt->adc().begin(),
tt->adc().end());
342 if(!pprChanCalib->pprChanCalib(
tt->coolId())) {
344 << std::hex <<
tt->coolId() << std::dec <<
"!");
348 double energy = (*
max -
int( pprChanCalib->pprChanCalib(
tt->coolId())->pedValue())) * 0.25;
349 ATH_MSG_DEBUG(
"PedValue " <<
tt->coolId() <<
":" <<
int( pprChanCalib->pprChanCalib(
tt->coolId())->pedValue()) );
358 auto id =
m_ttTool->identifier(
tt->eta(),
tt->phi(),
tt->sampling());
361 if(fabs(
tt->eta()) > 2.5) {
363 }
else if(fabs(
tt->eta()) > 1.9) {
◆ initialize()
StatusCode L1CaloRampMaker::initialize |
( |
| ) |
|
Definition at line 91 of file L1CaloRampMaker.cxx.
101 return StatusCode::FAILURE;
113 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()
◆ 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_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)
const_iterator end() const
Extra patterns decribing particle interation process.
SG::ReadCondHandleKey< CondAttrListCollection > m_strategy
uint64_t eventNumber() const
The current event's event number.
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....
uint32_t runNumber() const
The current event's run 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.
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