|
ATLAS Offline Software
|
Go to the documentation of this file.
6 #include "GaudiKernel/SystemOfUnits.h"
28 return StatusCode::SUCCESS;
32 return StatusCode::SUCCESS;
41 auto outputContainerCellPtr = std::make_unique<CaloCellContainer>(
SG::VIEW_ELEMENTS);
48 outputContainerCellPtr->reserve( hash_max );
73 if (!(*cabling)->isOnlineConnected(
id))
continue;
77 const std::vector<short>& samples=
digit->samples();
78 const size_t nSamples=samples.size();
89 return StatusCode::FAILURE;
94 return StatusCode::FAILURE;
98 std::vector<float> samp_no_ped(
nSamples,0.0);
100 samp_no_ped[
i]=samples[
i]-
p;
107 bool passBCIDmax=
false;
109 size_t nOFC=ofca.size();
112 <<
". Found " <<
nSamples <<
", expect at least " << nOFC+2 <<
".");
115 for (
size_t i=0;
i<nOFC;++
i) {
116 A+=
static_cast<double>(samp_no_ped[
i+1])*ofca[
i];
120 for (
size_t i=0;
i<nOFC;++
i) {
121 Abefore+=
static_cast<double>(samp_no_ped[
i])*ofca[
i];
125 for (
size_t i=0;
i<nOFC;++
i) {
126 Aafter+=
static_cast<double>(samp_no_ped[
i+2])*ofca[
i];
129 if ( (
A>Abefore) && (
A>Aafter) ) passBCIDmax=
true;
133 const float E=adc2mev[0]+
A*adc2mev[1];
146 for (
size_t i=0;
i<nOFC;++
i) {
147 At+=
static_cast<double>(samp_no_ped[
i+1])*ofcb[
i];
150 tau=(std::fabs(
A)>0.1) ? At/
A : 0.0;
151 const auto& fullShape=shapes->
Shape(
id,
gain);
164 <<
" gain " <<
gain);
167 nOFC=fullShape.size()-firstSample;
170 const float* shape=&*fullShape.begin()+firstSample;
178 <<
" gain " <<
gain <<
". Will not use shape derivative.");
182 const float* shapeDer=&*fullshapeDer.begin()+firstSample;
183 for (
size_t i=0;
i<nOFC;++
i) {
184 q +=
std::pow((
A*(shape[
i]-tau*shapeDer[
i])-(samp_no_ped[
i+1])),2);
190 for (
size_t i=0;
i<nOFC;++
i) {
195 int iqua =
static_cast<int>(
q);
196 if (iqua > 0xFFFF) iqua=0xFFFF;
197 iquaShort =
static_cast<uint16_t>(iqua & 0xFFFF);
210 float et =
ss->et()*1
e-3;
216 ss->setProvenance(prov);
218 ss->setQuality(iquaShort);
219 outputContainerCellPtr->push_back(
ss);
224 ATH_CHECK(outputContainer.
record(std::move(outputContainerCellPtr) ) );
226 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
StatusCode initialize() override
virtual float pedestal(const HWIdentifier &id, int gain) const =0
const LArVectorProxy ADC2MEV(const HWIdentifier &id, int gain) const
Extra patterns decribing particle interation process.
SG::ReadCondHandleKey< ILArPedestal > m_pedestalKey
Gaudi::Property< int > m_firstSample
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Gaudi::Property< bool > m_absECutFortQ
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
virtual OFCRef_t OFC_b(const HWIdentifier &id, int gain, int tbin=0) const =0
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
virtual ShapeRef_t ShapeDer(const HWIdentifier &id, int gain, int tbin=0, int mode=0) const =0
void reserve(unsigned int size)
Set the desired capacity.
#define ATH_MSG_VERBOSE(x)
Definition of CaloDetDescrManager.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
SG::ReadHandleKey< LArDigitContainer > m_digitKey
pointer nextElementPtr()
obtain the next available element in pool by pointer pool is resized if its limit has been reached On...
virtual float timeOffset(const HWIdentifier &CellID, int gain) const =0
bool isHECchannel(const HWIdentifier id) const override final
Liquid Argon digit base class.
::StatusCode StatusCode
StatusCode definition for legacy code.
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_caloSuperCellMgrKey
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Gaudi::Property< float > m_eCutFortQ
const LArOnline_SuperCellID * m_onlineId
SG::WriteHandleKey< CaloCellContainer > m_cellKey
SG::ReadCondHandleKey< LArADC2MeV > m_adc2MeVKey
Gaudi::Property< bool > m_useShapeDer
StatusCode execute(const EventContext &ctx) const override
size_type channelHashMax(void) const
Define channel hash tables max size.
SG::ReadCondHandleKey< ILArOFC > m_ofcKey
StatusCode initialize(bool used=true)
SG::ReadCondHandleKey< ILArShape > m_shapeKey
StatusCode finalize() override
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
Data object for each calorimeter readout cell.
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
virtual OFCRef_t OFC_a(const HWIdentifier &id, int gain, int tbin=0) const =0
access to OFCs by online ID, gain, and tbin (!=0 for testbeam)
std::string channel_name(const HWIdentifier id) const
Return a string corresponding to a feedthrough name given an identifier.
unsigned int allocated()
return size already allocated OK
constexpr int pow(int base, int exp) noexcept
virtual ShapeRef_t Shape(const HWIdentifier &id, int gain, int tbin=0, int mode=0) const =0