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;
94 const EventContext& ctx = Gaudi::Hive::currentContext();
99 ATH_MSG_ERROR(
"Do not have cabling object LArOnOffIdMapping" );
100 return StatusCode::FAILURE;
121 std::vector<const LArDigit*> IndexDigit;
122 int nCell =
m_calo_id->calo_cell_hash_max();
123 IndexDigit.resize(nCell,
nullptr);
131 digit_container = hdlDigit.
cptr();
135 if(digit_container) {
138 for (; first_digit != end_digit; ++first_digit) {
140 Identifier id = cabling->cnvToIdentifier(hwid);
148 if(!cells.isValid()){
150 return StatusCode::FAILURE;
157 if(recocells.
isValid()) recocell_container=recocells.
cptr();
160 std::vector<int> iflag_cell;
161 iflag_cell.resize(nCell,0);
167 cell != cell_container->
end(); ++cell) {
170 double et = (*cell)->et();
176 myList.
select((*cell)->eta(),(*cell)->phi(),0.10);
177 for (
const CaloCell* cell : myList) {
179 int index2 = (int)(
m_calo_id->calo_cell_hash(cellID2));
180 iflag_cell[index2]=1;
186 cell != cell_container->
end(); ++cell) {
192 if (iflag_cell[
index]==1 ){
199 HWIdentifier hwid=cabling->createSignalChannelID(cellID);
207 pedestal = larPedestal->
pedestal(hwid,(*cell)->gain());
211 if (IndexDigit[
index]) {
212 const std::vector<short>& vSamples=(IndexDigit[
index])->samples();
213 int nsamples = vSamples.size();
214 for (
int i=0;i<std::min(32,nsamples);i++) {
221 if(recocell_container) {
236 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 with parameters:
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.
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
virtual StatusCode execute()
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
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.