49 NTupleFilePtr file1(
ntupleSvc(),
"/NTUPLES/FILE1");
52 return StatusCode::FAILURE;
54 NTuplePtr nt(
ntupleSvc(),
"/NTUPLES/FILE1/LARDIGITS");
56 nt=
ntupleSvc()->book(
"/NTUPLES/FILE1/LARDIGITS",CLID_ColumnWiseTuple,
"LArDigits");
60 return StatusCode::FAILURE;
80 ATH_MSG_INFO(
"======== ReadLArDigits initialize successfully ========" );
81 return StatusCode::SUCCESS;
99 return StatusCode::FAILURE;
107 unsigned cellCounter=0;
109 if (!larDigitCont.
empty())
113 for (
const LArDigit* digit : larDigitCont) {
115 const std::vector<short>& vSamples=digit->samples();
118 const Identifier id=cabling->cnvToIdentifier(chid);
119 if (
m_emId->is_lar_em(
id))
125 m_eta[cellCounter]=0;
126 m_phi[cellCounter]=0;
131 m_eta[cellCounter]=-999;
132 m_phi[cellCounter]=-999;
140 m_gain[cellCounter]=digit->gain();
142 int nSamples=vSamples.size();
143 for (
int i=0;i<nSamples && i<32;i++)
148 if (
m_eta[cellCounter]==-999 &&
m_phi[cellCounter]==-999 &&
m_layer[cellCounter]==-999)
149 m_outfile <<
"Cell l/e/p= <ILLEGAL IDENTIFIER> ";
152 <<
"/" <<
m_phi[cellCounter] <<
" ";
156 << std::dec <<
" Ch= " <<
m_channel[cellCounter] <<
" ";
157 for (
int i=0;i<nSamples;i++) {
168 return StatusCode::SUCCESS;
176 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
Handle class for reading from StoreGate.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
Helper class for offline cell identifiers.
const LArEM_ID * em_idHelper() const
access to EM idHelper
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.
const T * front() const
Access the first element in the collection as an rvalue.
bool empty() const noexcept
Returns true if the collection is empty.
Container class for LArDigit.
Liquid Argon digit base class.
const std::vector< short > & samples() const
Exception class for LAr Identifiers.
CTB: code to read digits.
SortDigits(const LArOnlineID *onlineHelper)
const LArOnlineID * m_onlineHelper
NTuple::Array< long > m_channel
NTuple::Matrix< long > m_samples
StatusCode execute(const EventContext &ctx)
Execute method.
NTuple::Array< long > m_phi
NTuple::Tuple * m_ntuplePtr
NTuple::Array< long > m_layer
NTuple::Array< long > m_barrel_ec
ReadLArDigits(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
NTuple::Array< long > m_gain
NTuple::Item< long > m_cellIndex
SG::ReadHandleKey< LArDigitContainer > m_containerKey
NTuple::Array< long > m_slot
NTuple::Array< long > m_pos_neg
const LArOnlineID * m_onlineHelper
NTuple::Array< long > m_eta
NTuple::Array< long > m_FT
NTuple::Item< long > m_Nsamples
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.