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, int overridedigversion, 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 {}
 
int m_overridedigversion {}
 
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 29 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,
int  overridedigversion,
bool  alignable,
bool  useDynamicAlignmentFolders 
)

Definition at line 53 of file TRTDetectorFactory_Lite.cxx.

61  : InDetDD::DetectorFactoryBase(athenaComps),
62  m_sqliteReader (sqliteReader),
63  m_useOldActiveGasMixture(useOldActiveGasMixture),
64  m_DC2CompatibleBarrelCoordinates(DC2CompatibleBarrelCoordinates),
65  m_overridedigversion(overridedigversion),
66  m_alignable(alignable),
67  m_sumTool(sumTool),
68  m_useDynamicAlignFolders(useDynamicAlignmentFolders)
69 {
70 }

◆ ~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 1143 of file TRTDetectorFactory_Lite.cxx.

1143  {
1144 
1145  double lengthOfInnerDeadRegion= hasLargeDeadRegion ? m_data->barrelLengthOfLargeDeadRegion : m_data->lengthOfDeadRegion ;
1146  double lengthOfActiveGas = (m_data->barrelLengthOfStraw-m_data->barrelLengthOfTwister)/2.0 - m_data->lengthOfDeadRegion - lengthOfInnerDeadRegion;
1147  return (lengthOfActiveGas + m_data->barrelLengthOfTwister) / 2. + lengthOfInnerDeadRegion; // middle of lengthOfActiveGas
1148 
1149 }

◆ create()

void TRTDetectorFactory_Lite::create ( GeoPhysVol *  world)
overridevirtual

Definition at line 96 of file TRTDetectorFactory_Lite.cxx.

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

◆ 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 77 of file TRTDetectorFactory_Lite.cxx.

78 {
79  //TK: Maybe check that m_detectorManager!=0 ?
80  return m_detectorManager;
81 }

◆ 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 1223 of file TRTDetectorFactory_Lite.cxx.

1223  {
1224 
1225  const GeoMaterial *material = m_xenonGas.get();
1226 
1227  if (m_strawsvcavailable && (strawStatusHT == TRTCond::StrawStatus::Dead ||
1228  strawStatusHT == TRTCond::StrawStatus::Argon))
1229  material= m_argonGas.get();
1230 
1231  GeoVolumeCursor cursor0(shell);
1232  if (!cursor0.atEnd()) {
1233  const GeoVPhysVol *v1=cursor0.getVolume().get();
1234  GeoCountVolAndSTAction counter;
1235  v1->exec(&counter);
1236  for (unsigned int i=0;i<counter.getCount();i++) {
1237  GeoAccessVolAndSTAction accessor(i);
1238  v1->exec(&accessor);
1239  const GeoSerialTransformer *st=accessor.getSerialTransformer();
1240  if (st) {
1241  const GeoVPhysVol *v2=st->getVolume().get();
1242  GeoVolumeCursor cursor1(v2);
1243  if (!cursor1.atEnd()) {
1244  const GeoVPhysVol *v3=cursor1.getVolume();
1245  GeoVolumeCursor cursor2(v3);
1246  while (!cursor2.atEnd()) {
1247  std::string regionName=cursor2.getVolume()->getLogVol()->getName();
1248  if (regionName=="GasMA" || regionName=="DeadRegion" || regionName=="InnerDeadRegion") {
1249  ATH_MSG_DEBUG("BARREL: REFRESHING GAS MIXTURE " << cursor2.getVolume()->getLogVol()->getName() << " -->" << material->getName());
1250  cursor2.getVolume()->getLogVol()->setMaterial(material);
1251  }
1252  cursor2.next();
1253  }
1254  }
1255  }
1256  }
1257  }
1258 
1259 }

◆ refreshGasEndcap()

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

Definition at line 1203 of file TRTDetectorFactory_Lite.cxx.

1203  {
1204 
1205  const GeoMaterial *material = m_xenonGas.get();
1206 
1207  if (m_strawsvcavailable && (strawStatusHT == TRTCond::StrawStatus::Dead ||
1208  strawStatusHT == TRTCond::StrawStatus::Argon))
1209  material= m_argonGas.get();
1210 
1211  // The volume hierarchy from here is: strawPlane>>straw>>gas
1212  GeoVolumeCursor cursor0(strawPlane);
1213  if (!cursor0.atEnd()) {
1214  const GeoVPhysVol *v1=cursor0.getVolume().get();
1215  GeoVolumeCursor cursor1(v1);
1216  if (!cursor1.atEnd()) {
1217  ATH_MSG_DEBUG("ENDCAP: REFRESHING GAS MIXTURE " << strawPlane->getLogVol()->getName() << " -->" << material->getName());
1218  cursor1.getVolume()->getLogVol()->setMaterial(material);
1219  }
1220  }
1221 }

◆ setEndcapTransformField()

void TRTDetectorFactory_Lite::setEndcapTransformField ( size_t  w)
private

Definition at line 1156 of file TRTDetectorFactory_Lite.cxx.

1156  {
1157 
1158  size_t nstraws=0;
1159 
1160  //A and B wheels have similar straw planes, but the C wheels are different.
1161  // const size_t firstIndexOfC = 15; //hardcoded
1162  const size_t firstIndexOfC = 14; //hardcoded
1163 
1164  double R0, R1;
1165  if (w >= firstIndexOfC) {
1166  //C wheels:
1167  nstraws=m_data->endcapNumberOfStrawsInStrawLayer_CWheels;
1168  R0 = m_data->endcapOuterRadiusOfInnerSupport_wheelC;
1169  R1 = m_data->endcapInnerRadiusOfOuterSupport_wheelC;
1170  } else {
1171  //A and B wheels:
1172  R0 = m_data->endcapOuterRadiusOfInnerSupport_wheelAB;
1173  R1 = m_data->endcapInnerRadiusOfOuterSupport_wheelAB;
1174  nstraws=m_data->endcapNumberOfStrawsInStrawLayer_AWheels;
1175  }
1176 
1177  double pos = 0.5*(R0+R1);
1178 
1179  // Positioning of straws :
1180  double dphi = 2*M_PI/ nstraws;
1181  GeoTrf::RotateZ3D Rz(1.0);// Radians!
1182  GeoTrf::TranslateX3D Tx(1.0);// MM! TK: actually this doesnt need to be interpreted as mm? Just as a dimensionless 1. (i guess)
1183  GeoTrf::TranslateY3D Ty(1.0);// MM!
1184  Variable i;
1185  Sin sin;
1186  Cos cos;
1187  TRANSFUNCTION tx = Pow(Tx,pos*cos(dphi*i))*Pow(Ty,pos*sin(dphi*i))*Pow(Rz,dphi*i)*GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg);
1188 
1189  // Give this parameterization also to the readout geometry:
1190  if (w<firstIndexOfC) {
1193  }
1194  else {
1196  }
1197  return;
1198 
1199 }

Member Data Documentation

◆ m_alignable

bool TRTDetectorFactory_Lite::m_alignable {}
private

Definition at line 77 of file TRTDetectorFactory_Lite.h.

◆ m_argonGas

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

Definition at line 83 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 72 of file TRTDetectorFactory_Lite.h.

◆ m_DC2CompatibleBarrelCoordinates

bool TRTDetectorFactory_Lite::m_DC2CompatibleBarrelCoordinates {}
private

Definition at line 75 of file TRTDetectorFactory_Lite.h.

◆ m_detectorManager

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

Definition at line 71 of file TRTDetectorFactory_Lite.h.

◆ m_overridedigversion

int TRTDetectorFactory_Lite::m_overridedigversion {}
private

Definition at line 76 of file TRTDetectorFactory_Lite.h.

◆ m_sqliteReader

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

Definition at line 70 of file TRTDetectorFactory_Lite.h.

◆ m_strawsvcavailable

bool TRTDetectorFactory_Lite::m_strawsvcavailable {}
private

Definition at line 79 of file TRTDetectorFactory_Lite.h.

◆ m_sumTool

const ITRT_StrawStatusSummaryTool* TRTDetectorFactory_Lite::m_sumTool {}
private

Definition at line 78 of file TRTDetectorFactory_Lite.h.

◆ m_useDynamicAlignFolders

bool TRTDetectorFactory_Lite::m_useDynamicAlignFolders {}
private

Definition at line 80 of file TRTDetectorFactory_Lite.h.

◆ m_useOldActiveGasMixture

bool TRTDetectorFactory_Lite::m_useOldActiveGasMixture {}
private

Definition at line 74 of file TRTDetectorFactory_Lite.h.

◆ m_xenonGas

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

Definition at line 82 of file TRTDetectorFactory_Lite.h.


The documentation for this class was generated from the following files:
beamspotman.r
def r
Definition: beamspotman.py:676
fillPileUpNoiseLumi.current
current
Definition: fillPileUpNoiseLumi.py:52
InDetDD::TRT_DetectorManager::manageBarrelElement
void manageBarrelElement(TRT_BarrelElement *barrel)
Definition: TRT_DetectorManager.cxx:102
InDetDD::TRT_DetectorManager::conditions
const TRT_Conditions * conditions() const
Conditions interface (mostly for internal use):-------------------------—.
Definition: TRT_DetectorManager.cxx:519
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:500
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:292
InDetDD::TRT_BarrelElement
Definition: TRT_BarrelElement.h:44
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
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:18
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
TRTDetectorFactory_Lite::m_detectorManager
InDetDD::TRT_DetectorManager * m_detectorManager
Definition: TRTDetectorFactory_Lite.h:71
InDetDD::TRT_DetectorManager::setEndcapDescriptor
void setEndcapDescriptor(const TRT_EndcapDescriptor *endcapDescriptor)
Definition: TRT_DetectorManager.cxx:601
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:1143
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:113
InDetDD::TRT_DetectorManager::setBarrelTransformField
void setBarrelTransformField(size_t i, const GeoXF::Function *field)
Definition: TRT_DetectorManager.cxx:196
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:44
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
TRTDetectorFactory_Lite::m_overridedigversion
int m_overridedigversion
Definition: TRTDetectorFactory_Lite.h:76
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:75
InDetDD::static_run1
@ static_run1
Definition: InDetDD_Defs.h:19
python.SystemOfUnits.gram
int gram
Definition: SystemOfUnits.py:165
TRT_ID::barrel_ec_id
Identifier barrel_ec_id(int barrel_ec) const
For +/-barrel or +/-endcap id.
Definition: TRT_ID.h:417
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:201
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
TRTDetectorFactory_Lite::refreshGasBarrel
void refreshGasBarrel(int strawStatusHT, GeoVPhysVol *shell)
Definition: TRTDetectorFactory_Lite.cxx:1223
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
GeoGenfun::ArrayFunction
Definition: ArrayFunction.h:16
InDetDD::TRT_DetectorManager::manageEndcapElement
void manageEndcapElement(TRT_EndcapElement *endcap)
Definition: TRT_DetectorManager.cxx:108
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:80
InDetDD::TRT_DetectorManager::getNumerology
TRT_Numerology * getNumerology()
Access Numerological information:---------------------------------------—.
Definition: TRT_DetectorManager.cxx:56
TRTDetectorFactory_Lite::setEndcapTransformField
void setEndcapTransformField(size_t w)
Definition: TRTDetectorFactory_Lite.cxx:1156
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:210
InDetDD::DetectorFactoryBase::detStore
StoreGateSvc * detStore()
Definition: InDetDetectorFactoryBase.h:27
lumiFormat.i
int i
Definition: lumiFormat.py:92
z
#define z
TRTDetectorFactory_Lite::m_argonGas
GeoIntrusivePtr< const GeoMaterial > m_argonGas
Definition: TRTDetectorFactory_Lite.h:83
IRDBAccessSvc
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
Definition: IRDBAccessSvc.h:45
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:82
InDetDD::InDetDetectorManager::addFolder
void addFolder(const std::string &key)
Definition: InDetDetectorManager.cxx:66
ITRT_StrawStatusSummaryTool::getStatusHT
virtual int getStatusHT(const Identifier) const =0
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:70
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:129
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:1203
InDetDD::TRT_DetectorManager::digitizationVersionName
std::string digitizationVersionName() const
Definition: TRT_DetectorManager.cxx:230
InDetDD::TRT_DetectorManager::setGasType
void setGasType(const ActiveGasType &)
Definition: TRT_DetectorManager.cxx:220
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
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:150
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
InDetDD::TRT_DetectorManager::oldgas
@ oldgas
Definition: TRT_DetectorManager.h:89
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:84
TRTDetectorFactory_Lite::m_sumTool
const ITRT_StrawStatusSummaryTool * m_sumTool
Definition: TRTDetectorFactory_Lite.h:78
InDetDD::TRT_DetectorManager
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
Definition: TRT_DetectorManager.h:69
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
query_example.cursor
cursor
Definition: query_example.py:21
InDetDD::TRT_DetectorManager::newgas
@ newgas
Definition: TRT_DetectorManager.h:89
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:77
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
InDetDD::TRT_DetectorManager::digitizationVersion
unsigned int digitizationVersion() const
Get and set information about digitization version ---------------------—.
Definition: TRT_DetectorManager.cxx:225
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:79
InDetDD::TRT_DetectorManager::setEndcapTransformField
void setEndcapTransformField(size_t i, const GeoXF::Function *field)
Definition: TRT_DetectorManager.cxx:205
InDetDD::DetectorFactoryBase::m_athenaComps
InDetDD::AthenaComps * m_athenaComps
Definition: InDetDetectorFactoryBase.h:46
InDetDD::TRT_DetectorManager::setDigitizationVersion
void setDigitizationVersion(const unsigned int &, const std::string &name)
Definition: TRT_DetectorManager.cxx:235
mole
#define mole
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.
InDetDD::TRT_DetectorManager::addTreeTop
void addTreeTop(PVLink)
Definition: TRT_DetectorManager.cxx:97
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
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:878
TRTDetectorFactory_Lite::m_useOldActiveGasMixture
bool m_useOldActiveGasMixture
Definition: TRTDetectorFactory_Lite.h:74
TRTDetectorFactory_Lite::m_data
std::unique_ptr< TRTParameterInterface > m_data
Definition: TRTDetectorFactory_Lite.h:72
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:596
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:448
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:581
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88