![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <TRT_DetElementsRoadMaker_xk.h>
|
| TRT_DetElementsRoadMaker_xk (const std::string &, const std::string &, const IInterface *) |
|
virtual | ~TRT_DetElementsRoadMaker_xk () |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | finalize () override |
|
virtual std::vector< const InDetDD::TRT_BaseElement * > | detElementsRoad (const EventContext &ctx, MagField::AtlasFieldCache &fieldCache, const Trk::TrackParameters &Tp, Trk::PropDirection D, InDet::TRT_DetElementLink_xk::TRT_DetElemUsedMap &used) const override |
|
virtual MsgStream & | dump (MsgStream &out) const override |
|
virtual std::ostream & | dump (std::ostream &out) const override |
|
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 |
|
◆ StoreGateSvc_t
◆ TRT_DetElementsRoadMaker_xk()
InDet::TRT_DetElementsRoadMaker_xk::TRT_DetElementsRoadMaker_xk |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~TRT_DetElementsRoadMaker_xk()
InDet::TRT_DetElementsRoadMaker_xk::~TRT_DetElementsRoadMaker_xk |
( |
| ) |
|
|
virtualdefault |
◆ 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]
◆ detElementsRoad()
◆ detElementsRoadATL()
Definition at line 311 of file TRT_DetElementsRoadMaker_xk.cxx.
324 float(std::sqrt((*g).x()*(*g).x()+(*g).y()*(*g).y())),
m_width,0.};
330 std::vector<std::pair<const InDet::TRT_DetElementLink_xk*,float> > lDE;
331 for (
unsigned int module_i = 0; module_i < 3; ++module_i) {
332 size_t layersSize =
layer[module_i].size();
334 used[module_i].resize(layersSize);
335 for (
unsigned int layer_i = 0; layer_i < layersSize; ++layer_i) {
338 used[module_i][layer_i].clear();
340 used[module_i][layer_i].resize(
layer[module_i][layer_i].nElements());
344 for(++
g;
g!=ge; ++
g) {
347 float(std::sqrt((*g).x()*(*g).x()+(*g).y()*(*g).y()))};
349 float dx = Pn[0]-Po[0];
350 float dy = Pn[1]-Po[1];
351 float dz = Pn[2]-Po[2];
352 float st = std::sqrt(
dx*
dx+
dy*
dy+dz*dz);
353 if(st <=0.)
continue;
364 assert(
used.at(1).size() >
static_cast<unsigned int>(
n1));
368 for (--
n1;
n1 >= 0; --
n1) {
371 assert(
used.at(1).size() >
static_cast<unsigned int>(
n1));
382 if (Pn[2] <
layer[2][n2].
z())
384 assert(
used.at(2).size() >
static_cast<unsigned int>(n2));
385 layer[2][n2].getEndcapDetElements(Po,
A, lDE,
used[2][n2]);
388 for (--n2; n2 >= 0; --n2) {
389 if (Pn[2] >
layer[2][n2].
z())
391 assert(
used.at(2).size() >
static_cast<unsigned int>(n2));
392 layer[2][n2].getEndcapDetElements(Po,
A, lDE,
used[2][n2]);
402 if (Pn[2] >
layer[0][n0].
z())
404 assert(
used.at(0).size() >
static_cast<unsigned int>(n0));
405 layer[0][n0].getEndcapDetElements(Po,
A, lDE,
used[0][n0]);
408 for (--n0; n0 >= 0; --n0) {
409 if (Pn[2] <
layer[0][n0].
z())
411 assert(
used.at(0).size() >
static_cast<unsigned int>(n0));
412 layer[0][n0].getEndcapDetElements(Po,
A, lDE,
used[0][n0]);
425 std::vector<std::pair<const InDet::TRT_DetElementLink_xk*,float> >
::iterator l=lDE.begin(),le=lDE.end(),
n,
m;
432 for(++
n;
n!=le; ++
n) {
434 if( (*m).second > (*n).second ) {
435 std::pair<const InDet::TRT_DetElementLink_xk*,float>
d=(*m); (*m)=(*n); (*n)=
d;
nc=
true;
443 for(
l=lDE.begin();
l!=le; ++
l) {
444 Road.push_back((*l).first->detElement());
◆ detElementsRoadCTB()
Definition at line 453 of file TRT_DetElementsRoadMaker_xk.cxx.
464 float(std::sqrt((*g).x()*(*g).x()+(*g).y()*(*g).y())),
m_width,0.};
468 std::vector<std::pair<const InDet::TRT_DetElementLink_xk*,float> > lDE;
469 for (
unsigned int module_i = 0; module_i < 3; ++module_i) {
470 size_t layersSize =
layer[module_i].size();
472 used[module_i].resize(layersSize);
473 for (
unsigned int layer_i = 0; layer_i < layersSize; ++layer_i) {
476 used[module_i][layer_i].clear();
478 used[module_i][layer_i].resize(
layer[module_i][layer_i].nElements());
482 for(++
g;
g!=ge; ++
g) {
485 float(std::sqrt((*g).x()*(*g).x()+(*g).y()*(*g).y()))};
487 float dx = Pn[0]-Po[0];
488 float dy = Pn[1]-Po[1];
489 float dz = Pn[2]-Po[2];
490 float st = std::sqrt(
dx*
dx+
dy*
dy+dz*dz);
499 assert(
used.at(1).size() >
static_cast<unsigned int>(
n1) );
514 std::vector<std::pair<const InDet::TRT_DetElementLink_xk*, float> >
::iterator l=lDE.begin(),le=lDE.end(),
n;
521 for(++
n;
n!=le; ++
n) {
523 if( (*l).second > (*n).second ) {
524 std::pair<const InDet::TRT_DetElementLink_xk*,float>
d = (*l); (*l) = (*n); (*n) =
d;
533 for(
l=lDE.begin();
l!=le; ++
l) {
534 Road.push_back((*l).first->detElement());
◆ detStore()
◆ dump() [1/2]
MsgStream & InDet::TRT_DetElementsRoadMaker_xk::dump |
( |
MsgStream & |
out | ) |
const |
|
overridevirtual |
◆ dump() [2/2]
std::ostream & InDet::TRT_DetElementsRoadMaker_xk::dump |
( |
std::ostream & |
out | ) |
const |
|
overridevirtual |
◆ dumpConditions()
MsgStream & InDet::TRT_DetElementsRoadMaker_xk::dumpConditions |
( |
MsgStream & |
out | ) |
const |
|
private |
Definition at line 105 of file TRT_DetElementsRoadMaker_xk.cxx.
108 std::string
s1;
for(
int i=0;
i<
n; ++
i)
s1.append(
" ");
s1.append(
"|");
110 std::string fieldmode[9] ={
"NoField" ,
"ConstantField",
"SolenoidalField",
111 "ToroidalField" ,
"Grid3DField" ,
"RealisticField" ,
112 "UndefinedField",
"AthenaField" ,
"?????" };
119 fieldCondObj->getInitializedCache (fieldCache);
123 int mode = fieldprop.magneticFieldMode();
124 if(mode<0 || mode>8 )
mode = 8;
126 n = 62-fieldmode[
mode].size();
127 std::string
s3;
for(
int i=0;
i<
n; ++
i)
s3.append(
" ");
s3.append(
"|");
136 out<<
"|----------------------------------------------------------------------"
137 <<
"-------------------|"
140 out<<
"| Magnetic field mode | "<<fieldmode[
mode]<<
s3<<std::endl;
141 out<<
"| Width of the road (mm) | "
142 <<std::setw(12)<<std::setprecision(5)<<
m_width
144 out<<
"|----------------------------------------------------------------------"
145 <<
"-------------------|"
151 int nl =
layer[1].size();
153 for(
const auto &
i :
layer[1])
nc+=
i.nElements();
154 out<<
"|----------------------------------------------------------------|"
156 out<<
"| Barrel map containt "
157 <<std::setw(4)<<nl<<
" layers and "
158 <<std::setw(6)<<
nc<<
" elements |"
160 out<<
"|------|-----------|------------|------------|------------|------|"
162 out<<
"| n | R | Z min | Z max | max dF | nEl |"
164 out<<
"|------|-----------|------------|------------|------------|------|"
166 for(
unsigned int i=0;
i!=
layer[1].size(); ++
i) {
170 <<std::setw(4)<<
i<<
" |"
171 <<std::setw(10)<<std::setprecision(4)<<
layer[1][
i].r ()<<
" | "
172 <<std::setw(10)<<std::setprecision(4)<<
zmin<<
" | "
173 <<std::setw(10)<<std::setprecision(4)<<
zmax<<
" | "
174 <<std::setw(10)<<std::setprecision(4)<<
layer[1][
i].dfe()<<
" | "
175 <<std::setw(4)<<
layer[1][
i].nElements()<<
" | "
178 out<<
"|------|-----------|------------|------------|------------|------|"
184 int nl =
layer[0].size();
186 for(
const auto &
i :
layer[0])
nc+=
i.nElements();
187 out<<
"|----------------------------------------------------------------|"
189 out<<
"| L.Endcap map containt "
190 <<std::setw(4)<<nl<<
" layers and "
191 <<std::setw(6)<<
nc<<
" elements |"
194 out<<
"|------|-----------|------------|------------|------------|------|"
196 out<<
"| n | Z | R min | R max | max dF | nEl |"
198 out<<
"|------|-----------|------------|------------|------------|------|"
200 for(
unsigned int i=0;
i!=
layer[0].size(); ++
i) {
204 <<std::setw(4)<<
i<<
" |"
205 <<std::setw(10)<<std::setprecision(4)<<
layer[0][
i].z()<<
" | "
206 <<std::setw(10)<<std::setprecision(4)<< rmin<<
" | "
207 <<std::setw(10)<<std::setprecision(4)<< rmax<<
" | "
208 <<std::setw(10)<<std::setprecision(4)<<
layer[0][
i].dfe()<<
" | "
209 <<std::setw(4)<<
layer[0][
i].nElements()<<
" | "
212 out<<
"|------|-----------|------------|------------|------------|------|"
216 int nl =
layer[2].size();
218 for(
const auto &
i :
layer[2])
nc+=
i.nElements();
219 out<<
"|----------------------------------------------------------------|"
221 out<<
"| R.Endcap map containt "
222 <<std::setw(4)<<nl<<
" layers and "
223 <<std::setw(6)<<
nc<<
" elements |"
225 out<<
"|------|-----------|------------|------------|------------|------|"
227 out<<
"| n | Z | R min | R max | max dF | nEl |"
229 out<<
"|------|-----------|------------|------------|------------|------|"
231 for(
unsigned int i=0;
i!=
layer[2].size(); ++
i) {
235 <<std::setw(4)<<
i<<
" |"
236 <<std::setw(10)<<std::setprecision(4)<<
layer[2][
i].z()<<
" | "
237 <<std::setw(10)<<std::setprecision(4)<< rmin<<
" | "
238 <<std::setw(10)<<std::setprecision(4)<< rmax<<
" | "
239 <<std::setw(10)<<std::setprecision(4)<<
layer[2][
i].dfe()<<
" | "
240 <<std::setw(4)<<
layer[2][
i].nElements()<<
" | "
243 out<<
"|------|-----------|------------|------------|------------|------|"
◆ dumpEvent()
MsgStream & InDet::TRT_DetElementsRoadMaker_xk::dumpEvent |
( |
MsgStream & |
out, |
|
|
int |
size_road |
|
) |
| |
|
staticprivate |
Definition at line 253 of file TRT_DetElementsRoadMaker_xk.cxx.
255 out<<
"|--------------------------------------------------------------------|"
257 out<<
"| Road size | "<<std::setw(12)<<size_road
259 out<<
"|--------------------------------------------------------------------|"
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ finalize()
StatusCode InDet::TRT_DetElementsRoadMaker_xk::finalize |
( |
| ) |
|
|
overridevirtual |
◆ get_bounds()
◆ getBound()
Definition at line 555 of file TRT_DetElementsRoadMaker_xk.cxx.
558 const double cor = 0.8;
565 zfield = 299.7925*
f[2];
570 if( std::abs(zfield) < .0000001 )
return bounds;
572 const AmgVector(5)& Vp = Tp.parameters();
576 if( std::abs(
cur)*bounds.
r() < cor )
return bounds;
579 if(cor*std::abs(
rad) > bounds.
r() )
return bounds;
582 double sn,cs; sincos(Vp[2],&sn,&cs);
583 double xc = Gp.x()+sn*
rad ;
584 double yc = Gp.y()-cs*
rad ;
585 double rm = (std::sqrt(xc*xc+yc*yc)+std::abs(
rad))*cor;
586 if( rm > bounds.
r() )
return bounds;
◆ getLayers()
◆ getTRTMinR()
double InDet::TRT_DetElementsRoadMaker_xk::getTRTMinR |
( |
| ) |
const |
|
inlineprivate |
◆ initialize()
StatusCode InDet::TRT_DetElementsRoadMaker_xk::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.
◆ interfaceID()
const InterfaceID & InDet::ITRT_DetElementsRoadMaker::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ 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()
◆ stepToDetElement()
◆ 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_detStore
◆ m_evtStore
◆ m_fieldCacheCondObjInputKey
Initial value:{this,"AtlasFieldCacheCondObj", "fieldCondObj",
"Name of the Magnetic Field conditions object key"}
Definition at line 106 of file TRT_DetElementsRoadMaker_xk.h.
◆ m_fieldmode
std::string InDet::TRT_DetElementsRoadMaker_xk::m_fieldmode |
|
private |
◆ m_fieldModeEnum
◆ m_proptool
◆ m_roadDataKey
Initial value:{this, "RoadDataKey",
"TRT_DetElementsRoadData_xk", "Key of TRT_DetElementsRoadData_xk"}
Definition at line 103 of file TRT_DetElementsRoadMaker_xk.h.
◆ m_step
double InDet::TRT_DetElementsRoadMaker_xk::m_step {} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_width
float InDet::TRT_DetElementsRoadMaker_xk::m_width {} |
|
private |
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
MsgStream & dumpConditions(MsgStream &out) const
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
const Trk::CylinderBounds get_bounds() const
void getFieldZR(const double *ATH_RESTRICT xyz, double *ATH_RESTRICT bxyz, double *ATH_RESTRICT deriv=nullptr)
get B field valaue on the z-r plane at given position works only inside the solenoid.
const Amg::Vector3D & position() const
Access method for the position.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
double getTRTMinR() const
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
const TRT_DetElementsLayerVectors_xk * getLayers() const
std::vector< std::vector< InDet::TRT_DetElementsLayer_xk > > TRT_DetElementsLayerVectors_xk
virtual void setOwner(IDataHandleHolder *o)=0
Trk::MagneticFieldMode m_fieldModeEnum
SG::ReadCondHandleKey< TRT_DetElementsRoadData_xk > m_roadDataKey
@ FastField
call the fast field access method of the FieldSvc
ToolHandle< Trk::IPropagator > m_proptool
::StatusCode StatusCode
StatusCode definition for legacy code.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
bool solenoidOn() const
status of the magnets
@ FullField
Field is set to be realistic, but within a given Volume.
Trk::CylinderBounds getBound(MagField::AtlasFieldCache &fieldCache, const Trk::TrackParameters &) const
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
@ NoField
Field is set to 0., 0., 0.,.
StatusCode initialize(bool used=true)
Eigen::Matrix< double, 3, 1 > Vector3D
void detElementsRoadATL(std::deque< Amg::Vector3D > &, std::vector< const InDetDD::TRT_BaseElement * > &, InDet::TRT_DetElementLink_xk::TRT_DetElemUsedMap &used) const
virtual const Amg::Vector3D & center() const override final
Element Surface: center of a straw layer.
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual const Amg::Vector3D & normal() const override final
Element Surface: normal of a straw layer.
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
double halflengthZ() const
This method returns the halflengthZ.
virtual double r() const override final
This method returns the radius.