36 return StatusCode::SUCCESS;
47 auto new_scell_cont = std::make_unique<CaloCellContainer> ();
50 if ( not cellsHandle.isValid() ) {
54 return StatusCode::FAILURE;
64 badchannel = *larBadChan;
68 maskedchannel = *larBadChan;
72 ATH_MSG_DEBUG(
"Got a CaloCellContainer input with size : "<<scells_from_sg->
size());
73 if ( scells_from_sg->
empty() ) {
74 ATH_MSG_WARNING(
"Got an empty input collection, maybe the key is wrong : "
78 return StatusCode::SUCCESS;
81 const EventIDBase& EIHandle = context.eventID();
82 const unsigned int bcid = EIHandle.bunch_crossing_id();
84 new_scell_cont->reserve(scells_from_sg->
size());
86 for(
const auto *
sc : *scells_from_sg){
88 Identifier off_id = cabling->cnvToIdentifier(
sc->hardwareID());
91 cell->setCaloDDE(dde);
98 bool saturation(
false);
101 energy=
sc->energies().at(0);
102 if(energy != 0. &&
sc->passTauSelection().at(0)) {
103 int Etau=
sc->tauEnergies().at(0);
104 cell->setTime((
float)Etau / energy);
105 cell->setProvenance(cell->provenance()|0x200);
108 const std::vector< unsigned short >& bcids =
sc->bcids();
109 const std::vector< int >& energies =
sc->energies();
110 const std::vector< bool>& satur =
sc->satur();
111 for(
unsigned int i=0;i<bcids.size();i++) {
114 saturation = satur[i];
122 cell->setEnergy( 12.5*energy*cosh(cell->eta()) );
128 cell->setProvenance(cell->provenance()|0x80);
135 cell->setProvenance(cell->provenance()|0x80);
141 if ( energy < -99998.0 ){
142 cell->setProvenance(cell->provenance()|0x40);
145 cell->setQuality((
unsigned short)saturation);
146 new_scell_cont->push_back( cell );
150 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Definition of CaloDetDescrManager.
LArBadXCont< LArBadChannel > LArBadChannelCont
const ServiceHandle< StoreGateSvc > & detStore() const
An algorithm that can be simultaneously executed in multiple threads.
Data object for each calorimeter readout cell.
This class groups all DetDescr information related to a CaloCell.
CaloCell_ID::SUBCALO getSubCalo() const
cell subcalo
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
size_type size() const noexcept
Returns the number of elements in the collection.
bool empty() const noexcept
Returns true if the collection is empty.
bool statusBad(PosType pb) const
Returns true if corresponding status bit its set.
bool good() const
Returns true if no problems at all (all bits at zero)
LArBC_t offlineStatus(const Identifier id) const
Query the status of a particular channel by offline ID This is the main client access method.
SG::ReadCondHandleKey< LArBadChannelCont > m_maskedContKey
OTF Channel masking for Super-Cells.
StatusCode execute(const EventContext &context) const
IntegerProperty m_bcidOffset
SG::ReadCondHandleKey< LArBadChannelCont > m_bcContKey
Bad Channel masking for Super-Cells.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
LArRAWtoSuperCell(const std::string &name, ISvcLocator *pSvcLocator)
SG::WriteHandleKey< CaloCellContainer > m_sCellContainerOutKey
Property: SG key for the output supercell LAr channel container.
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_caloMgrKey
Geometry manager.
const LArOnline_SuperCellID * m_laronline_id
SG::ReadHandleKey< LArRawSCContainer > m_sCellContainerInKey
Property: SG key for the input calorimeter cell container.
Container class for LArRawSC.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())