18 #include "TEveManager.h" 19 #include "TEveGeoNode.h" 20 #include "TEveGeoShape.h" 21 #include "TEveCompound.h" 50 m_muonBarrelElements(nullptr),
51 m_muonBarrelFullElements(nullptr),
52 m_muonEndcapElements(nullptr),
53 m_muonEndcapFullElements(nullptr),
54 m_pixelBarrelElements(nullptr),
55 m_pixelEndcapElements(nullptr),
56 m_trackerBarrelElements(nullptr),
57 m_trackerEndcapElements(nullptr),
58 m_HGCalEEElements(nullptr),
59 m_HGCalHSiElements(nullptr),
60 m_HGCalHScElements(nullptr),
61 m_mtdBarrelElements(nullptr),
62 m_mtdEndcapElements(nullptr) {
63 SetElementName(
"3D Geometry");
88 for (Int_t iWheel = -2; iWheel <= 2; ++iWheel) {
89 for (Int_t iStation = 1; iStation <= 4; ++iStation) {
92 if (iWheel == -2 || iWheel == 2 || iStation == 4) {
94 s <<
"Station" << iStation;
95 TEveElementList* cStation =
new TEveElementList(
s.str().c_str());
97 for (Int_t iSector = 1; iSector <= 14; ++iSector) {
98 if (iStation < 4 && iSector > 12)
103 cStation->AddElement(
shape);
120 for (Int_t iWheel = -2; iWheel <= 2; ++iWheel) {
121 TEveElementList* cWheel =
new TEveElementList(TString::Format(
"Wheel %d", iWheel));
123 for (Int_t iStation = 1; iStation <= 4; ++iStation) {
124 TEveElementList* cStation =
new TEveElementList(TString::Format(
"Station %d", iStation));
125 cWheel->AddElement(cStation);
126 for (Int_t iSector = 1; iSector <= 14; ++iSector) {
127 if (iStation < 4 && iSector > 12)
131 shape->SetTitle(TString::Format(
"DT: W=%d, S=%d, Sec=%d\ndet-id=%u", iWheel, iStation, iSector,
id.
rawId()));
133 cStation->AddElement(
shape);
151 for (Int_t iEndcap = 1; iEndcap <= 2; ++iEndcap)
153 TEveElementList* cEndcap =
nullptr;
155 cEndcap =
new TEveElementList(
"CSC Forward");
157 cEndcap =
new TEveElementList(
"CSC Backward");
164 Int_t maxChambers = 36;
165 for (Int_t iStation = 1; iStation <= 4; ++iStation) {
166 std::ostringstream
s;
167 s <<
"Station" << iStation;
168 TEveElementList* cStation =
new TEveElementList(
s.str().c_str());
169 cEndcap->AddElement(cStation);
170 for (Int_t iRing = 1; iRing <= 4; ++iRing) {
171 if (iStation > 1 && iRing > 2)
174 std::ostringstream
s;
175 s <<
"Ring" << iRing;
176 TEveElementList* cRing =
new TEveElementList(
s.str().c_str());
177 cStation->AddElement(cRing);
178 (iRing == 1 && iStation > 1) ? (maxChambers = 18) : (maxChambers = 36);
179 for (Int_t iChamber = 1; iChamber <= maxChambers; ++iChamber) {
181 CSCDetId id(iEndcap, iStation, iRing, iChamber, iLayer);
183 shape->SetTitle(TString::Format(
184 "CSC: %s, S=%d, R=%d, C=%d\ndet-id=%u", cEndcap->GetName(), iStation, iRing, iChamber,
id.rawId()));
187 cRing->AddElement(
shape);
195 TEveElementList* teEndcap =
nullptr;
196 teEndcap =
new TEveElementList(Form(
"GEM Reg=%d", iRegion));
200 std::ostringstream
s;
201 s <<
"Station" << iStation;
202 TEveElementList* cStation =
new TEveElementList(
s.str().c_str());
203 teEndcap->AddElement(cStation);
207 std::ostringstream sl;
208 sl <<
"Layer" << iLayer;
209 TEveElementList* elayer =
new TEveElementList(sl.str().c_str());
210 cStation->AddElement(elayer);
212 for (Int_t iChamber = 1; iChamber <= maxChamber; ++iChamber) {
213 std::ostringstream
cl;
214 cl <<
"Chamber" << iChamber;
215 TEveElementList* cha =
new TEveElementList(
cl.str().c_str());
216 elayer->AddElement(cha);
221 GEMDetId id(iRegion, iRing, iStation, iLayer, iChamber, iRoll);
224 shape->SetTitle(TString::Format(
225 "GEM: , Rng=%d, St=%d, Ch=%d Rl=%d\ndet-id=%u", iRing, iStation, iChamber, iRoll,
id.
rawId()));
227 cha->AddElement(
shape);
241 TEveElementList* teEndcap =
nullptr;
243 teEndcap =
new TEveElementList(
"ME0 Forward");
245 teEndcap =
new TEveElementList(
"ME0 Backward");
248 for (Int_t iLayer = 1; iLayer <= 6; ++iLayer) {
249 std::ostringstream
s;
250 s <<
"Layer" << iLayer;
251 TEveElementList* cLayer =
new TEveElementList(
s.str().c_str());
252 teEndcap->AddElement(cLayer);
254 for (Int_t iChamber = 1; iChamber <= 18; ++iChamber) {
257 ME0DetId id(iRegion, iLayer, iChamber, iRoll);
260 shape->SetTitle(TString::Format(
"ME0: , Ch=%d Rl=%d\ndet-id=%u", iChamber, iRoll,
id.
rawId()));
263 cLayer->AddElement(
shape);
285 for (std::vector<unsigned int>::const_iterator
id = ids.begin();
id != ids.end(); ++
id) {
310 for (std::vector<unsigned int>::const_iterator
id = ids.begin();
id != ids.end(); ++
id) {
334 for (std::vector<unsigned int>::const_iterator
id = ids.begin();
id != ids.end(); ++
id) {
340 for (std::vector<unsigned int>::const_iterator
id = ids.begin();
id != ids.end(); ++
id) {
342 shape->SetTitle(Form(
"TrackerBarrel %d", *
id));
360 for (std::vector<unsigned int>::const_iterator
id = ids.begin();
id != ids.end(); ++
id) {
366 for (std::vector<unsigned int>::const_iterator
id = ids.begin();
id != ids.end(); ++
id) {
369 shape->SetTitle(Form(
"TrackerEndcap %d", *
id));
387 for (
const auto&
id : ids) {
393 float color[3] = {0., 0., 0.};
394 if (siIndex >= 0 && siIndex < 3)
395 color[siIndex] = 1.f;
396 shape->SetMainColorRGB(color[0], color[1], color[2]);
397 shape->SetPickable(
false);
414 for (
const auto&
id : ids) {
420 float color[3] = {0., 0., 0.};
421 if (siIndex >= 0 && siIndex < 3)
422 color[siIndex] = 1.f;
423 shape->SetMainColorRGB(color[0], color[1], color[2]);
424 shape->SetPickable(
false);
462 for (std::vector<unsigned int>::const_iterator mtdId = ids.begin(); mtdId != ids.end(); ++mtdId) {
464 if (
id.mtdSubDetector() != MTDDetId::MTDType::BTL)
468 shape->SetTitle(Form(
"MTD barrel %d",
id.
rawId()));
488 for (std::vector<unsigned int>::const_iterator mtdId = ids.begin(); mtdId != ids.end(); ++mtdId) {
490 if (
id.mtdSubDetector() != MTDDetId::MTDType::ETL)
494 shape->SetTitle(Form(
"MTD endcap %d",
id.
rawId()));
~FW3DViewGeometry() override
void showMuonBarrel(long)
TEveCompound * m_colorComp[kFWGeomColorSize]
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const
void showMuonBarrel(bool)
static constexpr int minRegionId
TEveElementList * m_pixelBarrelElements
TEveElementList * m_mtdEndcapElements
std::string print(DetId detid) const
TEveElementList * m_HGCalEEElements
void showTrackerEndcap(bool)
static constexpr int32_t maxRegionId
bool haveExtraDet(const char *) const
void showMuonBarrelFull(bool)
Detector identifier base class for the MIP Timing Layer.
TEveElementList * m_HGCalHSiElements
void showTrackerBarrel(bool)
const VersionInfo & versionInfo() const
TEveElementList * m_HGCalHScElements
TEveGeoShape * getHGCScintillatorEveShape(unsigned int id) const
void showMuonEndcap(bool)
TEveElementList * m_pixelEndcapElements
const TrackerTopology * getTrackerTopology() const
TEveGeoShape * getHGCSiliconEveShape(unsigned int id) const
TEveElementList * m_muonEndcapElements
TEveElementList * m_muonBarrelElements
TEveElementList * m_mtdBarrelElements
const FWGeometry * m_geom
TEveElementList * m_trackerEndcapElements
TEveElementList * m_trackerBarrelElements
TEveGeoShape * getEveShape(unsigned int id) const
void showPixelBarrel(bool)
TEveElementList * m_muonBarrelFullElements
static constexpr int32_t maxLayerId
FW3DViewGeometry(const fireworks::Context &context)
void showPixelEndcap(bool)
static constexpr int32_t maxChamberId
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
const float * getParameters(unsigned int id) const
static constexpr int maxRegionId
static constexpr int32_t minLayerId
static constexpr int32_t minRegionId