26 fCrate(0),fModule(0),fChannel(0),
27 fDetectorOriginX(0),fDetectorOriginY(0),fDetectorOriginZ(0),
28 fDetectorPitch(0),fDetectorPitchCos(1),fDetectorPitchSin(0),
29 fDetectorYaw(0),fDetectorYawCos(1),fDetectorYawSin(0),
30 fDetectorRoll(0),fDetectorRollCos(1),fDetectorRollSin(0),
31 fRotatorPitch(0),fRotatorPitchCos(1),fRotatorPitchSin(0),
32 fRotatorYaw(0),fRotatorYawCos(1),fRotatorYawSin(0),
33 fRotatorRoll(0),fRotatorRollCos(1),fRotatorRollSin(0),
34 fIsActive(true),fSpatialResolution(0),fTrackResolution(0),fSlopeMatching(0),
35 fActiveWidthX(0),fActiveWidthY(0),fActiveWidthZ(0),
36 fElementSpacing(0),fElementAngle(0),fElementAngleCos(0),fElementAngleSin(0),
37 fElementOffset(0),fPlaneOffset(0),fNumberOfElements(0),fTree(0),
38 fDetectorName(name),fReferenceChannelIndex(0)
139 while (begin < list.size()) {
141 size_t end = list.find(
' ',begin);
143 if (end == std::string::npos) end = list.size();
145 std::string word = list.substr(begin,end-begin);
147 size_t colon = word.find(
':');
149 if (colon == std::string::npos)
continue;
150 #if defined(__GXX_EXPERIMENTAL_CXX0X) || __cplusplus >= 201103L
152 int element = std::stoi(word.substr(0,colon));
153 double efficiency = std::stod(word.substr(colon+1,word.size()-colon-1));
157 string str1 = word.substr(0,colon);
158 string str2 = word.substr(colon+1,word.size()-colon-1);
159 int element = std::atoi(str1.c_str());
160 double efficiency = std::atof(str2.c_str());
182 std::string varname,varvalue;
185 if (varname ==
"crosstalk") {
188 while (begin < list.size()) {
190 size_t end = list.find(
' ',begin);
192 if (end == std::string::npos) end = list.size();
194 std::string word = list.substr(begin,end-begin);
196 size_t comma = word.find(
',');
198 if (comma == std::string::npos)
continue;
199 #if defined(__GXX_EXPERIMENTAL_CXX0X) || __cplusplus >= 201103L
201 int element1 = std::stoi(word.substr(0,comma));
202 int element2 = std::stoi(word.substr(comma+1,word.size()-comma-1));
208 string str1 = word.substr(0,comma);
209 string str2 = word.substr(comma+1,word.size()-comma-1);
210 int element1 = std::atoi(str1.c_str());
211 int element2 = std::atoi(str2.c_str());
213 fCrosstalk[element2] = element1;
294 stream <<
"type " << det.
fType <<
", ";
295 stream <<
"package " << det.
fPackage <<
", ";
296 stream <<
"region " << det.
fRegion <<
", ";
297 stream <<
"plane " << det.
fPlane <<
", ";
298 stream <<
"octant " << det.
fOctant <<
", ";
double GetElementCoordinate(const int element) const
double fRotatorPitch
Pitch of rotator (rotation of rotator about global x-axis)
#define QwOut
Predefined log drain for explicit output.
double fDetectorPitchSin
Sin of detector pitch.
std::ostream & operator<<(std::ostream &out, const QwColor &color)
Output stream operator which uses the enum-to-escape-code mapping.
double fDetectorOriginZ
Detector position in z.
EQwDetectorPackage fPackage
bool fIsActive
Is this detector activated in tracking.
double fElementAngleCos
Cos of the element orientation.
std::string GetDetectorName() const
double fSlopeMatching
Slope matching resolution (how accurate do the tracks line up)
double fRotatorRoll
Roll of rotator (rotation of rotator about global z-axis)
static const QwDirectionMap kQwDirectionMap
double fActiveWidthZ
Active volume in z.
Bool_t HasVariablePair(const std::string &separatorchars, std::string &varname, std::string &varvalue)
double fDetectorRollSin
Sin of detector roll.
double fDetectorPitchCos
Cos of detector pitch.
double fRotatorYawCos
Cos of rotator yaw.
double fActiveWidthY
Active volume in y.
double fPlaneOffset
exactly clear to me what that exactly means)
void Print(Option_t *option="") const
std::string fDetectorName
void SetNumberOfElements(const int nelements)
double fDetectorPitch
Pitch of detector.
void SetElementOffset(const double offset)
double GetElementOffset() const
double fRotatorPitchCos
Cos of rotator pitch.
void SetPosition(const TVector3 &position)
static const QwPackageMap kQwPackageMap
const TVector3 GetPosition() const
double fActiveWidthX
Active volume in x.
void SetElementEfficiency(int element, double efficiency)
double fRotatorRollCos
Cos of rotator roll.
double fTrackResolution
Track resolution (how accurate are the tracks through the hits)
double fDetectorYaw
Yaw of detector.
EQwDirectionID fDirection
double fRotatorRollSin
Sin of rotator roll.
double fRotatorYawSin
Sin of rotator yaw.
Bool_t FileHasVariablePair(const std::string &separatorchars, const std::string &varname, std::string &varvalue)
int fNumberOfElements
Total number of elements in this detector.
EQwDirectionID GetElementDirection() const
double fDetectorOriginX
Detector position in x.
void LoadGeometryDefinition(QwParameterFile *map)
static std::ostream & endl(std::ostream &)
End of the line.
double GetElementSpacing() const
double fDetectorOriginY
Detector position in y.
double fDetectorYawCos
Cos of detector yaw.
double fSpatialResolution
Spatial resolution (how accurate is the timing info)
double fDetectorRollCos
Cos of detector roll.
double fElementAngle
Element orientation with respect to the X axis.
static const QwRegionMap kQwRegionMap
double fDetectorYawSin
Sin of detector yaw.
void TrimWhitespace(TString::EStripType head_tail=TString::kBoth)
double fRotatorPitchSin
Sin of rotator pitch.
double GetZPosition() const
double GetXPosition() const
double fDetectorRoll
Roll of detector.
QwDetectorInfo(const std::string &name="")
Constructor with optional name.
void SetElementSpacing(const double spacing)
std::map< int, int > fCrosstalk
double fElementAngleSin
Sin of the element orientation.
double fRotatorYaw
Yaw of rotator (rotation of rotator about global y-axis)
T ConvertValue(const std::string &value)
Convert string value into specific type.
static const QwTypeMap kQwTypeMap
double fElementSpacing
Perpendicular distance between the elements.
static const double cm
Length units: base unit is mm.
void LoadCrosstalkDefinition(QwParameterFile *map)