test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HodoscopeDetId.cc
Go to the documentation of this file.
3 
4 #include <iostream>
6  EBDetId()
7 {
8 }
9 
10 HodoscopeDetId::HodoscopeDetId( uint32_t rawid ) :
11  EBDetId( rawid )
12 {
13 }
14 
15 int
17 {
18  return ieta() ;
19 }
20 
21 int
23 {
24  return iphi() ;
25 }
26 
28  int iFibr )
29  : EBDetId( iPlane, iFibr )
30 {
31  if( !validDetId( iPlane, iFibr ) )
32  {
33  throw cms::Exception("InvalidDetId")
34  << "HodoscopeDetId: Cannot create object. Indices out of bounds.";
35  }
36 }
37 
39  EBDetId( gen )
40 {
41  if( !validDetId( planeId(), fibrId() ) )
42  {
43  throw cms::Exception("InvalidDetId")
44  << "HodoscopeDetId: Cannot create object. Indices out of bounds.";
45  }
46 }
47 
48 bool
50  int iFibr )
51 {
52  return !( iPlane < MIN_PLANE ||
53  iPlane > MAX_PLANE ||
54  iFibr < MIN_FIBR ||
55  iFibr > MAX_FIBR ) ;
56 }
57 
58 std::ostream& operator<<(std::ostream& s,const HodoscopeDetId& id)
59 {
60  return s << "(Plane " << id.planeId() << ", fiber " << id.fibrId() << ')';
61 }
62 
static bool validDetId(int iPlane, int iFibr)
static const int MIN_FIBR
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
def gen
run2 Cosmic #### Run 256259 @ 0T 2015C### Run 272133 @ 3.8T 2016B###
int iphi() const
get the crystal iphi
Definition: EBDetId.h:53
static const int MAX_FIBR
int ieta() const
get the crystal ieta
Definition: EBDetId.h:51
Definition: DetId.h:18
int fibrId() const
static const int MAX_PLANE
int planeId() const
static const int MIN_PLANE
range constants