|
ATLAS Offline Software
|
#include <ZdcRecChannelTool.h>
|
| ZdcRecChannelTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~ZdcRecChannelTool () |
|
virtual StatusCode | initialize () |
|
virtual StatusCode | finalize () |
|
int | makeRawFromDigits (const ZdcDigitsCollection &data_collection, ZdcRawChannelCollection &raw_collection) |
|
int | getCalibration (const ZdcDigitsCollection &data_collection, ZdcRawChannelCollection &raw_collection) |
|
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 double | fx (double x0, void *params) |
|
static double | fxCallback (double d, void *v) |
|
Definition at line 71 of file ZdcRecChannelTool.h.
◆ StoreGateSvc_t
◆ ZdcRecChannelTool()
ZdcRecChannelTool::ZdcRecChannelTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Definition at line 52 of file ZdcRecChannelTool.cxx.
65 declareInterface<ZdcRecChannelTool>(
this);
68 "Supress channels with only 0");
71 "Minimum difference between min and max to be considered a signal");
◆ ~ZdcRecChannelTool()
ZdcRecChannelTool::~ZdcRecChannelTool |
( |
| ) |
|
|
virtual |
◆ 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()
◆ 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
◆ finalize()
StatusCode ZdcRecChannelTool::finalize |
( |
| ) |
|
|
virtual |
◆ fx()
double ZdcRecChannelTool::fx |
( |
double |
x0, |
|
|
void * |
params |
|
) |
| |
|
staticprivate |
◆ fxCallback()
static double ZdcRecChannelTool::fxCallback |
( |
double |
d, |
|
|
void * |
v |
|
) |
| |
|
inlinestaticprivate |
◆ getCalibration()
Definition at line 457 of file ZdcRecChannelTool.cxx.
462 for (
const ZdcDigits* digits_p : mydata) {
463 digits_p->identify();
466 int ncal = ChannelCollection.size();
◆ getTimingCFD()
int ZdcRecChannelTool::getTimingCFD |
( |
const Identifier & |
id, |
|
|
const std::vector< std::vector< int > > & |
wfm |
|
) |
| |
|
private |
Definition at line 473 of file ZdcRecChannelTool.cxx.
478 unsigned int nsamples_local = 14;
485 std::vector<float> vaux;
486 unsigned int tmin = 0;
487 unsigned int tmax = 0;
495 int max_iterations = 100;
499 gsl_root_fsolver *
s = gsl_root_fsolver_alloc (
T);
507 std::vector<std::vector<int> >::const_iterator vit;
510 std:: vector<float>
result;
514 msg(
MSG::DEBUG) <<
"--> ZDC : ZdcRecChannelTool::getTimingCFD: Id " <<
id.getString() ;
524 for (vit = wfm.begin(); vit<wfm.end(); ++vit) {
527 for (
it=
y.begin();
it !=
y.end();++
it) {
531 for (
i=0;
i<nsamples_local;
i++) {
536 gsl_spline_init (
m_spline,
t,
v, nsamples_local);
540 for (
i=0;
i<nsamples_local;
i++) {
547 gsl_spline_init (
m_spline,
t, vf, nsamples_local);
557 vaux.assign(vf,vf+14);
558 tmin = std::min_element(vaux.begin(), vaux.end()) - vaux.begin();
559 tmax = std::max_element(vaux.begin(), vaux.end()) - vaux.begin();
593 gsl_root_fsolver_set (
s, &
F, x_lo, x_hi);
599 status = gsl_root_fsolver_iterate(
s);
600 r = gsl_root_fsolver_root(
s);
601 x_lo = gsl_root_fsolver_x_lower(
s);
602 x_hi = gsl_root_fsolver_x_upper(
s);
603 status = gsl_root_test_interval (x_lo, x_hi, 0, 0.001);
607 while (
status == GSL_CONTINUE && iterations < max_iterations);
611 gsl_root_fsolver_free (
s);
◆ getTimingSinc()
int ZdcRecChannelTool::getTimingSinc |
( |
const Identifier & |
id, |
|
|
const std::vector< std::vector< int > > & |
wfm |
|
) |
| |
|
private |
Definition at line 633 of file ZdcRecChannelTool.cxx.
651 std::vector<float>
vt(7);
655 std::vector<std::vector<int> >::const_iterator vvi_it;
667 msg(
MSG::DEBUG) <<
"--> ZDC : ZdcRecChannelTool::getTimingSinc: "
668 <<
" id;Side;Module;Type;Channel: "
669 <<
id.getString() <<
";"
675 for (vvi_it = wfm.begin(); vvi_it<wfm.end(); ++vvi_it) {
691 x = (TMath::Pi() *(
t*0.1 -
i*25.))/25. ;
692 if (fabs(
x) < 1
e-8) {
721 if ( (mSide == -1) && (mType == 0) && (mModule == 0) && (mChannel == 0) ) {
724 -0.483265 *
pow(tfpeak,2) +
725 0.00234842 *
pow(tfpeak,3);
730 if ( (mSide == 1) && (mType == 0) && (mModule == 0) && (mChannel == 0) ) {
735 -1.229 *
pow(tfpeak,2) +
736 0.006276 *
pow(tfpeak,3);
741 -1.19169 *
pow(tfpeak,2) +
742 0.005659 *
pow(tfpeak,3);
◆ getTimingSinc2()
int ZdcRecChannelTool::getTimingSinc2 |
( |
const Identifier & |
id, |
|
|
const std::vector< std::vector< int > > & |
wfm |
|
) |
| |
|
private |
Definition at line 764 of file ZdcRecChannelTool.cxx.
778 double CFD_frac = 1.0;
781 std::vector<std::vector<int> >::const_iterator vit;
813 for (vit = wfm.begin(); vit<wfm.end(); ++vit) {
814 if ( (
i < wfmIndex) && (mType == 0) )
820 for(
int I=0;
I<NSlice;
I++) {Slices[
I]=
y[
I];}
823 zdcSignalSinc.process(Slices,
gain,pedestal,CFD_frac,corr);
829 error = zdcSignalSinc.getError();
830 warning = zdcSignalSinc.getWarning();
832 msg(
MSG::DEBUG) <<
"--> ZDC : ZdcRecChannelTool::getTimingSinc2: "
◆ initialize()
StatusCode ZdcRecChannelTool::initialize |
( |
| ) |
|
|
virtual |
Definition at line 85 of file ZdcRecChannelTool.cxx.
103 msg(MSG::INFO) <<
"Using a time step of "
105 <<
"ps for the Bandwidth Limited Sin(x)/x Interpolation: "
117 m_spline = gsl_spline_alloc (interp_type, 14);
122 const ZdcID* zdcId =
nullptr;
124 msg(MSG::ERROR) <<
"execute: Could not retrieve ZdcID object from the detector store" <<
endmsg;
125 return StatusCode::FAILURE;
133 return StatusCode::SUCCESS;
◆ 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 & ZdcRecChannelTool::interfaceID |
( |
| ) |
|
|
static |
◆ makeRawFromDigits()
Traditional code bellow (Energy by peak or sum, time by ratio of samples
Definition at line 151 of file ZdcRecChannelTool.cxx.
185 std::vector<std::vector<int> > wfm;
189 std::vector<float> energy_sum;
190 std::vector<float> energy_peak;
191 std::vector<float> time_cfd;
192 std::vector<float> time_sratio;
193 std::vector<float> chi;
199 std::vector<float> vcfd1;
200 std::vector<float> vcfd2;
201 std::vector<float> vcfd3;
214 for (
const ZdcDigits* digits_p : mydata) {
217 id = digits_p->identify();
223 msg(
MSG::DEBUG) <<
"--> ZDC : ZdcRecChannelTool::makeRawFromDigits: "
224 <<
" id;Side;Module;Type;Channel: "
225 <<
id.getString() <<
";"
243 wfm[0] = digits_p->get_digits_gain0_delay0();
244 if (wfm[0].
empty()) {
249 wfm[1] = digits_p->get_digits_gain1_delay0();
250 if (wfm[1].
empty()) {
275 wfm[2] = digits_p->get_digits_gain0_delay1();
276 wfm[3] = digits_p->get_digits_gain1_delay1();
287 for (vit = wfm.begin(); vit<wfm.end(); ++vit) {
288 if (vit->empty()) vit->resize(7);
290 for (
it=vit->begin(); it<vit->
end();++
it) {
354 for (vit = wfm.begin(); vit<wfm.end(); ++vit) {
357 pico = *(std::max_element(
v.begin(),
v.end()) );
358 energy_sum.push_back ((
float) soma);
359 energy_peak.push_back((
float) pico);
378 imax = std::max_element(
v.begin(),
v.end()) -
v.begin();
386 time_sratio.push_back(tsr);
389 msg(
MSG::DEBUG) <<
"--> ZDC : ZdcRecChannelTool " <<
id.getString() <<
391 " Energy Sum=" << soma <<
392 " Energy Peak=" << pico <<
393 " Chi=" << *(chi.end() -1) <<
394 " t0=" <<
t0 <<
" t1=" <<
t1 <<
396 " Time by CFD=" << tzc <<
397 " Peak at imax = " <<
imax <<
398 " v[imax-1] = " << (
imax > 0 ?
v[
imax-1] : 0) <<
399 " V[imax] = " <<
v[
imax] <<
400 " Sample Ratio A1/A2=" << tsr <<
endmsg;
427 z->setEnergy (
i, energy_peak[
i]);
428 z->setTime (
i, time_sratio[
i]);
429 z->setChi (
i, chi[
i]);
433 z->setChi (
i+
k, chi[
i]);
435 z->setEnergy (
i+2*
k, energy_sum[
i]);
437 z->setChi (
i+2*
k, chi[
i]);
445 ChannelCollection.push_back(
z);
448 msg(
MSG::DEBUG) <<
"--> ZDC : ZdcRecChannelTool ChannelCollection size " << ChannelCollection.size() <<
endmsg ;
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ 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.
◆ renounce()
◆ renounceArray()
◆ 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_bwl_time_resolution
int ZdcRecChannelTool::m_bwl_time_resolution |
|
private |
◆ m_bwl_tpeak
std::vector<float> ZdcRecChannelTool::m_bwl_tpeak |
|
private |
◆ m_bwl_tpeak2
std::vector<float> ZdcRecChannelTool::m_bwl_tpeak2 |
|
private |
◆ m_bwl_vpeak
std::vector<float> ZdcRecChannelTool::m_bwl_vpeak |
|
private |
◆ m_bwl_vpeak2
std::vector<float> ZdcRecChannelTool::m_bwl_vpeak2 |
|
private |
◆ m_cfd_delay
float ZdcRecChannelTool::m_cfd_delay |
|
private |
◆ m_cfd_fraction
float ZdcRecChannelTool::m_cfd_fraction |
|
private |
◆ m_cfd_result
std::vector<float> ZdcRecChannelTool::m_cfd_result |
|
private |
◆ m_delta
int ZdcRecChannelTool::m_delta |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_interp_acc
gsl_interp_accel* ZdcRecChannelTool::m_interp_acc {} |
|
private |
◆ m_nsamples
unsigned int ZdcRecChannelTool::m_nsamples |
|
private |
◆ m_sample_time
float ZdcRecChannelTool::m_sample_time |
|
private |
◆ m_spline
gsl_spline* ZdcRecChannelTool::m_spline {} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_wfm_bwl
std::vector<float> ZdcRecChannelTool::m_wfm_bwl |
|
private |
◆ m_zdcId
◆ m_zeroSupress
int ZdcRecChannelTool::m_zeroSupress |
|
private |
◆ s_CFD_FRACTION
const int ZdcRecChannelTool::s_CFD_FRACTION = -3 |
|
staticprivate |
◆ s_FADC_SATURATION
const int ZdcRecChannelTool::s_FADC_SATURATION = 1022 |
|
staticprivate |
◆ s_GAIN_RATIO
const int ZdcRecChannelTool::s_GAIN_RATIO = 1 |
|
staticprivate |
◆ s_HALF_SAMPLING_TIME
const int ZdcRecChannelTool::s_HALF_SAMPLING_TIME = 12500 |
|
staticprivate |
◆ s_SAMPLING_TIME
const int ZdcRecChannelTool::s_SAMPLING_TIME = 25000 |
|
staticprivate |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
int module(const Identifier &id) const
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
std::vector< ALFA_RawData_p1 > t0
std::vector< ALFA_RawDataCollection_p1 > t1
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
int side(const Identifier &id) const
Values of different levels (failure returns 0)
int type(const Identifier &id) const
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
#define ATLAS_THREAD_SAFE
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
int channel(const Identifier &id) const