ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TRTDetectorFactory_Lite Class Reference

#include <TRTDetectorFactory_Lite.h>

Inheritance diagram for TRTDetectorFactory_Lite:
Collaboration diagram for TRTDetectorFactory_Lite:

Public Member Functions

 TRTDetectorFactory_Lite (GeoModelIO::ReadGeoModel *sqliteReader, InDetDD::AthenaComps *athenaComps, const ITRT_StrawStatusSummaryTool *sumTool, bool useOldActiveGasMixture, bool DC2CompatibleBarrelCoordinates, bool alignable, bool useDynamicAlignmentFolders)
 
 ~TRTDetectorFactory_Lite ()=default
 
virtual void create (GeoPhysVol *world) override
 
virtual const InDetDD::TRT_DetectorManagergetDetectorManager () const override
 
const TRTDetectorFactory_Liteoperator= (const TRTDetectorFactory_Lite &right)=delete
 
 TRTDetectorFactory_Lite (const TRTDetectorFactory_Lite &right)=delete
 
StoreGateSvcdetStore ()
 
const StoreGateSvcdetStore () const
 
const IGeoDbTagSvcgeoDbTagSvc () const
 
IRDBAccessSvcrdbAccessSvc ()
 
const IGeometryDBSvcgeomDB () const
 
MsgStream & msg (MSG::Level lvl) const
 
bool msgLvl (MSG::Level lvl)
 
InDetDD::AthenaCompsgetAthenaComps ()
 

Private Member Functions

double activeGasZPosition (bool hasLargeDeadRegion=false) const
 
void setEndcapTransformField (size_t w)
 
void refreshGasEndcap (int strawStatusHT, GeoVPhysVol *strawPlane)
 
void refreshGasBarrel (int strawStatusHT, GeoVPhysVol *shell)
 

Private Attributes

GeoModelIO::ReadGeoModel * m_sqliteReader {}
 
InDetDD::TRT_DetectorManagerm_detectorManager = nullptr
 
std::unique_ptr< TRTParameterInterfacem_data
 
bool m_useOldActiveGasMixture {}
 
bool m_DC2CompatibleBarrelCoordinates {}
 
bool m_alignable {}
 
const ITRT_StrawStatusSummaryToolm_sumTool {}
 
bool m_strawsvcavailable {}
 
bool m_useDynamicAlignFolders {}
 
GeoIntrusivePtr< const GeoMaterial > m_xenonGas {nullptr}
 
GeoIntrusivePtr< const GeoMaterial > m_argonGas {nullptr}
 
InDetDD::AthenaCompsm_athenaComps
 

Detailed Description

Author
Joe Boudreau

Definition at line 28 of file TRTDetectorFactory_Lite.h.

Constructor & Destructor Documentation

◆ TRTDetectorFactory_Lite() [1/2]

TRTDetectorFactory_Lite::TRTDetectorFactory_Lite ( GeoModelIO::ReadGeoModel *  sqliteReader,
InDetDD::AthenaComps athenaComps,
const ITRT_StrawStatusSummaryTool sumTool,
bool  useOldActiveGasMixture,
bool  DC2CompatibleBarrelCoordinates,
bool  alignable,
bool  useDynamicAlignmentFolders 
)

Definition at line 46 of file TRTDetectorFactory_Lite.cxx.

53  : InDetDD::DetectorFactoryBase(athenaComps),
54  m_sqliteReader (sqliteReader),
55  m_useOldActiveGasMixture(useOldActiveGasMixture),
56  m_DC2CompatibleBarrelCoordinates(DC2CompatibleBarrelCoordinates),
57  m_alignable(alignable),
58  m_sumTool(sumTool),
59  m_useDynamicAlignFolders(useDynamicAlignmentFolders)
60 {
61 }

◆ ~TRTDetectorFactory_Lite()

TRTDetectorFactory_Lite::~TRTDetectorFactory_Lite ( )
default

◆ TRTDetectorFactory_Lite() [2/2]

TRTDetectorFactory_Lite::TRTDetectorFactory_Lite ( const TRTDetectorFactory_Lite right)
delete

Member Function Documentation

◆ activeGasZPosition()

double TRTDetectorFactory_Lite::activeGasZPosition ( bool  hasLargeDeadRegion = false) const
private

Definition at line 1122 of file TRTDetectorFactory_Lite.cxx.

1122  {
1123 
1124  double lengthOfInnerDeadRegion= hasLargeDeadRegion ? m_data->barrelLengthOfLargeDeadRegion : m_data->lengthOfDeadRegion ;
1125  double lengthOfActiveGas = (m_data->barrelLengthOfStraw-m_data->barrelLengthOfTwister)/2.0 - m_data->lengthOfDeadRegion - lengthOfInnerDeadRegion;
1126  return (lengthOfActiveGas + m_data->barrelLengthOfTwister) / 2. + lengthOfInnerDeadRegion; // middle of lengthOfActiveGas
1127 
1128 }

◆ create()

void TRTDetectorFactory_Lite::create ( GeoPhysVol *  world)
overridevirtual

Definition at line 87 of file TRTDetectorFactory_Lite.cxx.

88 {
89 
90  // Here we build materials by hand. This awaits updates to GeoModelIO which would allow to retreive materials from
91  // the database. At that point we can remove the manual creation of materials.
92 
93  // Make two kinds of Gas
94  GeoElement *carbon = new GeoElement("Carbon","C",6,12.0112*GeoModelKernelUnits::gram/GeoModelKernelUnits::mole);
95  GeoElement *oxygen = new GeoElement("Oxygen","O",8,15.9994*GeoModelKernelUnits::gram/GeoModelKernelUnits::mole);
96  GeoElement *argon = new GeoElement("Argon","Ar",18,39.948*GeoModelKernelUnits::gram/GeoModelKernelUnits::mole);
97  GeoElement *xenon = new GeoElement("Xenon","Xe",54,131.3*GeoModelKernelUnits::gram/GeoModelKernelUnits::mole);
98 
99  GeoMaterial *trtCO2 = new GeoMaterial("trt::CO2", 0.001842*GeoModelKernelUnits::gram / GeoModelKernelUnits::cm3);
100  trtCO2->add(carbon,1);
101  trtCO2->add(oxygen,2);
102  trtCO2->lock();
103 
104 
105  GeoMaterial *trtO2 = new GeoMaterial("trt::O2", 0.001334*GeoModelKernelUnits::gram / GeoModelKernelUnits::cm3);
106  trtO2->add(oxygen,1);
107  trtO2->lock();
108 
109  GeoMaterial *trtArgon = new GeoMaterial("trt::Argon", 0.001662*GeoModelKernelUnits::gram / GeoModelKernelUnits::cm3);
110  trtArgon->add(argon,1);
111  trtArgon->lock();
112 
113  GeoMaterial *trtXenon = new GeoMaterial("trt::Xenon", 0.005485*GeoModelKernelUnits::gram / GeoModelKernelUnits::cm3);
114  trtXenon->add(xenon,1);
115  trtXenon->lock();
116 
117  GeoMaterial *argonGas = new GeoMaterial("trt::ArCO2O2",0.00165878*GeoModelKernelUnits::gram / GeoModelKernelUnits::cm3);
118  argonGas->add(trtArgon,0.7);
119  argonGas->add(trtCO2,0.27);
120  argonGas->add(trtO2,0.03);
121  argonGas->lock();
122 
123  GeoMaterial *xenonGas = new GeoMaterial("trt::XeCO2O2",0.00437686*GeoModelKernelUnits::gram / GeoModelKernelUnits::cm3);
124  xenonGas->add(trtXenon,0.7);
125  xenonGas->add(trtCO2,0.27);
126  xenonGas->add(trtO2,0.03);
127  xenonGas->lock();
128 
129  m_argonGas=argonGas;
130  m_xenonGas=xenonGas;
131 
132  std::map<std::string, GeoFullPhysVol*> mapFPV = m_sqliteReader->getPublishedNodes<std::string, GeoFullPhysVol*>("TRT");
133  std::map<std::string, GeoAlignableTransform*> mapAX = m_sqliteReader->getPublishedNodes<std::string, GeoAlignableTransform*>("TRT");
134 
135  // The top level volumes
136  GeoFullPhysVol *pBarrelVol = mapFPV["TRTBarrel"];
137  GeoFullPhysVol *pEndCapABPlus = mapFPV["TRTEndCapABPlus"];
138  GeoFullPhysVol *pEndCapCPlus = mapFPV["TRTEndCapCPlus"];
139  GeoFullPhysVol *pEndCapABMinus = mapFPV["TRTEndCapABMinus"];
140  GeoFullPhysVol *pEndCapCMinus = mapFPV["TRTEndCapCPlus"];;
141 
142 
143 
144  // Create a new detectormanager.
146 
147  //---------------------- Initialize the parameter interface ------------------------//
148 
149  ATH_MSG_DEBUG( " Getting primary numbers from the Detector Description Database " );
151  m_data.reset(parameterInterface);
152 
153 
154  IRDBAccessSvc* iAccessSvc = rdbAccessSvc();
155 
156 
157  std::vector<GeoTrf::Transform3D> shellPosVec;
158  IRDBRecordset_ptr trtShellPosVecRecordSet = iAccessSvc->getRecordsetPtr("TRTShellPosVec","","","");
159  for (size_t r=0;r<trtShellPosVecRecordSet->size();r++) {
160  const IRDBRecord * trtShellPosVecRecord = (*trtShellPosVecRecordSet)[r];
161  double xx=trtShellPosVecRecord->getDouble("xx");
162  double xy=trtShellPosVecRecord->getDouble("xy");
163  double xz=trtShellPosVecRecord->getDouble("xz");
164 
165  double yx=trtShellPosVecRecord->getDouble("yx");
166  double yy=trtShellPosVecRecord->getDouble("yy");
167  double yz=trtShellPosVecRecord->getDouble("yz");
168 
169  double zx=trtShellPosVecRecord->getDouble("zx");
170  double zy=trtShellPosVecRecord->getDouble("zy");
171  double zz=trtShellPosVecRecord->getDouble("zz");
172 
173  double dx=trtShellPosVecRecord->getDouble("dx");
174  double dy=trtShellPosVecRecord->getDouble("dy");
175  double dz=trtShellPosVecRecord->getDouble("dz");
176  Eigen::Matrix4d M;
177  M(0,0)=xx; M(0,1)=xy; M(0,2)=xz; M(0,3)=dx;
178  M(1,0)=yx; M(1,1)=yy; M(1,2)=yz; M(1,3)=dy;
179  M(2,0)=zx; M(2,1)=zy; M(2,2)=zz; M(2,3)=dz;
180  M(3,0)= 0; M(3,1)= 0; M(3,2)= 0; M(3,3)=1;
182  T.matrix()=M;
183  shellPosVec.push_back(T);
184  }
185 
186  //---------------------- Check if the folder TRT/Cond/StatusHT is in place ------------------------//
188  detStore()->contains<TRTCond::StrawStatusMultChanContainer>("/TRT/Cond/StatusHT")
189  &&
190  m_sumTool->getStrawStatusHTContainer() != nullptr;
191 
192  //---------------------- Initialize ID Helper ------------------------------------//
193  const TRT_ID *idHelper = nullptr;
194 
195  if (detStore()->retrieve(idHelper, "TRT_ID").isFailure()) {
196  ATH_MSG_ERROR( "Could not retrieve TRT ID Helper");
197  }
198 
199  m_detectorManager->setIdHelper(idHelper,false);
200 
201  //---------------------- Set and Print Version Information ------------------------------------//
202 
203  //Set active gas type information.
206 
207  // Set Version information
208  // Some of these get overwritten for new configurations.
209  std::string versionTag = m_data->versionTag;
210  std::string versionName = "DC2";
211  std::string layout = "Final";
212  std::string description = "DC2 Geometry";
213  int versionMajorNumber = 2;
214  int versionMinorNumber = 1;
215  int versionPatchNumber = 0;
216 
217  if (m_data->initialLayout) layout = "Initial";
218  //In principle we dont need to let the minor number reflect the
219  //gastype anymore, but it doesn't hurt:
220  if (m_useOldActiveGasMixture) versionMinorNumber = 0;
222  versionMajorNumber = 3;
223  versionName = "Rome";
224  description = "Geometry for Rome 2005";
225  }
226 
227  if (m_data->isCosmicRun) {
228  layout = "SR1";
229  description = "Geometry for SR1";
230  }
231 
232 
233  // If new configuration we get the version information from the database.
234  // The version numbers can be incremented as one sees fit.
235  // In principle they should be changed whenever there are any code changes.
236  if (!m_data->oldConfiguration) {
237  versionName = m_data->versionName;
238  layout = m_data->layout;
239  description = m_data->versionDescription;
240  versionMajorNumber = 4;
241  versionMinorNumber = 1;
242  versionPatchNumber = 1;
243  }
244 
245  InDetDD::Version version(versionTag,
246  versionName,
247  layout,
248  description,
249  versionMajorNumber,
250  versionMinorNumber,
251  versionPatchNumber);
252 
254 
255 
256  // Print version information.
257  ATH_MSG_INFO( "In TRT Detector Factory Lite" );
258  ATH_MSG_INFO( " " << version.fullDescription() );
259 
260 
261  //---------- Alignmnent and Conditions -----------//
262  // Register the channels for alignment constants
263  // and the level corresponding to the channel.
264  // Not the levels are an internal definition . They are not the same as
265  // the usual alignment levels
266  const int AlignmentLevelSubWheel = 1; // Level 2 in endcap. Not used in barrel
267  const int AlignmentLevelModule = 2; // Level 2 in barrel. Deprecated (wheel level) in endcap.
268  const int AlignmentLevelTop = 3; // Level 1
269 
270  if (m_alignable) {
271 
274  m_detectorManager->addFolder("/TRT/Align");
275  m_detectorManager->addChannel("/TRT/Align/TRT", AlignmentLevelTop, InDetDD::global);
276 
277  if (pBarrelVol) {
278  m_detectorManager->addChannel("/TRT/Align/B0", AlignmentLevelModule, InDetDD::global);
279  m_detectorManager->addChannel("/TRT/Align/B1", AlignmentLevelModule, InDetDD::global);
280  m_detectorManager->addChannel("/TRT/Align/B2", AlignmentLevelModule, InDetDD::global);
281  }
282  if (pEndCapABPlus) { // EndcapA
283  m_detectorManager->addChannel("/TRT/Align/L2A", AlignmentLevelSubWheel, InDetDD::global);
284  }
285  if (pEndCapABMinus) {// EndcapC
286  m_detectorManager->addChannel("/TRT/Align/L2C", AlignmentLevelSubWheel, InDetDD::global);
287  }
288  }
289 
290  else {
292 
293  m_detectorManager->addGlobalFolder("/TRT/AlignL1/TRT");
294  m_detectorManager->addChannel("/TRT/AlignL1/TRT", AlignmentLevelTop, InDetDD::global);
295  m_detectorManager->addFolder("/TRT/AlignL2");
296 
297  if (pBarrelVol) {
298  m_detectorManager->addChannel("/TRT/AlignL2/B0", AlignmentLevelModule, InDetDD::global);
299  m_detectorManager->addChannel("/TRT/AlignL2/B1", AlignmentLevelModule, InDetDD::global);
300  m_detectorManager->addChannel("/TRT/AlignL2/B2", AlignmentLevelModule, InDetDD::global);
301  }
302 
303  if (pEndCapABPlus) { // EndcapA
304  m_detectorManager->addChannel("/TRT/AlignL2/L2A", AlignmentLevelSubWheel, InDetDD::global);
305  }
306  if (pEndCapABMinus) {// EndcapC
307  m_detectorManager->addChannel("/TRT/AlignL2/L2C", AlignmentLevelSubWheel, InDetDD::global);
308  }
309  }
310 
311  // Unchanged in Run1 and new Run2 schema
312  m_detectorManager->addSpecialFolder("/TRT/Calib/DX");
313  }
314 
315 
316 
317  //Uncomment for testing:
318  // m_data->ShowValues();
319 
320  //----------------------Initialize the numerology------------------------//
321 
322  for (unsigned int m=0;m<m_data->nBarrelRings;m++) {
323  m_detectorManager->getNumerology()->setNBarrelLayers(m, m_data->barrelNumberOfStrawLayersInModule[m]);
324  }
325 
327  //Note: This next line is now consistent with TRT_TestBeamDetDescr.
328  m_detectorManager->getNumerology()->setNBarrelPhi(m_data->nBarrelModulesUsed);
329 
330  unsigned int nEndcapWheels = 0;
331  if (pEndCapABPlus||pEndCapABMinus) nEndcapWheels += m_data->endcapNumberOfAWheels + m_data->endcapNumberOfBWheels;
332  if (pEndCapCPlus||pEndCapCMinus) nEndcapWheels += m_data->endcapNumberOfCWheels;
333 
336 
337  for (unsigned int w=0;w<m_detectorManager->getNumerology()->getNEndcapWheels();w++) {
338  unsigned int nlayers;
339  if ( w < m_data->endcapNumberOfAWheels )
340  nlayers = m_data->endCapNumberOfStrawLayersPerWheelA;
341  else if ( w < ( m_data->endcapNumberOfAWheels + m_data->endcapNumberOfBWheels ) )
342  nlayers = m_data->endCapNumberOfStrawLayersPerWheelB;
343  else
344  nlayers = m_data->endCapNumberOfStrawLayersPerWheelC;
346  }
347 
348 
349  //
350  // Barrel volume:
351  //
352 
353  if (pBarrelVol) {
354 
355  ATH_MSG_DEBUG( "Virtual TRT Barrel volume defined by RMin = "<<m_data->virtualBarrelInnerRadius
356  <<", Rmax = "<<m_data->virtualBarrelOuterRadius<<" Zmax = "<<m_data->virtualBarrelVolumeLength );
357 
358  // Common Endcap volumes (one for forward, one for backward):
359  //GeoPhysVol *pCommonEndcapVolume[2];
360 
361  GeoAlignableTransform * barrelTransform = mapAX["TRTBarrel"];
362 
363  m_detectorManager->addTreeTop(pBarrelVol);
364  // Use barrel_ec_id = -1 (+ve and -ve barrel is treated as one alignable object)
365  Identifier id = idHelper->barrel_ec_id(-1);
366  m_detectorManager->addAlignableTransform(AlignmentLevelTop, id, barrelTransform, pBarrelVol); // global if other selected
367 
368  }
369 
370  if (pEndCapABPlus) {
371 
372  GeoAlignableTransform * transform = mapAX["TRTEndCapABPlus"];
373 
374  m_detectorManager->addTreeTop(pEndCapABPlus);
375  Identifier id = idHelper->barrel_ec_id(2);
376  m_detectorManager->addAlignableTransform(AlignmentLevelTop, id, transform, pEndCapABPlus); // global if other selected
377  }
378 
379  if (pEndCapABMinus) {
380 
381  GeoAlignableTransform * transform = mapAX["TRTEndCapABMinus"];
382 
383  m_detectorManager->addTreeTop(pEndCapABMinus);
384  Identifier id = idHelper->barrel_ec_id(-2);
385  m_detectorManager->addAlignableTransform(AlignmentLevelTop, id, transform, pEndCapABMinus); // global if other selected
386  }
387 
388  if (pEndCapCPlus) {
389  m_detectorManager->addTreeTop(pEndCapCPlus);
390  }
391  if (pEndCapCMinus) {
392  m_detectorManager->addTreeTop(pEndCapCMinus);
393  }
394  // Pointers to the Endcap volumes (index 0: for forward, index 1: for backward):
395  GeoFullPhysVol *pCommonEndcapAB[]={pEndCapABPlus,pEndCapABMinus};
396  GeoFullPhysVol *pCommonEndcapC[]={pEndCapCPlus,pEndCapCMinus};
397  //-----------------------------------------------------------------------//
398  // //
399  // Barrel //
400  // //
401  //-----------------------------------------------------------------------//
402 
403 
404  if (pBarrelVol) {
405 
406 
407  //-----------------------------------------------------------------------//
408  // //
409  // Barrel Modules //
410  // //
411  //-----------------------------------------------------------------------//
412 
413  std::vector<InDetDD::TRT_BarrelDescriptor *> bDescriptor;
414 
415  // Create some shared stuff to stick into each module.
416 
417  // The barrel straw (including the "hole" in the radiator around it):
418  double activeGasZPositionNormalStraws= activeGasZPosition();
419  // The straws in the inner layers of module A have a large dead region, and are thus different.
420  double activeGasZPositionStrawsWithLargeDeadRegion= activeGasZPosition(true);
421 
422  // The modules themselves.
423  for (size_t iABC=0;iABC<m_data->nBarrelRings;iABC++) {
424 
425  GeoTrf::Transform3D shellPosition=shellPosVec[iABC];
426 
427  //----------------------------------------------------------------------------------------------------------------
428  // Parameterize all of the straws and put them within the radiator.
429 
430  // Figure out how many straws have a large dead region
431  size_t nStrawsWithLargeDeadRegion = 0;
432  if (iABC==0) {
433  for (size_t iLayer = 0; iLayer<m_data->barrelNumberOfLayersWithLargeDeadRegion; iLayer++) {
434  nStrawsWithLargeDeadRegion += m_data->barrelNumberOfStrawsInStrawLayer[iABC][iLayer];
435  }
436  }
437 
438  // Generators:
439  GeoTrf::TranslateX3D Xx(1.0);
440  GeoTrf::TranslateY3D Xy(1.0);
441 
442  GENFUNCTION fx = ArrayFunction(&m_data->strawXPosition[iABC][0+nStrawsWithLargeDeadRegion],
443  &m_data->strawXPosition[iABC][0]+m_data->barrelNumberOfStrawsInModule[iABC]);
444  //TK: why ..[0]+n and not ..[n] ?
445  GENFUNCTION fy = ArrayFunction(&m_data->strawYPosition[iABC][0+nStrawsWithLargeDeadRegion],
446  &m_data->strawYPosition[iABC][0]+m_data->barrelNumberOfStrawsInModule[iABC]);
447  TRANSFUNCTION tx1 = Pow(Xx,fx)*Pow(Xy,fy);
448 
449  //TK: Quick fix, might waste a few KB of memory.
450  //TK: only use when iABC==0
451  GENFUNCTION fxAll = ArrayFunction(&m_data->strawXPosition[iABC][0], &m_data->strawXPosition[iABC][0]+m_data->barrelNumberOfStrawsInModule[iABC]);
452  GENFUNCTION fyAll = ArrayFunction(&m_data->strawYPosition[iABC][0], &m_data->strawYPosition[iABC][0]+m_data->barrelNumberOfStrawsInModule[iABC]);
453  TRANSFUNCTION tx1All = Pow(Xx,fxAll)*Pow(Xy,fyAll);
454 
455 
457  //Calculation of needed transforms
458  //First get the global and local positions of the two alignment straws:
459  //USE HEP2VECTORS!!!
460 
461  GeoTrf::Vector3D Align1Global(m_data->barrelXOfFirstGlobalAlignmentStraw[iABC], m_data->barrelYOfFirstGlobalAlignmentStraw[iABC], 0);
462  GeoTrf::Vector3D Align2Global(m_data->barrelXOfSecondGlobalAlignmentStraw[iABC], m_data->barrelYOfSecondGlobalAlignmentStraw[iABC],0);
463  GeoTrf::Vector3D Align1Local(m_data->strawXPosition[iABC][0],m_data->strawYPosition[iABC][0],0);
464  GeoTrf::Vector3D Align2Local(m_data->strawXPosition[iABC][m_data->barrelIndexOfSecondGlobalAlignmentStraw[iABC]],
465  m_data->strawYPosition[iABC][m_data->barrelIndexOfSecondGlobalAlignmentStraw[iABC]],0);
466 
467  //We need to make first a translation which puts the first alignment straw into place:
468 
469  //And we need to make a rotation which puts the second one on its position:
470 
471  GeoTrf::Vector2D local12((Align2Local - Align1Local).x(),(Align2Local - Align1Local).y());
472  GeoTrf::Vector2D global12((Align2Global - Align1Global).x(),(Align2Global - Align1Global).y());
473  double zrotang = global12.phi()-local12.phi();
474 
475  //Here we combine these two into a GeoTrf::Transform3D:
476 
477  GeoTrf::Transform3D absStrawXForm = GeoTrf::Translate3D(Align1Global.x(),Align1Global.y(),Align1Global.z())
478  *GeoTrf::RotateZ3D( zrotang )
479  *GeoTrf::Translate3D(-Align1Local.x(),-Align1Local.y(),-Align1Local.z());
480 
481  //
483 
484  //Why not use radiator instead of shell?
485  TRANSFUNCTION tx2=shellPosition.inverse()*absStrawXForm*tx1;
486  TRANSFUNCTION tx2All=shellPosition.inverse()*absStrawXForm*tx1All;
487  if (iABC==0) {
488  //TK: move rest of ...All stuff here?
489  m_detectorManager->setBarrelTransformField(iABC,tx2All.clone());
490  } else {
491  m_detectorManager->setBarrelTransformField(iABC,tx2.clone());
492  }
493 
494 
495  // Adds one straw from each layer (reformulate..) (should be done via m_data from database)
496  double oldx=-999*GeoModelKernelUnits::cm, oldz=-999*GeoModelKernelUnits::cm;
497  unsigned int c=0;
498  size_t iLayer=0;
499  while (c< m_data->barrelNumberOfStrawsInModule[iABC] ) {
500 
501  GeoTrf::Vector3D p(0,0,0);
502  if (iABC==0)
503  p = tx2All(c)*p;
504  else
505  p = tx2(c)*p;
506 
507  double x = p.x();
508  double z = p.z();
509 
510  //TK: use arrays!! update this...
511  if (sqrt((x-oldx)*(x-oldx)+ (z-oldz)*(z-oldz))> 5*GeoModelKernelUnits::cm) {
512  iLayer++;
513  bDescriptor.push_back(new InDetDD::TRT_BarrelDescriptor());
514  m_detectorManager->setBarrelDescriptor(bDescriptor.back());
515  bDescriptor.back()->setStrawTransformField(m_detectorManager->barrelTransformField(iABC),c);
516 
517  //TK: Next, we are providing information about the Z
518  //dimensions of the active gas, to be used for reconstruction
519  //purposes. Personally I find "strawZDead" to be a slightly
520  //confusing choice of name for that method.
521 
522  if((iABC==0)&&(iLayer<=m_data->barrelNumberOfLayersWithLargeDeadRegion )) {
523  //TK: these things should come back from makestraw...
524  double lengthOfActiveGas=
525  (m_data->barrelLengthOfStraw-m_data->barrelLengthOfTwister)/2.0 - m_data->lengthOfDeadRegion-m_data->barrelLengthOfLargeDeadRegion;
526  double startZOfActiveGas=activeGasZPositionStrawsWithLargeDeadRegion-lengthOfActiveGas/2.0;
527  bDescriptor.back()->strawZPos(activeGasZPositionStrawsWithLargeDeadRegion);
528  bDescriptor.back()->strawZDead(startZOfActiveGas);
529  bDescriptor.back()->strawLength(lengthOfActiveGas);
530  } else {
531  double lengthOfActiveGas=(m_data->barrelLengthOfStraw-m_data->barrelLengthOfTwister)/2.0 - 2*m_data->lengthOfDeadRegion;
532  double startZOfActiveGas=activeGasZPositionNormalStraws-lengthOfActiveGas/2.0;
533  bDescriptor.back()->strawZPos(activeGasZPositionNormalStraws);
534  bDescriptor.back()->strawZDead(startZOfActiveGas);
535  bDescriptor.back()->strawLength(lengthOfActiveGas);
536  }
537 
538  }
539  bDescriptor.back()->addStraw(z,x);
540  oldx=x; oldz=z;
541  c++;
542 
543  }
544 
545  // Get a list of fibre radiators in the barrel;
546  std::set<const GeoVPhysVol *> barrelFibreRadiators;
547  std::set<const GeoVPhysVol *> strawPlanes;
548 
549  // Now create m_data->nBarrelModulesUsed unique modules within each layer.
550  for (size_t iMod = 0; iMod<m_data->nBarrelModulesUsed;iMod++) {
551  GeoFullPhysVol * pShell = mapFPV["TRTShell-"+std::to_string(iABC)+"-"+std::to_string(iMod)];
552  GeoAlignableTransform * xfx1 = mapAX["TRTShell-"+std::to_string(iABC)+"-"+std::to_string(iMod)];
553 
554 
555 
556  GeoVolumeCursor cursor(pShell);
557  while (!cursor.atEnd()) {
558  if (cursor.getVolume()->getLogVol()->getName().find("FibreRadiator") != std::string::npos) {
559  barrelFibreRadiators.insert(cursor.getVolume().get());
560  }
561  cursor.next();
562  }
563 
564 
565 
566  // Register the alignable transfrom to the manager
567  // +ve and -ve are part of the same barrel. We use barrel_ec = -1.
568  Identifier idModule = idHelper->module_id(-1, iMod, iABC);
569  // In barrel frame (generally the same as the global frame)
570  m_detectorManager->addAlignableTransform(AlignmentLevelModule, idModule, xfx1, pShell, pBarrelVol);
571 
572  Identifier TRT_Identifier = idHelper->straw_id(1, iMod, iABC, 1, 1);
573  int strawStatusHT = TRTCond::StrawStatus::Good;
574  if (m_strawsvcavailable) strawStatusHT = m_sumTool->getStatusHT(TRT_Identifier, Gaudi::Hive::currentContext());
575  refreshGasBarrel(strawStatusHT,pShell);
576 
577  //-------------------------------------------------------------------//
578  // //
579  // Barrel readout: //
580  // //
581  //-------------------------------------------------------------------//
582 
583  unsigned int nStrawLayers = m_detectorManager->getNumerology()->getNBarrelLayers(iABC);
584  for (unsigned int iStrawLayer=0;iStrawLayer<nStrawLayers; iStrawLayer++) { // limit stored as float!
585 
586  unsigned int jStrawLayer=iStrawLayer;
587  if (iABC>0) jStrawLayer += m_detectorManager->getNumerology()->getNBarrelLayers(0);
588  if (iABC>1) jStrawLayer += m_detectorManager->getNumerology()->getNBarrelLayers(1);
589  //TK: just go from jStrawLayer=layerstart;jStrawLayer<layerend ?
590 
591  InDetDD::TRT_BarrelDescriptor *bD=bDescriptor[jStrawLayer];
592 
593  InDetDD::TRT_BarrelElement *element0 = new InDetDD::TRT_BarrelElement(pShell, bD, 0 , iABC, iMod, iStrawLayer, idHelper, m_detectorManager->conditions());
594  InDetDD::TRT_BarrelElement *element1 = new InDetDD::TRT_BarrelElement(pShell, bD, 1 , iABC, iMod, iStrawLayer, idHelper, m_detectorManager->conditions());
595 
598  }
599 
600  }//End "for (size_t iMod = ..." loop.
601 
602  }
603 
604  // Set up the nearest neighbor pointers: in R.
605  for (unsigned int e=0;e<2;e++) {
606  for (unsigned int iMod=0;iMod<m_data->nBarrelModulesUsed; iMod++) {
607  InDetDD::TRT_BarrelElement *prev=nullptr;
608  for (unsigned int iABC=0;iABC<m_data->nBarrelRings;iABC++) {
609  for (unsigned int s=0;s<m_detectorManager->getNumerology()->getNBarrelLayers(iABC); s++) {
611  if (prev && current) {
612  prev->setNextInR(current);
613  current->setPreviousInR(prev);
614  }
615  prev=current;
616  }
617  }
618  }
619  }
620 
621  // Set up the nearest neighbor pointers: in Phi.
622  for (unsigned int e=0;e<2;e++) {
623  for (unsigned int iABC=0;iABC<m_data->nBarrelRings;iABC++) {
624  for (unsigned int s=0;s<m_detectorManager->getNumerology()->getNBarrelLayers(iABC); s++) {
625  InDetDD::TRT_BarrelElement *prev=nullptr;
626  for (unsigned int iMod=0;iMod<m_data->nBarrelModulesUsed; iMod++) {
628  if (prev && current) {
629  prev->setNextInPhi(current);
630  current->setPreviousInPhi(prev);
631  }
632  prev=current;
633  }
634  if (m_data->nBarrelModulesUsed==m_data->nBarrelModules) { // Full complement; then, we wrap!:
636  InDetDD::TRT_BarrelElement *last =m_detectorManager->getBarrelElement(e,iABC,m_data->nBarrelModules-1,s);
637  if (first && last) {
638  first->setPreviousInPhi(last);
639  last->setNextInPhi(first);
640  }
641  }
642  }
643  }
644  }
645  }//end of if (pBarrelVol)
646 
647 
648 
649  //-----------------------------------------------------------------------//
650  // //
651  // Endcap Modules //
652  // //
653  //-----------------------------------------------------------------------//
654 
655  // TK: This part could really use some cleanup and reordering.
656  // There is no need to repeat the same code for A, B & C endcaps.
657 
658 
659  // if none of the endcaps is being built we can return.
660  if (!(pEndCapABPlus || pEndCapABMinus || pEndCapCPlus || pEndCapCMinus)){
661  return;
662  }
663  unsigned int firstIndexOfA = 0;
664  unsigned int firstIndexOfB = m_data->endcapNumberOfAWheels;
665  unsigned int firstIndexOfC = m_data->endcapNumberOfAWheels + m_data->endcapNumberOfBWheels;
666 
667  unsigned int indexUpperBound = firstIndexOfA + m_detectorManager->getNumerology()->getNEndcapWheels();
668 
669  if (m_data->initialLayout) indexUpperBound = firstIndexOfC; // No wheel C.
670 
671  const unsigned int nSides = 2;
672  const unsigned int nStrawLayMaxEc = 8;//hardcoded...
673 
674  unsigned int iiSide, iiWheel, iiPlane, iiPhi, counter; //set of counters
675  GeoFullPhysVol *childPlane = nullptr;
676 
677 
678  double RotationsOfStrawPlanes[nStrawLayMaxEc]; //8 is hardcoded
679  double shiftForEachRotation = m_data->endCapShiftForEachRotation; // in units of deltaPhi
680  RotationsOfStrawPlanes[0] = 0.;
681 
682  bool oldGeometry = true;
683  // Temporary way to determine old from new
684  if (shiftForEachRotation < 0) oldGeometry = false;
685 
686  if (oldGeometry) {
687  // For old geometry
688  for (counter = 1; counter < nStrawLayMaxEc; counter++)
689  {
690  RotationsOfStrawPlanes[counter] = RotationsOfStrawPlanes[counter-1] + shiftForEachRotation;
691  if (RotationsOfStrawPlanes[counter] >= 1.)
692  RotationsOfStrawPlanes[counter] -= 1.;
693  }
694  } else {
695  // New geometry
696  double RotationsOfStrawPlanesTmp[nStrawLayMaxEc] = {0,0,0,0,2,2,2,2};
697  for (counter = 0; counter < nStrawLayMaxEc; counter++)
698  {
699  RotationsOfStrawPlanes[counter] = (counter * shiftForEachRotation) + RotationsOfStrawPlanesTmp[counter];
700  }
701  }
702 
703  // Create and initialize by 0 arrays of descriptors
704  std::vector<InDetDD::TRT_EndcapDescriptor*> descriptorsAB[nSides][nStrawLayMaxEc];
705  std::vector<InDetDD::TRT_EndcapDescriptor*> descriptorsC[nSides][nStrawLayMaxEc];
706  InDetDD::TRT_EndcapDescriptor* pDescriptor = nullptr;
707  InDetDD::TRT_EndcapElement* element = nullptr;
708 
709  for(iiSide = 0; iiSide<nSides; iiSide++) {
710  for(iiPlane = 0; iiPlane < nStrawLayMaxEc; iiPlane++) {
711  descriptorsAB[iiSide][iiPlane].resize (m_data->nEndcapPhi);
712  descriptorsC[iiSide][iiPlane].resize (m_data->nEndcapPhi);
713  }
714  }
715 
716 
717 
718  // Do Wheels A and B if one of them is present
719  if (pEndCapABPlus || pEndCapABMinus) {
720  // -------------- Wheel A -----------------------
721 
722 
723  // Straw plane
724  setEndcapTransformField(firstIndexOfA);
725 
726 
727  // This is the straw pitch.
728  double deltaPhiForStrawsA = 360.*GeoModelKernelUnits::deg/m_data->endcapNumberOfStrawsInStrawLayer_AWheels;
729 
730 
731  // In reality the positive and negative endcaps are built identical, both in
732  // geometry and readout. The offline numbering however keeps phi numbering going
733  // in the same direction as global phi (righthanded direction).
734 
735  // For the latest version we build +ve and negative endcaps identical.
736  // We also build the descriptors identical apart from the setting of startphi.
737  //
738  // The mapping is fixed (this must be reproduced in the sensitive
739  // detector and readout geometry) The mapping is 1-1 for the
740  // +ve endcap, for the -ve endcap it is as follows:
741  //
742  // ***************************************************************
743  // * Negative endcap (Endcap C) mapping. *
744  // * *
745  // * nSectors = 32 *
746  // * nStraws = num straws in sector *
747  // * sector -> (nSectors + nSectors/2 - sector - 1) % nSectors *
748  // * straw -> nStraws - 1 - straw *
749  // ***************************************************************
750  //
751  // For compatibility with old (wrong geometry) we rotate the strawlayers
752  // differently for the negative endcap than we do for the positive endcap.
753  // This is to allow the sensitive detector and readout geometry to have
754  // the same code for both layouts.
755  //
756  // Below we refere to online as the physical readout and offline as the offline
757  // identifier convetions.
758  // iiPhi corresponds to the "online" readout phi sector. This goes
759  // right handed in positive endcap and left handed in negative, where handedness
760  // is wrt to global frame.
761  // iiPhiOffline is the offline numbering which is always right handed.
762 
763  for(iiSide=0; iiSide<nSides; iiSide++) {
764  // Wheel A
765  if (pCommonEndcapAB[iiSide]) {
766 
767  for(iiWheel=firstIndexOfA; iiWheel < firstIndexOfB; iiWheel++)
768  {
769  //prepair to place wheel
770 
771  GeoFullPhysVol* pWheelA = mapFPV["TRTWheelA-"
772  +std::to_string(iiSide)+"-"
773  +std::to_string(iiWheel)];
774 
775  GeoAlignableTransform * xfAlignableModule = nullptr;
776 
777  // Place planes in the wheel
778  for (iiPlane = 0; iiPlane < m_data->endCapNumberOfStrawLayersPerWheelA; iiPlane++)
779  {
780  // WheelA is subdivided into 4 alignable objects. (Every 4th straw layer)
781  // We create an alignable transform for each alignable module
782  // and multiply this by the transform for every straw layer in the "alignable module"
783  // The tranform is by default Identity.
784  if (iiPlane % 4 == 0) {
785  // Register alignable node
786  int barrel_ec = (iiSide) ? -2 : +2;
787  xfAlignableModule = mapAX["TRTWheelA-StrawPlane-"
788  +std::to_string(iiSide)+"-"
789  +std::to_string(iiWheel)+"-"
790  +std::to_string(iiPlane)];
791 
792  Identifier idSubModule = idHelper->layer_id(barrel_ec, 0, iiWheel, iiPlane);
793  // We pass the parent volume as the local delta for this correction is the same as a local delta
794  // on the transformation of the wheel.
795  m_detectorManager->addAlignableTransform(AlignmentLevelSubWheel, idSubModule, xfAlignableModule, pWheelA);
796  }
797 
798  // phiPlane is phi of straw 0, sector 0 (online numbering)
799  double phiPlane = m_data->endCapPhiOfFirstStraw + RotationsOfStrawPlanes[iiPlane%nStrawLayMaxEc]*deltaPhiForStrawsA;
800 
801  // For compatibility with old geometry we have to shift every eighth wheel by 1 straw pitch.
802  if(iiSide && oldGeometry && (iiPlane%8 == 0)) {
803  phiPlane += deltaPhiForStrawsA;
804  }
805 
806  Identifier TRT_Identifier;
807  int bar_ec = (iiSide) ? -2 : +2;
808  TRT_Identifier = idHelper->straw_id(bar_ec, 1, iiWheel, 1, 1);
809  int strawStatusHT = TRTCond::StrawStatus::Good;
810  if (m_strawsvcavailable) strawStatusHT = m_sumTool->getStatusHT(TRT_Identifier, Gaudi::Hive::currentContext());
811 
812 
813  childPlane = mapFPV["TRTWheelA-StrawPlane-"
814  +std::to_string(iiSide)+"-"
815  +std::to_string(iiWheel)+"-"
816  +std::to_string(iiPlane)];
817 
818  refreshGasEndcap(strawStatusHT,childPlane);
819 
820  // Create descriptors
821  // Just do it for the first wheel
822  if(iiWheel==firstIndexOfA && iiPlane < nStrawLayMaxEc)
823  for(iiPhi = 0; iiPhi < m_data->nEndcapPhi; iiPhi++)
824  {
825 
826  pDescriptor = new InDetDD::TRT_EndcapDescriptor();
828 
829  pDescriptor->nStraws() = m_data->endcapNumberOfStrawsInStrawLayer_AWheels/m_data->nEndcapPhi;
830  pDescriptor->strawPitch() = deltaPhiForStrawsA;
831 
832  double startPhi = phiPlane + iiPhi * pDescriptor->strawPitch() * pDescriptor->nStraws();
833 
834  // For negative endcap the startPhi is the last straw in the physical sector
835  // phi -> phi + strawPitch*(n-1)
836  // it then gets rotated 180 around y axis
837  // phi -> pi - phi
838  if (iiSide) {
839  startPhi = GeoModelKernelUnits::pi - (startPhi + pDescriptor->strawPitch() * (pDescriptor->nStraws() - 1));
840  }
841 
842  // Make sure its between -pi and pi.
843  if (startPhi <= -GeoModelKernelUnits::pi) startPhi += 2*GeoModelKernelUnits::pi;
844  if (startPhi > GeoModelKernelUnits::pi) startPhi -= 2*GeoModelKernelUnits::pi;
845 
846  pDescriptor->startPhi() = startPhi;
847 
848  pDescriptor->strawLength() = m_data->endCapOuterRadiusOfSupportA - m_data->endCapRadialThicknessOfOuterSupportA
849  - 2*m_data->lengthOfDeadRegion - m_data->endCapRadialThicknessOfInnerSupportA - m_data->endCapInnerRadiusOfSupportA;
850  pDescriptor->innerRadius() = m_data->endCapInnerRadiusOfSupportA + m_data->endCapRadialThicknessOfInnerSupportA
851  + m_data->lengthOfDeadRegion;
852  pDescriptor->setStrawTransformField(m_detectorManager->endcapTransformField(0),iiPhi*pDescriptor->nStraws());
853 
854  descriptorsAB[iiSide][iiPlane%nStrawLayMaxEc][iiPhi] = pDescriptor;
855  }
856  // Create elements
857  for(iiPhi = 0; iiPhi < m_data->nEndcapPhi; iiPhi++)
858  {
859  // m_data->nEndcapPhi assumed to be even.
860  // For positive endcap online == offline. For negative endcap we rotate 180 deg about y axis so
861  // sector 0 -> 15, 15 -> 0, 16 -> 31, 31 -> 16, etc. This is achieved with
862  // sector -> (nSectors + nSectors/2 - sector - 1) % nSectors
863  int iiPhiOffline = (iiSide==0) ? iiPhi : (3*m_data->nEndcapPhi/2 - iiPhi - 1)% m_data->nEndcapPhi;
864  element = new InDetDD::TRT_EndcapElement(childPlane,
865  descriptorsAB[iiSide][iiPlane%nStrawLayMaxEc][iiPhi],
866  iiSide==0,
867  iiWheel,
868  iiPlane,
869  iiPhiOffline,
870  idHelper,
873  }
874  }
875  // Place Inner/Outer supports in the wheel
876 
877  // Place wheel in the Endcap Volume
878  GeoAlignableTransform * xfWheel = mapAX["TRTWheelA-"
879  +std::to_string(iiSide)+"-"
880  +std::to_string(iiWheel)];
881 
882  // Register alignable node
883  int barrel_ec = (iiSide) ? -2 : +2;
884  Identifier idModule = idHelper->module_id(barrel_ec, 0, iiWheel);
885  m_detectorManager->addAlignableTransform(AlignmentLevelModule, idModule, xfWheel, pWheelA);
886 
887  } // iiWheel loop for Wheel A
888  } // if (pCommonEndcapAB[iiSide]) block for Wheel A
889  } // iiSide loop for Wheel A
890 
891 
892 
893  // --------------- Wheel B ----------------------------
894 
895  // Straw plane
896  setEndcapTransformField(firstIndexOfB);
897 
898  for(iiSide=0; iiSide<nSides; iiSide++) {
899 
900  // Wheel B
901  if (pCommonEndcapAB[iiSide]) {
902  for(iiWheel=firstIndexOfB; iiWheel < firstIndexOfC; iiWheel++)
903  {
904 
905  GeoFullPhysVol* pWheelB = mapFPV["TRTWheelB-"
906  +std::to_string(iiSide)+"-"
907  +std::to_string(iiWheel)];
908 
909  GeoAlignableTransform * xfAlignableModule = nullptr;
910 
911  // Place planes in the wheel
912  for (iiPlane = 0; iiPlane < m_data->endCapNumberOfStrawLayersPerWheelB; iiPlane++)
913  {
914 
915  // Each wheel in WheelB is subdivided into 2 alignable objects (every 4th straw layer)
916  // We create an alignable transform for each alignable module
917  // and multiply this by the transform for every straw layer in the "alignable module"
918  // The tranform is by default Identity.
919  if (iiPlane % 4 == 0) {
920  // Register alignable node
921  int barrel_ec = (iiSide) ? -2 : +2;
922  xfAlignableModule = mapAX["TRTWheelB-StrawPlane-"
923  +std::to_string(iiSide)+"-"
924  +std::to_string(iiWheel)+"-"
925  +std::to_string(iiPlane)];
926 
927 
928 
929  Identifier idSubModule = idHelper->layer_id(barrel_ec, 0, iiWheel, iiPlane);
930  // We pass the parent volume as the local delta for this correction is the same as a local delta
931  // on the transformation of the wheel.
932  m_detectorManager->addAlignableTransform(AlignmentLevelSubWheel, idSubModule, xfAlignableModule, pWheelB);
933  }
934 
935  Identifier TRT_Identifier;
936  int bar_ec = (iiSide) ? -2 : +2;
937  TRT_Identifier = idHelper->straw_id(bar_ec, 1, iiWheel, 1, 1);
938  int strawStatusHT = TRTCond::StrawStatus::Good;
939  if (m_strawsvcavailable) strawStatusHT = m_sumTool->getStatusHT(TRT_Identifier, Gaudi::Hive::currentContext());
940 
941  childPlane = mapFPV["TRTWheelB-StrawPlane-"
942  +std::to_string(iiSide)+"-"
943  +std::to_string(iiWheel)+"-"
944  +std::to_string(iiPlane)];
945  refreshGasEndcap(strawStatusHT,childPlane);
946 
947 
948 
949  // Create elements
950  for(iiPhi = 0; iiPhi < m_data->nEndcapPhi; iiPhi++)
951  {
952  // m_data->nEndcapPhi assumed to be even.
953  // For positive endcap online == offline. For negative endcap we rotate 180 deg about y axis so
954  // sector 0 -> 15, 15 -> 0, 16 -> 31, 31 -> 16, etc. This is achieved with
955  // sector -> (nSectors + nSectors/2 - sector - 1) % nSectors
956  int iiPhiOffline = (iiSide==0) ? iiPhi : (3*m_data->nEndcapPhi/2 - iiPhi - 1)% m_data->nEndcapPhi;
957  element = new InDetDD::TRT_EndcapElement(childPlane,
958  descriptorsAB[iiSide][iiPlane%nStrawLayMaxEc][iiPhi],
959  iiSide==0,
960  iiWheel,
961  iiPlane,
962  iiPhiOffline,
963  idHelper,
966  }
967  }
968 
969  // Place wheel in the Endcap Volume
970  GeoAlignableTransform * xfWheel = mapAX["TRTWheelB-"
971  +std::to_string(iiSide)+"-"
972  +std::to_string(iiWheel)];
973  // Register alignable node
974  int barrel_ec = (iiSide) ? -2 : +2;
975  Identifier idModule = idHelper->module_id(barrel_ec, 0, iiWheel);
976  m_detectorManager->addAlignableTransform(AlignmentLevelModule, idModule, xfWheel, pWheelB);
977  }// iiWheel loop for Wheel B
978  } // if (pCommonEndcapAB[iiSide]) block for Wheel B
979  } // iiSide loop for Wheel B
980 
981  } // end AB
982 
983  // ---------------- Wheel C ---------------------------
984  // Not present in initial layout
985  if (pEndCapCPlus || pEndCapCMinus) {
986 
987  setEndcapTransformField(firstIndexOfC);
988 
989  // This is the straw pitch.
990  double deltaPhiForStrawsC = 360.*GeoModelKernelUnits::deg/m_data->endcapNumberOfStrawsInStrawLayer_CWheels;
991 
992  for(iiSide=0; iiSide<nSides; iiSide++) {
993  // Wheel C
994  if (pCommonEndcapC[iiSide]) {
995  for(iiWheel=firstIndexOfC; iiWheel < indexUpperBound; iiWheel++)
996  {
997  GeoFullPhysVol* pWheelC = mapFPV["TRTWheelC-"
998  +std::to_string(iiSide)+"-"
999  +std::to_string(iiWheel)];
1000 
1001 
1002 
1003  // Place planes in the wheel
1004  for (iiPlane = 0; iiPlane < m_data->endCapNumberOfStrawLayersPerWheelC; iiPlane++)
1005  {
1006  // phiPlane is phi of straw 0, sector 0 (online numbering)
1007  double phiPlane = m_data->endCapPhiOfFirstStraw + RotationsOfStrawPlanes[iiPlane%nStrawLayMaxEc]*deltaPhiForStrawsC;
1008 
1009  // For compatibility with old geometry we have to shift every eighth wheel by 1 straw pitch.
1010  if(iiSide && oldGeometry && (iiPlane%8 == 0)) {
1011  phiPlane += deltaPhiForStrawsC;
1012  }
1013 
1014 
1015 
1016  childPlane = mapFPV["TRTWheelC-StrawPlane-"
1017  +std::to_string(iiSide)+"-"
1018  +std::to_string(iiWheel)+"-"
1019  +std::to_string(iiPlane)];
1020 
1021 
1022  // Create descriptors
1023  // Just do it for the first wheel
1024  if(iiWheel==firstIndexOfC && iiPlane < nStrawLayMaxEc)
1025  for(iiPhi = 0; iiPhi < m_data->nEndcapPhi; iiPhi++)
1026  {
1027  pDescriptor = new InDetDD::TRT_EndcapDescriptor();
1028  m_detectorManager->setEndcapDescriptor(pDescriptor);
1029 
1030  pDescriptor->nStraws() = m_data->endcapNumberOfStrawsInStrawLayer_CWheels/m_data->nEndcapPhi;
1031  pDescriptor->strawPitch() = deltaPhiForStrawsC;
1032 
1033 
1034  double startPhi = phiPlane + iiPhi * pDescriptor->strawPitch() * pDescriptor->nStraws();
1035 
1036  // For negative endcap the startPhi is the last straw in the physical sector, it then gets
1037  // rotated 180 around y axis (phi -> pi - phi)
1038  if (iiSide) {
1039  startPhi = GeoModelKernelUnits::pi - (startPhi + pDescriptor->strawPitch() * (pDescriptor->nStraws() - 1));
1040  }
1041 
1042  // Make sure its between -pi and pi.
1043  if (startPhi <= -GeoModelKernelUnits::pi) startPhi += 2*GeoModelKernelUnits::pi;
1044  if (startPhi > GeoModelKernelUnits::pi) startPhi -= 2*GeoModelKernelUnits::pi;
1045 
1046 
1047  pDescriptor->startPhi() = startPhi;
1048 
1049  pDescriptor->strawLength() = m_data->endCapOuterRadiusOfSupportC - m_data->endCapRadialThicknessOfOuterSupportC
1050  - 2*m_data->lengthOfDeadRegion - m_data->endCapRadialThicknessOfInnerSupportC - m_data->endCapInnerRadiusOfSupportC;
1051  pDescriptor->innerRadius() = m_data->endCapInnerRadiusOfSupportC + m_data->endCapRadialThicknessOfInnerSupportC + m_data->lengthOfDeadRegion;
1052  pDescriptor->setStrawTransformField(m_detectorManager->endcapTransformField(2),iiPhi*pDescriptor->nStraws());
1053 
1054 
1055  descriptorsC[iiSide][iiPlane%nStrawLayMaxEc][iiPhi] = pDescriptor;
1056  }
1057 
1058  // Create elements
1059  for(iiPhi = 0; iiPhi < m_data->nEndcapPhi; iiPhi++)
1060  {
1061  // m_data->nEndcapPhi assumed to be even.
1062  // For positive endcap online == offline. For negative endcap we rotate 180 deg about y axis so
1063  // sector 0 -> 15, 15 -> 0, 16 -> 31, 31 -> 16, etc. This is achieved with
1064  // sector -> (nSectors + nSectors/2 - sector - 1) % nSectors
1065  int iiPhiOffline = (iiSide==0) ? iiPhi : (3*m_data->nEndcapPhi/2 - iiPhi - 1)% m_data->nEndcapPhi;
1066  element = new InDetDD::TRT_EndcapElement(childPlane,
1067  descriptorsC[iiSide][iiPlane%nStrawLayMaxEc][iiPhi],
1068  iiSide==0,
1069  iiWheel,
1070  iiPlane,
1071  iiPhiOffline,
1072  idHelper,
1075  }
1076  }
1077 
1078 
1079  // Place wheel in the Endcap Volume
1080  GeoAlignableTransform * xfWheel = mapAX["TRTWheelC-"
1081  +std::to_string(iiSide)+"-"
1082  +std::to_string(iiWheel)];
1083 
1084  // Register alignable node
1085  int barrel_ec = (iiSide) ? -2 : +2;
1086  Identifier idModule = idHelper->module_id(barrel_ec, 0, iiWheel);
1087  m_detectorManager->addAlignableTransform(AlignmentLevelModule, idModule, xfWheel, pWheelC);
1088 
1089 
1090  } // iiWheel loop for Wheel C
1091  } // if (pCommonEndcapC[iiSide]) block for Wheel C
1092  } // iiSide loop for Wheel C
1093 
1094  } // End Wheel C
1095 
1096 
1097  // Set up the nearest neighbor pointers: in Z
1098  for (iiSide=0; iiSide<2; iiSide++)
1099  for(iiPhi=0; iiPhi<m_data->nEndcapPhi; iiPhi++)
1100  {
1101  InDetDD::TRT_EndcapElement *prev = nullptr;
1102  for (iiWheel=0; iiWheel<indexUpperBound; iiWheel++)
1103  for (iiPlane=0; iiPlane<m_detectorManager->getNumerology()->getNEndcapLayers(iiWheel); iiPlane++)
1104  {
1105  InDetDD::TRT_EndcapElement *current = m_detectorManager->getEndcapElement(iiSide, iiWheel, iiPlane, iiPhi);
1106  if (prev && current)
1107  {
1108  prev->setNextInZ(current);
1109  current->setPreviousInZ(prev);
1110  }
1111  prev=current;
1112  }
1113  }
1114 }

◆ detStore() [1/2]

StoreGateSvc* InDetDD::DetectorFactoryBase::detStore ( )
inlineinherited

Definition at line 27 of file InDetDetectorFactoryBase.h.

27 {return m_athenaComps->detStore();}

◆ detStore() [2/2]

const StoreGateSvc* InDetDD::DetectorFactoryBase::detStore ( ) const
inlineinherited

Definition at line 28 of file InDetDetectorFactoryBase.h.

28 {return std::as_const(*m_athenaComps).detStore();}

◆ geoDbTagSvc()

const IGeoDbTagSvc* InDetDD::DetectorFactoryBase::geoDbTagSvc ( ) const
inlineinherited

Definition at line 30 of file InDetDetectorFactoryBase.h.

30 {return std::as_const(*m_athenaComps).geoDbTagSvc();}

◆ geomDB()

const IGeometryDBSvc* InDetDD::DetectorFactoryBase::geomDB ( ) const
inlineinherited

Definition at line 34 of file InDetDetectorFactoryBase.h.

34 {return m_athenaComps->geomDB();}

◆ getAthenaComps()

InDetDD::AthenaComps* InDetDD::DetectorFactoryBase::getAthenaComps ( )
inlineinherited

Definition at line 42 of file InDetDetectorFactoryBase.h.

42 {return m_athenaComps;}

◆ getDetectorManager()

const InDetDD::TRT_DetectorManager * TRTDetectorFactory_Lite::getDetectorManager ( ) const
overridevirtual

Definition at line 68 of file TRTDetectorFactory_Lite.cxx.

69 {
70  //TK: Maybe check that m_detectorManager!=0 ?
71  return m_detectorManager;
72 }

◆ msg()

MsgStream& InDetDD::DetectorFactoryBase::msg ( MSG::Level  lvl) const
inlineinherited

Definition at line 37 of file InDetDetectorFactoryBase.h.

37 { return m_athenaComps->msg(lvl); }

◆ msgLvl()

bool InDetDD::DetectorFactoryBase::msgLvl ( MSG::Level  lvl)
inlineinherited

Definition at line 40 of file InDetDetectorFactoryBase.h.

40 { return m_athenaComps->msgLvl(lvl); }

◆ operator=()

const TRTDetectorFactory_Lite& TRTDetectorFactory_Lite::operator= ( const TRTDetectorFactory_Lite right)
delete

◆ rdbAccessSvc()

IRDBAccessSvc* InDetDD::DetectorFactoryBase::rdbAccessSvc ( )
inlineinherited

Definition at line 32 of file InDetDetectorFactoryBase.h.

32 {return m_athenaComps->rdbAccessSvc();}

◆ refreshGasBarrel()

void TRTDetectorFactory_Lite::refreshGasBarrel ( int  strawStatusHT,
GeoVPhysVol *  shell 
)
private

Definition at line 1202 of file TRTDetectorFactory_Lite.cxx.

1202  {
1203 
1204  const GeoMaterial *material = m_xenonGas.get();
1205 
1206  if (m_strawsvcavailable && (strawStatusHT == TRTCond::StrawStatus::Dead ||
1207  strawStatusHT == TRTCond::StrawStatus::Argon))
1208  material= m_argonGas.get();
1209 
1210  GeoVolumeCursor cursor0(shell);
1211  if (!cursor0.atEnd()) {
1212  const GeoVPhysVol *v1=cursor0.getVolume().get();
1213  GeoCountVolAndSTAction counter;
1214  v1->exec(&counter);
1215  for (unsigned int i=0;i<counter.getCount();i++) {
1216  GeoAccessVolAndSTAction accessor(i);
1217  v1->exec(&accessor);
1218  const GeoSerialTransformer *st=accessor.getSerialTransformer();
1219  if (st) {
1220  const GeoVPhysVol *v2=st->getVolume().get();
1221  GeoVolumeCursor cursor1(v2);
1222  if (!cursor1.atEnd()) {
1223  const GeoVPhysVol *v3=cursor1.getVolume();
1224  GeoVolumeCursor cursor2(v3);
1225  while (!cursor2.atEnd()) {
1226  std::string regionName=cursor2.getVolume()->getLogVol()->getName();
1227  if (regionName=="GasMA" || regionName=="DeadRegion" || regionName=="InnerDeadRegion") {
1228  ATH_MSG_DEBUG("BARREL: REFRESHING GAS MIXTURE " << cursor2.getVolume()->getLogVol()->getName() << " -->" << material->getName());
1229  cursor2.getVolume()->getLogVol()->setMaterial(material);
1230  }
1231  cursor2.next();
1232  }
1233  }
1234  }
1235  }
1236  }
1237 
1238 }

◆ refreshGasEndcap()

void TRTDetectorFactory_Lite::refreshGasEndcap ( int  strawStatusHT,
GeoVPhysVol *  strawPlane 
)
private

Definition at line 1182 of file TRTDetectorFactory_Lite.cxx.

1182  {
1183 
1184  const GeoMaterial *material = m_xenonGas.get();
1185 
1186  if (m_strawsvcavailable && (strawStatusHT == TRTCond::StrawStatus::Dead ||
1187  strawStatusHT == TRTCond::StrawStatus::Argon))
1188  material= m_argonGas.get();
1189 
1190  // The volume hierarchy from here is: strawPlane>>straw>>gas
1191  GeoVolumeCursor cursor0(strawPlane);
1192  if (!cursor0.atEnd()) {
1193  const GeoVPhysVol *v1=cursor0.getVolume().get();
1194  GeoVolumeCursor cursor1(v1);
1195  if (!cursor1.atEnd()) {
1196  ATH_MSG_DEBUG("ENDCAP: REFRESHING GAS MIXTURE " << strawPlane->getLogVol()->getName() << " -->" << material->getName());
1197  cursor1.getVolume()->getLogVol()->setMaterial(material);
1198  }
1199  }
1200 }

◆ setEndcapTransformField()

void TRTDetectorFactory_Lite::setEndcapTransformField ( size_t  w)
private

Definition at line 1135 of file TRTDetectorFactory_Lite.cxx.

1135  {
1136 
1137  size_t nstraws=0;
1138 
1139  //A and B wheels have similar straw planes, but the C wheels are different.
1140  // const size_t firstIndexOfC = 15; //hardcoded
1141  const size_t firstIndexOfC = 14; //hardcoded
1142 
1143  double R0, R1;
1144  if (w >= firstIndexOfC) {
1145  //C wheels:
1146  nstraws=m_data->endcapNumberOfStrawsInStrawLayer_CWheels;
1147  R0 = m_data->endcapOuterRadiusOfInnerSupport_wheelC;
1148  R1 = m_data->endcapInnerRadiusOfOuterSupport_wheelC;
1149  } else {
1150  //A and B wheels:
1151  R0 = m_data->endcapOuterRadiusOfInnerSupport_wheelAB;
1152  R1 = m_data->endcapInnerRadiusOfOuterSupport_wheelAB;
1153  nstraws=m_data->endcapNumberOfStrawsInStrawLayer_AWheels;
1154  }
1155 
1156  double pos = 0.5*(R0+R1);
1157 
1158  // Positioning of straws :
1159  double dphi = 2*M_PI/ nstraws;
1160  GeoTrf::RotateZ3D Rz(1.0);// Radians!
1161  GeoTrf::TranslateX3D Tx(1.0);// MM! TK: actually this doesnt need to be interpreted as mm? Just as a dimensionless 1. (i guess)
1162  GeoTrf::TranslateY3D Ty(1.0);// MM!
1163  Variable i;
1164  Sin sin;
1165  Cos cos;
1166  TRANSFUNCTION tx = Pow(Tx,pos*cos(dphi*i))*Pow(Ty,pos*sin(dphi*i))*Pow(Rz,dphi*i)*GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg);
1167 
1168  // Give this parameterization also to the readout geometry:
1169  if (w<firstIndexOfC) {
1172  }
1173  else {
1175  }
1176  return;
1177 
1178 }

Member Data Documentation

◆ m_alignable

bool TRTDetectorFactory_Lite::m_alignable {}
private

Definition at line 74 of file TRTDetectorFactory_Lite.h.

◆ m_argonGas

GeoIntrusivePtr<const GeoMaterial> TRTDetectorFactory_Lite::m_argonGas {nullptr}
private

Definition at line 80 of file TRTDetectorFactory_Lite.h.

◆ m_athenaComps

InDetDD::AthenaComps* InDetDD::DetectorFactoryBase::m_athenaComps
privateinherited

Definition at line 46 of file InDetDetectorFactoryBase.h.

◆ m_data

std::unique_ptr<TRTParameterInterface> TRTDetectorFactory_Lite::m_data
private

Definition at line 70 of file TRTDetectorFactory_Lite.h.

◆ m_DC2CompatibleBarrelCoordinates

bool TRTDetectorFactory_Lite::m_DC2CompatibleBarrelCoordinates {}
private

Definition at line 73 of file TRTDetectorFactory_Lite.h.

◆ m_detectorManager

InDetDD::TRT_DetectorManager* TRTDetectorFactory_Lite::m_detectorManager = nullptr
private

Definition at line 69 of file TRTDetectorFactory_Lite.h.

◆ m_sqliteReader

GeoModelIO::ReadGeoModel* TRTDetectorFactory_Lite::m_sqliteReader {}
private

Definition at line 68 of file TRTDetectorFactory_Lite.h.

◆ m_strawsvcavailable

bool TRTDetectorFactory_Lite::m_strawsvcavailable {}
private

Definition at line 76 of file TRTDetectorFactory_Lite.h.

◆ m_sumTool

const ITRT_StrawStatusSummaryTool* TRTDetectorFactory_Lite::m_sumTool {}
private

Definition at line 75 of file TRTDetectorFactory_Lite.h.

◆ m_useDynamicAlignFolders

bool TRTDetectorFactory_Lite::m_useDynamicAlignFolders {}
private

Definition at line 77 of file TRTDetectorFactory_Lite.h.

◆ m_useOldActiveGasMixture

bool TRTDetectorFactory_Lite::m_useOldActiveGasMixture {}
private

Definition at line 72 of file TRTDetectorFactory_Lite.h.

◆ m_xenonGas

GeoIntrusivePtr<const GeoMaterial> TRTDetectorFactory_Lite::m_xenonGas {nullptr}
private

Definition at line 79 of file TRTDetectorFactory_Lite.h.


The documentation for this class was generated from the following files:
cmd-l1calo-dq-test.xx
xx
Definition: cmd-l1calo-dq-test.py:16
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
beamspotman.r
def r
Definition: beamspotman.py:674
fillPileUpNoiseLumi.current
current
Definition: fillPileUpNoiseLumi.py:52
InDetDD::TRT_DetectorManager::manageBarrelElement
void manageBarrelElement(TRT_BarrelElement *barrel)
Definition: TRT_DetectorManager.cxx:89
InDetDD::TRT_DetectorManager::conditions
const TRT_Conditions * conditions() const
Conditions interface (mostly for internal use):-------------------------—.
Definition: TRT_DetectorManager.cxx:486
TRT_ID::layer_id
Identifier layer_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer) const
For an individual straw layer.
Definition: TRT_ID.h:494
InDetDD::TRT_DetectorManager::addAlignableTransform
void addAlignableTransform(int level, const Identifier &id, GeoAlignableTransform *transform, const GeoVFullPhysVol *child=0, const GeoVFullPhysVol *frameVol=0)
Add alignable transforms: GeoModel/CLHEP based.
Definition: TRT_DetectorManager.cxx:273
InDetDD::TRT_BarrelElement
Definition: TRT_BarrelElement.h:43
InDetDD::DetectorFactoryBase
Definition: InDetDetectorFactoryBase.h:20
InDetDD::InDetDetectorManager::addSpecialFolder
void addSpecialFolder(const std::string &key)
Definition: InDetDetectorManager.cxx:71
TRT_DetDescrDB_ParameterInterface
Definition: TRT_DetDescrDB_ParameterInterface.h:16
TRTDetectorFactory_Lite::m_detectorManager
InDetDD::TRT_DetectorManager * m_detectorManager
Definition: TRTDetectorFactory_Lite.h:69
InDetDD::TRT_DetectorManager::setEndcapDescriptor
void setEndcapDescriptor(const TRT_EndcapDescriptor *endcapDescriptor)
Definition: TRT_DetectorManager.cxx:568
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
PlotCalibFromCool.yy
yy
Definition: PlotCalibFromCool.py:714
IRDBAccessSvc::getRecordsetPtr
virtual IRDBRecordset_ptr getRecordsetPtr(const std::string &node, const std::string &tag, const std::string &tag2node="", const std::string &connName="ATLASDD")=0
Provides access to the Recordset object containing HVS-tagged data.
InDetDD::TRT_EndcapElement::setNextInZ
void setNextInZ(const TRT_EndcapElement *element)
Set Next in Z.
Definition: TRT_EndcapElement.cxx:88
InDetDD::TRT_EndcapDescriptor::innerRadius
double & innerRadius()
The inner radius:
Definition: TRT_EndcapDescriptor.cxx:49
InDetDD::timedependent_run2
@ timedependent_run2
Definition: InDetDD_Defs.h:19
TRTCond::StrawStatusMultChanContainer
Definition: StrawStatusMultChanContainer.h:19
TRTDetectorFactory_Lite::activeGasZPosition
double activeGasZPosition(bool hasLargeDeadRegion=false) const
Definition: TRTDetectorFactory_Lite.cxx:1122
subproc.shell
shell
Definition: subproc.py:29
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
InDetDD::TRT_DetectorManager::getBarrelElement
const TRT_BarrelElement * getBarrelElement(unsigned int positive, unsigned int moduleIndex, unsigned int phiIndex, unsigned int strawLayerIndex) const
Access Barrel Elements:---------------—(Fast)-------------------------—.
Definition: TRT_DetectorManager.cxx:100
InDetDD::TRT_DetectorManager::setBarrelTransformField
void setBarrelTransformField(size_t i, const GeoXF::Function *field)
Definition: TRT_DetectorManager.cxx:192
InDetDD::TRT_BarrelDescriptor
Definition: TRT_BarrelDescriptor.h:40
InDetDD::TRT_Numerology::setNBarrelLayers
void setNBarrelLayers(unsigned int module, unsigned int nLayers)
Definition: TRT_Numerology.cxx:25
cm3
#define cm3
M_PI
#define M_PI
Definition: ActiveFraction.h:11
InDetDD::TRT_EndcapElement
Definition: TRT_EndcapElement.h:43
deg
#define deg
Definition: SbPolyhedron.cxx:17
InDetDD::InDetDetectorManager::setVersion
void setVersion(const Version &version)
Definition: InDetDetectorManager.cxx:43
InDetDD::TRT_Numerology::setNEndcapLayers
void setNEndcapLayers(unsigned int wheel, unsigned int nLayers)
Definition: TRT_Numerology.cxx:29
InDetDD::Version
Definition: Version.h:24
InDetDD::TRT_EndcapDescriptor::nStraws
unsigned int & nStraws()
The number of straws in a module:
Definition: TRT_EndcapDescriptor.cxx:33
TRTDetectorFactory_Lite::m_DC2CompatibleBarrelCoordinates
bool m_DC2CompatibleBarrelCoordinates
Definition: TRTDetectorFactory_Lite.h:73
InDetDD::static_run1
@ static_run1
Definition: InDetDD_Defs.h:19
TRT_ID::barrel_ec_id
Identifier barrel_ec_id(int barrel_ec) const
For +/-barrel or +/-endcap id.
Definition: TRT_ID.h:411
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
InDetDD::global
@ global
Definition: InDetDD_Defs.h:16
InDetDD::TRT_DetectorManager::barrelTransformField
const GeoXF::Function * barrelTransformField(size_t i) const
Definition: TRT_DetectorManager.cxx:197
x
#define x
InDetDD::InDetDetectorManager::addAlignFolderType
void addAlignFolderType(const AlignFolderType alignfolder)
Definition: InDetDetectorManager.cxx:81
TRTCond::StrawStatus::Dead
@ Dead
Definition: StrawStatus.h:18
InDetDD::TRT_BarrelElement::setNextInPhi
void setNextInPhi(const TRT_BarrelElement *element)
Sets the next-in-phi detector.
Definition: TRT_BarrelElement.cxx:77
ITRT_StrawStatusSummaryTool::getStatusHT
virtual int getStatusHT(const Identifier, const EventContext &) const =0
TRTDetectorFactory_Lite::refreshGasBarrel
void refreshGasBarrel(int strawStatusHT, GeoVPhysVol *shell)
Definition: TRTDetectorFactory_Lite.cxx:1202
pi
#define pi
Definition: TileMuonFitter.cxx:65
InDetDD::TRT_BarrelElement::setNextInR
void setNextInR(const TRT_BarrelElement *element)
Sets the next-in-r detector.
Definition: TRT_BarrelElement.cxx:87
InDetDD::TRT_EndcapDescriptor
class TRT_EndcapDescriptor
Definition: TRT_EndcapDescriptor.h:30
InDetDD::TRT_DetectorManager::addTreeTop
void addTreeTop(const PVLink &)
Definition: TRT_DetectorManager.cxx:84
GeoGenfun::ArrayFunction
Definition: ArrayFunction.h:16
InDetDD::TRT_DetectorManager::manageEndcapElement
void manageEndcapElement(TRT_EndcapElement *endcap)
Definition: TRT_DetectorManager.cxx:95
InDetDD::TRT_EndcapDescriptor::setStrawTransformField
void setStrawTransformField(const GeoXF::Function *xf, size_t offsetInto)
Sets the transform field for straws and offset.
Definition: TRT_EndcapDescriptor.cxx:28
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
InDetDD::TRT_Numerology::setNBarrelRings
void setNBarrelRings(unsigned int ring)
Definition: TRT_Numerology.cxx:33
InDetDD::TRT_Numerology::getNEndcapWheels
unsigned int getNEndcapWheels() const
TRTDetectorFactory_Lite::m_useDynamicAlignFolders
bool m_useDynamicAlignFolders
Definition: TRTDetectorFactory_Lite.h:77
checkCorrelInHIST.cursor
cursor
Definition: checkCorrelInHIST.py:26
InDetDD::TRT_DetectorManager::getNumerology
TRT_Numerology * getNumerology()
Access Numerological information:---------------------------------------—.
Definition: TRT_DetectorManager.cxx:43
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
TRTDetectorFactory_Lite::setEndcapTransformField
void setEndcapTransformField(size_t w)
Definition: TRTDetectorFactory_Lite.cxx:1135
InDetDD::TRT_Numerology::setNEndcapWheels
void setNEndcapWheels(unsigned int wheel)
Definition: TRT_Numerology.cxx:41
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthMessaging::msgLvl
bool msgLvl(const MSG::Level lvl) const
Test the output level.
Definition: AthMessaging.h:151
InDetDD::TRT_DetectorManager::endcapTransformField
const GeoXF::Function * endcapTransformField(size_t i) const
Definition: TRT_DetectorManager.cxx:206
InDetDD::DetectorFactoryBase::detStore
StoreGateSvc * detStore()
Definition: InDetDetectorFactoryBase.h:27
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
TRTDetectorFactory_Lite::m_argonGas
GeoIntrusivePtr< const GeoMaterial > m_argonGas
Definition: TRTDetectorFactory_Lite.h:80
IRDBAccessSvc
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
Definition: IRDBAccessSvc.h:42
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRTDetectorFactory_Lite::m_xenonGas
GeoIntrusivePtr< const GeoMaterial > m_xenonGas
Definition: TRTDetectorFactory_Lite.h:79
InDetDD::InDetDetectorManager::addFolder
void addFolder(const std::string &key)
Definition: InDetDetectorManager.cxx:66
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
InDetDD::InDetDetectorManager::addGlobalFolder
void addGlobalFolder(const std::string &key)
Definition: InDetDetectorManager.cxx:76
InDetDD::TRT_Numerology::setNBarrelPhi
void setNBarrelPhi(unsigned int phi)
Definition: TRT_Numerology.cxx:37
InDetDD::TRT_Numerology::getNBarrelLayers
unsigned int getNBarrelLayers(unsigned int iMod) const
TRTDetectorFactory_Lite::m_sqliteReader
GeoModelIO::ReadGeoModel * m_sqliteReader
Definition: TRTDetectorFactory_Lite.h:68
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition: IRDBAccessSvc.h:25
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
TRTCond::StrawStatus::Good
@ Good
Definition: StrawStatus.h:18
InDetDD::TRT_DetectorManager::getEndcapElement
const TRT_EndcapElement * getEndcapElement(unsigned int positive, unsigned int wheelIndex, unsigned int strawLayerIndex, unsigned int phiIndex) const
Access Endcap Elements:---------------—(Fast)--------------------------—.
Definition: TRT_DetectorManager.cxx:116
InDetDD::TRT_EndcapDescriptor::startPhi
double & startPhi()
The starting phi (angular!!)
Definition: TRT_EndcapDescriptor.cxx:41
TRTDetectorFactory_Lite::refreshGasEndcap
void refreshGasEndcap(int strawStatusHT, GeoVPhysVol *strawPlane)
Definition: TRTDetectorFactory_Lite.cxx:1182
InDetDD::TRT_DetectorManager::setGasType
void setGasType(const ActiveGasType &)
Definition: TRT_DetectorManager.cxx:216
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
InDetDD::TRT_Numerology::setNEndcapPhi
void setNEndcapPhi(unsigned int phi)
Definition: TRT_Numerology.cxx:45
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Variable
Wrapper around a histogram which allows for some additional filling patterns and data manipulation.
Definition: Trigger/TrigCost/TrigCostAnalysis/src/Variable.h:39
Muon::MuonStationIndex::regionName
const std::string & regionName(DetectorRegionIndex index)
convert DetectorRegionIndex into a string
Definition: MuonStationIndex.cxx:138
xAOD::JetAttributeAccessor::accessor
const AccessorWrapper< T > * accessor(xAOD::JetAttribute::AttributeID id)
Returns an attribute accessor corresponding to an AttributeID.
Definition: JetAccessorMap.h:26
InDetDD::TRT_DetectorManager::setIdHelper
void setIdHelper(const TRT_ID *idHelper, bool owns=true)
Get the ID helper: -----------------------------------------------------—.
Definition: TRT_DetectorManager.cxx:137
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:16
InDetDD::TRT_DetectorManager::oldgas
@ oldgas
Definition: TRT_DetectorManager.h:83
ReadCellNoiseFromCoolCompare.v2
v2
Definition: ReadCellNoiseFromCoolCompare.py:364
get_generator_info.version
version
Definition: get_generator_info.py:33
makeTRTBarrelCans.dy
tuple dy
Definition: makeTRTBarrelCans.py:21
InDetDD::TRT_EndcapDescriptor::strawPitch
double & strawPitch()
The straw pitch (angular!!)
Definition: TRT_EndcapDescriptor.cxx:37
TRT_ID
Definition: TRT_ID.h:82
TRTDetectorFactory_Lite::m_sumTool
const ITRT_StrawStatusSummaryTool * m_sumTool
Definition: TRTDetectorFactory_Lite.h:75
InDetDD::TRT_DetectorManager
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
Definition: TRT_DetectorManager.h:63
InDetDD::TRT_DetectorManager::newgas
@ newgas
Definition: TRT_DetectorManager.h:83
y
#define y
InDetDD::AthenaComps::geomDB
const IGeometryDBSvc * geomDB() const
Definition: InDetDDAthenaComps.h:63
TRTDetectorFactory_Lite::m_alignable
bool m_alignable
Definition: TRTDetectorFactory_Lite.h:74
InDetDD::TRT_EndcapDescriptor::strawLength
double & strawLength()
Definition: TRT_EndcapDescriptor.cxx:45
IRDBRecord
IRDBRecord is one record in the IRDBRecordset object.
Definition: IRDBRecord.h:27
InDetDD::DetectorFactoryBase::rdbAccessSvc
IRDBAccessSvc * rdbAccessSvc()
Definition: InDetDetectorFactoryBase.h:32
DeMoScan.first
bool first
Definition: DeMoScan.py:534
makeTRTBarrelCans.dx
tuple dx
Definition: makeTRTBarrelCans.py:20
TRTDetectorFactory_Lite::m_strawsvcavailable
bool m_strawsvcavailable
Definition: TRTDetectorFactory_Lite.h:76
InDetDD::TRT_DetectorManager::setEndcapTransformField
void setEndcapTransformField(size_t i, const GeoXF::Function *field)
Definition: TRT_DetectorManager.cxx:201
InDetDD::DetectorFactoryBase::m_athenaComps
InDetDD::AthenaComps * m_athenaComps
Definition: InDetDetectorFactoryBase.h:46
mole
#define mole
python.SystemOfUnits.s
float s
Definition: SystemOfUnits.py:147
ITRT_StrawStatusSummaryTool::getStrawStatusHTContainer
virtual const StrawStatusContainer * getStrawStatusHTContainer() const =0
InDetDD::TRT_Numerology::getNEndcapLayers
unsigned int getNEndcapLayers(unsigned int iWheel) const
IRDBRecord::getDouble
virtual double getDouble(const std::string &fieldName) const =0
Get double field value.
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:198
InDetDD::AthenaComps::detStore
const StoreGateSvc * detStore() const
Definition: InDetDDAthenaComps.h:53
InDetDD::InDetDetectorManager::addChannel
void addChannel(const std::string &key, int level, FrameType frame)
Alignment access.
Definition: InDetDetectorManager.cxx:56
test_pyathena.counter
counter
Definition: test_pyathena.py:15
InDetDD::AthenaComps::rdbAccessSvc
IRDBAccessSvc * rdbAccessSvc()
Definition: InDetDDAthenaComps.h:74
TRTCond::StrawStatus::Argon
@ Argon
Definition: StrawStatus.h:18
python.compressB64.c
def c
Definition: compressB64.py:93
TileDCSDataPlotter.tx
tx
Definition: TileDCSDataPlotter.py:880
TRTDetectorFactory_Lite::m_useOldActiveGasMixture
bool m_useOldActiveGasMixture
Definition: TRTDetectorFactory_Lite.h:72
TRTDetectorFactory_Lite::m_data
std::unique_ptr< TRTParameterInterface > m_data
Definition: TRTDetectorFactory_Lite.h:70
InDetDD::DetectorFactoryBase::getAthenaComps
InDetDD::AthenaComps * getAthenaComps()
Definition: InDetDetectorFactoryBase.h:42
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
InDetDD::TRT_DetectorManager::setBarrelDescriptor
void setBarrelDescriptor(const TRT_BarrelDescriptor *barrelDescriptor)
Set TRT_Barrel/EndcapDescriptor pointer to the internal sets to delete them in the destructor.
Definition: TRT_DetectorManager.cxx:563
python.SystemOfUnits.m
float m
Definition: SystemOfUnits.py:106
TRT_ID::module_id
Identifier module_id(int barrel_ec, int phi_module, int layer_or_wheel) const
For an individual module phi sector.
Definition: TRT_ID.h:442
TRT_ID::straw_id
Identifier straw_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer, int straw) const
Three ways of getting id for a single straw:
Definition: TRT_ID.h:575
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88
python.SystemOfUnits.gram
float gram
Definition: SystemOfUnits.py:183
Identifier
Definition: IdentifierFieldParser.cxx:14