LDMX Software
Public Member Functions | Private Attributes | List of all members
eventdisplay::EveDetectorGeometry Class Reference

Class that constructs the detector components for the event display. More...

#include <EveDetectorGeometry.h>

Public Member Functions

 EveDetectorGeometry ()
 Constructor Builds and draws all of the detector elements.
 
 ~EveDetectorGeometry ()
 Destructor Cleanup leftover pointers.
 
void drawECAL ()
 Draw the elements of the ECAL.
 
void drawHCAL ()
 Draw the elements of the HCAL.
 
void drawRecoilTracker ()
 Draw the elements of the Recoil Tracker.
 
TEveElement * getECAL ()
 Access ECAL Eve Element.
 
TEveElement * getHCAL ()
 Access HCAL Eve Element.
 
TEveElement * getRecoilTracker ()
 Access Recoil Tracker Eve Element.
 
TEveElement * getDetector ()
 Access Entire Detector Eve Element.
 

Private Attributes

TEveElement * hcal_
 
TEveElement * sidehcal_
 
TEveElement * ecal_
 
TEveElement * recoilTracker_
 
TEveElement * detector_
 

Detailed Description

Class that constructs the detector components for the event display.

Definition at line 22 of file EveDetectorGeometry.h.

Constructor & Destructor Documentation

◆ EveDetectorGeometry()

eventdisplay::EveDetectorGeometry::EveDetectorGeometry ( )

Constructor Builds and draws all of the detector elements.

Definition at line 12 of file EveDetectorGeometry.cxx.

12 {
13 hcal_ = new TEveElementList("HCAL");
14 sidehcal_ = new TEveElementList("Side HCAL");
15 ecal_ = new TEveElementList("ECAL");
16 recoilTracker_ = new TEveElementList("Recoil Tracker");
17 detector_ = new TEveElementList("LDMX Detector");
18
19 drawECAL();
20 drawHCAL();
22}
void drawRecoilTracker()
Draw the elements of the Recoil Tracker.
void drawECAL()
Draw the elements of the ECAL.
void drawHCAL()
Draw the elements of the HCAL.

References drawECAL(), drawHCAL(), and drawRecoilTracker().

◆ ~EveDetectorGeometry()

eventdisplay::EveDetectorGeometry::~EveDetectorGeometry ( )
inline

Destructor Cleanup leftover pointers.

Definition at line 34 of file EveDetectorGeometry.h.

34 {
35 delete hcal_;
36 delete sidehcal_;
37 delete ecal_;
38 delete recoilTracker_;
39 delete detector_;
40 }

Member Function Documentation

◆ drawECAL()

void eventdisplay::EveDetectorGeometry::drawECAL ( )

Draw the elements of the ECAL.

Definition at line 24 of file EveDetectorGeometry.cxx.

24 {
25 for (int col = 0; col < 7; ++col) {
26 TString colName;
27 colName.Form("Tower %d", col);
28 TEveGeoShape* hexCol = EveShapeDrawer::getInstance().drawHexPrism(
29 DetectorGeometry::getInstance().getHexTower(col), 0, 0, 0, kBlue, 90,
30 colName);
31
32 ecal_->AddElement(hexCol);
33 }
34
35 detector_->AddElement(ecal_);
36}
static const DetectorGeometry & getInstance()
Get the single instance of this class.
TEveGeoShape * drawHexPrism(Double_t xPos, Double_t yPos, Double_t zPos, Double_t xRot, Double_t yRot, Double_t zRot, Double_t h, Double_t r, Int_t color, Int_t transparency, TString name)
Draw a hexagonal prism.
static EveShapeDrawer & getInstance()
Get Instance of Drawer.

References eventdisplay::EveShapeDrawer::drawHexPrism(), eventdisplay::DetectorGeometry::getInstance(), and eventdisplay::EveShapeDrawer::getInstance().

Referenced by EveDetectorGeometry().

◆ drawHCAL()

void eventdisplay::EveDetectorGeometry::drawHCAL ( )

Draw the elements of the HCAL.

Definition at line 38 of file EveDetectorGeometry.cxx.

38 {
39 TEveGeoShape* backHcal = EveShapeDrawer::getInstance().drawRectPrism(
40 DetectorGeometry::getInstance().getBoundingBox(
41 ldmx::HcalID::HcalSection::BACK),
42 0, 0, 0, kCyan, 90, "Back HCal");
43 hcal_->AddElement(backHcal);
44
45 TEveGeoShape* sideTopHcal = EveShapeDrawer::getInstance().drawRectPrism(
46 DetectorGeometry::getInstance().getBoundingBox(
47 ldmx::HcalID::HcalSection::TOP),
48 0, 0, 0, kCyan, 90, "Module 1");
49
50 sidehcal_->AddElement(sideTopHcal);
51
52 TEveGeoShape* sideBottomHcal = EveShapeDrawer::getInstance().drawRectPrism(
53 DetectorGeometry::getInstance().getBoundingBox(
54 ldmx::HcalID::HcalSection::BOTTOM),
55 0, 0, 0, kCyan, 90, "Module 4");
56
57 sidehcal_->AddElement(sideBottomHcal);
58
59 TEveGeoShape* sideLeftHcal = EveShapeDrawer::getInstance().drawRectPrism(
60 DetectorGeometry::getInstance().getBoundingBox(
61 ldmx::HcalID::HcalSection::LEFT),
62 0, 0, 0, kCyan, 90, "Module 2");
63
64 sidehcal_->AddElement(sideLeftHcal);
65
66 TEveGeoShape* sideRightHcal = EveShapeDrawer::getInstance().drawRectPrism(
67 DetectorGeometry::getInstance().getBoundingBox(
68 ldmx::HcalID::HcalSection::RIGHT),
69 0, 0, 0, kCyan, 90, "Module 3");
70
71 sidehcal_->AddElement(sideRightHcal);
72 hcal_->AddElement(sidehcal_);
73
74 detector_->AddElement(hcal_);
75}
TEveGeoShape * drawRectPrism(Double_t xPos, Double_t yPos, Double_t zPos, Double_t dX, Double_t dY, Double_t dZ, Double_t xRot, Double_t yRot, Double_t zRot, Int_t color, Int_t transparency, TString name)
Draw a rectangular prism.

References eventdisplay::EveShapeDrawer::drawRectPrism(), eventdisplay::DetectorGeometry::getInstance(), and eventdisplay::EveShapeDrawer::getInstance().

Referenced by EveDetectorGeometry().

◆ drawRecoilTracker()

void eventdisplay::EveDetectorGeometry::drawRecoilTracker ( )

Draw the elements of the Recoil Tracker.

Definition at line 77 of file EveDetectorGeometry.cxx.

77 {
78 for (int layerID = 1; layerID < 9; layerID++) {
79 TString name;
80 name.Form("Stereo_%d", layerID);
81
82 TEveGeoShape* layer = EveShapeDrawer::getInstance().drawRectPrism(
83 DetectorGeometry::getInstance().getBoundingBox(layerID, 0), 0, 0,
84 DetectorGeometry::getInstance().getRotAngle(layerID, 0) * 180 / M_PI,
85 kRed - 10, 90, name);
86
87 recoilTracker_->AddElement(layer);
88 }
89
90 for (int layerID = 9; layerID < 11; layerID++) {
91 for (int moduleID = 0; moduleID < 10; moduleID++) {
92 TString name;
93 name.Form("Mono_%d_%d", layerID, moduleID);
94
95 TEveGeoShape* layer = EveShapeDrawer::getInstance().drawRectPrism(
96 DetectorGeometry::getInstance().getBoundingBox(layerID, moduleID), 0,
97 0,
98 DetectorGeometry::getInstance().getRotAngle(layerID, moduleID) * 180 /
99 M_PI,
100 kRed - 10, 90, name);
101
102 recoilTracker_->AddElement(layer);
103 }
104 }
105
106 detector_->AddElement(recoilTracker_);
107
108 return;
109}

References eventdisplay::EveShapeDrawer::drawRectPrism(), eventdisplay::DetectorGeometry::getInstance(), and eventdisplay::EveShapeDrawer::getInstance().

Referenced by EveDetectorGeometry().

◆ getDetector()

TEveElement * eventdisplay::EveDetectorGeometry::getDetector ( )
inline

Access Entire Detector Eve Element.

Definition at line 75 of file EveDetectorGeometry.h.

75{ return detector_; }

◆ getECAL()

TEveElement * eventdisplay::EveDetectorGeometry::getECAL ( )
inline

Access ECAL Eve Element.

Definition at line 60 of file EveDetectorGeometry.h.

60{ return ecal_; }

Referenced by eventdisplay::Display::Display().

◆ getHCAL()

TEveElement * eventdisplay::EveDetectorGeometry::getHCAL ( )
inline

Access HCAL Eve Element.

Definition at line 65 of file EveDetectorGeometry.h.

65{ return hcal_; }

Referenced by eventdisplay::Display::Display().

◆ getRecoilTracker()

TEveElement * eventdisplay::EveDetectorGeometry::getRecoilTracker ( )
inline

Access Recoil Tracker Eve Element.

Definition at line 70 of file EveDetectorGeometry.h.

70{ return recoilTracker_; }

Referenced by eventdisplay::Display::Display().

Member Data Documentation

◆ detector_

TEveElement* eventdisplay::EveDetectorGeometry::detector_
private

Definition at line 82 of file EveDetectorGeometry.h.

◆ ecal_

TEveElement* eventdisplay::EveDetectorGeometry::ecal_
private

Definition at line 80 of file EveDetectorGeometry.h.

◆ hcal_

TEveElement* eventdisplay::EveDetectorGeometry::hcal_
private

Definition at line 78 of file EveDetectorGeometry.h.

◆ recoilTracker_

TEveElement* eventdisplay::EveDetectorGeometry::recoilTracker_
private

Definition at line 81 of file EveDetectorGeometry.h.

◆ sidehcal_

TEveElement* eventdisplay::EveDetectorGeometry::sidehcal_
private

Definition at line 79 of file EveDetectorGeometry.h.


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