57 |
|
#include "Geometry/CommonDetUnit/interface/TrackingGeometry.h" |
58 |
|
#include "Geometry/Records/interface/MuonGeometryRecord.h" |
59 |
|
#include "Geometry/DTGeometry/interface/DTGeometry.h" |
60 |
+ |
#include "Geometry/CSCGeometry/interface/CSCGeometry.h" |
61 |
+ |
#include "Geometry/RPCGeometry/interface/RPCGeometry.h" |
62 |
+ |
|
63 |
|
|
64 |
|
|
65 |
|
#include "DataFormats/CaloRecHit/interface/CaloRecHit.h" |
270 |
|
// ### MUON GEOMETRY ### |
271 |
|
|
272 |
|
edm::ESHandle<DTGeometry> DtGeom; |
270 |
– |
// iSetup.get<IdealGeometryRecord>().get( DtGeom ); |
273 |
|
iSetup.get<MuonGeometryRecord>().get( DtGeom ); |
274 |
|
const vector<GeomDet*> DtDets = DtGeom->dets(); |
275 |
|
|
276 |
+ |
edm::ESHandle<CSCGeometry> CscGeom; |
277 |
+ |
iSetup.get<MuonGeometryRecord>().get( CscGeom ); |
278 |
+ |
const vector<GeomDet*> CscDets = CscGeom->dets(); |
279 |
+ |
|
280 |
+ |
edm::ESHandle<RPCGeometry> RpcGeom; |
281 |
+ |
iSetup.get<MuonGeometryRecord>().get( RpcGeom ); |
282 |
+ |
const vector<GeomDet*> RpcDets = RpcGeom->dets(); |
283 |
+ |
|
284 |
+ |
vector<GeomDet*> MuonDets; |
285 |
+ |
for(unsigned int i=0;i<DtDets.size() ;i++){MuonDets.push_back(DtDets [i]);} |
286 |
+ |
for(unsigned int i=0;i<CscDets.size();i++){MuonDets.push_back(CscDets[i]);} |
287 |
+ |
for(unsigned int i=0;i<RpcDets.size();i++){MuonDets.push_back(RpcDets[i]);} |
288 |
|
|
289 |
< |
for(unsigned int i=0;i<DtDets.size();i++) |
289 |
> |
|
290 |
> |
for(unsigned int i=0;i<MuonDets.size();i++) |
291 |
|
{ |
292 |
< |
Detid = DetId(DtDets[i]->geographicalId()); |
292 |
> |
Detid = DetId(MuonDets[i]->geographicalId()); |
293 |
|
SubDet = Detid.subdetId(); |
294 |
|
|
295 |
< |
GeomDet* DetUnit = DtDets[i]; |
295 |
> |
GeomDet* DetUnit = MuonDets[i]; |
296 |
|
if(!DetUnit)continue; |
297 |
|
const BoundPlane plane = DetUnit->surface(); |
298 |
|
const TrapezoidalPlaneBounds* trapezoidalBounds( dynamic_cast<const TrapezoidalPlaneBounds*>(&(plane.bounds()))); |
323 |
|
|
324 |
|
GlobalVector Pos = GlobalVector(DetUnit->position().basicVector()); |
325 |
|
|
311 |
– |
printf("Det = %i\n",Detid.det()); |
326 |
|
Geom_Muon->Add_TrackerDet(Detid.rawId(), TrapezoidalParam, |
327 |
|
Pos.x(), Pos.y(), Pos.z(), |
328 |
|
WidthVector.x() -Pos.x(), WidthVector.y() -Pos.y(), WidthVector.z() -Pos.z(), |
336 |
|
Geom_Tracker->Save("Tracker.geom"); |
337 |
|
Geom_ECAL ->Save("Ecal.geom"); |
338 |
|
Geom_HCAL ->Save("Hcal.geom"); |
339 |
+ |
|
340 |
+ |
printf("RPC = %i\n",Geom_Muon ->Det_Muon_RPC.size()); |
341 |
+ |
|
342 |
|
Geom_Muon ->Save("Muon.geom"); |
343 |
|
|
344 |
|
} |