 |
ATLAS Offline Software
|
#include <MdtAnalyticRtCalibAlg.h>
|
| virtual | ~MdtAnalyticRtCalibAlg ()=default |
| |
| virtual StatusCode | initialize () override final |
| |
| virtual StatusCode | execute (const EventContext &ctx) const override final |
| |
| virtual StatusCode | sysInitialize () override |
| | Override sysInitialize. More...
|
| |
| virtual bool | isClonable () const override |
| | Specify if the algorithm is clonable. More...
|
| |
| virtual unsigned int | cardinality () const override |
| | Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
|
| |
| virtual StatusCode | sysExecute (const EventContext &ctx) override |
| | Execute an algorithm. More...
|
| |
| virtual const DataObjIDColl & | extraOutputDeps () const override |
| | Return the list of extra output dependencies. More...
|
| |
| virtual bool | filterPassed (const EventContext &ctx) const |
| |
| virtual void | setFilterPassed (bool state, const EventContext &ctx) const |
| |
| 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 | 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, V, H > &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 |
| |
|
| void | drawRt (const EventContext &ctx, const Identifier &detId, const std::vector< MuonCalib::SamplePoint > &rtPoints, const MuonCalib::MdtRtRelation &inRel) const |
| |
| void | drawResoFunc (const EventContext &ctx, const Identifier &detId, const std::vector< MuonCalib::SamplePoint > &resoPoints, const MuonCalib::IRtResolution &inReso) const |
| |
| RtRelationPtr | translateRt (const EventContext &ctx, const Identifier &detId, const MuonCalib::MdtRtRelation &inRel) const |
| | Translates the rt / tr & resolution relation from a look-up table into the requested polynomial type. More...
|
| |
| std::vector< Identifier > | tubeIds (const Identifier &chId) const |
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| | specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
| |
|
| ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
| |
| ServiceHandle< MuonValR4::IRootVisualizationService > | m_visualSvc {this, "VisualSvc", "MuonValR4::RootVisualizationService"} |
| | Service handle of the visualization service. More...
|
| |
| MuonValR4::IRootVisualizationService::ClientToken | m_clientToken {} |
| | Token to be presented to the visualization service
More...
|
| |
| SG::ReadCondHandleKey< MuonCalib::MdtCalibDataContainer > | m_readKey {this, "ReadKey", "MdtCalibConstantsR4"} |
| |
| SG::WriteCondHandleKey< MuonCalib::MdtCalibDataContainer > | m_writeKey |
| |
| Gaudi::Property< unsigned > | m_maxOrder {this, "maxOrder", 12} |
| | Maximum order of the polynomial in use. More...
|
| |
| Gaudi::Property< int > | m_polyTypeRt {this, "PolyTypeRt", Acts::toUnderlying(PolyType::ChebyChev)} |
| | Toggle the polynomial for the Rt-relation: ChebyChev or Legendre. More...
|
| |
| Gaudi::Property< int > | m_polyTypeTr {this, "PolyTypeTr", Acts::toUnderlying(PolyType::Legendre)} |
| | Toggle the polynomial for the Rt-relation: ChebyChev or Legendre. More...
|
| |
| Gaudi::Property< bool > | m_fitRtReso {this, "FitRtReso", true} |
| | Toggle whether the resolution shall be also converted into a polynomial. More...
|
| |
| Gaudi::Property< double > | m_relUncReso {this, "RelUncertOnReso", 0.01} |
| | Assignment of the relative uncertainty on each resolution data point. More...
|
| |
| Gaudi::Property< unsigned > | m_maxOrderReso {this, "maxOrderReso", 25} |
| | Maximal order to use for the resolution
More...
|
| |
| Gaudi::Property< float > | m_chiCutOff {this,"chi2CutOff", 0.05} |
| | Stop incrementing the order once the chi2CutOff is reached
More...
|
| |
| Gaudi::Property< bool > | m_saveDiagnostic {this, "saveDiagnosticHist", true} |
| | Save diagnostic histograms. More...
|
| |
| Gaudi::Property< std::string > | m_outStream {this, "OutStream", "MDTANALYTICRTS"} |
| | StreamName of the diagnostic histograms. More...
|
| |
| Gaudi::Property< unsigned > | m_precCutOff {this,"precCutOff", 6} |
| | Precision cut-off to treat two incoming rt-relations as equivalent. More...
|
| |
| Gaudi::Property< bool > | m_fillMissingCh {this, "fillMissingCh", true} |
| | At the end of the translation, it's checked whether all channels have been assigned. More...
|
| |
| Gaudi::Property< float > | m_missingT0 {this, "missingT0", 5.4597301} |
| | Default t0 constant to use, in case there's
More...
|
| |
| DataObjIDColl | m_extendedExtraObjects |
| | Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
|
| |
| StoreGateSvc_t | m_evtStore |
| | Pointer to StoreGate (event store by default) More...
|
| |
| StoreGateSvc_t | m_detStore |
| | Pointer to StoreGate (detector store by default) More...
|
| |
| std::vector< SG::VarHandleKeyArray * > | m_vhka |
| |
| bool | m_varHandleArraysDeclared |
| |
Definition at line 27 of file MdtAnalyticRtCalibAlg.h.
◆ RtRelationPtr
◆ StoreGateSvc_t
◆ PolyType
◆ ~MdtAnalyticRtCalibAlg()
| virtual MuonCalibR4::MdtAnalyticRtCalibAlg::~MdtAnalyticRtCalibAlg |
( |
| ) |
|
|
virtualdefault |
◆ cardinality()
Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
Override this to return 0 for reentrant algorithms.
Override this to return 0 for reentrant algorithms.
Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.
◆ 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);
◆ 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.
◆ 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.
◆ 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()
◆ drawResoFunc()
Definition at line 306 of file MdtAnalyticRtCalibAlg.cxx.
319 canvas->setAxisTitles(
"drift time [ns]",
"#sigma(r_{drift}) [mm]");
320 auto dataGraph = std::make_unique<TGraphErrors>();
322 dataGraph->SetPoint(dataGraph->GetN(), dataPoint.x1(), dataPoint.x2());
323 dataGraph->SetPointError(dataGraph->GetN()-1, 0., dataPoint.error());
324 canvas->expandPad(dataPoint.x1(), dataPoint.x2());
326 auto resoGraph = std::make_unique<TGraph>();
327 const auto [tLow, tHigh] =
interval(resoPoints);
328 const auto [resoLow, resoHigh] =
minMax(resoPoints);
329 canvas->expandPad(tLow, resoLow);
330 canvas->expandPad(tHigh, resoHigh);
334 resoGraph->SetPoint(resoGraph->GetN(),
driftTime, evalReso);
337 canvas->add(std::move(dataGraph),
"P");
338 canvas->add(std::move(resoGraph),
"C");
◆ drawRt()
Populate the rt & tr relation graphs
Definition at line 244 of file MdtAnalyticRtCalibAlg.cxx.
258 canvas->setAxisTitles(
"drift time [ns]",
"drift radius [mm]");
259 auto dataGraph = std::make_unique<TGraphErrors>();
261 dataGraph->SetPoint(dataGraph->GetN(), dataPoint.x1(), dataPoint.x2());
262 dataGraph->SetPointError(dataGraph->GetN()-1, 0., dataPoint.error());
263 canvas->expandPad(dataPoint.x1(), dataPoint.x2());
267 auto rtGraph = std::make_unique<TGraph>();
268 auto trGraph = std::make_unique<TGraph>();
274 const double backTime = inRel.
tr()->
driftTime(backRadius).value_or(-666.);
276 trGraph->SetPoint(trGraph->GetN(), backTime,
radius);
282 const unsigned rtNDoF= rtPoints.size() - inRel.
rt()->
nDoF();
283 const unsigned trNDoF= rtPoints.size() - inRel.
tr()->
nDoF();
287 auto legend = std::make_unique<TLegend>(0.2,0.7,0.6, 0.9,
chName.c_str());
290 legend->AddEntry(rtGraph.get(),
std::format(
"{:}, order: {:d}, #chi^{{2}}: {:.3f}({:d})",
291 inRel.
rt()->
name(), inRel.
rt()->
nDoF(), rtChi2, rtNDoF).c_str(),
"L");
293 legend->AddEntry(trGraph.get(),
std::format(
"{:}, order: {:d}, #chi^{{2}}: {:.3f}({:d})",
294 inRel.
tr()->
name(), inRel.
tr()->
nDoF(), trChi2, trNDoF).c_str(),
"L");
296 dataGraph->SetMarkerSize(0);
297 rtGraph->SetLineColor(kRed);
298 trGraph->SetLineColor(kBlue);
300 canvas->add(std::move(dataGraph),
"P");
301 canvas->add(std::move(rtGraph),
"C");
302 canvas->add(std::move(trGraph),
"C");
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
| StatusCode MuonCalibR4::MdtAnalyticRtCalibAlg::execute |
( |
const EventContext & |
ctx | ) |
const |
|
finaloverridevirtual |
Setup the conditions handle to convert the calibration constants
Output conditions object
Start the loop
Check whether all tubes are complete
Copy the calibration constants for T0 & the corrections
Definition at line 39 of file MdtAnalyticRtCalibAlg.cxx.
41 if(writeHandle.isValid()) {
42 ATH_MSG_DEBUG(
"CondHandle " << writeHandle.fullKey() <<
" is already valid.");
43 return StatusCode::SUCCESS;
48 writeHandle.addDependency(readHandle);
50 auto writeCdo = std::make_unique<MdtCalibDataContainer>(
m_idHelperSvc.get(), readHandle->granularity());
57 std::unordered_set<Identifier> missedElements{};
58 for (
auto itr = idHelper.detectorElement_begin(); itr != idHelper.detectorElement_end(); ++itr){
60 if (!readHandle->hasDataForChannel(detId, msgStream())){
62 missedElements.insert(detId);
65 const MdtFullCalibData* copyMe = readHandle->getCalibData(detId, msgStream());
68 return StatusCode::FAILURE;
71 const std::vector<Identifier> tubes =
tubeIds(detId);
72 if (std::ranges::none_of(tubes, [copyMe](
const Identifier& tubeId){
76 if (!writeCdo->storeData(detId, copyMe->
tubeCalib, msgStream())) {
77 return StatusCode::FAILURE;
81 missedElements.insert(detId);
89 dummyFillerRt = translated;
92 if (!writeCdo->storeData(detId, translated, msgStream())) {
94 return StatusCode::FAILURE;
98 missedElements.clear();
100 for (
const Identifier& detId: missedElements) {
102 <<
". Insert instead the first translated rt-relation for those channels");
103 const bool fillRt = !writeCdo->hasDataForChannel(detId, msgStream()) ||
104 !writeCdo->getCalibData(detId, msgStream())->rtRelation;
106 if (!writeCdo->storeData(detId, dummyFillerRt, msgStream())) {
108 return StatusCode::FAILURE;
110 if (dummyFillerCorr && !writeCdo->storeData(detId, dummyFillerCorr, msgStream())) {
111 return StatusCode::FAILURE;
114 if (writeCdo->getCalibData(detId, msgStream())->tubeCalib) {
121 if (!dummyT0cont->
setCalib(dummyT0Calib, tubeId, msgStream())) {
122 return StatusCode::FAILURE;
125 if (!writeCdo->storeData(detId, std::move(dummyT0cont), msgStream())) {
126 return StatusCode::FAILURE;
129 ATH_CHECK(writeHandle.record(std::move(writeCdo)));
130 return StatusCode::SUCCESS;
◆ 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
◆ extraOutputDeps()
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.
◆ filterPassed()
◆ initialize()
| StatusCode MuonCalibR4::MdtAnalyticRtCalibAlg::initialize |
( |
| ) |
|
|
finaloverridevirtual |
◆ 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.
◆ isClonable()
◆ 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()
◆ setFilterPassed()
◆ sysExecute()
Execute an algorithm.
We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.
Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.
◆ sysInitialize()
Override sysInitialize.
Override sysInitialize from the base class.
Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc
Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc
Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.
Reimplemented in InputMakerBase, and HypoBase.
Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.
110 if (
sc.isFailure()) {
118 if ( cs.retrieve().isFailure() ) {
120 return StatusCode::SUCCESS;
122 if (cs->regHandle(
this,*
h).isFailure()) {
123 sc = StatusCode::FAILURE;
124 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ translateRt()
Translates the rt / tr & resolution relation from a look-up table into the requested polynomial type.
If translation fails, a nullptr is returned
- Parameters
-
| ctx | EventContext mainly used for visualization |
| detId | Identifier of the associated Mdt multilayer (visualization) |
| inRel | Pointer to the input rt relation to translate |
Reject bad fits
Definition at line 147 of file MdtAnalyticRtCalibAlg.cxx.
154 unsigned int order{0};
157 <<
" using a polynomial of order "<<
order);
171 const unsigned rtNdoF = rtPoints.size() - rt->nDoF();
182 const std::vector<SamplePoint> trPoints =
swapCoordinates(rtPoints, *rt);
186 <<
" using a polynomial of order "<<
order);
200 const unsigned trNdoF = rtPoints.size() - tr->nDoF();
203 ATH_MSG_VERBOSE(
"T-R fit resulted in a chi2/nDoF for tr: "<<trChi2<<
" ("<<trNdoF<<
")");
214 std::unique_ptr<IRtResolution> fittedReso{};
219 <<
" using a polynomial of order "<<
order);
221 const unsigned nDoF = rtResoPoints.size() - fittedReso->nDoF();
234 rtReso = std::move(fittedReso);
237 <<
" no rt resolution function could be fitted for "<<
m_idHelperSvc->toStringDetEl(detId));
240 auto finalRt = std::make_unique<MdtRtRelation>(std::move(rt), rtReso, std::move(tr));
241 drawRt(ctx, detId, rtPoints, *finalRt);
◆ tubeIds()
Definition at line 132 of file MdtAnalyticRtCalibAlg.cxx.
133 std::vector<Identifier> tubes{};
135 for (
int ml = 1; ml <= idHelper.multilayerMax(chId); ++ml) {
136 const Identifier detId = idHelper.multilayerID(chId, ml);
138 for (
int tube = 1;
tube <= idHelper.tubeMax(detId); ++
tube) {
139 tubes.emplace_back(idHelper.channelID(detId, ml,
layer,
tube));
◆ updateVHKA()
◆ m_chiCutOff
| Gaudi::Property<float> MuonCalibR4::MdtAnalyticRtCalibAlg::m_chiCutOff {this,"chi2CutOff", 0.05} |
|
private |
◆ m_clientToken
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 114 of file AthCommonReentrantAlgorithm.h.
◆ m_fillMissingCh
| Gaudi::Property<bool> MuonCalibR4::MdtAnalyticRtCalibAlg::m_fillMissingCh {this, "fillMissingCh", true} |
|
private |
At the end of the translation, it's checked whether all channels have been assigned.
Definition at line 98 of file MdtAnalyticRtCalibAlg.h.
◆ m_fitRtReso
| Gaudi::Property<bool> MuonCalibR4::MdtAnalyticRtCalibAlg::m_fitRtReso {this, "FitRtReso", true} |
|
private |
Toggle whether the resolution shall be also converted into a polynomial.
Definition at line 83 of file MdtAnalyticRtCalibAlg.h.
◆ m_idHelperSvc
◆ m_maxOrder
| Gaudi::Property<unsigned> MuonCalibR4::MdtAnalyticRtCalibAlg::m_maxOrder {this, "maxOrder", 12} |
|
private |
◆ m_maxOrderReso
| Gaudi::Property<unsigned> MuonCalibR4::MdtAnalyticRtCalibAlg::m_maxOrderReso {this, "maxOrderReso", 25} |
|
private |
◆ m_missingT0
| Gaudi::Property<float> MuonCalibR4::MdtAnalyticRtCalibAlg::m_missingT0 {this, "missingT0", 5.4597301} |
|
private |
◆ m_outStream
| Gaudi::Property<std::string> MuonCalibR4::MdtAnalyticRtCalibAlg::m_outStream {this, "OutStream", "MDTANALYTICRTS"} |
|
private |
◆ m_polyTypeRt
| Gaudi::Property<int> MuonCalibR4::MdtAnalyticRtCalibAlg::m_polyTypeRt {this, "PolyTypeRt", Acts::toUnderlying(PolyType::ChebyChev)} |
|
private |
◆ m_polyTypeTr
| Gaudi::Property<int> MuonCalibR4::MdtAnalyticRtCalibAlg::m_polyTypeTr {this, "PolyTypeTr", Acts::toUnderlying(PolyType::Legendre)} |
|
private |
◆ m_precCutOff
| Gaudi::Property<unsigned> MuonCalibR4::MdtAnalyticRtCalibAlg::m_precCutOff {this,"precCutOff", 6} |
|
private |
◆ m_readKey
◆ m_relUncReso
| Gaudi::Property<double> MuonCalibR4::MdtAnalyticRtCalibAlg::m_relUncReso {this, "RelUncertOnReso", 0.01} |
|
private |
◆ m_saveDiagnostic
| Gaudi::Property<bool> MuonCalibR4::MdtAnalyticRtCalibAlg::m_saveDiagnostic {this, "saveDiagnosticHist", true} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_visualSvc
◆ m_writeKey
Initial value:{this, "WriteKey", "MdtCalibConstants",
"Conditions object containing the calibrations"}
Definition at line 73 of file MdtAnalyticRtCalibAlg.h.
The documentation for this class was generated from the following files:
std::string preFixName
Prefix name of the saved Canvas.
float t0
< relative t0 in chamber (ns)
Gaudi::Property< int > m_polyTypeTr
Toggle the polynomial for the Rt-relation: ChebyChev or Legendre.
virtual double resolution(double t, double bgRate=0.0) const =0
returns resolution for a give time and background rate
Gaudi::Property< unsigned > m_maxOrderReso
Maximal order to use for the resolution
Gaudi::Property< bool > m_saveDiagnostic
Save diagnostic histograms.
Gaudi::Property< bool > m_fillMissingCh
At the end of the translation, it's checked whether all channels have been assigned.
RtRelationPtr translateRt(const EventContext &ctx, const Identifier &detId, const MuonCalib::MdtRtRelation &inRel) const
Translates the rt / tr & resolution relation from a look-up table into the requested polynomial type.
std::vector< SamplePoint > fetchResolution(const std::vector< SamplePoint > &points, const double uncert)
Creates a new vector of sample points where the x2 is assigned to the uncertainty and the uncertainty...
Helper struct to group Mdt calibration constants which are equivalent within the target precision.
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
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 ...
#define ATH_MSG_VERBOSE(x)
const SingleTubeCalib * getCalib(const Identifier &tubeId) const
return calibration constants of a single tube
std::unique_ptr< TLatex > drawLabel(const std::string &text, const double xPos, const double yPos, const unsigned int fontSize=18)
Create a TLatex label,.
class which holds the full set of calibration constants for a given tube
const IRtResolution * rtRes() const
resolution
ServiceHandle< MuonValR4::IRootVisualizationService > m_visualSvc
Service handle of the visualization service.
std::size_t canvasLimit
How many canvases are drawn at maximum in a job.
virtual void setOwner(IDataHandleHolder *o)=0
CorrectionPtr corrections
Gaudi::Property< double > m_relUncReso
Assignment of the relative uncertainty on each resolution data point.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
virtual std::string name() const =0
Gaudi::Property< unsigned > m_precCutOff
Precision cut-off to treat two incoming rt-relations as equivalent.
SG::WriteCondHandleKey< MuonCalib::MdtCalibDataContainer > m_writeKey
TubeContainerPtr tubeCalib
Gaudi::Property< unsigned > m_maxOrder
Maximum order of the polynomial in use.
virtual double maxRadius() const =0
Returns the maximum drift-radius.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
const std::string & chName(ChIndex index)
convert ChIndex into a string
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
virtual double minRadius() const =0
Returns the minimum drift-radius.
double chi2(TH1 *h0, TH1 *h1)
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.
SG::ReadCondHandleKey< MuonCalib::MdtCalibDataContainer > m_readKey
std::vector< SamplePoint > fetchDataPoints(const IRtRelation &rtRel, const double relUnc)
Constructs a list of sample points from the rt-relation.
std::vector< Identifier > tubeIds(const Identifier &chId) const
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
void drawRt(const EventContext &ctx, const Identifier &detId, const std::vector< MuonCalib::SamplePoint > &rtPoints, const MuonCalib::MdtRtRelation &inRel) const
const ITrRelation * tr() const
t(r) relationship
MuonCalib::MdtFullCalibData::RtRelationPtr RtRelationPtr
Gaudi::Property< float > m_missingT0
Default t0 constant to use, in case there's
float minMax(float x, const std::vector< float > ¶ms)
virtual double radius(double t) const =0
returns drift radius for a given time
StatusCode initialize(bool used=true)
MuonValR4::IRootVisualizationService::ClientToken m_clientToken
Token to be presented to the visualization service
const IRtResolutionPtr & smartReso() const
bool setCalib(SingleTubeCalib val, const Identifier &tubeId, MsgStream &msg)
set the calibration constants of a single tube
virtual double tLower() const =0
Returns the lower time covered by the r-t.
const IRtRelation * rt() const
rt relation
virtual unsigned nDoF() const =0
Returns the number of degrees of freedom of the tr relation.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual StatusCode sysInitialize() override
Override sysInitialize.
std::vector< SamplePoint > swapCoordinates(const std::vector< SamplePoint > &points, const IRtRelation &rtRel)
Creates a new vector of samples points with x1 exchanged by x2 and vice-versa.
virtual unsigned nDoF() const =0
Returns the number of degrees of freedom of the relation function
Gaudi::Property< float > m_chiCutOff
Stop incrementing the order once the chi2CutOff is reached
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
virtual unsigned nDoF() const =0
Returns the number of degrees of freedom of the relation function
constexpr int pow(int base, int exp) noexcept
void drawResoFunc(const EventContext &ctx, const Identifier &detId, const std::vector< MuonCalib::SamplePoint > &resoPoints, const MuonCalib::IRtResolution &inReso) const
Gaudi::Property< bool > m_fitRtReso
Toggle whether the resolution shall be also converted into a polynomial.
Gaudi::Property< int > m_polyTypeRt
Toggle the polynomial for the Rt-relation: ChebyChev or Legendre.