ATLAS Offline Software
Loading...
Searching...
No Matches
TRTCalibrator Class Reference

The TRTCalibrator is called from TRTCalibrationMgr. More...

#include <TRTCalibrator.h>

Inheritance diagram for TRTCalibrator:
Collaboration diagram for TRTCalibrator:

Classes

class  BDboard
 dictionary class for a board More...
class  BDchip
 dictionary class for a chip More...
class  BDdetector
 dictionary class for a detector More...
class  BDlayer
 dictionary class for a layer More...
class  BDmodule
 dictionary class for a module More...
class  BDstraw
 dictionary class for a straw More...
class  BDTRT
 dictionary class for the full TRT More...
class  BDzero
 dummy dictionary class More...
struct  conf
class  epdata

Public Member Functions

 TRTCalibrator (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor.
virtual ~TRTCalibrator ()
 Destructor.
virtual StatusCode initialize () override
 Pre-define standard calibration configuration.
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
bool IsSubLev (const std::string &, int, const std::string &)
 returns true if the ...
void DumpStrawData (int)
 returns true if the ...
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
void MakeBDKeys (int, int, int, int, int, int)
 makes the key strings for a sub-module
virtual bool calibrate ATLAS_NOT_THREAD_SAFE () override
 Method for doing the actual calibration.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

enum  { CALIB_ALL =-3 , CALIB_NONE =-4 }
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ToolHandle< ITRT_CalDbToolm_trtcaldbTool {this, "TRTCalDbTool", "ITRT_CalDbTool", ""}
ToolHandle< ITRT_StrawStatusSummaryToolm_TRTStrawSummaryTool {this, "TRTStrawSummaryTool", "ITRT_StrawStatusSummaryTool", ""}
ServiceHandle< ITRT_StrawNeighbourSvcm_neighbourSvc {this,"NeighbourSvc","ITRT_StrawNeighbourSvc","retrieve barrel and end-cap straw number" }
Gaudi::Property< float > m_maxDistance {this, "maxDistance" , 2.8 , ""}
Gaudi::Property< float > m_maxTimeResidual {this, "maxTimeResidual" , 150.0 , ""}
Gaudi::Property< float > m_maxTrackChisquarePerDof {this, "maxTrackChisquarePerDof" , 10.0 , ""}
Gaudi::Property< float > m_t0offset {this, "T0Offset" , -0.3 , ""}
Gaudi::Property< int > m_minTimebinsOverThreshold {this, "minTimebinsOverThreshold" , 2 , ""}
Gaudi::Property< int > m_minrt {this, "MinRt" , 10000 , "minimum number of hits required to do R-t calibration" }
Gaudi::Property< int > m_mint0 {this, "MinT0" , 200 , "minimum number of hits required to do T0 calibration" }
Gaudi::Property< int > m_nevents {this, "Nevents" , -1 , "The number of hits or histograms read from the input file"}
Gaudi::Property< bool > m_SplitBarrel {this, "SplitBarrel" , true , ""}
Gaudi::Property< bool > m_useP0 {this, "UseP0" , true , ""}
Gaudi::Property< bool > m_floatP3 {this, "FloatP3" , true , ""}
Gaudi::Property< bool > m_DoArXenonSep {this, "DoArXenonSep" , false , ""}
Gaudi::Property< bool > m_DoShortStrawCorrection {this, "DoShortStrawCorrection" , true , ""}
Gaudi::Property< std::string > m_selstring {this, "Selstring" , "_*_-_-_-_-_-_-" , ""}
Gaudi::Property< std::string > m_calsub {this, "SubPart" , "user" , ""}
Gaudi::Property< std::string > m_options {this, "Options" , "" , ""}
Gaudi::Property< std::string > m_hittuple {this, "Hittuple" , "merged.root" , ""}
Gaudi::Property< std::string > m_rtrel {this, "RtRel" , "basic" , "the rt relation to use"}
Gaudi::Property< std::string > m_rtbinning {this, "RtBinning" , "t" , ""}
Gaudi::Property< std::string > m_ntrtmanager {this, "TrtManagerLocation" , "TRT" , ""}
Gaudi::Property< std::vector< std::string > > m_doRt {this, "CalibrateRt" , {} , ""}
Gaudi::Property< std::vector< std::string > > m_doT0 {this, "CalibrateT0" , {} , ""}
Gaudi::Property< std::vector< std::string > > m_doRes {this, "FitResidual" , {} , ""}
Gaudi::Property< std::vector< std::string > > m_beQuiet {this, "NoHistograms" , {} , ""}
Gaudi::Property< std::vector< std::string > > m_useBoardRef {this, "UseBoardRef" , {} , ""}
Gaudi::Property< std::vector< std::string > > m_doLogPrint {this, "PrintLog" , {} , ""}
Gaudi::Property< std::vector< std::string > > m_doOutPrint {this, "PrintT0Out" , {} , ""}
Gaudi::Property< std::vector< std::string > > m_doRtPrint {this, "PrintRtOut" , {} , ""}
const AtlasDetectorIDm_DetID {}
const TRT_IDm_TRTID {}
const InDetDD::TRT_DetectorManagerm_trtmanager {}
unsigned int m_numOfHitsTotal {}
unsigned int m_numOfHitsAccepted {}
unsigned int m_numOfProcessedTracks {}
std::string m_comTimeName
std::string m_Tkey
std::string m_Dkey
std::string m_Lkey
std::string m_Mkey
std::string m_Bkey
std::string m_Ckey
std::string m_Skey
std::string m_Lkey_acc
std::string m_Dkey_acc
BDTRT m_trt
 instance if the dictionary class for the full TRT
BDTRT m_trt_acc
 instance if the dictionary class for the full TRT
std::map< std::string, confm_config
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

The TRTCalibrator is called from TRTCalibrationMgr.

Definition at line 45 of file TRTCalibrator.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
CALIB_ALL 
CALIB_NONE 

Definition at line 189 of file TRTCalibrator.h.

Constructor & Destructor Documentation

◆ TRTCalibrator()

TRTCalibrator::TRTCalibrator ( const std::string & type,
const std::string & name,
const IInterface * parent )

Constructor.

Definition at line 44 of file TRTCalibrator.cxx.

44 :
45 AthAlgTool(type, name, parent),
46 m_DetID(nullptr),
47 m_TRTID(nullptr),
48 m_trtmanager(nullptr)
49{
50 declareInterface<ITRTCalibrator>(this);
51}
AthAlgTool()
Default constructor:
const InDetDD::TRT_DetectorManager * m_trtmanager
const AtlasDetectorID * m_DetID
const TRT_ID * m_TRTID

◆ ~TRTCalibrator()

virtual TRTCalibrator::~TRTCalibrator ( )
inlinevirtual

Destructor.

Definition at line 56 of file TRTCalibrator.h.

56{}

Member Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

virtual bool calibrate TRTCalibrator::ATLAS_NOT_THREAD_SAFE ( )
overridevirtual

Method for doing the actual calibration.

Implements ITRTCalibrator.

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ DumpStrawData()

void TRTCalibrator::DumpStrawData ( int isid)

returns true if the ...

Definition at line 215 of file TRTCalibrator.cxx.

215 {
216
217 std::map<std::string,int> strawmap;
218 Identifier ident=(Identifier)(isid);
219
220
221
222 std::string strawkey=std::string(Form("%i %i %i %i %i",
223 (int)m_TRTID->barrel_ec(ident),
224 (int)m_TRTID->layer_or_wheel(ident) ,
225 (int)m_TRTID->phi_module(ident) ,
226 (int)m_TRTID->straw_layer(ident) ,
227 (int)m_TRTID->straw(ident)));
228 strawmap[strawkey]=isid;
229}
@ ident
Definition HitInfo.h:77

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

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()

bool TRTCalibrator::fill ( const Trk::Track * aTrack,
TRT::TrackInfo * output )
overridevirtual

Implements ITRTCalibrator.

Definition at line 981 of file TRTCalibrator.cxx.

981 {
982 if (aTrack==nullptr) {};
983 if (output==nullptr) {};
984 return true;
985}

◆ finalize()

StatusCode TRTCalibrator::finalize ( )
overridevirtual

Definition at line 197 of file TRTCalibrator.cxx.

198{
199 return StatusCode::SUCCESS;
200}

◆ 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 247 of file TRTCalibrator.cxx.

247 {
248
249 std::string sl=SubLev(key,lev);
250
251 if (sl.compare("-")==0) {
252 levels->insert(-4);
253 return 999;
254 }
255 if (sl.compare("*")==0) {
256 levels->insert(-3);
257 return 999;
258 }
259
260 if(sl.find(',')!=std::string::npos){
261 int value;
262 while(sl.find(',')!=std::string::npos){
263 sscanf(sl.substr(0,sl.find(',')).data(),"%i",&value);
264 levels->insert(value);
265 sl=sl.substr(sl.find(',')+1);
266 }
267 sscanf(sl.data(),"%i",&value);
268 levels->insert(value);
269 return levels->size();
270 }
271
272 if(sl.find('t')!=std::string::npos){
273 int min,max;
274 sscanf(sl.substr(0,sl.find('t')).data(),"%i",&min);
275 ATH_MSG_INFO( "min=" << min );
276 sl=sl.substr(sl.find('t')+1);
277 sscanf(sl.data(),"%i",&max);
278 ATH_MSG_INFO("max=" << max);
279 for (int imod=min; imod<=max; imod++){
280 levels->insert(imod);
281 }
282 return levels->size();
283 }
284
285 int value;
286 sscanf(sl.data(),"%i",&value);
287 levels->insert(value);
288 return levels->size();
289
290}
#define ATH_MSG_INFO(x)
#define min(a, b)
Definition cfImp.cxx:40
#define max(a, b)
Definition cfImp.cxx:41
std::string SubLev(std::string, int)
return sub-level i from a selection string with the form _X_X_X_X_X_X_X

◆ 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 54 of file TRTCalibrator.cxx.

55{
56 ATH_MSG_INFO( "initialize()" );
57
58 m_trtmanager=nullptr;
59
60 if ((detStore()->retrieve(m_DetID,"AtlasID")).isFailure()) {
61 ATH_MSG_FATAL( "Problem retrieving ATLASDetectorID helper" );
62 return StatusCode::FAILURE;
63 }
64 if ((detStore()->retrieve(m_trtmanager,m_ntrtmanager)).isFailure()) {
65 ATH_MSG_FATAL ( "Could not get TRT_DetectorManager" );
66 return StatusCode::FAILURE;
67 }
68 if ((detStore()->retrieve(m_TRTID)).isFailure()) {
69 ATH_MSG_FATAL( "Problem retrieving TRTID helper" );
70 return StatusCode::FAILURE;
71 }
72 if(m_trtcaldbTool.retrieve().isFailure()) {
73 ATH_MSG_FATAL( "Could not get TRTCalDbTool !" );
74 return StatusCode::FAILURE;
75 }
76 if(StatusCode::SUCCESS!=m_neighbourSvc.retrieve() ) {
77 ATH_MSG_FATAL("Could not get TRTStrawNeighbourTool !");
78 return StatusCode::FAILURE;
79 }
80
81
82 // The tool to get the argon status:
83
84 if (m_TRTStrawSummaryTool.retrieve().isFailure() ) {
85 ATH_MSG_ERROR ("Failed to retrieve StrawStatus Summary " << m_TRTStrawSummaryTool);
86 return StatusCode::FAILURE;
87 } else {
88 ATH_MSG_INFO( "Retrieved tool " << m_TRTStrawSummaryTool );
89 }
90
91
92
93 /*
94 Pre-define standard calibration configuration
95
96 The string-vectors "CalibrateRt" ("CalibrateT0") contains the names of the levels for
97 which R-t (T0) calibration should be performed
98
99 The string-vector "PrintLog" contains the names of the levels for which a status line
100 should be printed to the output log
101
102 The string-vectors "PrintT0Out" and "PrintRtOut" contains the names of the levels for
103 text files containing the calibration constants should be generated
104
105 This standard configuration divides the Barrel in 9 parts:
106
107 "all": a single calibration for all hits in the whole TRT
108 "-1" & "1": calibration of the barrel C- & A-side
109 "X_Y": calibration of layer Y in barrel X-side
110 */
111
112 //the whole TRT
113 m_config["all"].selections["Detector"].insert(CALIB_NONE); // don't go deeper than TRT level
114 m_config["all"].selections["Layer"].insert(CALIB_NONE);
115 m_config["all"].selections["Module"].insert(CALIB_NONE);
116 m_config["all"].selections["Board"].insert(CALIB_NONE);
117 m_config["all"].selections["Chip"].insert(CALIB_NONE);
118 m_config["all"].selections["Straw"].insert(CALIB_NONE);
119 m_config["all"].CalibrateRt.emplace_back("TRT") ; //only calibrate R-t and T0 on TRT level
120 m_config["all"].CalibrateT0.emplace_back("TRT") ;
121 m_config["all"].PrintLog.emplace_back("TRT") ;
122 m_config["all"].PrintT0Out.emplace_back("TRT") ;
123 m_config["all"].PrintRtOut.emplace_back("TRT") ;
124
125 //common for all barrel/ec
126 m_config["subdet"].CalibrateRt.emplace_back("TRT") ; //calibrate R-t and T0 on TRT and barrel/ec level
127 m_config["subdet"].CalibrateRt.emplace_back("Detector") ;
128 m_config["subdet"].CalibrateT0=m_config["subdet"].CalibrateRt;
129 m_config["subdet"].NoHistograms.emplace_back("TRT") ; //don't write root histogram on TRT level
130 m_config["subdet"].PrintLog=m_config["subdet"].CalibrateRt;
131 m_config["subdet"].PrintT0Out.emplace_back("Detector") ;
132 m_config["subdet"].PrintRtOut.emplace_back("Detector") ;
133
134 //individual barrel/ec
135 m_config["1"]=m_config["subdet"];
136 m_config["1"].selections["Detector"].insert(1);
137 m_config["1"].selections["Layer"].insert(CALIB_NONE); // don't go deeper than barrel/ec level
138 m_config["1"].selections["Module"].insert(CALIB_NONE);
139 m_config["1"].selections["Board"].insert(CALIB_NONE);
140 m_config["1"].selections["Chip"].insert(CALIB_NONE);
141 m_config["1"].selections["Straw"].insert(CALIB_NONE);
142 m_config["-1"]=m_config["subdet"];
143 m_config["-1"].selections["Detector"].insert(-1);
144 m_config["-1"].selections["Layer"].insert(CALIB_NONE);
145 m_config["-1"].selections["Module"].insert(CALIB_NONE);
146 m_config["-1"].selections["Board"].insert(CALIB_NONE);
147 m_config["-1"].selections["Chip"].insert(CALIB_NONE);
148 m_config["-1"].selections["Straw"].insert(CALIB_NONE);
149
150 //common for all layers
151 m_config["layer"].CalibrateRt.emplace_back("TRT") ; //calibrate R-t and T0 on all levels (except Straw level)
152 m_config["layer"].CalibrateRt.emplace_back("Detector") ;
153 m_config["layer"].CalibrateRt.emplace_back("Layer") ;
154 m_config["layer"].CalibrateRt.emplace_back("Module") ;
155 m_config["layer"].CalibrateRt.emplace_back("Board") ;
156 m_config["layer"].CalibrateRt.emplace_back("Chip") ;
157 m_config["layer"].CalibrateT0=m_config["layer"].CalibrateRt;
158 m_config["layer"].NoHistograms.emplace_back("TRT") ; //don't write root histogram on TRT, barrel/ec, straw level
159 m_config["layer"].NoHistograms.emplace_back("Detector") ;
160 m_config["layer"].NoHistograms.emplace_back("Straw") ;
161 m_config["layer"].PrintLog=m_config["layer"].CalibrateRt;
162 m_config["layer"].PrintT0Out.emplace_back("Layer") ;
163 m_config["layer"].PrintT0Out.emplace_back("Module") ;
164 m_config["layer"].PrintT0Out.emplace_back("Board") ;
165 m_config["layer"].PrintT0Out.emplace_back("Chip") ;
166 m_config["layer"].PrintT0Out.emplace_back("Straw") ; //print txt output for each straw
167 m_config["layer"].PrintRtOut.emplace_back("Layer") ;
168 m_config["layer"].PrintRtOut.emplace_back("Module") ;
169 m_config["layer"].PrintRtOut.emplace_back("Board") ;
170 m_config["layer"].PrintRtOut.emplace_back("Chip") ;
171 m_config["layer"].PrintRtOut.emplace_back("Straw") ; //print txt output for each straw
172
173 //individual layers
174 m_config["1_0"]=m_config["layer"];
175 m_config["1_0"].selections["Detector"].insert(1);
176 m_config["1_0"].selections["Layer"].insert(0);
177 m_config["1_1"]=m_config["layer"];
178 m_config["1_1"].selections["Detector"].insert(1);
179 m_config["1_1"].selections["Layer"].insert(1);
180 m_config["1_2"]=m_config["layer"];
181 m_config["1_2"].selections["Detector"].insert(1);
182 m_config["1_2"].selections["Layer"].insert(2);
183 m_config["-1_0"]=m_config["layer"];
184 m_config["-1_0"].selections["Detector"].insert(-1);
185 m_config["-1_0"].selections["Layer"].insert(0);
186 m_config["-1_1"]=m_config["layer"];
187 m_config["-1_1"].selections["Detector"].insert(-1);
188 m_config["-1_1"].selections["Layer"].insert(1);
189 m_config["-1_2"]=m_config["layer"];
190 m_config["-1_2"].selections["Detector"].insert(-1);
191 m_config["-1_2"].selections["Layer"].insert(2);
192
193 return StatusCode::SUCCESS;
194}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_FATAL(x)
const ServiceHandle< StoreGateSvc > & detStore() const
ToolHandle< ITRT_CalDbTool > m_trtcaldbTool
ServiceHandle< ITRT_StrawNeighbourSvc > m_neighbourSvc
ToolHandle< ITRT_StrawStatusSummaryTool > m_TRTStrawSummaryTool
Gaudi::Property< std::string > m_ntrtmanager
std::map< std::string, conf > m_config
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

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 & ITRTCalibrator::interfaceID ( )
inlinestaticinherited

Definition at line 40 of file ITRTCalibrator.h.

41{
42 return IID_ITRTCalibrator;
43}
static const InterfaceID IID_ITRTCalibrator("ITRTCalibrator", 1, 0)

◆ IsSubLev()

bool TRTCalibrator::IsSubLev ( const std::string & key,
int lev,
const std::string & sublev )

returns true if the ...

Definition at line 232 of file TRTCalibrator.cxx.

232 {
233
234 std::string sl=sublev;
235
236 if (sl.compare(SubLev(key,lev))==0) return true;
237
238 while(sl.compare(sl.substr(sl.find(',')+1))!=0){
239 if (SubLev(key,lev).compare(sl.substr(0,sl.find(',')))==0) return true;
240 sl=sl.substr(sl.find(',')+1);
241 if (SubLev(key,lev).compare(sl.substr(0,sl.find(',')))==0) return true;
242 }
243 return false;
244
245}
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,...

◆ MakeBDKeys()

void TRTCalibrator::MakeBDKeys ( int bec,
int low,
int mod,
int brd,
int chp,
int strawid )

makes the key strings for a sub-module

Definition at line 292 of file TRTCalibrator.cxx.

292 {
293 //make map keys for the board-chip view
294
295 char ckey[100];
296 sprintf(ckey,"_%i_%i_%i_%i_%i_%i",bec,low,mod,brd,chp,strawid); m_Skey=std::string(ckey);
297 sprintf(ckey,"_%i_%i_%i_%i_%i",bec,low,mod,brd,chp); m_Ckey=std::string(ckey);
298 sprintf(ckey,"_%i_%i_%i_%i",bec,low,mod,brd); m_Bkey=std::string(ckey);
299 sprintf(ckey,"_%i_%i_%i",bec,low,mod); m_Mkey=std::string(ckey);
300 sprintf(ckey,"_%i_%i",bec,low); m_Lkey=std::string(ckey);
301 sprintf(ckey,"_%i",bec); m_Dkey=std::string(ckey);
302 sprintf(ckey,"_all"); m_Tkey=std::string(ckey);
303
304 sprintf(ckey,"_%i_%i",abs(bec),low); m_Lkey_acc=std::string(ckey);
305 sprintf(ckey,"_%i",abs(bec)); m_Dkey_acc=std::string(ckey);
306
307}
std::string m_Lkey_acc
std::string m_Skey
std::string m_Dkey
std::string m_Ckey
std::string m_Mkey
std::string m_Lkey
std::string m_Tkey
std::string m_Dkey_acc
std::string m_Bkey

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

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()

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 > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
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)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ 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 203 of file TRTCalibrator.cxx.

203 {
204
205 std::string sublev;
206
207 for (int i=0;i<lev;i++){
208 pat.replace(pat.find('_'),1,"");
209 sublev = pat.substr(0,pat.find('_'));
210 pat.replace(0,pat.find('_'),"");
211 }
212 return sublev;
213}

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_beQuiet

Gaudi::Property< std::vector<std::string> > TRTCalibrator::m_beQuiet {this, "NoHistograms" , {} , ""}
private

Definition at line 148 of file TRTCalibrator.h.

148{this, "NoHistograms" , {} , ""};

◆ m_Bkey

std::string TRTCalibrator::m_Bkey
private

Definition at line 162 of file TRTCalibrator.h.

◆ m_calsub

Gaudi::Property<std::string> TRTCalibrator::m_calsub {this, "SubPart" , "user" , ""}
private

Definition at line 138 of file TRTCalibrator.h.

138{this, "SubPart" , "user" , ""};

◆ m_Ckey

std::string TRTCalibrator::m_Ckey
private

Definition at line 162 of file TRTCalibrator.h.

◆ m_comTimeName

std::string TRTCalibrator::m_comTimeName
private

Definition at line 161 of file TRTCalibrator.h.

◆ m_config

std::map<std::string,conf> TRTCalibrator::m_config
private

Definition at line 187 of file TRTCalibrator.h.

◆ m_DetID

const AtlasDetectorID* TRTCalibrator::m_DetID {}
private

Definition at line 154 of file TRTCalibrator.h.

154{};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_Dkey

std::string TRTCalibrator::m_Dkey
private

Definition at line 162 of file TRTCalibrator.h.

◆ m_Dkey_acc

std::string TRTCalibrator::m_Dkey_acc
private

Definition at line 162 of file TRTCalibrator.h.

◆ m_DoArXenonSep

Gaudi::Property<bool> TRTCalibrator::m_DoArXenonSep {this, "DoArXenonSep" , false , ""}
private

Definition at line 134 of file TRTCalibrator.h.

134{this, "DoArXenonSep" , false , ""};

◆ m_doLogPrint

Gaudi::Property< std::vector<std::string> > TRTCalibrator::m_doLogPrint {this, "PrintLog" , {} , ""}
private

Definition at line 150 of file TRTCalibrator.h.

150{this, "PrintLog" , {} , ""};

◆ m_doOutPrint

Gaudi::Property< std::vector<std::string> > TRTCalibrator::m_doOutPrint {this, "PrintT0Out" , {} , ""}
private

Definition at line 151 of file TRTCalibrator.h.

151{this, "PrintT0Out" , {} , ""};

◆ m_doRes

Gaudi::Property< std::vector<std::string> > TRTCalibrator::m_doRes {this, "FitResidual" , {} , ""}
private

Definition at line 147 of file TRTCalibrator.h.

147{this, "FitResidual" , {} , ""};

◆ m_doRt

Gaudi::Property< std::vector<std::string> > TRTCalibrator::m_doRt {this, "CalibrateRt" , {} , ""}
private

Definition at line 145 of file TRTCalibrator.h.

145{this, "CalibrateRt" , {} , ""};

◆ m_doRtPrint

Gaudi::Property< std::vector<std::string> > TRTCalibrator::m_doRtPrint {this, "PrintRtOut" , {} , ""}
private

Definition at line 152 of file TRTCalibrator.h.

152{this, "PrintRtOut" , {} , ""};

◆ m_DoShortStrawCorrection

Gaudi::Property<bool> TRTCalibrator::m_DoShortStrawCorrection {this, "DoShortStrawCorrection" , true , ""}
private

Definition at line 135 of file TRTCalibrator.h.

135{this, "DoShortStrawCorrection" , true , ""};

◆ m_doT0

Gaudi::Property< std::vector<std::string> > TRTCalibrator::m_doT0 {this, "CalibrateT0" , {} , ""}
private

Definition at line 146 of file TRTCalibrator.h.

146{this, "CalibrateT0" , {} , ""};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_floatP3

Gaudi::Property<bool> TRTCalibrator::m_floatP3 {this, "FloatP3" , true , ""}
private

Definition at line 133 of file TRTCalibrator.h.

133{this, "FloatP3" , true , ""};

◆ m_hittuple

Gaudi::Property<std::string> TRTCalibrator::m_hittuple {this, "Hittuple" , "merged.root" , ""}
private

Definition at line 140 of file TRTCalibrator.h.

140{this, "Hittuple" , "merged.root" , ""};

◆ m_Lkey

std::string TRTCalibrator::m_Lkey
private

Definition at line 162 of file TRTCalibrator.h.

◆ m_Lkey_acc

std::string TRTCalibrator::m_Lkey_acc
private

Definition at line 162 of file TRTCalibrator.h.

◆ m_maxDistance

Gaudi::Property<float> TRTCalibrator::m_maxDistance {this, "maxDistance" , 2.8 , ""}
private

Definition at line 121 of file TRTCalibrator.h.

121{this, "maxDistance" , 2.8 , ""};

◆ m_maxTimeResidual

Gaudi::Property<float> TRTCalibrator::m_maxTimeResidual {this, "maxTimeResidual" , 150.0 , ""}
private

Definition at line 122 of file TRTCalibrator.h.

122{this, "maxTimeResidual" , 150.0 , ""};

◆ m_maxTrackChisquarePerDof

Gaudi::Property<float> TRTCalibrator::m_maxTrackChisquarePerDof {this, "maxTrackChisquarePerDof" , 10.0 , ""}
private

Definition at line 123 of file TRTCalibrator.h.

123{this, "maxTrackChisquarePerDof" , 10.0 , ""};

◆ m_minrt

Gaudi::Property<int> TRTCalibrator::m_minrt {this, "MinRt" , 10000 , "minimum number of hits required to do R-t calibration" }
private

Definition at line 127 of file TRTCalibrator.h.

127{this, "MinRt" , 10000 , "minimum number of hits required to do R-t calibration" };

◆ m_mint0

Gaudi::Property<int> TRTCalibrator::m_mint0 {this, "MinT0" , 200 , "minimum number of hits required to do T0 calibration" }
private

Definition at line 128 of file TRTCalibrator.h.

128{this, "MinT0" , 200 , "minimum number of hits required to do T0 calibration" };

◆ m_minTimebinsOverThreshold

Gaudi::Property<int> TRTCalibrator::m_minTimebinsOverThreshold {this, "minTimebinsOverThreshold" , 2 , ""}
private

Definition at line 126 of file TRTCalibrator.h.

126{this, "minTimebinsOverThreshold" , 2 , ""};

◆ m_Mkey

std::string TRTCalibrator::m_Mkey
private

Definition at line 162 of file TRTCalibrator.h.

◆ m_neighbourSvc

ServiceHandle<ITRT_StrawNeighbourSvc> TRTCalibrator::m_neighbourSvc {this,"NeighbourSvc","ITRT_StrawNeighbourSvc","retrieve barrel and end-cap straw number" }
private

Definition at line 117 of file TRTCalibrator.h.

117{this,"NeighbourSvc","ITRT_StrawNeighbourSvc","retrieve barrel and end-cap straw number" };

◆ m_nevents

Gaudi::Property<int> TRTCalibrator::m_nevents {this, "Nevents" , -1 , "The number of hits or histograms read from the input file"}
private

Definition at line 129 of file TRTCalibrator.h.

129{this, "Nevents" , -1 , "The number of hits or histograms read from the input file"};

◆ m_ntrtmanager

Gaudi::Property<std::string> TRTCalibrator::m_ntrtmanager {this, "TrtManagerLocation" , "TRT" , ""}
private

Definition at line 143 of file TRTCalibrator.h.

143{this, "TrtManagerLocation" , "TRT" , ""};

◆ m_numOfHitsAccepted

unsigned int TRTCalibrator::m_numOfHitsAccepted {}
private

Definition at line 158 of file TRTCalibrator.h.

158{} ;

◆ m_numOfHitsTotal

unsigned int TRTCalibrator::m_numOfHitsTotal {}
private

Definition at line 157 of file TRTCalibrator.h.

157{};

◆ m_numOfProcessedTracks

unsigned int TRTCalibrator::m_numOfProcessedTracks {}
private

Definition at line 159 of file TRTCalibrator.h.

159{} ;

◆ m_options

Gaudi::Property<std::string> TRTCalibrator::m_options {this, "Options" , "" , ""}
private

Definition at line 139 of file TRTCalibrator.h.

139{this, "Options" , "" , ""};

◆ m_rtbinning

Gaudi::Property<std::string> TRTCalibrator::m_rtbinning {this, "RtBinning" , "t" , ""}
private

Definition at line 142 of file TRTCalibrator.h.

142{this, "RtBinning" , "t" , ""};

◆ m_rtrel

Gaudi::Property<std::string> TRTCalibrator::m_rtrel {this, "RtRel" , "basic" , "the rt relation to use"}
private

Definition at line 141 of file TRTCalibrator.h.

141{this, "RtRel" , "basic" , "the rt relation to use"};

◆ m_selstring

Gaudi::Property<std::string> TRTCalibrator::m_selstring {this, "Selstring" , "_*_-_-_-_-_-_-" , ""}
private

Definition at line 137 of file TRTCalibrator.h.

137{this, "Selstring" , "_*_-_-_-_-_-_-" , ""};

◆ m_Skey

std::string TRTCalibrator::m_Skey
private

Definition at line 162 of file TRTCalibrator.h.

◆ m_SplitBarrel

Gaudi::Property<bool> TRTCalibrator::m_SplitBarrel {this, "SplitBarrel" , true , ""}
private

Definition at line 131 of file TRTCalibrator.h.

131{this, "SplitBarrel" , true , ""};

◆ m_t0offset

Gaudi::Property<float> TRTCalibrator::m_t0offset {this, "T0Offset" , -0.3 , ""}
private

Definition at line 124 of file TRTCalibrator.h.

124{this, "T0Offset" , -0.3 , ""};

◆ m_Tkey

std::string TRTCalibrator::m_Tkey
private

Definition at line 162 of file TRTCalibrator.h.

◆ m_trt

BDTRT TRTCalibrator::m_trt
private

instance if the dictionary class for the full TRT

Definition at line 172 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 174 of file TRTCalibrator.h.

◆ m_trtcaldbTool

ToolHandle<ITRT_CalDbTool> TRTCalibrator::m_trtcaldbTool {this, "TRTCalDbTool", "ITRT_CalDbTool", ""}
private

Definition at line 115 of file TRTCalibrator.h.

115{this, "TRTCalDbTool", "ITRT_CalDbTool", ""};

◆ m_TRTID

const TRT_ID* TRTCalibrator::m_TRTID {}
private

Definition at line 155 of file TRTCalibrator.h.

155{};

◆ m_trtmanager

const InDetDD::TRT_DetectorManager* TRTCalibrator::m_trtmanager {}
private

Definition at line 156 of file TRTCalibrator.h.

156{};

◆ m_TRTStrawSummaryTool

ToolHandle<ITRT_StrawStatusSummaryTool> TRTCalibrator::m_TRTStrawSummaryTool {this, "TRTStrawSummaryTool", "ITRT_StrawStatusSummaryTool", ""}
private

Definition at line 116 of file TRTCalibrator.h.

116{this, "TRTStrawSummaryTool", "ITRT_StrawStatusSummaryTool", ""};

◆ m_useBoardRef

Gaudi::Property< std::vector<std::string> > TRTCalibrator::m_useBoardRef {this, "UseBoardRef" , {} , ""}
private

Definition at line 149 of file TRTCalibrator.h.

149{this, "UseBoardRef" , {} , ""};

◆ m_useP0

Gaudi::Property<bool> TRTCalibrator::m_useP0 {this, "UseP0" , true , ""}
private

Definition at line 132 of file TRTCalibrator.h.

132{this, "UseP0" , true , ""};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: