APV hit-related standard handlers¶
This page lists handlers related to detectors based on APV chip (Micromegas and GEMs).
Subjects: hit and APV raw data structs¶
All the handlers listed below operate with the instances of the APVHit
C/C++ structure (and, optionally with RawDataAPV
instance accessed by
rawData
attribute):
-
struct APVHit¶
Representation of a hit on APV-based detector entity.
GETTER:
rawData.wireNo
– Triggered wire number (detector’s channel) (propagated fromrawData:RawDataAPV
, returnswireNo
)rawData.chip
– chip ID wrt DDD DAQ (propagated fromrawData:RawDataAPV
, returnschip
)rawData.srcID
– source ID wrt DDD DAQ (propagated fromrawData:RawDataAPV
, returnssrcID
)rawData.adcID
– adc ID wrt DDD DAQ (propagated fromrawData:RawDataAPV
, returnsadcID
)rawData.chipChannel
– channel number inside chip (before remapping) (propagated fromrawData:RawDataAPV
, returnschipChannel
)rawData.timeTag
– Time with the respect to trigger time (propagated fromrawData:RawDataAPV
, returnstimeTag
)maxCharge
– Hit max charge wrt APV waveformtimeRise
– Time of rising fronta02
– APV samples amplitude ratio a0/a2a12
– APV samples amplitude ratio a1/a2t02
– Tangent values of raising front, at a0 and a2t12
– Tangent values of raising front, at a1 and a2t02sigma
– Error estimation of tangent raising frontt12sigma
– Error estimation of tangent raising fronttime
– Estimated hit time, [SADC sample #]timeError
– Error of hit time estimation, [SADC sample #]
Public Functions
-
APVHit(LocalMemory&)¶
A ctr, needs the pool allocator instance to be bound with.
Public Members
-
mem::Ref<RawDataAPV> rawData¶
Hit raw data (as got from DDD digit)
-
double maxCharge¶
Hit max charge wrt APV waveform.
-
double timeRise¶
Time of rising front
- Todo:
seemed to be not used; remove?
-
double a02¶
APV samples amplitude ratio a0/a2.
-
double a12¶
APV samples amplitude ratio a1/a2.
-
double t02¶
Tangent values of raising front, at a0 and a2
- Todo:
More doc on it
-
double t12¶
Tangent values of raising front, at a1 and a2
- Todo:
More doc on it
-
double t02sigma¶
Error estimation of tangent raising front
- Todo:
More doc on it
-
double t12sigma¶
Error estimation of tangent raising front
- Todo:
More doc on it
-
double time¶
Estimated hit time, [SADC sample #].
-
double timeError¶
Error of hit time estimation, [SADC sample #].
-
struct RawDataAPV¶
Raw data of APV digit
GETTER:
wireNo
– Triggered wire number (detector’s channel)chip
– chip ID wrt DDD DAQsrcID
– source ID wrt DDD DAQadcID
– adc ID wrt DDD DAQchipChannel
– channel number inside chip (before remapping)timeTag
– Time with the respect to trigger timegetter for field
RawDataAPV::samples
disabled
Public Functions
-
inline RawDataAPV()¶
Default ctr (creates uninitialized instance of RawDataAPV.
-
inline RawDataAPV(LocalMemory&)¶
A ctr, ignores memory arg (creates uninitialized instance of RawDataAPV. Needed to simplify compatibility with template code.
Public Members
-
APVDAQWire_t wireNo¶
Triggered wire number (detector’s channel)
-
uint16_t chip¶
chip ID wrt DDD DAQ
-
uint16_t srcID¶
source ID wrt DDD DAQ
-
uint16_t adcID¶
adc ID wrt DDD DAQ
-
uint16_t chipChannel¶
channel number inside chip (before remapping)
-
uint32_t timeTag¶
Time with the respect to trigger time.
-
uint32_t samples[3]¶
Measured amplitude samples on a wire.
Note, that APVHit
may have its rawData
reference unset. For instance,
when events are read from Monte-Carlo data source.
Handlers list¶
This handlers deal with APV hits at the very basic level of DAQ digits.
- group apv-handlers
-
class APVCalcTime : public na64dp::AbstractHitHandler<event::APVHit>¶
Uses \(t_{01}\) and \(t_{12}\) and error estimations to calculate time and hit time error for
APVHit
The time and time error will be estimated by the following formulae:
$$ t = (\frac{t_{02}}{\sigma_{02}(t)^2} + \frac{t_{12}}{\sigma_{12}(t)^2}) / (\frac{1}{\sigma_{02}(t)^2} + \frac{1}{\sigma_{12}(t)^2}), \ \delta t = (\frac{1}{\sigma_{02}(t)^2} + \frac{1}{\sigma_{12}(t)^2})^{-1/2} $$
Usage info:
- _type: APVCalcTime # optional, hit selection expression applyTo: null
This handler relies on pre-calculated values within APV hit that usually acquired using some calibration data by other handler(s):
t02
t12
t02sigma
t12sigma
To obtain these values, consider using of
CalcAPVTimeType1
handler.See also
CalcAPVTimeType1
Public Functions
-
inline APVCalcTime(calib::Dispatcher &cdsp, const std::string &only, log4cpp::Category &logCat, const std::string &namingClass = "default")¶
Ctr: forwards calib dispatcher and detector selection args to parent class
-
class APVCalcARatios : public na64dp::AbstractHitHandler<APVHit>¶
Calculates ratios \(r_{1,2}\) and \(r_{1,3}\) for hits on APV detector.
A-ratios are the useful coefficients for APV hits data quality assurance. $$ r_{1,2} = a_1/a_2, r_{1,3} = a_1/a_3 $$
where \(a_i, i = 1, 2, 3\) is the amplitude samples usually brought by APV chip.
Usage:
- _type: APVCalcARatios # optional, hit selection expression applyTo: null
This handler has no parameters except for usual optional
applyTo
detector selection.Public Functions
-
APVCalcARatios(calib::Dispatcher &ch, const std::string &select, log4cpp::Category &logCat, const std::string &namingClass = "default")¶
Default ctr.
-
virtual bool process_hit(EventID, HitKey, APVHit &cHit)¶
Writes ratios to
APVHit::a12
andAPVHit::a13
If \(A_2\) is null or NaN, the
APVHit::a12
will be left intact. If \(A_3\) is null or NaN, theAPVHit::a13
will be left intact.- Returns
always
true
.
-
APVCalcARatios(calib::Dispatcher &ch, const std::string &select, log4cpp::Category &logCat, const std::string &namingClass = "default")¶
-
class APVCalcHitTimeRatios : public na64dp::AbstractHitHandler<APVHit>, public na64dp::calib::Handle<Collection<APVTimingCalib>>, public na64dp::calib::Handle<Collection<APVChannelEntry>>¶
Calculates hit times using type#1 calibration data.
Usage:
- _type: APVCalcHitTimeRatios # optional, hit selection expression applyTo: null # Handler behaviour on no calibration data available for certain # detector entry. Possible values: "ignore", "warn", "error"; opt, str onNoCalib: warn
Relies on standard p348reco/GEMMonitor-produced timing calibrations.
- Todo:
few error reports and meaningful assertions
See also
Note
This handler does not calculate time of APV hit, just a set of values required. For time calculation based on these values, consider
APVCalcTime
handler that may be applied afterwards.Public Functions
-
inline virtual void finalize() override¶
Method performing some operations after all the events were processed and before the resources will be freed (e.g. before output ROOT file is closed).
Public Static Functions
-
static inline double calc_hit_time_calibrated(const P348_RECO_NAMESPACE::APVTimingCalibEntry::ParPack &c, double ratio)¶
Applies calibrations to the calculated ratio to return the estimated time
-
static inline double calc_hit_time_error_calibrated(const P348_RECO_NAMESPACE::APVTimingCalibEntry::ParPack &c, const double sigmaN, double ratio, double A, double B)¶
Applies calibrations for the hit sample data to calculate the estimated sigma (RMS) error of the hit time value. The
APVCalibDataType1Wire<>
calibration data is required at this point
-
class APVCalcTime : public na64dp::AbstractHitHandler<event::APVHit>¶