1 |
konec |
1.1 |
#include "UserCode/L1RpcTriggerAnalysis/interface/RPCDetIdUtil.h"
|
2 |
|
|
|
3 |
|
|
#include "FWCore/Framework/interface/EventSetup.h"
|
4 |
|
|
#include "FWCore/Framework/interface/ESHandle.h"
|
5 |
|
|
#include "Geometry/RPCGeometry/interface/RPCGeometry.h"
|
6 |
|
|
#include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
|
7 |
|
|
#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
|
8 |
|
|
|
9 |
|
|
void RPCDetIdUtil::print(const edm::EventSetup &es)
|
10 |
|
|
{
|
11 |
|
|
edm::ESHandle<RPCGeometry> rpcGeometry;
|
12 |
|
|
es.get<MuonGeometryRecord>().get(rpcGeometry);
|
13 |
|
|
|
14 |
|
|
GlobalPoint position = rpcGeometry->idToDet(theRpcDet)->position();
|
15 |
|
|
|
16 |
|
|
std::cout << (*this) <<" R= "<<position.perp()
|
17 |
|
|
<<" Z= "<<position.z()
|
18 |
|
|
<<" eta="<<position.eta()
|
19 |
|
|
<<" consecutiveLayer: "<<layer(position.eta())
|
20 |
|
|
<< std::endl;
|
21 |
|
|
}
|
22 |
|
|
|
23 |
|
|
std::ostream & operator<< (std::ostream &out, const RPCDetIdUtil &o) {
|
24 |
|
|
out <<"DetId: "<<o.theRpcDet.rawId()
|
25 |
|
|
<<" region: "<<o.theRpcDet.region()
|
26 |
|
|
<<" layer: "<<o.layer()
|
27 |
|
|
<<" ring/wheel: "<<o.theRpcDet.ring();
|
28 |
|
|
return out;
|
29 |
|
|
}
|
30 |
|
|
|