64 |
|
|
65 |
|
|
66 |
|
#include "Visualisation/OpenGLDisplayer/interface/SimEvent.h" |
67 |
< |
//#include "Visualisation/OpenGLDisplayer/interface/SimEvent.cpp" |
68 |
< |
|
69 |
< |
|
67 |
> |
#include "Visualisation/OpenGLDisplayer/interface/Geometry.h" |
68 |
|
|
69 |
|
using namespace edm; |
70 |
|
using namespace std; |
80 |
|
|
81 |
|
|
82 |
|
private: |
83 |
< |
virtual void beginJob(const edm::EventSetup&) ; |
84 |
< |
virtual void analyze(const edm::Event&, const edm::EventSetup&); |
85 |
< |
virtual void endJob() ; |
83 |
> |
virtual void beginJob(const edm::EventSetup& iSetup); |
84 |
> |
virtual void analyze (const edm::Event&, const edm::EventSetup&); |
85 |
> |
virtual void endJob (); |
86 |
|
|
87 |
|
|
88 |
|
MySimEvents* MyEvents; |
89 |
+ |
Geometry* Geom; |
90 |
|
|
91 |
|
|
92 |
|
std::vector<std::string> SimHitSubdetectors; |
114 |
|
|
115 |
|
// ------------ method called once each job just before starting event loop ------------ |
116 |
|
void |
117 |
< |
OpenGLDisplayer::beginJob(const edm::EventSetup&) |
117 |
> |
OpenGLDisplayer::beginJob(const edm::EventSetup& iSetup) |
118 |
|
{ |
119 |
|
|
121 |
– |
|
120 |
|
MyEvents = new MySimEvents(); |
121 |
+ |
Geom = new Geometry(); |
122 |
+ |
|
123 |
+ |
edm::ESHandle<TrackerGeometry> tkGeom; |
124 |
+ |
iSetup.get<TrackerDigiGeometryRecord>().get( tkGeom ); |
125 |
+ |
vector<GeomDet*> Det = tkGeom->dets(); |
126 |
+ |
|
127 |
+ |
for(unsigned int i=0;i<Det.size();i++){ |
128 |
+ |
DetId Detid = Det[i]->geographicalId(); |
129 |
+ |
int SubDet = Detid.subdetId(); |
130 |
+ |
|
131 |
+ |
StripGeomDetUnit* DetUnit = dynamic_cast<StripGeomDetUnit*> (Det[i]); |
132 |
+ |
if(!DetUnit)continue; |
133 |
+ |
|
134 |
+ |
GlobalVector Pos = GlobalVector(DetUnit->position().basicVector()); |
135 |
+ |
|
136 |
+ |
Geom->Add_TrackerDet(SubDet,Pos.x(),Pos.y(),Pos.z(),Detid.rawId()); |
137 |
+ |
} |
138 |
+ |
Geom->Save("Tracker.geom"); |
139 |
+ |
|
140 |
|
|
141 |
|
} |
142 |
|
|