|
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 > &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 > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &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 96 of file eSuperCellTowerMapper.cxx.
102 if(!scellsCollection.isValid()){
104 return StatusCode::FAILURE;
113 int SCprov = (
cell)->provenance()&0xFFF;
114 bool isMasked = (SCprov&0x80)==0x80;
116 if (isMasked)
continue;
124 if(abs(pos_neg) == 3){
continue; }
129 bool doenergysplit {
false };
143 }
else if (slot <= 4) {
145 }
else if (slot <= 8) {
147 }
else if (slot == 9) {
158 const int phi_index = idHelper->
phi(
ID);
159 int prov = (
cell)->provenance();
217 else if (region == 1){ }
218 else if (region == 2){
eta_index += 60; }
219 else if (region == 3){
eta_index += 108; }
220 else if (region == 4){
eta_index += 80; }
221 else if (region == 5){
eta_index += 24; }
226 else if (region == 1){
eta_index += 57; }
238 FindAndConnectTower(my_eTowerContainerRaw,
sample,region,
layer,pos_neg,
eta_index,phi_index,
ID,
et,prov,doPrint);
241 return StatusCode::SUCCESS;
◆ AssignTriggerTowerMapper()
StatusCode LVL1::eSuperCellTowerMapper::AssignTriggerTowerMapper |
( |
std::unique_ptr< eTowerContainer > & |
my_eTowerContainerRaw | ) |
const |
|
overridevirtual |
Implements LVL1::IeSuperCellTowerMapper.
Definition at line 49 of file eSuperCellTowerMapper.cxx.
51 static constexpr
float pi_over_32 =
M_PI/32;
54 if(!triggerTowerCollection.isValid()){
56 return StatusCode::FAILURE;
60 for(
auto eachTower : *triggerTowerCollection) {
61 if(std::abs(eachTower->eta())<1.5 && eachTower->sampling()==1) {
62 int i_phi =
int(eachTower->phi()/pi_over_32);
64 int towerID_Modifier{100000};
65 if (eachTower->eta() > 0) {
67 towerID_Modifier = 200000;
69 int i_eta =
int(eachTower->eta() * 10) * etaSign;
70 if(i_eta * etaSign == -14) {
71 towerID_Modifier = 300000;
72 }
else if (i_eta * etaSign == 14) {
73 towerID_Modifier = 400000;
78 if((targetTower = my_eTowerContainerRaw->findTower(towerid))) {
80 ATH_MSG_WARNING(
"\n==== eSuperCellTowerMapper ============ Hadronic layer energy filled more than once - it will be ignored. (Needs investigation). Please report this!");
82 targetTower->
setET(10,
int(eachTower->cpET()) * 500., 4);
84 ATH_MSG_WARNING(
"\n==== eSuperCellTowerMapper ============ Tower id is officially unknown - it will be ignored. (Needs investigation). Please report this!");
88 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()
Definition at line 834 of file eSuperCellTowerMapper.cxx.
835 std::string sampleName =
"";
853 ATH_MSG_DEBUG(
"\n==== jSuperCellTowerMapper ============ Supercell has invalid CaloSampling value: " <<
sample <<
" (Needs investigation). Please report this!");
◆ 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 256 of file eSuperCellTowerMapper.cxx.
260 bool doenergysplit =
false;
263 bool validcell =
true;
270 int towerID_Modifier = -999999999;
367 towerphi = phi_index;
370 if(pos_neg < 0){ towerID_Modifier = 300000; }
371 else if(pos_neg > 0){ towerID_Modifier = 400000; }
375 if(pos_neg < 0){ towerID_Modifier = 100000; }
376 else if(pos_neg > 0){ towerID_Modifier = 200000; }
394 towerphi = phi_index;
395 if(pos_neg < 0){ towerID_Modifier = 100000; }
396 else if(pos_neg > 0){ towerID_Modifier = 200000; }
398 else if (region == 1){
400 towerphi = phi_index;
401 if(pos_neg < 0){ towerID_Modifier = 300000; }
402 else if(pos_neg > 0){ towerID_Modifier = 400000; }
405 ATH_MSG_DEBUG(
"[CaloSampling::EMB1 or CaloSampling::EMB2] -> invalid 'region' value: " << region <<
" (Under investigation) ");
415 if (region == 0) { iCell = (
eta_index % 4) + 5; }
416 else if (region == 1){ iCell = 5; }
421 ATH_MSG_DEBUG(
"CaloSampling::EMBX -> invalid sample for assigning iCell value! " <<
sample <<
" (Under investigation) ");
435 towerphi = phi_index;
439 if(pos_neg < 0){ towerID_Modifier = 100000; }
440 else if(pos_neg > 0){ towerID_Modifier = 200000; }
452 towerphi = phi_index;
456 if(pos_neg < 0){ towerID_Modifier = 500000; }
457 else if(pos_neg > 0){ towerID_Modifier = 600000; }
486 towerphi = phi_index;
494 towerphi = phi_index;
503 towerphi = phi_index;
507 if(iCell == 1){ iCell = 1; doenergysplit =
false; }
508 else if( iCell == 2 ){ iCell = 1; doenergysplit =
true; }
509 else if( iCell == 3 ){ iCell = 2; doenergysplit =
false; }
510 else if( iCell == 4 ){ iCell = 3; doenergysplit =
false; }
511 else if( iCell == 5 ){ iCell = 3; doenergysplit =
true; }
512 else if( iCell == 6 ){ iCell = 4; doenergysplit =
false; }
537 towerphi = phi_index;
545 towerphi = phi_index;
552 ATH_MSG_DEBUG(
"CaloSampling::EME1 -> invalid 'region' value: " << region <<
" (Under investigation) ");
559 if(pos_neg < 0){ towerID_Modifier = 500000; }
560 else if(pos_neg > 0){ towerID_Modifier = 600000; }
562 else if(region == 0){
564 if(pos_neg < 0){ towerID_Modifier = 300000; }
565 else if(pos_neg > 0){ towerID_Modifier = 400000; }
590 towerphi = phi_index;
599 towerphi = phi_index;
606 ATH_MSG_DEBUG(
"CaloSampling::EME2 -> invalid 'region' value: " << region <<
" (Under investigation) ");
614 if(pos_neg < 0){ towerID_Modifier = 300000; }
615 else if(pos_neg > 0){ towerID_Modifier = 400000; }
619 if(pos_neg < 0){ towerID_Modifier = 300000; }
620 else if(pos_neg > 0){ towerID_Modifier = 400000; }
623 if(pos_neg < 0){ towerID_Modifier = 500000; }
624 else if(pos_neg > 0){ towerID_Modifier = 600000; }
646 towerphi = phi_index;
653 ATH_MSG_DEBUG(
"CaloSampling::EME3 -> invalid 'region' value: " << region <<
" (Under investigation) ");
659 if(pos_neg < 0){ towerID_Modifier = 500000; }
660 else if(pos_neg > 0){ towerID_Modifier = 600000; }
678 towerphi = phi_index;
688 ATH_MSG_DEBUG(
"CaloSampling::HECX -> invalid sample for assigning iCell value! " <<
sample <<
" (Under investigation) ");
704 if(pos_neg < 0){ towerID_Modifier = 500000; }
705 else if(pos_neg > 0){ towerID_Modifier = 600000; }
738 case CaloSampling::MINIFCAL0:
739 case CaloSampling::MINIFCAL1:
740 case CaloSampling::MINIFCAL2:
741 case CaloSampling::MINIFCAL3: {
752 ATH_MSG_DEBUG(
"\n==== eSuperCellTowerMapper ============ Supercell has invalid CaloSampling value: " <<
sample <<
" (Needs investigation). Please report this!");
763 if (iETower < 200000 || (iETower > 300000 && iETower < 400000) || (iETower > 500000 && iETower < 600000)) {
766 if (doenergysplit) iCell -= 1;
767 }
else if (
layer == 2) {
773 int etaIndex = (iETower%100000)/64;
774 if (iETower > 500000 && etaIndex == 24 && iCell < 5) iCell = 0;
777 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 793 of file eSuperCellTowerMapper.cxx.
796 std::string sampleName =
"";
812 ATH_MSG_DEBUG(
"\n==== eSuperCellTowerMapper ============ Supercell has invalid CaloSampling value: " <<
sample <<
" (Needs investigation). Please report this!");
819 <<
"\tLayer: " <<
layer
820 <<
"\tRegion: " << region
822 <<
"\tPhi_Index: " << phi_index
823 <<
"\tPosNeg: " << pos_neg
824 <<
"\tiETower: " << iETower
825 <<
"\tiCell: " << iCell
826 <<
"\tDoEnergySplit: " << doenergysplit
827 <<
"\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
ToolHandle< IeFEXSuperCellTowerIdProvider > m_eFEXSuperCellTowerIdProviderTool
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
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
SG::ReadHandleKey< xAOD::TriggerTowerContainer > m_triggerTowerCollectionSGKey
SG::ReadHandleKey< CaloCellContainer > m_scellsCollectionSGKey
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.
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)
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
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