ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/L1RpcTriggerAnalysis/interface/RPCDetIdUtil.h
(Generate patch)

Comparing UserCode/L1RpcTriggerAnalysis/interface/RPCDetIdUtil.h (file contents):
Revision 1.3 by konec, Mon Oct 1 19:19:57 2012 UTC vs.
Revision 1.4 by konec, Fri May 17 13:02:11 2013 UTC

# Line 3 | Line 3
3  
4   #include "DataFormats/MuonDetId/interface/RPCDetId.h"
5   #include <iostream>
6 + #include <ostream>
7   #include <cmath>
8 + namespace edm { class EventSetup; }
9  
10   class RPCDetIdUtil{
11   public:
12    RPCDetIdUtil( const RPCDetId & rpcDet) : theRpcDet(rpcDet) { }
13 +  RPCDetIdUtil( uint32_t rawId) : theRpcDet( RPCDetId(rawId) ) { }
14  
15    bool isBarrel() const { return (theRpcDet.region()==0); }
16  
# Line 23 | Line 26 | public:
26      return isBarrel() ? barrelLayer() : endcapLayer();
27    }
28  
29 +  //WARNING - use eta of DetUnit position, not muon direction
30    unsigned int layer(float eta) const {
31      if (fabs(eta) < 0.83) {
32        return barrelLayer();
# Line 53 | Line 57 | public:
57  
58    RPCDetId rpdDetIt() { return theRpcDet; }
59  
60 <  void print() {
57 <    std::cout <<"DetId: "<<theRpcDet.rawId()
58 <              <<" region: "<<theRpcDet.region()
59 <              <<" layer:  "<<layer()
60 <              <<" ring/wheel: "<<theRpcDet.ring() << std::endl; }
60 >  void print(const edm::EventSetup& es);
61      
62   private:
63    RPCDetId theRpcDet;
64 +  friend std::ostream & operator<< (std::ostream &out, const RPCDetIdUtil &o);
65   };
66   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines