![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
25 #include "Gaudi/Property.h"
33 #include "CLHEP/Matrix/Matrix.h"
45 static const InterfaceID IID_ITileRawChannelBuilderQIEFilter(
"TileRawChannelBuilderQIEFilter", 1, 0);
48 return IID_ITileRawChannelBuilderQIEFilter;
51 #define TILE_QIEFilterBUILDERVERBOSE false
69 declareInterface < TileRawChannelBuilder > (
this);
70 declareInterface < TileRawChannelBuilderQIEFilter > (
this);
134 return StatusCode::FAILURE;
142 return StatusCode::SUCCESS;
164 return StatusCode::SUCCESS;
171 float pedestal = 10.;
243 for (
unsigned int i = 0;
i <
m_digits.size();
i++) {
253 for (
unsigned int i = 0;
i <
m_digits.size();
i++) {
318 float minDigit = *minMaxDigits.first;
319 float maxDigit = *minMaxDigits.second;
321 if (maxDigit - minDigit < 0.01) {
325 ATH_MSG_VERBOSE(
"CASE NO SIGNAL: maxdig-mindig = " << maxDigit <<
"-" << minDigit <<
" = " << maxDigit - minDigit);
415 float fraction_mean = 0;
459 const float avg_fraction = 0.18;
460 const float Q_1pe = 17.;
488 double prob_cut_off = 0.005;
498 fraction_mean =
m_digits[4] / amplitude;
500 if (fraction_mean > avg_fraction) {
501 int n = (
int) (amplitude / Q_1pe);
506 double binom_coeff = 1.;
508 for (
int j =
n; j > 0; j--) {
510 binom_coeff = binom_coeff * (
double) j;
513 binom_coeff = binom_coeff / (
double) j;
517 double prob = binom_coeff *
pow(avg_fraction,
k) *
pow(1. - avg_fraction,
n -
k);
519 if (
prob < prob_cut_off) {
521 amplitude *= 1. / (1. - avg_fraction);
527 bool goodEnergy = (fabs(amplitude) > 1.0e-04);
542 if (fabs(
chi2) > 1.0
e-04 || goodEnergy) {
virtual StatusCode initialize()
Initialize method.
int NdigitSamples() const
Returns the number of sammples (digits) per event.
int m_nSignal
internal counters
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const TileHWID * m_tileHWID
int findMaxDigitPosition()
Finds maximum digit position in the pulse.
virtual StatusCode initialize()
Initializer.
bool msgLvl(const MSG::Level lvl) const
#define ATH_MSG_VERBOSE(x)
HWIdentifier adc_HWID(void) const
int m_nConst
internal counters
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
void assign(const HWIdentifier &id, float amplitude, float time, float quality, float ped=0.0)
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
std::vector< float > m_digits
TileFragHash::TYPE m_rChType
int adc(const HWIdentifier &id) const
extract adc field from HW identifier
virtual StatusCode finalize()
Finalize method.
static const InterfaceID & interfaceID()
AlgTool InterfaceID.
float compute(int ros, int drawer, int channel, float &litude, float &time)
< Apply the number of iterations needed for reconstruction by calling the Filter method
SG::WriteHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
::StatusCode StatusCode
StatusCode definition for legacy code.
double chi2(TH1 *h0, TH1 *h1)
#define CHECK(...)
Evaluate an expression and check for errors.
float filter(int ros, int drawer, int channel, float &litude, float &time)
< Applies OF algorithm
pointer nextElementPtr()
obtain the next available element in pool by pointer pool is resized if its limit has been reached On...
const std::vector< float > & samples() const
const TileInfo * m_tileInfo
Helpers for checking error return status codes and reporting errors.
int m_nSamples
number of samples in the data
virtual TileRawChannel * rawChannel(const TileDigits *digits, const EventContext &ctx)
Builder virtual method to be implemented by subclasses.
int drawer(const HWIdentifier &id) const
extract drawer field from HW identifier
def time(flags, cells_name, *args, **kw)
TileRawChannelBuilderQIEFilter(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
~TileRawChannelBuilderQIEFilter()
Destructor.
int m_pedestalMode
pedestal mode to use
std::string to_string(const HWIdentifier &id, int level=0) const
extract all fields from HW identifier HWIdentifier get_all_fields ( const HWIdentifier & id,...