|
ATLAS Offline Software
|
Reconstructs Tile digitized pulses (ie, computes amplitude, time and pedestal) as a linear combination of the samples.
More...
#include <TileRawChannelBuilderOpt2Filter.h>
|
| TileRawChannelBuilderOpt2Filter (const std::string &type, const std::string &name, const IInterface *parent) |
| Constructor. More...
|
|
| ~TileRawChannelBuilderOpt2Filter () |
| Destructor. More...
|
|
virtual StatusCode | initialize () |
| Initialize method. More...
|
|
virtual StatusCode | finalize () |
| Finalize method. More...
|
|
virtual TileRawChannel * | rawChannel (const TileDigits *digits, const EventContext &ctx) |
| Builder virtual method to be implemented by subclasses. More...
|
|
virtual StatusCode | createContainer (const EventContext &ctx) |
| Create container in SG with name given by parameter (m_rawChannelContainerKey) More...
|
|
virtual StatusCode | commitContainer (const EventContext &ctx) |
| Commit RawChannelContiner in SG and make const. More...
|
|
void | initLog (const EventContext &ctx) |
|
void | endLog () |
|
StatusCode | build (const TileDigitsCollection *collection, const EventContext &ctx) |
|
void | resetDrawer () |
|
void | resetOverflows (void) |
|
Overflows_t & | getOverflowedChannels (void) |
|
std::string | getTileRawChannelContainerID (void) |
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
static const InterfaceID & | interfaceID () |
| AlgTool InterfaceID. More...
|
|
static double | correctAmp (double phase, bool of2=true) |
| Amplitude correction factor according to the time when using weights for tau=0 without iterations. More...
|
|
static double | correctTime (double phase, bool of2=true) |
| Time correction factor. More...
|
|
static int | CorruptedData (int ros, int drawer, int channel, int gain, const std::vector< float > &digits, float &dmin, float &dmax, float ADCmaxMinusEps, float ADCmaskValueMinusEps) |
|
static const char * | BadPatternName (float ped) |
|
|
double | filter (int ros, int drawer, int channel, int &gain, double &pedestal, double &litude, double &time, const EventContext &ctx) |
|
int | findMaxDigitPosition () |
| Finds maximum digit position in the pulse. More...
|
|
float | getPedestal (int ros, int drawer, int channel, int gain, const EventContext &ctx) |
| Apply the number of iterations needed for reconstruction by calling the Filter method. More...
|
|
int | iterate (int ros, int drawer, int channel, int gain, double &pedestal, double &litude, double &time, double &chi2, const EventContext &ctx) |
| Computes A,time,ped using OF. More...
|
|
double | compute (int ros, int drawer, int channel, int gain, double &pedestal, double &litude, double &time, double &phase, const EventContext &ctx) |
|
void | ofc2int (int nDigits, double *w_off, short *w_int, short &scale) |
|
void | fill_drawer_errors (const EventContext &ctx, const TileDigitsCollection *collection) |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
Reconstructs Tile digitized pulses (ie, computes amplitude, time and pedestal) as a linear combination of the samples.
This class implements an energy reconstruction method known as Optimal Filtering. It takes as input the digital samples from the digitizer boards in the front-end electronics and outputs the amplitude, time and pedestal of the pulse. Full details and fundaments of the method can be found in the ATL-TILECAL-2005-001 note. Two different versions of the algorithms are currently used: OF1 (with 2 parameters: amplitude and time) and OF2 (with 3 parameters (amplitude, time and pedestal).
OFCs are calculated on-the-fly (using TileCondToolOfc) or are extracted from COOL database (TileCondToolOfcCool). In case of non-iterative procedure, optionally, the initial, "best phase", can be extracted from COOL DB by means of TileCondToolTiming.
Definition at line 47 of file TileRawChannelBuilderOpt2Filter.h.
◆ StoreGateSvc_t
◆ TileRawChannelBuilderOpt2Filter()
TileRawChannelBuilderOpt2Filter::TileRawChannelBuilderOpt2Filter |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Constructor.
Definition at line 52 of file TileRawChannelBuilderOpt2Filter.cxx.
63 declareInterface< TileRawChannelBuilder >(
this );
64 declareInterface< TileRawChannelBuilderOpt2Filter >(
this);
◆ ~TileRawChannelBuilderOpt2Filter()
TileRawChannelBuilderOpt2Filter::~TileRawChannelBuilderOpt2Filter |
( |
| ) |
|
◆ BadPatternName()
const char * TileRawChannelBuilder::BadPatternName |
( |
float |
ped | ) |
|
|
staticinherited |
Definition at line 458 of file TileRawChannelBuilder.cxx.
459 static const char *
const errname[26] = {
463 "-7 - underflow and overflow",
464 "-6 - constant signal",
465 "-5 - disconnected channel",
466 "-4 - half a drawer masked",
467 "-3 - bad DQ status",
468 "-2 - underflow in all samples",
469 "-1 - overflow in all samples",
471 "1 - jump from zero to saturation",
472 "2 - samples with zeros",
473 "3 - at least two saturated. others - close to pedestal",
474 "4 - two distinct levels with at least 2 samples each",
475 "5 - pedestal with jump up in one sample",
476 "6 - pedestal with jump down in one sample",
477 "7 - signal with jump up in one sample",
478 "8 - signal with jump down in one sample",
479 "9 - base line above threshold in low gain",
480 "10 - jump down in first sample in low gain",
481 "11 - jump down in last sample in low gain",
482 "12 - jump up in one sample above const",
483 "13 - jump down in one sample below const",
484 "14 - unrecoverable timing jump",
◆ build()
Definition at line 492 of file TileRawChannelBuilder.cxx.
495 int frag = coll->identify();
506 for (; digitItr != lastDigit; ++digitItr) {
515 if (
err == -8 ||
err == -7)
m_overflows.push_back(std::make_pair(rch, (*digitItr)));
536 rawChannelCollection->
setLvl1Id(coll->getLvl1Id());
537 rawChannelCollection->
setLvl1Type(coll->getLvl1Type());
538 rawChannelCollection->
setDetEvType(coll->getDetEvType());
539 rawChannelCollection->
setRODBCID(coll->getRODBCID());
541 return StatusCode::SUCCESS;
◆ commitContainer()
StatusCode TileRawChannelBuilder::commitContainer |
( |
const EventContext & |
ctx | ) |
|
|
virtualinherited |
Commit RawChannelContiner in SG and make const.
Definition at line 544 of file TileRawChannelBuilder.cxx.
556 ATH_MSG_DEBUG(
"Incomplete container - use noise filter corrections from DSP container" );
562 ATH_MSG_WARNING(
"Problem in applying noise corrections: DSP container ("
564 }
else if (
hashes != dspHashes) {
566 "hash vectors do not match.");
575 ATH_MSG_ERROR(
" Error in applying noise corrections " << MSG::hex
576 <<
" collection IDs 0x" << coll->
identify() <<
" and 0x" << dcoll->
identify()
577 <<
" do not match " << MSG::dec );
587 while (dspItr != dspLast && adc_id != (*dspItr)->adc_HWID()) {
590 if (dspItr != dspLast) {
591 float corr = (*dspItr)->pedestal();
593 <<
" amp " << rch->amplitude() <<
" ped " << rch->pedestal()
594 <<
" corr " << corr );
596 rch->setAmplitude (rch->amplitude() - corr);
597 rch->setPedestal (rch->pedestal() + corr);
599 float ped = rch->pedestal();
601 rch->setPedestal (fmod(
ped,10000.) +
int(corr)/10000 * 10000);
607 <<
" can not find channel in DSP container with HWID "
609 dspItr = dcoll->
begin();
618 if (noiseFilterTool->process(*
m_rawChannelCnt.get(), ctx).isFailure()) {
619 ATH_MSG_ERROR(
" Error status returned from noise filter " );
636 return StatusCode::SUCCESS;
◆ compute()
double TileRawChannelBuilderOpt2Filter::compute |
( |
int |
ros, |
|
|
int |
drawer, |
|
|
int |
channel, |
|
|
int |
gain, |
|
|
double & |
pedestal, |
|
|
double & |
amplitude, |
|
|
double & |
time, |
|
|
double & |
phase, |
|
|
const EventContext & |
ctx |
|
) |
| |
|
private |
Definition at line 557 of file TileRawChannelBuilderOpt2Filter.cxx.
564 <<
" gain=" <<
gain );
566 int i = 0, digits_size =
m_digits.size();
587 for (
i = 0;
i < digits_size; ++
i) {
596 short a_int[99],
ascale = 0,
calib = 0, calib_offset = 0;
597 short b_int[99], bscale = 0;
600 int dspEnergy = 0, dspTime = 0;
607 ofc2int(digits_size,
b, b_int, bscale);
616 for (
i = 0;
i < digits_size; ++
i) {
624 for (
i = 0;
i < digits_size; ++
i) {
632 for (
i = 0;
i < digits_size; ++
i) {
642 size_t OptInd = abs(e2Dsp);
643 if (OptInd >= (
sizeof(
lookup) /
sizeof(
short))) OptInd = 0;
650 time = dspTime / 16.0;
656 dspEnergy = (dspEnergy * calib_offset + (1 << (
calib - 15 - 1))) >> (
calib - 15);
658 double goffset = (
gain == 0) ? 512 : 2048;
659 dspEnergy = (
int) (dspEnergy + goffset);
660 amplitude = (dspEnergy - goffset) / 16.;
663 bool goodEnergy = (fabs(amplitude) > 1.0e-04);
673 <<
" ... assuming 0.0" <<
endmsg;
675 <<
" ... assuming 0.0" <<
endmsg;
677 time = amplitude = 0.0;
690 for (
i = 0;
i < digits_size; ++
i) {
698 if (fabs(
chi2) > 1.0
e-04 || goodEnergy) {
709 <<
" ... assuming 0.0" <<
endmsg;
◆ correctAmp()
double TileRawChannelBuilder::correctAmp |
( |
double |
phase, |
|
|
bool |
of2 = true |
|
) |
| |
|
staticinherited |
Amplitude correction factor according to the time when using weights for tau=0 without iterations.
Definition at line 646 of file TileRawChannelBuilder.cxx.
667 a1 =
phase < 0.0 ? 0.000940774 : 0.00102111;
668 a2 =
phase < 0.0 ? 0.000759051 : 0.000689625;
669 b =
phase < 0.0 ? -2.0 * 7.0 * (a1 - a2) : 2.0 * 12.5 * (a1 - a2);
670 c =
phase < 0.0 ? 1.0 - 7.0 * 7.0 * (a1-a2) : 1.0 - 12.5 * 12.5 * (a1-a2);
671 if (phase < 12.5 && phase > -7.0) corr = a1 *
phase *
phase + 1.0;
690 double k1 = (
phase < 0.0 ? -0.0000326707:0.000380336);
691 double k2 = (
phase < 0.0 ? -0.000560962:-0.000670487);
692 double k3 = (
phase < 0.0 ? -0.00000807869:0.00000501773);
693 double k4 = (
phase < 0.0 ? -0.000000145008:0.0000000584647);
◆ correctTime()
double TileRawChannelBuilder::correctTime |
( |
double |
phase, |
|
|
bool |
of2 = true |
|
) |
| |
|
staticinherited |
◆ CorruptedData()
int TileRawChannelBuilder::CorruptedData |
( |
int |
ros, |
|
|
int |
drawer, |
|
|
int |
channel, |
|
|
int |
gain, |
|
|
const std::vector< float > & |
digits, |
|
|
float & |
dmin, |
|
|
float & |
dmax, |
|
|
float |
ADCmaxMinusEps, |
|
|
float |
ADCmaskValueMinusEps |
|
) |
| |
|
staticinherited |
Definition at line 723 of file TileRawChannelBuilder.cxx.
727 bool empty = ((eb && ((
channel > 23 && channel < 30) || channel > 41)) || (ebsp &&
channel < 3));
731 const float epsilon = 4.1;
732 const float delta[4] = { 29.9, 29.9, 49.9, 99.9 };
733 const float level1 = 99.9;
734 const float level2 = 149.9;
735 const float narrowLevel[2] = { 29.9, 49.9 };
737 std::min(narrowLevel[0], narrowLevel[1]));
738 const float secondMaxLevel = 0.3;
742 unsigned int nSamp = digits.size();
744 dmin = dmax = digits[0];
745 unsigned int pmin = 0;
746 unsigned int pmax = 0;
747 unsigned int nzero = (dmin < 0.01) ? 1 : 0;
748 unsigned int nover = (dmax > ADCmaxMinusEps) ? 1 : 0;
750 for (
unsigned int i = 1;
i < nSamp; ++
i) {
751 float dig = digits[
i];
755 }
else if (dig < dmin) {
759 if (dig < 0.01) ++nzero;
760 else if (dig > ADCmaxMinusEps) ++nover;
763 float dmaxmin = dmax - dmin;
766 if (dmin > ADCmaxMinusEps) {
767 error = (dmin > ADCmaskValueMinusEps) ? -3 : -1;
769 }
else if (dmax < 0.01) {
772 }
else if (dmaxmin < 0.01) {
775 }
else if (nzero && nover) {
778 }
else if ((nzero && (not_gap || empty)) || nzero > 1) {
781 }
else if (
gain == 0 && dmin > level2) {
784 }
else if (dmaxmin > delt) {
786 float abovemin = dmax;
787 float belowmax = dmin;
788 unsigned int nmin = 0;
789 unsigned int nmax = 0;
790 for (
unsigned int i = 0;
i < nSamp; ++
i) {
791 float smp = digits[
i];
792 if (smp - dmin < epsilon) {
795 if (dmax - smp < epsilon) {
798 if (smp < abovemin && smp > dmin) {
801 if (smp > belowmax && smp < dmax) {
806 int gainInd = (abovemin != dmax || belowmax != dmin) ?
gain + 2 :
gain;
807 bool big_jump = (dmaxmin > delta[gainInd]);
808 bool max_in_middle = (pmax > 0 && pmax < nSamp - 1);
809 bool min_in_middle = (pmin > 0 && pmin < nSamp - 1);
811 if (nover > 1 && belowmax < level1) {
813 }
else if (
nmax + nmin == nSamp && big_jump) {
814 if (
nmax > 1 && nmin > 1) {
816 }
else if (
nmax == 1) {
820 }
else if (nmin == 1) {
824 if (
error == 0 && dmaxmin > narrowLevel[
gain]) {
825 float secondMax = dmaxmin * secondMaxLevel;
826 float dminPlus = dmin + secondMax;
827 float dmaxMinus = dmax - secondMax;
829 if (max_in_middle &&
std::max(digits[pmax - 1], digits[pmax + 1]) < dminPlus) {
831 }
else if (min_in_middle &&
std::min(digits[pmin - 1], digits[pmin + 1]) > dmaxMinus) {
833 }
else if (big_jump &&
gain == 0) {
834 if (pmin == 0 && digits[1] > dmax - secondMax) {
836 }
else if (pmin == nSamp - 1 && digits[pmin - 1] > dmax - secondMax) {
841 if (!
error && big_jump) {
842 if ((max_in_middle ||
gain == 0) &&
nmax == 1 && belowmax < dminPlus) {
844 }
else if ((min_in_middle ||
gain == 0) && nmin == 1 && abovemin > dmaxMinus) {
◆ createContainer()
StatusCode TileRawChannelBuilder::createContainer |
( |
const EventContext & |
ctx | ) |
|
|
virtualinherited |
Create container in SG with name given by parameter (m_rawChannelContainerKey)
Definition at line 233 of file TileRawChannelBuilder.cxx.
243 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ endLog()
void TileRawChannelBuilder::endLog |
( |
| ) |
|
|
inherited |
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ fill_drawer_errors()
Definition at line 300 of file TileRawChannelBuilder.cxx.
305 int frag = coll->identify();
306 int ros = (frag >> 8);
307 int drawer = (frag & 0xff);
327 <<
" is bad - skipping bad patterns check " );
332 <<
" looking for bad patterns in digits" );
335 float mindig, maxdig;
336 int nchbad[2] = { 0, 0 };
342 for (; digitItr != lastDigit; ++digitItr) {
352 <<
"/" <<
gain <<
" BAD DQ STATUS ");
380 std::vector<float> digits = pDigits->
samples();
381 for (
unsigned int i = 0;
i < digits.size(); ++
i) {
388 if (mindig < 0.01)
err += 1;
398 int ndmubad[2] = { 0, 0 };
409 int ndmulimit[2] = { 3, 3 };
412 if (frag == 0x30e || frag == 0x411)
418 bool printall =
true;
419 for (
int p = 0;
p < 2; ++
p) {
420 if (ndmubad[
p] > ndmulimit[
p] && nchbad[
p] > 0) {
423 <<
" masking whole " << ((
p) ?
"second" :
"first")
442 <<
" bad patterns" <<
endmsg;
◆ filter()
double TileRawChannelBuilderOpt2Filter::filter |
( |
int |
ros, |
|
|
int |
drawer, |
|
|
int |
channel, |
|
|
int & |
gain, |
|
|
double & |
pedestal, |
|
|
double & |
amplitude, |
|
|
double & |
time, |
|
|
const EventContext & |
ctx |
|
) |
| |
|
private |
Definition at line 340 of file TileRawChannelBuilderOpt2Filter.cxx.
350 float minDigit = *minMaxDigits.first;
351 float maxDigit = *minMaxDigits.second;
353 if (maxDigit - minDigit < 0.01) {
357 ATH_MSG_VERBOSE(
"CASE NO SIGNAL: maxdig-mindig = " << maxDigit <<
"-" << minDigit
358 <<
" = " << maxDigit - minDigit );
375 <<
" drawerIdx " << drawerIdx
379 double ofcPhase(
phase);
391 <<
" new amplitude is " << amplitude );
415 int digits_size_1 =
m_digits.size() - 1;
423 <<
" OptFilterDigits[0]-OptFilterDigits[ digits_size_1]="
436 <<
" OptFilterDigits[0]-OptFilterDigits[digits_size_1]="
442 for (
int i = 0;
i <= digits_size_1;
i++)
447 amplitude = -amplitude;
456 <<
" OptFilterDigits[0]-OptFilterDigits[digits_size_1]="
468 <<
" drawerIdx " << drawerIdx
483 <<
" new amplitude is " << amplitude );
◆ finalize()
StatusCode TileRawChannelBuilderOpt2Filter::finalize |
( |
| ) |
|
|
virtual |
◆ findMaxDigitPosition()
int TileRawChannelBuilderOpt2Filter::findMaxDigitPosition |
( |
| ) |
|
|
private |
◆ getOverflowedChannels()
Overflows_t & TileRawChannelBuilder::getOverflowedChannels |
( |
void |
| ) |
|
|
inherited |
◆ getPedestal()
float TileRawChannelBuilderOpt2Filter::getPedestal |
( |
int |
ros, |
|
|
int |
drawer, |
|
|
int |
channel, |
|
|
int |
gain, |
|
|
const EventContext & |
ctx |
|
) |
| |
|
private |
◆ getTileRawChannelContainerID()
std::string TileRawChannelBuilder::getTileRawChannelContainerID |
( |
void |
| ) |
|
|
inherited |
◆ initialize()
StatusCode TileRawChannelBuilderOpt2Filter::initialize |
( |
| ) |
|
|
virtual |
◆ initLog()
void TileRawChannelBuilder::initLog |
( |
const EventContext & |
ctx | ) |
|
|
inherited |
Definition at line 246 of file TileRawChannelBuilder.cxx.
269 const unsigned int *cispar = DQstatus->
cispar();
270 if (0 == cispar[7]) {
277 m_capdaq = (cispar[7] < 10) ? 5.2 : 100.0;
282 <<
"; dophys is " << ((
m_idophys) ?
"true" :
"false")
283 <<
"; dolas is " << ((
m_idolas) ?
"true" :
"false")
284 <<
"; doped is " << ((
m_idoped) ?
"true" :
"false")
285 <<
"; docis is " << ((
m_idocis) ?
"true" :
"false")
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ interfaceID()
const InterfaceID & TileRawChannelBuilderOpt2Filter::interfaceID |
( |
| ) |
|
|
static |
◆ iterate()
int TileRawChannelBuilderOpt2Filter::iterate |
( |
int |
ros, |
|
|
int |
drawer, |
|
|
int |
channel, |
|
|
int |
gain, |
|
|
double & |
pedestal, |
|
|
double & |
amplitude, |
|
|
double & |
time, |
|
|
double & |
chi2, |
|
|
const EventContext & |
ctx |
|
) |
| |
|
private |
Computes A,time,ped using OF.
If iterations are required, the Iterator method is used
Definition at line 505 of file TileRawChannelBuilderOpt2Filter.cxx.
511 double savePhase = 0.0;
539 <<
" END ITER=" << nIterations
540 <<
" new phase=" <<
phase
542 <<
" Amp=" << amplitude );
550 <<
" Phase=" << savePhase
551 <<
" Absolute Time=" <<
time );
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ ofc2int()
void TileRawChannelBuilderOpt2Filter::ofc2int |
( |
int |
nDigits, |
|
|
double * |
w_off, |
|
|
short * |
w_int, |
|
|
short & |
scale |
|
) |
| |
|
private |
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ rawChannel()
◆ renounce()
◆ renounceArray()
◆ resetDrawer()
void TileRawChannelBuilder::resetDrawer |
( |
| ) |
|
|
inherited |
◆ resetOverflows()
void TileRawChannelBuilder::resetOverflows |
( |
void |
| ) |
|
|
inherited |
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_ADCmaskValueMinusEps
float TileRawChannelBuilder::m_ADCmaskValueMinusEps |
|
protectedinherited |
◆ m_ADCmaxMinusEps
float TileRawChannelBuilder::m_ADCmaxMinusEps |
|
protectedinherited |
◆ m_ampMinThresh
float TileRawChannelBuilder::m_ampMinThresh |
|
protectedinherited |
◆ m_badDrawer
bool TileRawChannelBuilder::m_badDrawer = false |
|
protectedinherited |
◆ m_bestPhase
bool TileRawChannelBuilderOpt2Filter::m_bestPhase |
|
private |
◆ m_bsflags
unsigned int TileRawChannelBuilder::m_bsflags |
|
protectedinherited |
◆ m_cabling
◆ m_cablingSvc
Initial value:{ this,
"TileCablingSvc", "TileCablingSvc", "The Tile cabling service"}
Name of Tile cabling service.
Definition at line 179 of file TileRawChannelBuilder.h.
◆ m_calibrateEnergy
bool TileRawChannelBuilder::m_calibrateEnergy |
|
protectedinherited |
◆ m_capdaq
double TileRawChannelBuilder::m_capdaq |
|
protectedinherited |
◆ m_chCounter
unsigned int TileRawChannelBuilder::m_chCounter |
|
protectedinherited |
◆ m_cischan
int TileRawChannelBuilder::m_cischan |
|
protectedinherited |
◆ m_confTB
bool TileRawChannelBuilderOpt2Filter::m_confTB |
|
private |
◆ m_correctAmplitude
bool TileRawChannelBuilderOpt2Filter::m_correctAmplitude |
|
private |
◆ m_correctTime
bool TileRawChannelBuilder::m_correctTime |
|
protectedinherited |
◆ m_correctTimeNI
bool TileRawChannelBuilderOpt2Filter::m_correctTimeNI |
|
private |
◆ m_dataPoollSize
int TileRawChannelBuilder::m_dataPoollSize |
|
protectedinherited |
◆ m_demoFragIDs
Gaudi::Property<std::vector<int> > TileRawChannelBuilder::m_demoFragIDs |
|
protectedinherited |
Initial value:{this,
"DemoFragIDs", {}, "List of Tile frag IDs with new electronics (demonstrator)"}
Definition at line 184 of file TileRawChannelBuilder.h.
◆ m_detStore
◆ m_digits
std::vector<float> TileRawChannelBuilderOpt2Filter::m_digits |
|
private |
◆ m_DQstatusKey
◆ m_DSPContainerKey
◆ m_emulateDsp
bool TileRawChannelBuilderOpt2Filter::m_emulateDsp |
|
private |
◆ m_error
◆ m_evtCounter
unsigned int TileRawChannelBuilder::m_evtCounter |
|
protectedinherited |
◆ m_evtStore
◆ m_f_ADCmax
float TileRawChannelBuilder::m_f_ADCmax |
|
protectedinherited |
◆ m_f_ADCmaxPlus1
float TileRawChannelBuilder::m_f_ADCmaxPlus1 |
|
protectedinherited |
◆ m_firstSample
int TileRawChannelBuilder::m_firstSample |
|
protectedinherited |
◆ m_i_ADCmax
int TileRawChannelBuilder::m_i_ADCmax |
|
protectedinherited |
◆ m_i_ADCmaxPlus1
int TileRawChannelBuilder::m_i_ADCmaxPlus1 |
|
protectedinherited |
◆ m_idocis
bool TileRawChannelBuilder::m_idocis |
|
protectedinherited |
◆ m_idolas
bool TileRawChannelBuilder::m_idolas |
|
protectedinherited |
◆ m_idoped
bool TileRawChannelBuilder::m_idoped |
|
protectedinherited |
◆ m_idophys
bool TileRawChannelBuilder::m_idophys |
|
protectedinherited |
◆ m_infoName
std::string TileRawChannelBuilder::m_infoName |
|
protectedinherited |
◆ m_lastDrawer
int TileRawChannelBuilder::m_lastDrawer = -1 |
|
protectedinherited |
◆ m_maxIterations
int TileRawChannelBuilderOpt2Filter::m_maxIterations |
|
private |
◆ m_maxTime
double TileRawChannelBuilderOpt2Filter::m_maxTime |
|
private |
◆ m_minTime
double TileRawChannelBuilderOpt2Filter::m_minTime |
|
private |
◆ m_minus1Iter
bool TileRawChannelBuilderOpt2Filter::m_minus1Iter |
|
private |
◆ m_nCenter
int TileRawChannelBuilderOpt2Filter::m_nCenter |
|
private |
◆ m_nChH
int TileRawChannelBuilder::m_nChH |
|
protectedinherited |
◆ m_nChL
int TileRawChannelBuilder::m_nChL |
|
protectedinherited |
◆ m_nConst
int TileRawChannelBuilderOpt2Filter::m_nConst |
|
private |
◆ m_nNegative
int TileRawChannelBuilderOpt2Filter::m_nNegative |
|
private |
◆ m_noiseFilterTools
◆ m_noiseThresholdHG
int TileRawChannelBuilderOpt2Filter::m_noiseThresholdHG |
|
private |
◆ m_noiseThresholdLG
int TileRawChannelBuilderOpt2Filter::m_noiseThresholdLG |
|
private |
◆ m_notUpgradeCabling
bool TileRawChannelBuilder::m_notUpgradeCabling |
|
protectedinherited |
◆ m_nSamples
int TileRawChannelBuilderOpt2Filter::m_nSamples |
|
private |
◆ m_nSignal
int TileRawChannelBuilderOpt2Filter::m_nSignal |
|
private |
◆ m_of2
bool TileRawChannelBuilderOpt2Filter::m_of2 |
|
private |
◆ m_overflows
◆ m_pedestalMode
int TileRawChannelBuilderOpt2Filter::m_pedestalMode |
|
private |
◆ m_rawChannelCnt
◆ m_rawChannelContainerKey
Initial value:{this,"TileRawChannelContainer","TileRawChannelFiltered",
"Output Tile raw channels container key"}
Definition at line 129 of file TileRawChannelBuilder.h.
◆ m_RChSumH
double TileRawChannelBuilder::m_RChSumH |
|
protectedinherited |
◆ m_RChSumL
double TileRawChannelBuilder::m_RChSumL |
|
protectedinherited |
◆ m_rChType
◆ m_rChUnit
◆ m_runType
int TileRawChannelBuilder::m_runType |
|
protectedinherited |
◆ m_t0SamplePosition
int TileRawChannelBuilderOpt2Filter::m_t0SamplePosition |
|
private |
◆ m_tileCondToolOfc
◆ m_tileHWID
◆ m_tileID
◆ m_tileIdTransforms
Initial value:{this,
"TileCondIdTransforms", "TileCondIdTransforms",
"Tile tool to tranlate hardware identifier to the drawerIdx, channel, and adc"}
Definition at line 172 of file TileRawChannelBuilder.h.
◆ m_tileInfo
◆ m_tileToolEmscale
Initial value:{this,
"TileCondToolEmscale", "TileCondToolEmscale", "Tile EM scale calibration tool"}
Definition at line 166 of file TileRawChannelBuilder.h.
◆ m_tileToolNoiseSample
Initial value:{this,
"TileCondToolNoiseSample", "TileCondToolNoiseSample", "Tile noise sample tool"}
Applies OF algorithm.
Definition at line 72 of file TileRawChannelBuilderOpt2Filter.h.
◆ m_tileToolTiming
Initial value:{this,
"TileCondToolTiming", "TileCondToolTiming", "Tile timing tool"}
Definition at line 169 of file TileRawChannelBuilder.h.
◆ m_timeForConvergence
double TileRawChannelBuilderOpt2Filter::m_timeForConvergence |
|
private |
◆ m_timeMaxThresh
float TileRawChannelBuilder::m_timeMaxThresh |
|
protectedinherited |
◆ m_timeMinThresh
float TileRawChannelBuilder::m_timeMinThresh |
|
protectedinherited |
◆ m_trigType
int TileRawChannelBuilder::m_trigType |
|
protectedinherited |
◆ m_useDSP
bool TileRawChannelBuilder::m_useDSP |
|
protectedinherited |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ MAX_CHANNELS
const int TileRawChannelBuilder::MAX_CHANNELS = 48 |
|
staticprotectedinherited |
◆ MAX_DMUS
const int TileRawChannelBuilder::MAX_DMUS = 16 |
|
staticprotectedinherited |
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
static int CorruptedData(int ros, int drawer, int channel, int gain, const std::vector< float > &digits, float &dmin, float &dmax, float ADCmaxMinusEps, float ADCmaskValueMinusEps)
void setRODBCID(uint32_t rodBCID)
Setter for BCID from ROD header.
double m_minTime
min allowed time = -25*(m_nSamples-1)/2
Const iterator class for DataVector/DataList.
TileRawChannelBuilder(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
bool m_correctTimeNI
If true, resulting time is corrected when using method without iteration.
ToolHandleArray< ITileRawChannelTool > m_noiseFilterTools
ToolHandle< TileCondToolEmscale > m_tileToolEmscale
const unsigned short lookup[2401]
double compute(int ros, int drawer, int channel, int gain, double &pedestal, double &litude, double &time, double &phase, const EventContext &ctx)
void setDetEvType(uint32_t detEvType)
Setter for detector event type from ROD header.
int NdigitSamples() const
Returns the number of sammples (digits) per event.
float m_ampMinThresh
correct amplitude if it's above amplitude threshold (in ADC counts)
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
int m_nSignal
internal counters
float pedestal(void) const
const TileHWID * m_tileHWID
uint32_t calibMode() const
Calibration mode.
float round(const float toRound, const unsigned int decimals)
int m_pedestalMode
pedestal mode to use
std::unique_ptr< TileMutableRawChannelContainer > m_rawChannelCnt
bool isBiGain() const
returns gain mode of run
virtual StatusCode initialize()
Initializer.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
void setPedestal(float ped)
ToolHandle< ITileCondToolOfc > m_tileCondToolOfc
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
HWIdentifier adc_HWID(void) const
bool m_minus1Iter
bool variable for whether to apply -1 iteration (initial phase guess)
ToolHandle< TileCondToolTiming > m_tileToolTiming
float time(int ind=0) const
float m_ADCmaskValueMinusEps
indicates channels which were masked in background dataset
constexpr auto lut(Generator &&f)
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
SG::ReadHandleKey< TileRawChannelContainer > m_DSPContainerKey
double m_timeForConvergence
minimum time difference to quit iteration procedure
ToolHandle< TileCondToolNoiseSample > m_tileToolNoiseSample
Applies OF algorithm.
void ofc2int(int nDigits, double *w_off, short *w_int, short &scale)
void assign(const HWIdentifier &id, float amplitude, float time, float quality, float ped=0.0)
virtual void setOwner(IDataHandleHolder *o)=0
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
bool m_of2
bool variable for OF method: true=> OF2; false=> OF1
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
int trigType() const
Trigger type.
bool incompleteDigits() const
A few extra items (from TileBeamInfoProvider).
setScaleOne setStatusOne saturated
Class that holds Data Quality fragment information and provides functions to extract the data quality...
TileFragHash::TYPE m_rChType
int adc(const HWIdentifier &id) const
extract adc field from HW identifier
int ItrigSample() const
The sample at which the pulse should ideally peak.
virtual std::vector< IdentifierHash > GetAllCurrentHashes() const override final
Returns a collection of all hashes availiable in this IDC.
void ascale(TH1F *h, double s_)
SG::WriteHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
uint32_t get_bsflags() const
double chi2(TH1 *h0, TH1 *h1)
TileRawChannelUnit::UNIT m_rChUnit
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
double filter(int ros, int drawer, int channel, int &gain, double &pedestal, double &litude, double &time, const EventContext &ctx)
void fill_drawer_errors(const EventContext &ctx, const TileDigitsCollection *collection)
const std::vector< float > & samples() const
static const int MAX_CHANNELS
bool isAdcDQgood(int partition, int drawer, int ch, int gain) const
returns status of single ADC returns False if there are any errors
int iterate(int ros, int drawer, int channel, int gain, double &pedestal, double &litude, double &time, double &chi2, const EventContext &ctx)
Computes A,time,ped using OF.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
const TileInfo * m_tileInfo
float getPedestal(int ros, int drawer, int channel, int gain, const EventContext &ctx)
Apply the number of iterations needed for reconstruction by calling the Filter method.
static double correctAmp(double phase, bool of2=true)
Amplitude correction factor according to the time when using weights for tau=0 without iterations.
void insertTime(float time)
const uint32_t * cispar() const
CIS parameters.
float m_timeMaxThresh
correct amplitude is time is below time max threshold
static const char * BadPatternName(float ped)
virtual TileRawChannel * rawChannel(const TileDigits *digits, const EventContext &ctx)
Builder virtual method to be implemented by subclasses.
int m_nCenter
internal counters
double m_maxTime
max allowed time = 25*(m_nSamples-1)/2
int m_nConst
internal counters
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
virtual const T * indexFindPtr(IdentifierHash hashId) const override final
return pointer on the found entry or null if out of range using hashed index - fast version,...
static double correctTime(double phase, bool of2=true)
Time correction factor.
int m_maxIterations
maximum number of iteration to perform
bool m_confTB
use testbeam configuration
int drawer(const HWIdentifier &id) const
extract drawer field from HW identifier
unsigned int m_evtCounter
def time(flags, cells_name, *args, **kw)
SG::ReadHandleKey< TileDQstatus > m_DQstatusKey
#define ATH_MSG_WARNING(x)
std::vector< float > m_digits
void initLog(const EventContext &ctx)
static const int MAX_DMUS
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
bool m_correctAmplitude
If true, resulting amplitude is corrected when using weights for tau=0 without iteration.
int m_t0SamplePosition
position of peak sample = (m_nSamples-1)/2
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
void setLvl1Id(uint32_t lvl1Id)
Setter for level1 id from ROD header.
std::string to_string(const HWIdentifier &id, int level=0) const
extract all fields from HW identifier HWIdentifier get_all_fields ( const HWIdentifier & id,...
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
float m_timeMinThresh
correct amplitude is time is above time min threshold
int m_nSamples
number of samples in the data
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
int findMaxDigitPosition()
Finds maximum digit position in the pulse.
void setLvl1Type(uint32_t lvl1Type)
Setter for level1 type from ROD header.
int m_error[MAX_CHANNELS]
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
int m_nNegative
internal counters