![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
The TRTCalibrator is called from TRTCalibrationMgr.
More...
#include <TRTCalibrator.h>
|
| TRTCalibrator (const std::string &type, const std::string &name, const IInterface *parent) |
| Constructor. More...
|
|
virtual | ~TRTCalibrator () |
| Destructor. More...
|
|
virtual StatusCode | initialize () override |
| Pre-define standard calibration configuration. More...
|
|
virtual StatusCode | finalize () override |
|
virtual bool | fill (const Trk::Track *aTrack, TRT::TrackInfo *output) override |
|
bool | IncludedLevels (std::string, int *) |
|
std::string | SubLev (std::string, int) |
| return sub-level i from a selection string with the form _X_X_X_X_X_X_X More...
|
|
bool | IsSubLev (const std::string &, int, const std::string &) |
| returns true if the ... More...
|
|
void | DumpStrawData (int) |
| returns true if the ... More...
|
|
int | GetSubLevels (const std::string &, int, std::set< int > *) |
| fills a set of integers with the indexes af the sub-modules that are conatined in a selection More...
|
|
void | MakeBDKeys (int, int, int, int, int, int) |
| makes the key strings for a sub-module More...
|
|
virtual bool calibrate | ATLAS_NOT_THREAD_SAFE () override |
| Method for doing the actual calibration. More...
|
|
| DeclareInterfaceID (ITRTCalibrator, 1, 0) |
|
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 |
|
The TRTCalibrator is called from TRTCalibrationMgr.
Definition at line 44 of file TRTCalibrator.h.
◆ StoreGateSvc_t
◆ anonymous enum
◆ TRTCalibrator()
TRTCalibrator::TRTCalibrator |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Constructor.
Definition at line 44 of file TRTCalibrator.cxx.
77 declareInterface<ITRTCalibrator>(
this);
◆ ~TRTCalibrator()
virtual TRTCalibrator::~TRTCalibrator |
( |
| ) |
|
|
inlinevirtual |
◆ ATLAS_NOT_THREAD_SAFE()
virtual bool calibrate TRTCalibrator::ATLAS_NOT_THREAD_SAFE |
( |
| ) |
|
|
overridevirtual |
◆ 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);
◆ 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()
◆ DumpStrawData()
void TRTCalibrator::DumpStrawData |
( |
int |
isid | ) |
|
returns true if the ...
Definition at line 273 of file TRTCalibrator.cxx.
275 std::map<std::string,int> strawmap;
280 std::string strawkey=std::string(Form(
"%i %i %i %i %i",
286 strawmap[strawkey]=isid;
◆ 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()
◆ finalize()
StatusCode TRTCalibrator::finalize |
( |
| ) |
|
|
overridevirtual |
◆ GetSubLevels()
int TRTCalibrator::GetSubLevels |
( |
const std::string & |
key, |
|
|
int |
lev, |
|
|
std::set< int > * |
levels |
|
) |
| |
fills a set of integers with the indexes af the sub-modules that are conatined in a selection
Definition at line 305 of file TRTCalibrator.cxx.
309 if (sl.compare(
"-")==0) {
313 if (sl.compare(
"*")==0) {
318 if(sl.find(
',')!=std::string::npos){
320 while(sl.find(
',')!=std::string::npos){
321 sscanf(sl.substr(0,sl.find(
',')).data(),
"%i",&
value);
322 levels->insert(
value);
323 sl=sl.substr(sl.find(
',')+1);
325 sscanf(sl.data(),
"%i",&
value);
326 levels->insert(
value);
327 return levels->size();
330 if(sl.find(
't')!=std::string::npos){
332 sscanf(sl.substr(0,sl.find(
't')).data(),
"%i",&
min);
334 sl=sl.substr(sl.find(
't')+1);
335 sscanf(sl.data(),
"%i",&
max);
337 for (
int imod=
min; imod<=
max; imod++){
338 levels->insert(imod);
340 return levels->size();
344 sscanf(sl.data(),
"%i",&
value);
345 levels->insert(
value);
346 return levels->size();
◆ IncludedLevels()
bool TRTCalibrator::IncludedLevels |
( |
std::string |
, |
|
|
int * |
|
|
) |
| |
◆ initialize()
StatusCode TRTCalibrator::initialize |
( |
| ) |
|
|
overridevirtual |
Pre-define standard calibration configuration.
The string-vectors "CalibrateRt" ("CalibrateT0") contains the names of the levels for which R-t (T0) calibration should be performed
The string-vectors "PrintT0Out" and "PrintRtOut" contains the names of the levels for text files containing the calibration constants should be generated
The string-vector "PrintTxtOutput" contains the names of the levels for which a text file containing the calibration constants should be generated
This standard configuration divides the Barrel in 9 parts:
"all": a single calibration for all hits in the whole TRT "-1" & "1": calibration of the barrel C- & A-side "X_Y": calibration of layer Y in barrel X-side
Definition at line 112 of file TRTCalibrator.cxx.
119 ATH_MSG_FATAL(
"Problem retrieving ATLASDetectorID helper" );
120 return StatusCode::FAILURE;
124 return StatusCode::FAILURE;
128 return StatusCode::FAILURE;
132 return StatusCode::FAILURE;
136 return StatusCode::FAILURE;
144 return StatusCode::FAILURE;
177 m_config[
"all"].CalibrateRt.emplace_back(
"TRT") ;
178 m_config[
"all"].CalibrateT0.emplace_back(
"TRT") ;
179 m_config[
"all"].PrintLog.emplace_back(
"TRT") ;
180 m_config[
"all"].PrintT0Out.emplace_back(
"TRT") ;
181 m_config[
"all"].PrintRtOut.emplace_back(
"TRT") ;
184 m_config[
"subdet"].CalibrateRt.emplace_back(
"TRT") ;
185 m_config[
"subdet"].CalibrateRt.emplace_back(
"Detector") ;
187 m_config[
"subdet"].NoHistograms.emplace_back(
"TRT") ;
189 m_config[
"subdet"].PrintT0Out.emplace_back(
"Detector") ;
190 m_config[
"subdet"].PrintRtOut.emplace_back(
"Detector") ;
194 m_config[
"1"].selections[
"Detector"].insert(1);
201 m_config[
"-1"].selections[
"Detector"].insert(-1);
209 m_config[
"layer"].CalibrateRt.emplace_back(
"TRT") ;
210 m_config[
"layer"].CalibrateRt.emplace_back(
"Detector") ;
211 m_config[
"layer"].CalibrateRt.emplace_back(
"Layer") ;
212 m_config[
"layer"].CalibrateRt.emplace_back(
"Module") ;
213 m_config[
"layer"].CalibrateRt.emplace_back(
"Board") ;
214 m_config[
"layer"].CalibrateRt.emplace_back(
"Chip") ;
216 m_config[
"layer"].NoHistograms.emplace_back(
"TRT") ;
217 m_config[
"layer"].NoHistograms.emplace_back(
"Detector") ;
218 m_config[
"layer"].NoHistograms.emplace_back(
"Straw") ;
220 m_config[
"layer"].PrintT0Out.emplace_back(
"Layer") ;
221 m_config[
"layer"].PrintT0Out.emplace_back(
"Module") ;
222 m_config[
"layer"].PrintT0Out.emplace_back(
"Board") ;
223 m_config[
"layer"].PrintT0Out.emplace_back(
"Chip") ;
224 m_config[
"layer"].PrintT0Out.emplace_back(
"Straw") ;
225 m_config[
"layer"].PrintRtOut.emplace_back(
"Layer") ;
226 m_config[
"layer"].PrintRtOut.emplace_back(
"Module") ;
227 m_config[
"layer"].PrintRtOut.emplace_back(
"Board") ;
228 m_config[
"layer"].PrintRtOut.emplace_back(
"Chip") ;
229 m_config[
"layer"].PrintRtOut.emplace_back(
"Straw") ;
233 m_config[
"1_0"].selections[
"Detector"].insert(1);
234 m_config[
"1_0"].selections[
"Layer"].insert(0);
236 m_config[
"1_1"].selections[
"Detector"].insert(1);
237 m_config[
"1_1"].selections[
"Layer"].insert(1);
239 m_config[
"1_2"].selections[
"Detector"].insert(1);
240 m_config[
"1_2"].selections[
"Layer"].insert(2);
242 m_config[
"-1_0"].selections[
"Detector"].insert(-1);
243 m_config[
"-1_0"].selections[
"Layer"].insert(0);
245 m_config[
"-1_1"].selections[
"Detector"].insert(-1);
246 m_config[
"-1_1"].selections[
"Layer"].insert(1);
248 m_config[
"-1_2"].selections[
"Detector"].insert(-1);
249 m_config[
"-1_2"].selections[
"Layer"].insert(2);
251 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.
◆ IsSubLev()
bool TRTCalibrator::IsSubLev |
( |
const std::string & |
key, |
|
|
int |
lev, |
|
|
const std::string & |
sublev |
|
) |
| |
returns true if the ...
Definition at line 290 of file TRTCalibrator.cxx.
292 std::string sl=sublev;
294 if (sl.compare(
SubLev(
key,lev))==0)
return true;
296 while(sl.compare(sl.substr(sl.find(
',')+1))!=0){
298 sl=sl.substr(sl.find(
',')+1);
◆ MakeBDKeys()
void TRTCalibrator::MakeBDKeys |
( |
int |
bec, |
|
|
int |
low, |
|
|
int |
mod, |
|
|
int |
brd, |
|
|
int |
chp, |
|
|
int |
strawid |
|
) |
| |
◆ 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()
◆ SubLev()
std::string TRTCalibrator::SubLev |
( |
std::string |
pat, |
|
|
int |
lev |
|
) |
| |
return sub-level i from a selection string with the form _X_X_X_X_X_X_X
Definition at line 261 of file TRTCalibrator.cxx.
265 for (
int i=0;
i<lev;
i++){
266 pat.replace(
pat.find(
'_'),1,
"");
267 sublev =
pat.substr(0,
pat.find(
'_'));
268 pat.replace(0,
pat.find(
'_'),
"");
◆ 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_beQuiet
std::vector<std::string> TRTCalibrator::m_beQuiet |
|
private |
◆ m_Bkey
std::string TRTCalibrator::m_Bkey |
|
private |
◆ m_calsub
std::string TRTCalibrator::m_calsub |
|
private |
◆ m_Ckey
std::string TRTCalibrator::m_Ckey |
|
private |
◆ m_comTimeName
std::string TRTCalibrator::m_comTimeName |
|
private |
◆ m_config
std::map<std::string,conf> TRTCalibrator::m_config |
|
private |
◆ m_DetID
◆ m_detStore
◆ m_Dkey
std::string TRTCalibrator::m_Dkey |
|
private |
◆ m_Dkey_acc
std::string TRTCalibrator::m_Dkey_acc |
|
private |
◆ m_DoArXenonSep
bool TRTCalibrator::m_DoArXenonSep |
|
private |
◆ m_doLogPrint
std::vector<std::string> TRTCalibrator::m_doLogPrint |
|
private |
◆ m_doOutPrint
std::vector<std::string> TRTCalibrator::m_doOutPrint |
|
private |
◆ m_doRes
std::vector<std::string> TRTCalibrator::m_doRes |
|
private |
◆ m_doRt
std::vector<std::string> TRTCalibrator::m_doRt |
|
private |
◆ m_doRtPrint
std::vector<std::string> TRTCalibrator::m_doRtPrint |
|
private |
◆ m_DoShortStrawCorrection
bool TRTCalibrator::m_DoShortStrawCorrection |
|
private |
◆ m_doT0
std::vector<std::string> TRTCalibrator::m_doT0 |
|
private |
◆ m_evtStore
◆ m_floatP3
bool TRTCalibrator::m_floatP3 |
|
private |
◆ m_hittuple
std::string TRTCalibrator::m_hittuple |
|
private |
◆ m_Lkey
std::string TRTCalibrator::m_Lkey |
|
private |
◆ m_Lkey_acc
std::string TRTCalibrator::m_Lkey_acc |
|
private |
◆ m_maxDistance
float TRTCalibrator::m_maxDistance |
|
private |
◆ m_maxTimeResidual
float TRTCalibrator::m_maxTimeResidual |
|
private |
◆ m_maxTrackChisquarePerDof
float TRTCalibrator::m_maxTrackChisquarePerDof |
|
private |
◆ m_minrt
int TRTCalibrator::m_minrt |
|
private |
minimum number of hits required to do R-t calibration
Definition at line 130 of file TRTCalibrator.h.
◆ m_mint0
int TRTCalibrator::m_mint0 |
|
private |
minimum number of hits required to do T0 calibration
Definition at line 131 of file TRTCalibrator.h.
◆ m_minTimebinsOverThreshold
int TRTCalibrator::m_minTimebinsOverThreshold |
|
private |
◆ m_Mkey
std::string TRTCalibrator::m_Mkey |
|
private |
◆ m_neighbourSvc
◆ m_nevents
int TRTCalibrator::m_nevents |
|
private |
The number of hits or histograms read from the input file.
Definition at line 132 of file TRTCalibrator.h.
◆ m_ntrtmanager
std::string TRTCalibrator::m_ntrtmanager |
|
private |
◆ m_numOfHitsAccepted
unsigned int TRTCalibrator::m_numOfHitsAccepted |
|
private |
◆ m_numOfHitsTotal
unsigned int TRTCalibrator::m_numOfHitsTotal |
|
private |
◆ m_numOfProcessedTracks
unsigned int TRTCalibrator::m_numOfProcessedTracks |
|
private |
◆ m_options
std::string TRTCalibrator::m_options |
|
private |
◆ m_rtbinning
std::string TRTCalibrator::m_rtbinning |
|
private |
◆ m_rtrel
std::string TRTCalibrator::m_rtrel |
|
private |
◆ m_selstring
std::string TRTCalibrator::m_selstring |
|
private |
◆ m_Skey
std::string TRTCalibrator::m_Skey |
|
private |
◆ m_SplitBarrel
bool TRTCalibrator::m_SplitBarrel |
|
private |
◆ m_t0offset
float TRTCalibrator::m_t0offset |
|
private |
◆ m_Tkey
std::string TRTCalibrator::m_Tkey |
|
private |
◆ m_trt
BDTRT TRTCalibrator::m_trt |
|
private |
instance if the dictionary class for the full TRT
Definition at line 166 of file TRTCalibrator.h.
◆ m_trt_acc
BDTRT TRTCalibrator::m_trt_acc |
|
private |
instance if the dictionary class for the full TRT
Definition at line 168 of file TRTCalibrator.h.
◆ m_trtcaldbTool
◆ m_TRTID
◆ m_trtmanager
◆ m_TRTStrawSummaryTool
◆ m_useBoardRef
std::vector<std::string> TRTCalibrator::m_useBoardRef |
|
private |
◆ m_useP0
bool TRTCalibrator::m_useP0 |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
std::pair< int, int > compare(const AmgSymMatrix(N) &m1, const AmgSymMatrix(N) &m2, double precision=1e-9, bool relative=false)
compare two matrices, returns the indices of the first element that fails the condition,...
std::vector< std::string > m_beQuiet
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
int m_minTimebinsOverThreshold
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
float m_t0offset
The t0 offset.
std::vector< SG::VarHandleKeyArray * > m_vhka
float m_maxTrackChisquarePerDof
std::vector< std::string > m_doOutPrint
const AtlasDetectorID * m_DetID
std::map< std::string, conf > m_config
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
std::string m_rtrel
the rt relation to use
int straw(const Identifier &id) const
int m_nevents
The number of hits or histograms read from the input file.
std::string m_comTimeName
int m_minrt
minimum number of hits required to do R-t calibration
int m_mint0
minimum number of hits required to do T0 calibration
ToolHandle< ITRT_StrawStatusSummaryTool > m_TRTStrawSummaryTool
The ConditionsSummaryTool.
std::vector< std::string > m_doT0
std::vector< std::string > m_doRtPrint
std::vector< std::string > m_doLogPrint
std::string SubLev(std::string, int)
return sub-level i from a selection string with the form _X_X_X_X_X_X_X
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
int straw_layer(const Identifier &id) const
int layer_or_wheel(const Identifier &id) const
unsigned int m_numOfProcessedTracks
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
std::vector< std::string > m_doRes
int phi_module(const Identifier &id) const
const InDetDD::TRT_DetectorManager * m_trtmanager
std::string m_ntrtmanager
ServiceHandle< ITRT_StrawNeighbourSvc > m_neighbourSvc
unsigned int m_numOfHitsAccepted
std::vector< std::string > m_doRt
bool m_DoShortStrawCorrection
unsigned int m_numOfHitsTotal
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
std::vector< std::string > m_useBoardRef
ToolHandle< ITRT_CalDbTool > m_trtcaldbTool
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>