9#include "Identifier/Identifier.h"
12#include "CaloGeoHelpers/CaloSampling.h"
16#include "GaudiKernel/ITHistSvc.h"
17#include "GaudiKernel/ServiceHandle.h"
44 CHECK( histSvc.retrieve() );
45 m_tree =
new TTree(
"myTree",
"myTree");
83 return StatusCode::SUCCESS;
89 return StatusCode::SUCCESS;
98 ATH_MSG_ERROR(
"Do not have cabling object LArOnOffIdMapping" );
99 return StatusCode::FAILURE;
120 std::vector<const LArDigit*> IndexDigit;
121 int nCell =
m_calo_id->calo_cell_hash_max();
122 IndexDigit.resize(nCell,
nullptr);
130 digit_container = hdlDigit.
cptr();
134 if(digit_container) {
137 for (; first_digit != end_digit; ++first_digit) {
139 Identifier id = cabling->cnvToIdentifier(hwid);
147 if(!cells.isValid()){
149 return StatusCode::FAILURE;
156 if(recocells.
isValid()) recocell_container=recocells.
cptr();
159 std::vector<int> iflag_cell;
160 iflag_cell.resize(nCell,0);
166 cell != cell_container->
end(); ++cell) {
169 double et = (*cell)->et();
175 myList.
select((*cell)->eta(),(*cell)->phi(),0.10);
176 for (
const CaloCell* cell : myList) {
178 int index2 = (int)(
m_calo_id->calo_cell_hash(cellID2));
179 iflag_cell[index2]=1;
185 cell != cell_container->
end(); ++cell) {
191 if (iflag_cell[
index]==1 ){
198 HWIdentifier hwid=cabling->createSignalChannelID(cellID);
206 pedestal = larPedestal->
pedestal(hwid,(*cell)->gain());
210 if (IndexDigit[
index]) {
211 const std::vector<short>& vSamples=(IndexDigit[
index])->samples();
212 int nsamples = vSamples.size();
213 for (
int i=0;i<std::min(32,nsamples);i++) {
220 if(recocell_container) {
235 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Helper class for offline supercell identifiers.
#define CHECK(...)
Evaluate an expression and check for errors.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
ServiceHandle< StoreGateSvc > & evtStore()
const ServiceHandle< StoreGateSvc > & detStore() const
Container class for CaloCell.
const CaloCell * findCell(const IdentifierHash theHash) const
fast find method given identifier hash.
void select(double eta, double phi, double deta, double dphi)
Data object for each calorimeter readout cell.
float time() const
get time (data member)
double energy() const
get energy (data member)
This class initializes the Calo (LAr and Tile) offline identifiers.
const CaloCell_SuperCell_ID * getCaloCell_SuperCell_ID(void) const
DataModel_detail::const_iterator< DataVector > const_iterator
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
virtual float pedestal(const HWIdentifier &id, int gain) const =0
value_type get_compact() const
Get the compact id.
This is a "hash" representation of an Identifier.
constexpr value_type value() const
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
Container class for LArDigit.
std::vector< int > m_LayerCell
std::vector< float > m_TCell
const LArOnline_SuperCellID * m_lar_online_id
std::vector< float > m_PhiCell
virtual StatusCode finalize()
const CaloCell_SuperCell_ID * m_calo_id
std::vector< float > m_ECell
SG::ReadHandleKey< CaloCellContainer > m_SCKey
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_caloMgrKey
SG::ReadHandleKey< LArDigitContainer > m_contKey
std::vector< float > m_EtaCell
std::vector< std::array< float,32 > > m_ADC
virtual StatusCode initialize()
std::vector< int > m_HwidCell
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
LArReadSC(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< std::string > m_outStream
std::vector< int > m_ChidCell
SG::ReadHandleKey< CaloCellContainer > m_SCRecoKey
std::vector< float > m_ErecoCell
virtual StatusCode execute(const EventContext &ctx)
Execute method.
Gaudi::Property< double > m_etcut
SG::ReadCondHandleKey< ILArPedestal > m_pedestalKey
std::vector< int > m_ProvCell
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
uint32_t lumiBlock() const
The current event's luminosity block number.
uint32_t bcid() const
The bunch crossing ID of the event.
@ LAr
The LAr calorimeter.
@ Error
The sub-detector issued an error.
uint32_t runNumber() const
The current event's run number.
EventFlagErrorState errorState(EventFlagSubDet subDet) const
Get the error state for a particular sub-detector.
uint64_t eventNumber() const
The current event's event number.
EventInfo_v1 EventInfo
Definition of the latest event info version.
Extra patterns decribing particle interation process.