26 ISvcLocator* pSvcLocator)
57 ATH_MSG_INFO(
"TileRawChannelBuilder list is empty - will not do anything");
75 return StatusCode::SUCCESS;
83 const EventContext& ctx = Gaudi::Hive::currentContext();
88 if (!digitsContaner.
isValid()) {
92 return StatusCode::SUCCESS;
99 ATH_CHECK( rawChannelBuilder->createContainer(ctx) );
100 rawChannelBuilder->resetDrawer();
106 rawChannelBuilder->resetOverflows();
116 ATH_CHECK( rawChannelBuilder->build(digitsCollection, ctx) );
128 ATH_CHECK( rawChannelBuilder->commitContainer(ctx) );
133 return StatusCode::SUCCESS;
143 return StatusCode::SUCCESS;
150 Overflows_t overflows = rawChannelBuilder->getOverflowedChannels();
152 for (std::pair<TileRawChannel*, const TileDigits*>& overflow : overflows) {
164 std::vector<double> digits = pDigits->
get_digits();
165 for (
size_t ii = 0; ii<digits.size(); ii++) {
176 if ( !fitOK || nSatSamples > 2) {
183 float quality = 10000. * ( (nSatSamples) ? nSatSamples : 9);
184 if (fittedRwCh->
quality() > 99999.9) quality += 100000.;
185 rwCh->
insert(0.0, 0.0, quality);
189 float pedestal = (rwCh->
pedestal() < 29500.) ? (29400.)
192 " change ped from " << rwCh->
pedestal() <<
" to " << pedestal);
201 fittedRwCh->
quality()*(1./400.));
204 float pedestal = (rwCh->
pedestal() < 29500.) ? fittedRwCh->
pedestal() + 25000.
207 " change ped from " << rwCh->
pedestal() <<
" to " << pedestal);
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Helpers for checking error return status codes and reporting errors.
Handle class for reading from StoreGate.
std::vector< std::pair< TileRawChannel *, const TileDigits * > > Overflows_t
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
virtual bool isValid() override final
Can the handle be successfully dereferenced?
std::vector< double > get_digits(void) const
float m_overflowReplacePedestalCut
void fitOverflowedChannels(const EventContext &ctx)
ToolHandleArray< TileRawChannelBuilder > m_tileRawChannelBuilderList
Vector of builder algtools.
virtual StatusCode execute() override
Execute.
SG::ReadHandleKey< TileDigitsContainer > m_digitsContainerKey
virtual ~TileRawChannelMaker()
Destructor.
TileRawChannelMaker(const std::string &name, ISvcLocator *pSvcLocator)
Standard constructor.
float m_overflowReplaceTimeCut
virtual StatusCode finalize() override
Finalize.
const TileInfo * m_tileInfo
float m_overflowReplaceChi2Cut
ToolHandle< TileRawChannelBuilder > m_tileRawChannelBuilderFitOverflow
virtual StatusCode initialize() override
Initialize algorithm.
float pedestal(void) const
float time(int ind=0) const
float quality(int ind=0) const
void setPedestal(float ped)
int insert(float amplitude, float time, float quality)
float amplitude(int ind=0) const