ATLAS Offline Software
Loading...
Searching...
No Matches
RegSelModule.cxx File Reference
#include "RegSelLUT/RegSelModule.h"
#include <iostream>
#include <cmath>
Include dependency graph for RegSelModule.cxx:

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &s, const RegSelModule &m)
bool getModule (std::istream &ss, RegSelModule &m)

Function Documentation

◆ getModule()

bool getModule ( std::istream & ss,
RegSelModule & m )

copy z limits to max radius values just in case

read in extra z limits if required

Definition at line 110 of file RegSelModule.cxx.

111{
112 char s[128], s1[128], s2[128];
113
114 int layer;
115 int detector;
116
117 double rMin, rMax;
118 double zMin, zMax;
119 double z2Min, z2Max;
120 double phiMin, phiMax;
121
122 uint32_t robid;
123 // IdentifierHash hash;
124 unsigned int hashint;
125
126 ss >> s >> s >> std::dec >> layer
127 >> s >> s >> std::dec >> detector
128 >> s >> s >> rMin >> s >> rMax
129 >> s >> s >> phiMin >> s >> phiMax
130 >> s >> s >> zMin >> s >> zMax;
131
133 z2Min = zMin;
134 z2Max = zMax;
135
136 ss >> s1 >> s2;
137
139 if ( std::string(s2)=="z2=" ) {
140 ss >> z2Min >> s >> z2Max;
141 ss >> s >> s;
142 }
143
144 ss >> std::hex >> robid
145 >> s >> s >> std::hex >> hashint >> std::dec >> s;
146
147 if ( ss.fail() ) return false;
148
149 // std::cout << "s.fail() " << s.fail() << std::endl;
150
151 phiMin *= M_PI/180;
152 phiMax *= M_PI/180;
153
154 RegSelModule tm( zMin, zMax,
155 z2Min, z2Max,
156 rMin, rMax,
157 phiMin, phiMax,
158 layer,
159 detector,
160 robid,
161 IdentifierHash(hashint));
162
163 m=tm;
164
165 return true;
166}
#define M_PI
static Double_t ss
This is a "hash" representation of an Identifier.
@ layer
Definition HitInfo.h:79
setEventNumber uint32_t

◆ operator<<()

std::ostream & operator<< ( std::ostream & s,
const RegSelModule & m )

Definition at line 95 of file RegSelModule.cxx.

96{
97 s << "[ lyr= " << m.layer()
98 << " ,\tdet= " << m.detector()
99 << " ,\tr= " << m.rMin() << " - " << m.rMax()
100 << " ,\tphi= " << m.phiMin()*180/M_PI << " - " << m.phiMax()*180/M_PI
101 << " ,\tz= " << m.zMin() << " - " << m.zMax();
102 if ( m.zMin()!=m.z2Min() || m.zMax()!=m.z2Max() ) s << " ,\tz2= " << m.z2Min() << " - " << m.z2Max();
103 s << " ,\trob= 0x" << std::hex << m.robID()
104 << " ,\thash= 0x" << std::hex << m.hashID() << std::dec << ( m.enabled() ? " ]" : " (disabled)]");
105 return s;
106}