19 #include "TEveManager.h"
20 #include "TEveGeoNode.h"
44 m_muonBarrelElements(0), m_muonBarrelFullElements(0),
45 m_muonEndcapElements(0), m_muonEndcapFullElements(0),
46 m_pixelBarrelElements(0),
47 m_pixelEndcapElements(0),
48 m_trackerBarrelElements(0),
49 m_trackerEndcapElements(0)
52 SetElementName(
"3D Geometry");
83 for( Int_t iWheel = -2; iWheel <= 2; ++iWheel )
85 for ( Int_t iStation = 1; iStation <= 4; ++iStation )
89 if( iWheel == -2 || iWheel == 2 || iStation == 4 )
92 s <<
"Station" << iStation;
93 TEveElementList* cStation =
new TEveElementList( s.str().c_str() );
95 for( Int_t iSector = 1 ; iSector <= 14; ++iSector )
97 if( iStation < 4 && iSector > 12 )
continue;
101 cStation->AddElement( shape );
122 for (Int_t iWheel = -2; iWheel <= 2; ++iWheel)
124 TEveElementList* cWheel =
new TEveElementList(TString::Format(
"Wheel %d", iWheel));
126 for (Int_t iStation = 1; iStation <= 4; ++iStation)
128 TEveElementList* cStation =
new TEveElementList(TString::Format(
"Station %d", iStation));
129 cWheel->AddElement(cStation);
130 for (Int_t iSector = 1 ; iSector <= 14; ++iSector)
132 if( iStation < 4 && iSector > 12 )
continue;
135 shape->SetTitle(TString::Format(
"DT: W=%d, S=%d, Sec=%d\ndet-id=%u",
136 iWheel, iStation, iSector,
id.rawId()));
138 cStation->AddElement(shape);
159 for( Int_t iEndcap = 1; iEndcap <= 2; ++iEndcap )
161 TEveElementList* cEndcap = 0;
163 cEndcap =
new TEveElementList(
"Forward" );
165 cEndcap =
new TEveElementList(
"Backward" );
172 Int_t maxChambers = 36;
173 for( Int_t iStation = 1; iStation <= 4; ++iStation )
175 std::ostringstream
s; s <<
"Station" << iStation;
176 TEveElementList* cStation =
new TEveElementList( s.str().c_str() );
177 cEndcap->AddElement( cStation );
178 for( Int_t iRing = 1; iRing <= 4; ++iRing )
180 if( iStation > 1 && iRing > 2 )
continue;
181 if( iStation > 3 && iRing > 1 )
continue;
182 std::ostringstream
s; s <<
"Ring" << iRing;
183 TEveElementList* cRing =
new TEveElementList( s.str().c_str() );
184 cStation->AddElement( cRing );
185 ( iRing == 1 && iStation > 1 ) ? ( maxChambers = 18 ) : ( maxChambers = 36 );
186 for( Int_t iChamber = 1; iChamber <= maxChambers; ++iChamber )
189 CSCDetId id( iEndcap, iStation, iRing, iChamber, iLayer );
191 shape->SetTitle(TString::Format(
"CSC: %s, S=%d, R=%d, C=%d\ndet-id=%u",
192 cEndcap->GetName(), iStation, iRing, iChamber,
id.rawId()));
195 cRing->AddElement( shape );
219 for( std::vector<unsigned int>::const_iterator
id = ids.begin();
220 id != ids.end(); ++
id )
223 shape->SetTitle(Form(
"PixelBarrel %d",*
id));
245 for( std::vector<unsigned int>::const_iterator
id = ids.begin();
246 id != ids.end(); ++
id )
250 shape->SetTitle(Form(
"PixelEndCap %d",*
id));
273 for( std::vector<unsigned int>::const_iterator
id = ids.begin();
274 id != ids.end(); ++
id )
281 for( std::vector<unsigned int>::const_iterator
id = ids.begin();
282 id != ids.end(); ++
id )
286 shape->SetTitle(Form(
"TrackerBarrel %d",*
id));
308 for( std::vector<unsigned int>::const_iterator
id = ids.begin();
309 id != ids.end(); ++
id )
316 for( std::vector<unsigned int>::const_iterator
id = ids.begin();
317 id != ids.end(); ++
id )
321 shape->SetTitle(Form(
"TrackerEndcap %d",*
id));
void showMuonBarrel(bool)
TEveElementList * m_pixelBarrelElements
virtual ~FW3DViewGeometry()
void showTrackerEndcap(bool)
void showMuonBarrelFull(bool)
void showTrackerBarrel(bool)
void addToCompound(TEveElement *el, FWGeomColorIndex idx, bool applyTransp=true) const
void showMuonEndcap(bool)
TEveElementList * m_pixelEndcapElements
TEveGeoShape * getEveShape(unsigned int id) const
TEveElementList * m_muonEndcapElements
TEveElementList * m_muonBarrelElements
const FWGeometry * m_geom
TEveElementList * m_trackerEndcapElements
TEveElementList * m_trackerBarrelElements
void showPixelBarrel(bool)
TEveElementList * m_muonBarrelFullElements
FW3DViewGeometry(const fireworks::Context &context)
void showPixelEndcap(bool)
std::vector< unsigned int > getMatchedIds(Detector det, SubDetector subdet) const