ATLAS Offline Software
Loading...
Searching...
No Matches
MuonGM::MuonDetectorFactory001 Class Reference

#include <MuonDetectorFactory001.h>

Inheritance diagram for MuonGM::MuonDetectorFactory001:
Collaboration diagram for MuonGM::MuonDetectorFactory001:

Public Member Functions

 MuonDetectorFactory001 (StoreGateSvc *pDetStore)
 ~MuonDetectorFactory001 ()
virtual void create (GeoPhysVol *world) override
virtual const MuonDetectorManagergetDetectorManager () const override
MuonDetectorManagergetDetectorManager ()
void setDBAtlasVersion (const std::string &v)
void setDBMuonVersion (const std::string &v)
void setDBkey (const std::string &v)
void setDBnode (const std::string &v)
void setLayout (const std::string &str)
void setCutoutsFlag (int)
void setCutoutsBogFlag (int)
void setCtbBisFlag (int)
void setRDBAccess (IRDBAccessSvc *access)
void setAltAsciiDBMap (const AltAsciiDBMap &asciidbmap)
void setUseRDB (int rdb)
void setMinimalGeoFlag (int minimalGeo)
void setSelection (const std::vector< std::string > &, const std::vector< int > &, const std::vector< int > &)
void setDumpMemoryBreakDown (bool value)
void setCacheFillingFlag (int value)
void setMdtDeformationFlag (int mdtDeformationFlag)
void setNswAsBuiltParaFlag (int nswAsBuiltParaFlag)
void setFineClashFixingFlag (int value)
void hasCSC (bool value)
void hasSTgc (bool value)
void hasMM (bool value)
void setNSWAsBuiltAsciiPath (const std::string &, const std::string &)
void disableBEEShift (bool flag)
bool BEEShiftDisabled () const

Private Types

typedef std::map< std::string, std::string > AltAsciiDBMap

Private Attributes

std::string m_DBAtlasVersion {}
std::string m_DBMuonVersion {}
std::string m_DBkey {}
std::string m_DBnode {}
std::string m_layout {}
int m_includeCutouts {0}
int m_includeCutoutsBog {0}
int m_includeCtbBis {0}
int m_rdb {1}
int m_minimalGeoFlag {0}
bool m_dumpMemoryBreakDown {false}
int m_enableFineClashFixing {0}
bool m_hasCSC {true}
bool m_hasSTgc {true}
bool m_hasMM {true}
bool m_disableBEEShift {false}
std::vector< std::string > m_selectedStations
std::vector< int > m_selectedStEta
std::vector< int > m_selectedStPhi
std::unique_ptr< MuonSystemDescriptionm_muon
MuonDetectorManagerm_manager {nullptr}
StoreGateSvcm_pDetStore {nullptr}
IRDBAccessSvcm_pRDBAccess {nullptr}
AltAsciiDBMap m_altAsciiDBMap {}

Detailed Description

Definition at line 21 of file MuonDetectorFactory001.h.

Member Typedef Documentation

◆ AltAsciiDBMap

typedef std::map<std::string, std::string> MuonGM::MuonDetectorFactory001::AltAsciiDBMap
private

Definition at line 23 of file MuonDetectorFactory001.h.

Constructor & Destructor Documentation

◆ MuonDetectorFactory001()

MuonGM::MuonDetectorFactory001::MuonDetectorFactory001 ( StoreGateSvc * pDetStore)

Definition at line 71 of file MuonDetectorFactory001.cxx.

71 :
72 m_muon (std::make_unique< MuonSystemDescription>("MuonSystem")),
73 m_pDetStore{pDetStore} {
74 m_muon->barrelInnerRadius = 4.30 * Gaudi::Units::m;
75 m_muon->innerRadius = 0.07 * Gaudi::Units::m;
76 m_muon->outerRadius = 13.00 * Gaudi::Units::m;
77 m_muon->endcapFrontFace = 6.74 * Gaudi::Units::m;
78 m_muon->length = 22.03 * Gaudi::Units::m;
79 m_muon->barreLength = 6.53 * Gaudi::Units::m;
80 m_muon->barrelInterRadius = 3.83 * Gaudi::Units::m;
81 m_muon->extraZ = 12.9 * Gaudi::Units::m;
82 m_muon->extraR = 12.5 * Gaudi::Units::m;
83
84 MsgStream log(Athena::getMessageSvc(), "MuonGeoModel");
85 log << MSG::INFO << "MuonDetectorFactory - constructor "
86 << " MuonSystem OuterRadius " << m_muon->outerRadius << " Length " << m_muon->length << endmsg;
87 }
#define endmsg
std::unique_ptr< MuonSystemDescription > m_muon
IMessageSvc * getMessageSvc(bool quiet=false)

◆ ~MuonDetectorFactory001()

MuonGM::MuonDetectorFactory001::~MuonDetectorFactory001 ( )
default

Member Function Documentation

◆ BEEShiftDisabled()

bool MuonGM::MuonDetectorFactory001::BEEShiftDisabled ( ) const
inline

Definition at line 133 of file MuonDetectorFactory001.h.

◆ create()

void MuonGM::MuonDetectorFactory001::create ( GeoPhysVol * world)
overridevirtual

Definition at line 94 of file MuonDetectorFactory001.cxx.

94 {
95 MsgStream log(Athena::getMessageSvc(), "MuGM:MuonFactory");
96
97 int mem = 0;
98 float cpu = 0;
99 int umem = 0;
100 float ucpu = 0;
101 std::ofstream geoModelStats;
103 geoModelStats.open("MuonGeoModelStatistics_MuonDetectorFactory");
104
105 mem = GeoPerfUtils::getMem();
106 cpu = int(GeoPerfUtils::getCpu() / 100.);
107
108 geoModelStats << "At MuonDetectorFactory::create entry point: \t SZ= " << mem << " Kb \t Time = " << cpu << " seconds " << std::endl;
109
110 umem = GeoPerfUtils::getMem();
111 ucpu = int(GeoPerfUtils::getCpu() / 100.);
112 geoModelStats << "At MuonDetectorFactory::resetting to 0: \t SZ= " << umem - mem << " Kb \t Time = " << ucpu - cpu << " seconds " << std::endl;
113 mem = umem;
114 cpu = ucpu;
115 } // if (m_dumpMemoryBreakDown) {
116
117 if (!m_manager)
118 m_manager = new MuonDetectorManager();
119
120 // check consistency of flags coming from the tool
123 log << MSG::INFO << "MuonLayout set to <" << m_layout << "> = Development version for DC3 - infrastructures " << endmsg;
124 log << MSG::INFO << " BOG cutouts are activated " << m_includeCutoutsBog << " , all other cutouts are disabled " << m_includeCutouts << endmsg;
125
126 // set here the flag defining the geometry granularity
127 // minimalgeo = 1 => The geo tree is built up to the Detector Level (Full PhysVol)
128 // no internal structure of the Detector is built
129 // minimalgeo = 0 => The geo tree is built in full details
130 m_manager->setMinimalGeoFlag(m_minimalGeoFlag);
131
132 m_manager->setGeometryVersion(m_layout);
133 m_manager->set_DBMuonVersion(m_DBMuonVersion);
134
135 log << MSG::INFO << "Manager created for geometry version " << m_manager->geometryVersion() << " from DB MuonVersion <" << m_manager->get_DBMuonVersion() << ">" << endmsg;
136
137 // here create the MYSQL singleton and assign to it the geometry version
140 mysql->set_amdb_from_RDB(m_rdb == 1);
141
142
143 StatusCode sc = StatusCode::SUCCESS;
144
145
146 log << MSG::INFO << "MDTIDHELPER retrieved from DetStore" << endmsg;
147 log << MSG::INFO << "RPCIDHELPER retrieved from DetStore" << endmsg;
148 log << MSG::INFO << "TGCIDHELPER retrieved from DetStore" << endmsg;
149
150 if (m_hasCSC) {
151 log << MSG::INFO << "CSCIDHELPER retrieved from DetStore" << endmsg;
152 }
153 if (m_hasSTgc) {
154 log << MSG::INFO << "STGCIDHELPER retrieved from DetStore" << endmsg;
155 }
156 if (m_hasMM) {
157 log << MSG::INFO << "MMIDHELPER retrieved from DetStore" << endmsg;
158 }
159
161 umem = GeoPerfUtils::getMem();
162 ucpu = int(GeoPerfUtils::getCpu() / 100.);
163 geoModelStats << "At MuonDetectorFactory::IdHelpers loaded \t SZ= " << umem << " Kb \t Time = " << ucpu << " seconds ---- \t DeltaM = " << umem - mem
164 << " \t Delta T =" << ucpu - cpu << std::endl;
165 mem = umem;
166 cpu = ucpu;
167 }
168
169 log << MSG::INFO << " **************** MuonDetectorFactory001 ************************" << endmsg;
170 log << " *** Start building the Muon Geometry Tree **********************" << endmsg;
171
172 std::string OracleTag = m_DBkey;
173 std::string OracleNode = m_DBnode;
174
175 if (log.level() <= MSG::DEBUG)
176 log << MSG::DEBUG << "calling RDBReaderAtlas with m_altAsciiDBMap" << endmsg;
177
178 std::unique_ptr<RDBReaderAtlas> dbr =std::make_unique<RDBReaderAtlas>(m_pDetStore, m_pRDBAccess, OracleTag, OracleNode, m_altAsciiDBMap);
179
180
181 // set here the flag deciding whether to include cutouts:
182 // m_includeCutouts = 1 => include cutouts
183 // m_includeCutouts = 0 => no cutouts
184 m_manager->setCutoutsFlag(m_includeCutouts);
185 m_manager->setCutoutsBogFlag(m_includeCutoutsBog);
186
187 dbr->setGeometryVersion(m_layout);
188 dbr->setManager(getDetectorManager());
189 sc = dbr->ProcessDB(*mysql);
190 if (sc != StatusCode::SUCCESS) {
191 log << MSG::ERROR << " FAILURE in DB access; Muon node will not be built" << endmsg;
192 return;
193 }
194
196 umem = GeoPerfUtils::getMem();
197 ucpu = int(GeoPerfUtils::getCpu() / 100.);
198 geoModelStats << "At MuonDetectorFactory::DB read \t SZ= " << umem << " Kb \t Time = " << ucpu << " seconds ---- \t DeltaM = " << umem - mem
199 << " \t Delta T =" << ucpu - cpu << std::endl;
200 mem = umem;
201 cpu = ucpu;
202 }
203
204 StoredMaterialManager *theMaterialManager;
205 if (StatusCode::SUCCESS != m_pDetStore->retrieve(theMaterialManager, "MATERIALS")) {
206 return;
207 } else {
208 log << MSG::INFO << " theMaterialManager retrieven successfully from the DetStore" << endmsg;
209 }
210
211 const GeoMaterial *m4 = theMaterialManager->getMaterial("std::Air");
212 GeoLogVol *l4;
213 GeoPcon *c4 = new GeoPcon(0, 360 * Gaudi::Units::deg);
214
215
216 //--- --- --- CREATE ENVELOPE --- --- ---
217 // First try to get data from the GeomDB
218 IRDBRecordset_ptr muonSysRec = m_pRDBAccess->getRecordsetPtr("MuonSystem", OracleTag, OracleNode);
219
220 // -- Next two lines allow to use MuonSystem-00 by default instead of hardwired numbers
221 // even for geometry tags where MuonSystem was not collected
222 if (muonSysRec->size() == 0) {
223 muonSysRec = m_pRDBAccess->getRecordsetPtr("MuonSystem", "MuonSystem-00");
224 log << MSG::INFO << "MuonSystem description from default node in GeomDB, i.e. MuonSystem-00" << endmsg;
225 } else {
226 log << MSG::INFO << "MuonSystem description from OracleTag=<" << OracleTag << "> and node=<" << OracleNode << ">" << endmsg;
227 }
228
229 // --- Envelope from DB ....
230 if (muonSysRec->size() != 0) {
231 // Data retrieved
232 muonsysIndMap indmap;
233 muonsysIndMap::const_iterator iter;
234 const IRDBRecord *currentRecord;
235
236 // First fill the contents of muonsysIndMap
237 for (unsigned int ind = 0; ind < muonSysRec->size(); ind++) {
238 int key = (*muonSysRec)[ind]->getInt("PLANE_ID");
239 indmap[key] = ind;
240 }
241
242 // Create the polycone
243 for (unsigned int ind = 0; ind < indmap.size(); ind++) {
244 iter = indmap.find(ind);
245
246 if (iter == indmap.end()) {
247 throw std::runtime_error("Error in MuonDetectorFactory, missing plane in MuonSystem");
248 } else {
249 currentRecord = (*muonSysRec)[(*iter).second];
250 c4->addPlane(currentRecord->getDouble("ZPLANE"), currentRecord->getDouble("RMIN"), currentRecord->getDouble("RMAX"));
251 }
252 }
253 } else { // ... end if Envelope from DB ---
254 // Muon System node is not present, go for handcoded version
255 log << MSG::INFO << "MuonSystem description not available in GeomDB - using hard-wired description" << endmsg;
256
257 double ir = m_muon->barrelInnerRadius;
258 double pir = m_muon->innerRadius;
259 double orad = m_muon->outerRadius;
260 double l = m_muon->length;
261 double eff = m_muon->endcapFrontFace;
262
263 double extraR = m_muon->extraR;
264 double extraZ = m_muon->extraZ;
265
266 c4->addPlane(-l, pir, extraR);
267 c4->addPlane(-extraZ, pir, extraR);
268 c4->addPlane(-extraZ, pir, orad);
269
270 c4->addPlane(-eff, pir, orad);
271 c4->addPlane(-eff, ir, orad);
272 c4->addPlane(+eff, ir, orad);
273 c4->addPlane(+eff, pir, orad);
274
275 c4->addPlane(extraZ, pir, orad);
276 c4->addPlane(extraZ, pir, extraR);
277 c4->addPlane(l, pir, extraR);
278 } // ... end if Envelope from DB ---
279
280
281 l4 = new GeoLogVol("MuonSys", c4, m4);
282
283 GeoPhysVol *p4 = new GeoPhysVol(l4);
284
285 // Cannot (yet) cope with this:
286 // G4UserLimits *ul=new G4UserLimits;
287 // ul->SetMaxAllowedStep(5*Gaudi::Units::cm);
288 // lv->GetLogicalVolume()->SetUserLimits(ul);
289
290 m_manager->addTreeTop(p4); // This is the top!
291 log << MSG::INFO << " TreeTop added to the Manager" << endmsg;
292 log << MSG::INFO << " Muon Layout " << m_layout << endmsg;
293
294 std::vector<std::string> slist;
295 if (m_selectedStations.empty())
296 slist.emplace_back("*");
297 else
298 slist = m_selectedStations;
299
300 // create the fullphysvol map to allow cloning and save memory
301 std::unique_ptr<FPVMAP> savemem = std::make_unique< FPVMAP>();
302
303 int nstat_ss = 0;
304 int ntpos_ss = 0;
305 int npos_ss = 0;
306 int nAssemblies = 0;
307 if (m_enableFineClashFixing > 0) {
308 log << MSG::INFO << "Fine Clash Fixing enabled: (should be ON/OFF for Simulation/Reconstruction)" << endmsg;
309 } else {
310 log << MSG::INFO << "Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction)" << endmsg;
311 }
312
313 StationSelector sel(*mysql, slist);
315
316 for (it = sel.begin(); it != sel.end(); ++it) {
317 Station *station = (*it).second;
318 std::string stname(station->GetName(), 0, 3);
319 if (m_selectedStations.empty()) {
320 if (log.level() <= MSG::VERBOSE) {
321 log << MSG::VERBOSE << "Processing Stations named <" << station->GetName() << "> " << nstat_ss << " built until now" << endmsg;
322 }
323 }
324
325 if ((skip_chambers) && (stname.substr(0, 1) != "X"))
326 continue;
327
328 bool isAssembly = false;
329 if (station->GetNrOfCutouts() > 0 && stname.substr(0, 1) != "T")
330 isAssembly = true;
331
332 // BIR have multilayers of diff. length and overall station volume clashes with toroids
333 if (stname == "BIR")
334 isAssembly = true;
335
336 MuonChamber l(*mysql, station); // here is where we start to create a MuonChamber with all readoutelements
337 l.setFPVMAP(savemem.get());
338 l.setFineClashFixingFlag(m_enableFineClashFixing);
339
341 AlignPosIterator apit;
342 AlignPos ap;
343 npos_ss = 0;
344 for (pit = station->begin(); pit != station->end(); ++pit) {
345 int zi = (*pit).second.zindex;
346 int fi = (*pit).second.phiindex;
347 int sign = 1;
348 if (zi)
349 sign = zi / abs(zi);
350
351 // if there's a selection of eta location, check if this chamber is selected
352 if (!m_selectedStEta.empty()) {
353 bool selectedEta = false;
354 for (auto i = m_selectedStEta.begin(); i < m_selectedStEta.end(); i++) {
355 if (zi == *i) {
356 selectedEta = true;
357 break;
358 }
359 }
360
361 if (!selectedEta)
362 continue;
363 }
364
365 // if there's a selection of phi location, check if this chamber is selected
366 if (!m_selectedStPhi.empty()) {
367 bool selectedPhi = false;
368 for (auto i = m_selectedStPhi.begin(); i < m_selectedStPhi.end(); i++) {
369 if ((fi + 1) == *i) {
370 selectedPhi = true;
371 break;
372 }
373 }
374
375 if (!selectedPhi)
376 continue;
377 }
378
379 // total number of stations positioned in the layout
380 ntpos_ss++;
381 // total number of locations for this chamber
382 npos_ss++;
383
384 if ((m_selectedStPhi.size() + m_selectedStEta.size()) > 0) {
385 log << MSG::INFO << "Build selected Station <" << station->GetName() << "> at Jzz = " << zi << " Jff = " << fi + 1 << " ******* " << nstat_ss
386 << " stat.types built until now" << endmsg;
387 }
388
389 // here define GeoNameTag
390 GeoNameTag *nm = new GeoNameTag(station->GetName() + "_station");
391 // here build the physical volume (tree) associated to the chamber
392 bool is_mirrored = ((*pit).second).isMirrored;
393 int mirsign = 0;
394 if (zi < 0 && !is_mirrored)
395 mirsign = 1;
396 if (stname == "CSL")
397 isAssembly = true;
398
399 // CSL because coffin shape of the station mother volume
400 GeoVPhysVol *pv = l.build(*theMaterialManager, *mysql, getDetectorManager(), zi, fi, is_mirrored, isAssembly);
401 if (isAssembly)
402 nAssemblies++;
403
404 // here define GeoIdentifierTag
405 if (useAssemblies || isAssembly) {
406 int sideC = 0;
407 if (zi < 0)
408 sideC = 1;
409 int geoid = (sideC * 10000 + mirsign * 1000 + abs(zi) * 100 + fi + 1) * 100000;
410 if (log.level() <= MSG::DEBUG) {
411 log << MSG::DEBUG << "Adding Station with nameTag=<" << station->GetName() + "_station"
412 << "> and geoId " << geoid << endmsg;
413 }
414 p4->add(new GeoIdentifierTag(geoid));
415 } else {
416 int geoid = (mirsign * 1000 + abs(zi) * 100 + fi + 1) * sign;
417 p4->add(new GeoIdentifierTag(geoid));
418 if (log.level() <= MSG::DEBUG) {
419 log << MSG::DEBUG << "Adding Station with nameTag=<" << station->GetName() + "_station"
420 << "> and geoId " << geoid << " for zi/fi = " << zi << "/" << fi << endmsg;
421 }
422 }
423
424 // alignment issues and readout geometry for station
425 MuonStation *mst = m_manager->getMuonStation(station->GetName(), zi, fi + 1);
426 if (!mst) {
427 log << MSG::WARNING << "For Station with nameTag=<" << station->GetName() << "> at zi/fi = " << zi << "/" << fi
428 << " no MuonStation found => no possibility to align" << endmsg;
429 continue;
430 }
431
432 GeoTrf::Transform3D tsz_to_szt = GeoTrf::RotateZ3D(-90 * Gaudi::Units::degree) * GeoTrf::RotateY3D(-90 * Gaudi::Units::degree);
433 GeoTrf::Transform3D nativeToAmdbLRS=tsz_to_szt * station->native_to_tsz_frame(*mysql, (*pit).second);
434
435 mst->setNativeToAmdbLRS(nativeToAmdbLRS);
436 mst->setNominalAmdbLRSToGlobal(station->tsz_to_global_frame(*mysql, (*pit).second) * tsz_to_szt.inverse());
437
438 // find correct alignment information for this position
439 // xf->setDelta(DummyAline); // just in case we don't find one
440
441 // apit = station->FindAlignPos(zi,fi);
442 // number of A-lines for this station
443
444 int nAlines = station->CountAlignPos(zi, fi);
445 // nAlines=-1;
446 if (nAlines == 0 || BEEShiftDisabled() ) {
447
448 // here define the GeoAlignableTransform associated to the chamber
449 // nominal transform first
450 GeoAlignableTransform *xf = new GeoAlignableTransform(station->getNominalTransform(*mysql, (*pit).second));
451
452 // add tag, transform and physicalvolume associated to the chamber to the mother-volume
453 p4->add(nm);
454 p4->add(xf);
455 p4->add(pv);
456
457
458 mst->setTransform(xf);
459 GeoTrf::Transform3D tsz_to_szt = GeoTrf::RotateZ3D(-90 * Gaudi::Units::degree) * GeoTrf::RotateY3D(-90 * Gaudi::Units::degree);
460
461 mst->setNativeToAmdbLRS(tsz_to_szt * station->native_to_tsz_frame(*mysql, (*pit).second));
462 mst->setNominalAmdbLRSToGlobal(station->tsz_to_global_frame(*mysql, (*pit).second) * tsz_to_szt.inverse());
463
464 mst->setDeltaAmdbLRS(GeoTrf::Transform3D::Identity());
465
466 } else if (nAlines ==1) {
467 AlignPosIterator alast;
468 AlignPosIterator afirst = station->getFirstAlignPosInRange(zi, fi, alast);
469
470 for (AlignPosIterator acurrent = afirst; acurrent != alast; ++acurrent) {
471 ap = acurrent->second;
472
473 if (ap.phiindex != fi || ap.zindex != zi) {
474 log << MSG::ERROR << "Inconsistent AlignedPosition found in the static Geometry DB: aligPos.fi, zi = " << ap.phiindex << ", " << ap.zindex
475 << " for station " << station->GetName() << " at fi/zi = " << fi << "/" << zi << " AlignPos indices fi/zi " << fi << "/" << zi << endmsg;
476 }
477
478 if (ap.jobindex == 0) {
479 // station
480 if (log.level() <= MSG::DEBUG) {
481 log << MSG::DEBUG << "Going to set delta from A-line for station" << stname << " at zi/fi " << zi << "/" << fi << endmsg;
482 log << MSG::DEBUG << "A-line is: " << ap.tras << " " << ap.traz << " " << ap.trat << " " << ap.rots << " " << ap.rotz << " " << ap.rott << endmsg;
483 }
484 // compute the delta transform in the local AMDB frame
485 // here define the GeoAlignableTransform associated to the chamber
486 // nominal transform first
487 GeoTrf::Transform3D delta_amdb =
488 GeoTrf::TranslateX3D(ap.tras) * GeoTrf::TranslateY3D(ap.traz) * GeoTrf::TranslateZ3D(ap.trat) *
489 GeoTrf::RotateX3D(ap.rots) * GeoTrf::RotateY3D(ap.rotz) * GeoTrf::RotateZ3D(ap.rott);
490
491 GeoTrf::Transform3D tsz_to_szt = GeoTrf::RotateZ3D(-90 * Gaudi::Units::degree) * GeoTrf::RotateY3D(-90 * Gaudi::Units::degree);
492 GeoTrf::Transform3D nominalTransform=station->getNominalTransform(*mysql, (*pit).second);
493 GeoTrf::Transform3D native_to_amdbl=tsz_to_szt * station->native_to_tsz_frame(*mysql, (*pit).second);
494 GeoAlignableTransform *xf = new GeoAlignableTransform(nominalTransform*native_to_amdbl.inverse()*delta_amdb*native_to_amdbl);
495
496 // add tag, transform and physicalvolume associated to the chamber to the mother-volume
497 p4->add(nm);
498 p4->add(xf);
499 p4->add(pv);
500
501
502
503 mst->setTransform(xf);
504 mst->setNativeToAmdbLRS(tsz_to_szt * station->native_to_tsz_frame(*mysql, (*pit).second));
505 mst->setNominalAmdbLRSToGlobal(station->tsz_to_global_frame(*mysql, (*pit).second) * tsz_to_szt.inverse());
506 mst->setDeltaAmdbLRS(GeoTrf::Transform3D::Identity());
507
508
509 }
510 }
511 }
512 else {
513 }
514 } // end loop on positions
515
516 // number of stations realised in the layout
517 if (npos_ss > 0)
518 nstat_ss++;
519 } // for ( it = sel.begin(); it != sel.end(); it++ ) {
520
521 log << MSG::INFO << " **************** MuonDetectorFactory001 ****************************" << endmsg << " *** The Muon Chamber Geometry Tree is built with " << endmsg
522 << " *** " << p4->getNChildVols() << " child volumes " << endmsg << " *** " << savemem->NDetectors() << " independent elements and " << endmsg << " *** "
523 << savemem->NDetectorsReused() << " elements cloned or shared " << endmsg << " *** " << nstat_ss << " kinds of stations" << endmsg << " *** " << ntpos_ss
524 << " stations with alignable transforms" << endmsg << " *** " << nAssemblies << " stations are described as Assemblies" << endmsg << " *** "
525 << m_manager->nMuonStation() << " MuonStations " << endmsg << " *** \t " << m_manager->nMdtRE() << " MDT Readout Elements \t " << m_manager->nMdtDE()
526 << " MDT Detector Elements " << endmsg << " *** \t " << m_manager->nCscRE() << " CSC Readout Elements \t " << m_manager->nCscDE() << " CSC Detector Elements " << endmsg
527 << " *** \t " << m_manager->nRpcRE() << " RPC Readout Elements \t " << m_manager->nRpcDE() << " RPC Detector Elements " << endmsg << " *** \t " << m_manager->nTgcRE()
528 << " TGC Readout Elements \t " << m_manager->nTgcDE() << " TGC Detector Elements " << endmsg << " ********************************************************************"
529 << endmsg;
530
532 umem = GeoPerfUtils::getMem();
533 ucpu = int(GeoPerfUtils::getCpu() / 100.);
534 geoModelStats << "At MuonDetectorFactory::active geo done \t SZ= " << umem << " Kb \t Time = " << ucpu << " seconds ---- \t DeltaM = " << umem - mem
535 << " \t Delta T =" << ucpu - cpu << std::endl;
536 mem = umem;
537 cpu = ucpu;
538 }
539
540
541 // delete the station and technology map
542 delete mysql.get();
543
545 umem = GeoPerfUtils::getMem();
546 ucpu = int(GeoPerfUtils::getCpu() / 100.);
547 geoModelStats << "At MuonDetectorFactory::released access.mem \t SZ= " << umem << " Kb \t Time = " << ucpu << " seconds ---- \t DeltaM = " << umem - mem
548 << " \t Delta T =" << ucpu - cpu << std::endl;
549 mem = umem;
550 cpu = ucpu;
551 }
552
553 GeoNameTag *ntg = new GeoNameTag("Muon");
554 world->add(ntg);
555 world->add(p4);
556
557 log << MSG::INFO << " *** Inert Material built according to DB switches and config. ****** " << endmsg;
558 log << MSG::INFO << " *** The Muon Geometry Tree has " << p4->getNChildVols() << " child vol.s in total ********" << endmsg
559 << " ********************************************************************\n"
560 << endmsg;
561
563 umem = GeoPerfUtils::getMem();
564 ucpu = int(GeoPerfUtils::getCpu() / 100.);
565 geoModelStats << "At MuonDetectorFactory::inert geo done \t SZ= " << umem << " Kb \t Time = " << ucpu << " seconds ---- \t DeltaM = " << umem - mem
566 << " \t Delta T =" << ucpu - cpu << std::endl;
567 mem = umem;
568 cpu = ucpu;
569
570 geoModelStats.close();
571 }
572 } // MuonDetectorFactory001::create
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
static Double_t sc
#define useAssemblies
std::map< int, unsigned int, std::less< int > > muonsysIndMap
#define skip_chambers
int sign(int a)
virtual double getDouble(const std::string &fieldName) const =0
Get double field value.
virtual unsigned int size() const =0
void set_amdb_from_RDB(bool)
Definition MYSQL.cxx:268
void setGeometryVersion(const std::string &s)
Definition MYSQL.cxx:271
static LockedMYSQL GetPointer()
Definition MYSQL.cxx:42
CxxUtils::LockedPointer< MYSQL > LockedMYSQL
Definition MYSQL.h:47
std::vector< std::string > m_selectedStations
virtual const MuonDetectorManager * getDetectorManager() const override
StationMap::const_iterator StationIterator
virtual const GeoMaterial * getMaterial(const std::string &name)=0
int ir
counter of the current depth
Definition fastadd.cxx:49
::StatusCode StatusCode
StatusCode definition for legacy code.
std::multimap< int, AlignPos, std::less< int > >::const_iterator AlignPosIterator
Definition Station.h:38
std::map< int, Position, std::less< int > >::const_iterator PositionIterator
Definition Station.h:37
l
Printing final latex table to .tex output file.
unsigned int constexpr sideC
Definition RPDUtils.h:15

◆ disableBEEShift()

void MuonGM::MuonDetectorFactory001::disableBEEShift ( bool flag)
inline

Definition at line 132 of file MuonDetectorFactory001.h.

bool flag
Definition master.py:29

◆ getDetectorManager() [1/2]

MuonDetectorManager * MuonGM::MuonDetectorFactory001::getDetectorManager ( )

Definition at line 92 of file MuonDetectorFactory001.cxx.

92{ return m_manager; }

◆ getDetectorManager() [2/2]

const MuonDetectorManager * MuonGM::MuonDetectorFactory001::getDetectorManager ( ) const
overridevirtual

Definition at line 91 of file MuonDetectorFactory001.cxx.

91{ return m_manager; }

◆ hasCSC()

void MuonGM::MuonDetectorFactory001::hasCSC ( bool value)
inline

Definition at line 129 of file MuonDetectorFactory001.h.

129{ m_hasCSC = value; }

◆ hasMM()

void MuonGM::MuonDetectorFactory001::hasMM ( bool value)
inline

Definition at line 131 of file MuonDetectorFactory001.h.

131{ m_hasMM = value; }

◆ hasSTgc()

void MuonGM::MuonDetectorFactory001::hasSTgc ( bool value)
inline

Definition at line 130 of file MuonDetectorFactory001.h.

130{ m_hasSTgc = value; }

◆ setAltAsciiDBMap()

void MuonGM::MuonDetectorFactory001::setAltAsciiDBMap ( const AltAsciiDBMap & asciidbmap)
inline

Definition at line 116 of file MuonDetectorFactory001.h.

116{ m_altAsciiDBMap = asciidbmap; }

◆ setCacheFillingFlag()

void MuonGM::MuonDetectorFactory001::setCacheFillingFlag ( int value)
inline

◆ setCtbBisFlag()

void MuonGM::MuonDetectorFactory001::setCtbBisFlag ( int flag)
inline

◆ setCutoutsBogFlag()

void MuonGM::MuonDetectorFactory001::setCutoutsBogFlag ( int flag)
inline

Definition at line 112 of file MuonDetectorFactory001.h.

◆ setCutoutsFlag()

void MuonGM::MuonDetectorFactory001::setCutoutsFlag ( int flag)
inline

Definition at line 111 of file MuonDetectorFactory001.h.

◆ setDBAtlasVersion()

void MuonGM::MuonDetectorFactory001::setDBAtlasVersion ( const std::string & v)
inline

◆ setDBkey()

void MuonGM::MuonDetectorFactory001::setDBkey ( const std::string & v)
inline

Definition at line 108 of file MuonDetectorFactory001.h.

108{ m_DBkey = v; }

◆ setDBMuonVersion()

void MuonGM::MuonDetectorFactory001::setDBMuonVersion ( const std::string & v)
inline

Definition at line 107 of file MuonDetectorFactory001.h.

107{ m_DBMuonVersion = v; }

◆ setDBnode()

void MuonGM::MuonDetectorFactory001::setDBnode ( const std::string & v)
inline

Definition at line 109 of file MuonDetectorFactory001.h.

109{ m_DBnode = v; }

◆ setDumpMemoryBreakDown()

void MuonGM::MuonDetectorFactory001::setDumpMemoryBreakDown ( bool value)
inline

Definition at line 127 of file MuonDetectorFactory001.h.

◆ setFineClashFixingFlag()

void MuonGM::MuonDetectorFactory001::setFineClashFixingFlag ( int value)
inline

Definition at line 128 of file MuonDetectorFactory001.h.

◆ setLayout()

void MuonGM::MuonDetectorFactory001::setLayout ( const std::string & str)
inline

◆ setMdtDeformationFlag()

void MuonGM::MuonDetectorFactory001::setMdtDeformationFlag ( int mdtDeformationFlag)
inline

◆ setMinimalGeoFlag()

void MuonGM::MuonDetectorFactory001::setMinimalGeoFlag ( int minimalGeo)
inline

Definition at line 117 of file MuonDetectorFactory001.h.

117{ m_minimalGeoFlag = minimalGeo; }

◆ setNSWAsBuiltAsciiPath()

void MuonGM::MuonDetectorFactory001::setNSWAsBuiltAsciiPath ( const std::string & ,
const std::string &  )
inline

◆ setNswAsBuiltParaFlag()

void MuonGM::MuonDetectorFactory001::setNswAsBuiltParaFlag ( int nswAsBuiltParaFlag)
inline

◆ setRDBAccess()

void MuonGM::MuonDetectorFactory001::setRDBAccess ( IRDBAccessSvc * access)
inline

Definition at line 115 of file MuonDetectorFactory001.h.

115{ m_pRDBAccess = access; }
access(filename, mode)

◆ setSelection()

void MuonGM::MuonDetectorFactory001::setSelection ( const std::vector< std::string > & vst,
const std::vector< int > & veta,
const std::vector< int > & vphi )
inline

Definition at line 119 of file MuonDetectorFactory001.h.

121 {
122 m_selectedStations = vst;
123 m_selectedStEta = veta;
124 m_selectedStPhi = vphi;
125 }

◆ setUseRDB()

void MuonGM::MuonDetectorFactory001::setUseRDB ( int rdb)
inline

Definition at line 114 of file MuonDetectorFactory001.h.

114{ m_rdb = rdb; }

Member Data Documentation

◆ m_altAsciiDBMap

AltAsciiDBMap MuonGM::MuonDetectorFactory001::m_altAsciiDBMap {}
private

Definition at line 103 of file MuonDetectorFactory001.h.

103{};

◆ m_DBAtlasVersion

std::string MuonGM::MuonDetectorFactory001::m_DBAtlasVersion {}
private

Definition at line 75 of file MuonDetectorFactory001.h.

75{};

◆ m_DBkey

std::string MuonGM::MuonDetectorFactory001::m_DBkey {}
private

Definition at line 77 of file MuonDetectorFactory001.h.

77{};

◆ m_DBMuonVersion

std::string MuonGM::MuonDetectorFactory001::m_DBMuonVersion {}
private

Definition at line 76 of file MuonDetectorFactory001.h.

76{};

◆ m_DBnode

std::string MuonGM::MuonDetectorFactory001::m_DBnode {}
private

Definition at line 78 of file MuonDetectorFactory001.h.

78{};

◆ m_disableBEEShift

bool MuonGM::MuonDetectorFactory001::m_disableBEEShift {false}
private

Definition at line 93 of file MuonDetectorFactory001.h.

93{false};

◆ m_dumpMemoryBreakDown

bool MuonGM::MuonDetectorFactory001::m_dumpMemoryBreakDown {false}
private

Definition at line 87 of file MuonDetectorFactory001.h.

87{false};

◆ m_enableFineClashFixing

int MuonGM::MuonDetectorFactory001::m_enableFineClashFixing {0}
private

Definition at line 88 of file MuonDetectorFactory001.h.

88{0};

◆ m_hasCSC

bool MuonGM::MuonDetectorFactory001::m_hasCSC {true}
private

Definition at line 89 of file MuonDetectorFactory001.h.

89{true};

◆ m_hasMM

bool MuonGM::MuonDetectorFactory001::m_hasMM {true}
private

Definition at line 91 of file MuonDetectorFactory001.h.

91{true};

◆ m_hasSTgc

bool MuonGM::MuonDetectorFactory001::m_hasSTgc {true}
private

Definition at line 90 of file MuonDetectorFactory001.h.

90{true};

◆ m_includeCtbBis

int MuonGM::MuonDetectorFactory001::m_includeCtbBis {0}
private

Definition at line 83 of file MuonDetectorFactory001.h.

83{0};

◆ m_includeCutouts

int MuonGM::MuonDetectorFactory001::m_includeCutouts {0}
private

Definition at line 81 of file MuonDetectorFactory001.h.

81{0};

◆ m_includeCutoutsBog

int MuonGM::MuonDetectorFactory001::m_includeCutoutsBog {0}
private

Definition at line 82 of file MuonDetectorFactory001.h.

82{0};

◆ m_layout

std::string MuonGM::MuonDetectorFactory001::m_layout {}
private

Definition at line 80 of file MuonDetectorFactory001.h.

80{};

◆ m_manager

MuonDetectorManager* MuonGM::MuonDetectorFactory001::m_manager {nullptr}
private

Definition at line 100 of file MuonDetectorFactory001.h.

100{nullptr};

◆ m_minimalGeoFlag

int MuonGM::MuonDetectorFactory001::m_minimalGeoFlag {0}
private

Definition at line 85 of file MuonDetectorFactory001.h.

85{0};

◆ m_muon

std::unique_ptr<MuonSystemDescription> MuonGM::MuonDetectorFactory001::m_muon
private

Definition at line 99 of file MuonDetectorFactory001.h.

◆ m_pDetStore

StoreGateSvc* MuonGM::MuonDetectorFactory001::m_pDetStore {nullptr}
private

Definition at line 101 of file MuonDetectorFactory001.h.

101{nullptr};

◆ m_pRDBAccess

IRDBAccessSvc* MuonGM::MuonDetectorFactory001::m_pRDBAccess {nullptr}
private

Definition at line 102 of file MuonDetectorFactory001.h.

102{nullptr};

◆ m_rdb

int MuonGM::MuonDetectorFactory001::m_rdb {1}
private

Definition at line 84 of file MuonDetectorFactory001.h.

84{1};

◆ m_selectedStations

std::vector<std::string> MuonGM::MuonDetectorFactory001::m_selectedStations
private

Definition at line 95 of file MuonDetectorFactory001.h.

◆ m_selectedStEta

std::vector<int> MuonGM::MuonDetectorFactory001::m_selectedStEta
private

Definition at line 96 of file MuonDetectorFactory001.h.

◆ m_selectedStPhi

std::vector<int> MuonGM::MuonDetectorFactory001::m_selectedStPhi
private

Definition at line 97 of file MuonDetectorFactory001.h.


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