|
ATLAS Offline Software
|
Go to the documentation of this file.
18 m_ntpath =
"/NTUPLES/FILE1/LARDIGITS";
31 if (
sc!=StatusCode::SUCCESS) {
37 if (
sc!=StatusCode::SUCCESS) {
43 if (
sc!=StatusCode::SUCCESS) {
50 if (
sc!=StatusCode::SUCCESS) {
58 if (
sc!=StatusCode::SUCCESS) {
108 return StatusCode::SUCCESS;
119 unsigned long long thisevent;
120 unsigned long thisbcid = 0;
121 unsigned long thisELVL1Id = 0;
124 thisevent =
evt->eventNumber();
136 thisELVL1Id = (*hdrCont->
begin())->ELVL1Id();
141 thisbcid =
evt->bcid();
149 return StatusCode::SUCCESS;
157 unsigned cellCounter=0;
163 sc =
evtStore()->retrieve(etcontainer,
"SC_ET");
164 if (
sc.isFailure()) {
ATH_MSG_WARNING(
"Unable to retrieve LArRawSCContainer with key SC_ET from DetectorStore. " );}
165 else ATH_MSG_DEBUG(
"Got LArRawSCContainer with key SC_ET " );
167 sc =
evtStore()->retrieve(etcontainer_next,
"SC_ET_ID");
168 if (
sc.isFailure()) {
ATH_MSG_WARNING(
"Unable to retrieve LArRawSCContainer with key SC_ET_ID from DetectorStore. " );}
169 else ATH_MSG_DEBUG(
"Got LArRawSCContainer with key SC_ET_ID" );
173 for(
const LArDigit *digi : DigitContainer ){
175 unsigned int trueMaxSample = digi->nsamples();
179 m_gain[cellCounter] = digi->gain();
185 ATH_MSG_WARNING(
"The number of samples in data is larger than the one specified by JO: " << trueMaxSample <<
" > " <<
m_Nsamples <<
" --> only " <<
m_Nsamples <<
" will be available in the ntuple " );
194 for(
unsigned i = 0;
i<trueMaxSample;++
i)
m_samples[cellCounter][
i] = digi->samples().at(
i);
197 const LArRawSC*rawSC = etcontainer->
at(cellCounter);
199 unsigned int truenet =
m_Net;
201 if(truenet > rawSC->
bcids().size()) truenet=rawSC->
bcids().size();
202 for(
unsigned i=0;
i<truenet;++
i){
207 for(
unsigned i=0;
i<truenet;++
i){
212 if(truenet > rawSC->
satur().size()) truenet=rawSC->
satur().size();
214 for(
unsigned i = 0;
i<truenet;++
i){
221 if( etcontainer_next ){
222 const LArRawSC*rawSC = etcontainer_next->
at(cellCounter);
241 ATH_MSG_DEBUG(
"LArDigits2NtupleEB has finished, filled"<< cellCounter <<
" cells" );
242 return StatusCode::SUCCESS;
Liquid Argon SuperCell raw data.
SG::ReadHandleKey< xAOD::EventInfo > m_evtInfoKey
virtual StatusCode initialize() override
NTuple::Matrix< float > m_bcidVec_ET_ID
Container class for LArRawSC.
Gaudi::Property< unsigned int > m_Net
NTuple::Array< int > m_ntNsamples
NTuple::Matrix< float > m_bcidVec_ET
const std::string & key() const
Return the StoreGate ID for the referenced object.
const std::vector< bool > & satur() const
LArDigits2NtupleEB(const std::string &name, ISvcLocator *pSvcLocator)
NTuple::Matrix< bool > m_saturVec_ET_ID
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
NTuple::Item< short > m_bcid
Liquid Argon digit base class.
::StatusCode StatusCode
StatusCode definition for legacy code.
NTuple::Matrix< float > m_energyVec_ET
SG::ReadHandleKey< LArFebHeaderContainer > m_LArFebHeaderContainerKey
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
bool fillFromIdentifier(const HWIdentifier &id, int C)
virtual bool isValid() override final
Can the handle be successfully dereferenced?
NTuple::Matrix< float > m_energyVec_ET_ID
NTuple::Matrix< short > m_samples
Gaudi::Property< unsigned int > m_Nsamples
NTuple::Item< unsigned long long > m_IEvent
SG::ReadHandleKey< LArDigitContainer > m_contKey
const std::vector< unsigned short > & bcids() const
NTuple::Array< short > m_ELVL1Id
virtual StatusCode execute() override
#define ATH_MSG_WARNING(x)
Container class for LArDigit.
const T * at(size_type n) const
Access an element, as an rvalue.
NTuple::Array< short > m_gain
NTuple::Matrix< bool > m_saturVec_ET
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
Gaudi::Property< bool > m_isSC
const std::vector< int > & energies() const
Gaudi::Property< bool > m_fillBCID