Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <RT_Relation_DB_DigiTool.h>
|
| RT_Relation_DB_DigiTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual StatusCode | initialize () override |
|
virtual MdtDigiToolOutput | digitize (const EventContext &ctx, const MdtDigiToolInput &input, CLHEP::HepRandomEngine *rndmEngine) const override final |
|
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 |
|
| DeclareInterfaceID (IMDT_DigitizationTool, 1, 0) |
|
|
static double | getAdcResponse (double radius, CLHEP::HepRandomEngine *rndmEngine) |
|
Definition at line 32 of file RT_Relation_DB_DigiTool.h.
◆ StoreGateSvc_t
◆ RT_Relation_DB_DigiTool()
RT_Relation_DB_DigiTool::RT_Relation_DB_DigiTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ 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]
◆ DeclareInterfaceID()
◆ 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()
◆ digitize()
◆ 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
◆ getAdcResponse()
double RT_Relation_DB_DigiTool::getAdcResponse |
( |
double |
radius, |
|
|
CLHEP::HepRandomEngine * |
rndmEngine |
|
) |
| |
|
staticprivate |
Definition at line 126 of file RT_Relation_DB_DigiTool.cxx.
128 constexpr
double p0 = 57.38141;
129 constexpr
double p1 = 8.616943;
130 constexpr
double p2 = 2.497827;
131 constexpr
double p3 = -1.625900;
132 constexpr
double p4 = 0.3125281;
133 constexpr
double p5 = -0.02929554;
134 constexpr
double p6 = 0.001367115;
135 constexpr
double p7 = -0.00002541936;
141 constexpr
double g0 = 10.27808;
142 constexpr
double g1 = -0.3774593;
143 constexpr
double g2 = 0.02751001;
144 constexpr
double g3 = -0.0005994742;
149 double adc = CLHEP::RandGaussZiggurat::shoot(rndmEngine, adcfunc, adcWidth);
◆ getDriftTime()
double RT_Relation_DB_DigiTool::getDriftTime |
( |
const EventContext & |
ctx, |
|
|
double |
measRadius, |
|
|
double |
innerTubeRadius, |
|
|
const Identifier & |
DigitId, |
|
|
CLHEP::HepRandomEngine * |
rndmEngine |
|
) |
| const |
|
private |
Definition at line 46 of file RT_Relation_DB_DigiTool.cxx.
54 if (!calibConstants.isValid()) {
56 throw std::runtime_error(
"No Mdt calibration constants");
59 const RtRelationPtr&
data{calibConstants->getCalibData(DigitId, msgStream())->rtRelation};
71 time = trRelation->
driftTime(std::abs(measRadius)).value_or(0.);
85 ATH_MSG_WARNING(
"Drift velocity <=0 ! Time will not be smeared with resolution but will take the default measRadius-t value");
88 double timeWidth = radiusWidth / velocity;
91 double tUp = rtRelation->
tUpper();
94 double tmin =
time - 3.4 * timeWidth;
95 double tmax =
time + 3.4 * timeWidth;
97 if (tmin < 0.0) tmin = 0.0;
99 tmax = trRelation->
driftTime(innerTubeRadius).value_or(0.);
102 constexpr
double sqrt_one_over_two_pi = 0.39894228;
103 double p1r = 0.8480 *
std::exp(-0.5879 * measRadius);
109 t = CLHEP::RandFlat::shoot(rndmEngine, tmin, tmax);
111 gaussian = (1 - p1r) * sqrt_one_over_two_pi *
exp(-(
t -
time) * (
t -
time) / (2.0 * timeWidth * timeWidth));
112 if (gaussian >= CLHEP::RandFlat::shoot(rndmEngine, 0.0, 1.0) || cutoff > 200) {
flag = 1; }
116 ATH_MSG_DEBUG(
"t from r = " <<
time <<
" t resolution = " << timeWidth <<
"\nr resolution = " << radiusWidth
117 <<
" driftvelocity = " << velocity <<
"\nsmeared t = " <<
t <<
" cutoff = " << cutoff);
119 ATH_MSG_ERROR(
"Null pointer returned from CalibDBSvc. Returning 0.0 as drift time");
◆ initialize()
StatusCode RT_Relation_DB_DigiTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ 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.
◆ 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_calibDbKey
Initial value:{this, "CalibDataKey", "MdtCalibConstants",
"Conditions object containing the calibrations"}
Definition at line 53 of file RT_Relation_DB_DigiTool.h.
◆ m_detMgrKey
◆ m_detStore
◆ m_effRadius
Gaudi::Property<double> RT_Relation_DB_DigiTool::m_effRadius {this, "EffectiveRadius", 14.4275} |
|
private |
◆ m_evtStore
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
char data[hepevt_bytes_allocation_ATLAS]
virtual double resolution(double t, double bgRate=0.0) const =0
returns resolution for a give time and background rate
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
virtual std::optional< double > driftTime(const double r) const =0
Interface method for fetching the drift-time from the radius Returns a nullopt if the time is out of ...
virtual void setOwner(IDataHandleHolder *o)=0
MdtFullCalibData::RtRelationPtr RtRelationPtr
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual double tUpper() const =0
Returns the upper time covered by the r-t.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
StatusCode initialize(bool used=true)
virtual double driftVelocity(double t) const =0
Returns the drift velocity for a given time.
Generic interface to retrieve the resolution on the drift radius as a function of the drift time.
def time(flags, cells_name, *args, **kw)
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
constexpr int pow(int base, int exp) noexcept
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
generic interface for a rt-relation