 |
ATLAS Offline Software
|
#include <eSuperCellTowerMapper.h>
|
| eSuperCellTowerMapper (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~eSuperCellTowerMapper () |
|
virtual StatusCode | initialize () override |
| standard Athena-Algorithm method More...
|
|
virtual StatusCode | AssignSuperCellsToTowers (std::unique_ptr< eTowerContainer > &my_eTowerContainerRaw) const override |
|
virtual StatusCode | AssignTriggerTowerMapper (std::unique_ptr< eTowerContainer > &my_eTowerContainerRaw) const override |
|
virtual void | reset () const override |
|
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 | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T, V, H > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
virtual int | FindAndConnectTower (std::unique_ptr< eTowerContainer > &my_eTowerContainerRaw, CaloSampling::CaloSample sample, const int region, int layer, const int pos_neg, const int eta_index, const int phi_index, Identifier ID, float et, int prov, bool doPrint) const override |
|
virtual void | ConnectSuperCellToTower (std::unique_ptr< eTowerContainer > &my_eTowerContainerRaw, int iETower, Identifier ID, int iCell, float et, int layer, bool doenergysplit) const override |
|
virtual int | FindTowerIDForSuperCell (int towereta, int towerphi) const override |
|
virtual void | PrintCellSpec (const CaloSampling::CaloSample sample, int layer, const int region, const int eta_index, const int phi_index, const int pos_neg, int iETower, int iCell, int prov, Identifier ID, bool doenergysplit) const override |
|
std::string | DectectorName (const CaloSampling::CaloSample sample) const |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
Definition at line 28 of file eSuperCellTowerMapper.h.
◆ StoreGateSvc_t
◆ eSuperCellTowerMapper()
LVL1::eSuperCellTowerMapper::eSuperCellTowerMapper |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~eSuperCellTowerMapper()
LVL1::eSuperCellTowerMapper::~eSuperCellTowerMapper |
( |
| ) |
|
|
virtual |
◆ AssignSuperCellsToTowers()
StatusCode LVL1::eSuperCellTowerMapper::AssignSuperCellsToTowers |
( |
std::unique_ptr< eTowerContainer > & |
my_eTowerContainerRaw | ) |
const |
|
overridevirtual |
Implements LVL1::IeSuperCellTowerMapper.
Definition at line 91 of file eSuperCellTowerMapper.cxx.
97 if(!scellsCollection.isValid()){
99 return StatusCode::FAILURE;
108 int SCprov = (
cell)->provenance()&0xFFF;
109 bool isMasked = (SCprov&0x80)==0x80;
111 if (isMasked)
continue;
119 if(abs(pos_neg) == 3){
continue; }
124 bool doenergysplit {
false };
138 }
else if (slot <= 4) {
140 }
else if (slot <= 8) {
142 }
else if (slot == 9) {
153 const int phi_index = idHelper->
phi(
ID);
154 int prov = (
cell)->provenance();
212 else if (region == 1){ }
213 else if (region == 2){
eta_index += 60; }
214 else if (region == 3){
eta_index += 108; }
215 else if (region == 4){
eta_index += 80; }
216 else if (region == 5){
eta_index += 24; }
221 else if (region == 1){
eta_index += 57; }
233 FindAndConnectTower(my_eTowerContainerRaw,
sample,region,
layer,pos_neg,
eta_index,phi_index,
ID,
et,prov,doPrint);
236 return StatusCode::SUCCESS;
◆ AssignTriggerTowerMapper()
StatusCode LVL1::eSuperCellTowerMapper::AssignTriggerTowerMapper |
( |
std::unique_ptr< eTowerContainer > & |
my_eTowerContainerRaw | ) |
const |
|
overridevirtual |
Implements LVL1::IeSuperCellTowerMapper.
Definition at line 44 of file eSuperCellTowerMapper.cxx.
46 static constexpr
float pi_over_32 =
M_PI/32;
49 if(!triggerTowerCollection.isValid()){
51 return StatusCode::FAILURE;
55 for(
auto eachTower : *triggerTowerCollection) {
56 if(std::abs(eachTower->eta())<1.5 && eachTower->sampling()==1) {
57 int i_phi =
static_cast<int>(eachTower->phi()/pi_over_32);
59 int towerID_Modifier{100000};
60 if (eachTower->eta() > 0) {
62 towerID_Modifier = 200000;
64 int i_eta =
static_cast<int>(eachTower->eta() * 10) * etaSign;
65 if(i_eta * etaSign == -14) {
66 towerID_Modifier = 300000;
67 }
else if (i_eta * etaSign == 14) {
68 towerID_Modifier = 400000;
73 if((targetTower = my_eTowerContainerRaw->findTower(towerid))) {
75 ATH_MSG_WARNING(
"\n==== eSuperCellTowerMapper ============ Hadronic layer energy filled more than once - it will be ignored. (Needs investigation). Please report this!");
77 targetTower->
setET(10,
static_cast<int>(eachTower->cpET()) * 500., 4);
79 ATH_MSG_WARNING(
"\n==== eSuperCellTowerMapper ============ Tower id is officially unknown - it will be ignored. (Needs investigation). Please report this!");
83 return StatusCode::SUCCESS;
◆ ConnectSuperCellToTower()
void LVL1::eSuperCellTowerMapper::ConnectSuperCellToTower |
( |
std::unique_ptr< eTowerContainer > & |
my_eTowerContainerRaw, |
|
|
int |
iETower, |
|
|
Identifier |
ID, |
|
|
int |
iCell, |
|
|
float |
et, |
|
|
int |
layer, |
|
|
bool |
doenergysplit |
|
) |
| const |
|
overrideprivatevirtual |
◆ 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]
◆ DectectorName()
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ 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
◆ FindAndConnectTower()
int LVL1::eSuperCellTowerMapper::FindAndConnectTower |
( |
std::unique_ptr< eTowerContainer > & |
my_eTowerContainerRaw, |
|
|
CaloSampling::CaloSample |
sample, |
|
|
const int |
region, |
|
|
int |
layer, |
|
|
const int |
pos_neg, |
|
|
const int |
eta_index, |
|
|
const int |
phi_index, |
|
|
Identifier |
ID, |
|
|
float |
et, |
|
|
int |
prov, |
|
|
bool |
doPrint |
|
) |
| const |
|
overrideprivatevirtual |
Implements LVL1::IeSuperCellTowerMapper.
Definition at line 251 of file eSuperCellTowerMapper.cxx.
255 bool doenergysplit =
false;
258 bool validcell =
true;
265 int towerID_Modifier = -999999999;
362 towerphi = phi_index;
365 if(pos_neg < 0){ towerID_Modifier = 300000; }
366 else if(pos_neg > 0){ towerID_Modifier = 400000; }
370 if(pos_neg < 0){ towerID_Modifier = 100000; }
371 else if(pos_neg > 0){ towerID_Modifier = 200000; }
389 towerphi = phi_index;
390 if(pos_neg < 0){ towerID_Modifier = 100000; }
391 else if(pos_neg > 0){ towerID_Modifier = 200000; }
393 else if (region == 1){
395 towerphi = phi_index;
396 if(pos_neg < 0){ towerID_Modifier = 300000; }
397 else if(pos_neg > 0){ towerID_Modifier = 400000; }
400 ATH_MSG_DEBUG(
"[CaloSampling::EMB1 or CaloSampling::EMB2] -> invalid 'region' value: " << region <<
" (Under investigation) ");
410 if (region == 0) { iCell = (
eta_index % 4) + 5; }
411 else if (region == 1){ iCell = 5; }
416 ATH_MSG_DEBUG(
"CaloSampling::EMBX -> invalid sample for assigning iCell value! " <<
sample <<
" (Under investigation) ");
430 towerphi = phi_index;
434 if(pos_neg < 0){ towerID_Modifier = 100000; }
435 else if(pos_neg > 0){ towerID_Modifier = 200000; }
447 towerphi = phi_index;
451 if(pos_neg < 0){ towerID_Modifier = 500000; }
452 else if(pos_neg > 0){ towerID_Modifier = 600000; }
481 towerphi = phi_index;
489 towerphi = phi_index;
498 towerphi = phi_index;
502 if(iCell == 1){ iCell = 1; doenergysplit =
false; }
503 else if( iCell == 2 ){ iCell = 1; doenergysplit =
true; }
504 else if( iCell == 3 ){ iCell = 2; doenergysplit =
false; }
505 else if( iCell == 4 ){ iCell = 3; doenergysplit =
false; }
506 else if( iCell == 5 ){ iCell = 3; doenergysplit =
true; }
507 else if( iCell == 6 ){ iCell = 4; doenergysplit =
false; }
532 towerphi = phi_index;
540 towerphi = phi_index;
547 ATH_MSG_DEBUG(
"CaloSampling::EME1 -> invalid 'region' value: " << region <<
" (Under investigation) ");
554 if(pos_neg < 0){ towerID_Modifier = 500000; }
555 else if(pos_neg > 0){ towerID_Modifier = 600000; }
557 else if(region == 0){
559 if(pos_neg < 0){ towerID_Modifier = 300000; }
560 else if(pos_neg > 0){ towerID_Modifier = 400000; }
585 towerphi = phi_index;
594 towerphi = phi_index;
601 ATH_MSG_DEBUG(
"CaloSampling::EME2 -> invalid 'region' value: " << region <<
" (Under investigation) ");
609 if(pos_neg < 0){ towerID_Modifier = 300000; }
610 else if(pos_neg > 0){ towerID_Modifier = 400000; }
614 if(pos_neg < 0){ towerID_Modifier = 300000; }
615 else if(pos_neg > 0){ towerID_Modifier = 400000; }
618 if(pos_neg < 0){ towerID_Modifier = 500000; }
619 else if(pos_neg > 0){ towerID_Modifier = 600000; }
641 towerphi = phi_index;
648 ATH_MSG_DEBUG(
"CaloSampling::EME3 -> invalid 'region' value: " << region <<
" (Under investigation) ");
654 if(pos_neg < 0){ towerID_Modifier = 500000; }
655 else if(pos_neg > 0){ towerID_Modifier = 600000; }
673 towerphi = phi_index;
683 ATH_MSG_DEBUG(
"CaloSampling::HECX -> invalid sample for assigning iCell value! " <<
sample <<
" (Under investigation) ");
699 if(pos_neg < 0){ towerID_Modifier = 500000; }
700 else if(pos_neg > 0){ towerID_Modifier = 600000; }
733 case CaloSampling::MINIFCAL0:
734 case CaloSampling::MINIFCAL1:
735 case CaloSampling::MINIFCAL2:
736 case CaloSampling::MINIFCAL3: {
747 ATH_MSG_DEBUG(
"\n==== eSuperCellTowerMapper ============ Supercell has invalid CaloSampling value: " <<
sample <<
" (Needs investigation). Please report this!");
758 if (iETower < 200000 || (iETower > 300000 && iETower < 400000) || (iETower > 500000 && iETower < 600000)) {
761 if (doenergysplit) iCell -= 1;
762 }
else if (
layer == 2) {
768 int etaIndex = (iETower%100000)/64;
769 if (iETower > 500000 && etaIndex == 24 && iCell < 5) iCell = 0;
772 PrintCellSpec(
sample,
layer, region,
eta_index, phi_index, pos_neg, iETower, iCell, prov,
ID, doenergysplit);
◆ FindTowerIDForSuperCell()
int LVL1::eSuperCellTowerMapper::FindTowerIDForSuperCell |
( |
int |
towereta, |
|
|
int |
towerphi |
|
) |
| const |
|
overrideprivatevirtual |
◆ initialize()
StatusCode LVL1::eSuperCellTowerMapper::initialize |
( |
| ) |
|
|
overridevirtual |
◆ 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.
◆ interfaceID()
const InterfaceID & LVL1::IeSuperCellTowerMapper::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ 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.
◆ PrintCellSpec()
void LVL1::eSuperCellTowerMapper::PrintCellSpec |
( |
const CaloSampling::CaloSample |
sample, |
|
|
int |
layer, |
|
|
const int |
region, |
|
|
const int |
eta_index, |
|
|
const int |
phi_index, |
|
|
const int |
pos_neg, |
|
|
int |
iETower, |
|
|
int |
iCell, |
|
|
int |
prov, |
|
|
Identifier |
ID, |
|
|
bool |
doenergysplit |
|
) |
| const |
|
overrideprivatevirtual |
Implements LVL1::IeSuperCellTowerMapper.
Definition at line 788 of file eSuperCellTowerMapper.cxx.
807 ATH_MSG_DEBUG(
"\n==== eSuperCellTowerMapper ============ Supercell has invalid CaloSampling value: " <<
sample <<
" (Needs investigation). Please report this!");
814 <<
"\tLayer: " <<
layer
815 <<
"\tRegion: " << region
817 <<
"\tPhi_Index: " << phi_index
818 <<
"\tPosNeg: " << pos_neg
819 <<
"\tiETower: " << iETower
820 <<
"\tiCell: " << iCell
821 <<
"\tDoEnergySplit: " << doenergysplit
822 <<
"\tProvenance: " << prov
◆ renounce()
◆ renounceArray()
◆ reset()
void LVL1::eSuperCellTowerMapper::reset |
( |
| ) |
const |
|
overridevirtual |
◆ sysInitialize()
◆ 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_detStore
◆ m_eFEXSuperCellTowerIdProviderTool
◆ m_evtStore
◆ m_scellsCollectionSGKey
◆ m_triggerTowerCollectionSGKey
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
Extra patterns decribing particle interation process.
int region(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
virtual int FindTowerIDForSuperCell(int towereta, int towerphi) const override
The eTower class is an interface object for eFEX trigger algorithms The purposes are twofold:
std::vector< Identifier > ID
int pos_neg(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
float round(const float toRound, const unsigned int decimals)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
const std::string & key() const
Return the StoreGate ID for the referenced object.
void setSCID(Identifier ID, int cell, float et, int layer, bool doenergysplit)
Set supercell position ID.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
SG::ReadHandleKey< xAOD::TriggerTowerContainer > m_triggerTowerCollectionSGKey
SG::ReadHandleKey< CaloCellContainer > m_scellsCollectionSGKey
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
int eta(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
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.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
int phi(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
Data object for each calorimeter readout cell.
#define ATH_MSG_WARNING(x)
float getET_float(unsigned int layer, int cell=0) const
Get ET of a specified cell in MeV FLOAT VERSION.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
ToolHandle< eFEXSuperCellTowerIdProvider > m_eFEXSuperCellTowerIdProviderTool
virtual void ConnectSuperCellToTower(std::unique_ptr< eTowerContainer > &my_eTowerContainerRaw, int iETower, Identifier ID, int iCell, float et, int layer, bool doenergysplit) const override
virtual int FindAndConnectTower(std::unique_ptr< eTowerContainer > &my_eTowerContainerRaw, CaloSampling::CaloSample sample, const int region, int layer, const int pos_neg, const int eta_index, const int phi_index, Identifier ID, float et, int prov, bool doPrint) const override
Helper base class for offline cell identifiers.
void setET(int cell, float et, int layer, bool ignoreDisable=false)
virtual void PrintCellSpec(const CaloSampling::CaloSample sample, int layer, const int region, const int eta_index, const int phi_index, const int pos_neg, int iETower, int iCell, int prov, Identifier ID, bool doenergysplit) const override