Skip to content
Snippets Groups Projects
Commit 94615eb8 authored by Susumu Oda's avatar Susumu Oda Committed by Vakhtang Tsulaia
Browse files

Fix SCT related Coverity defects

Former-commit-id: 6147bb44
parent 0f651045
No related branches found
No related tags found
No related merge requests found
...@@ -85,7 +85,7 @@ SCTCalibWriteSvc::SCTCalibWriteSvc(const std::string& name, ISvcLocator* pSvcLoc ...@@ -85,7 +85,7 @@ SCTCalibWriteSvc::SCTCalibWriteSvc(const std::string& name, ISvcLocator* pSvcLoc
m_regSvc(0), m_regSvc(0),
//m_streamer(0), //m_streamer(0),
m_streamer(((m_version == 0) ? "AthenaOutputStreamTool" : "AthenaOutputStreamTool"), this), m_streamer("AthenaOutputStreamTool", this),
m_badIds(), m_badIds(),
m_defectRecorded(false), m_defectRecorded(false),
......
...@@ -210,7 +210,7 @@ double SiLorentzAngleCHSvc::getValue(const IdentifierHash& elementHash, const Am ...@@ -210,7 +210,7 @@ double SiLorentzAngleCHSvc::getValue(const IdentifierHash& elementHash, const Am
// gives a more physical sign of the angle (ie dosen't flip sign when the detector is flipped). // gives a more physical sign of the angle (ie dosen't flip sign when the detector is flipped).
// The hit depth axis is pointing from the readout side to the backside if m_design->readoutSide() < 0 // The hit depth axis is pointing from the readout side to the backside if m_design->readoutSide() < 0
// The hit depth axis is pointing from the backside to the readout side if m_design->readoutSide() > 0 // The hit depth axis is pointing from the backside to the readout side if m_design->readoutSide() > 0
if (variable==TanLorentzAngle and variable==LorentzShift) { if (variable==TanLorentzAngle or variable==LorentzShift) {
double tanLorentzAnglePhi{element->design().readoutSide()*mobility*element->hitDepthDirection()*element->hitPhiDirection()*(element->normal().cross(magneticField)).dot(element->phiAxis())}; double tanLorentzAnglePhi{element->design().readoutSide()*mobility*element->hitDepthDirection()*element->hitPhiDirection()*(element->normal().cross(magneticField)).dot(element->phiAxis())};
if (variable==TanLorentzAngle) { if (variable==TanLorentzAngle) {
return correctionFactor*tanLorentzAnglePhi; return correctionFactor*tanLorentzAnglePhi;
...@@ -224,7 +224,7 @@ double SiLorentzAngleCHSvc::getValue(const IdentifierHash& elementHash, const Am ...@@ -224,7 +224,7 @@ double SiLorentzAngleCHSvc::getValue(const IdentifierHash& elementHash, const Am
// The Lorentz eta shift very small and so can be ignored, but we include it for completeness. // The Lorentz eta shift very small and so can be ignored, but we include it for completeness.
// It is < ~0.1 um in the pixel. // It is < ~0.1 um in the pixel.
// In the SCT its largest in the stereo side of the barrel modules where it is about 0.3 micron along the strip. // In the SCT its largest in the stereo side of the barrel modules where it is about 0.3 micron along the strip.
if (variable==TanLorentzAngleEta and variable==LorentzShiftEta) { if (variable==TanLorentzAngleEta or variable==LorentzShiftEta) {
double tanLorentzAngleEta{element->design().readoutSide()*mobility*element->hitDepthDirection()*element->hitEtaDirection()*(element->normal().cross(magneticField)).dot(element->etaAxis())}; double tanLorentzAngleEta{element->design().readoutSide()*mobility*element->hitDepthDirection()*element->hitEtaDirection()*(element->normal().cross(magneticField)).dot(element->etaAxis())};
if (variable==TanLorentzAngleEta) { if (variable==TanLorentzAngleEta) {
return correctionFactor*tanLorentzAngleEta; return correctionFactor*tanLorentzAngleEta;
......
...@@ -183,7 +183,7 @@ double SiLorentzAngleTool::getValue(const IdentifierHash& elementHash, const Amg ...@@ -183,7 +183,7 @@ double SiLorentzAngleTool::getValue(const IdentifierHash& elementHash, const Amg
// gives a more physical sign of the angle (ie dosen't flip sign when the detector is flipped). // gives a more physical sign of the angle (ie dosen't flip sign when the detector is flipped).
// The hit depth axis is pointing from the readout side to the backside if m_design->readoutSide() < 0 // The hit depth axis is pointing from the readout side to the backside if m_design->readoutSide() < 0
// The hit depth axis is pointing from the backside to the readout side if m_design->readoutSide() > 0 // The hit depth axis is pointing from the backside to the readout side if m_design->readoutSide() > 0
if (variable==TanLorentzAngle and variable==LorentzShift) { if (variable==TanLorentzAngle or variable==LorentzShift) {
double tanLorentzAnglePhi{element->design().readoutSide()*mobility*element->hitDepthDirection()*element->hitPhiDirection()*(element->normal().cross(magneticField)).dot(element->phiAxis())}; double tanLorentzAnglePhi{element->design().readoutSide()*mobility*element->hitDepthDirection()*element->hitPhiDirection()*(element->normal().cross(magneticField)).dot(element->phiAxis())};
if (variable==TanLorentzAngle) { if (variable==TanLorentzAngle) {
return correctionFactor*tanLorentzAnglePhi; return correctionFactor*tanLorentzAnglePhi;
...@@ -197,7 +197,7 @@ double SiLorentzAngleTool::getValue(const IdentifierHash& elementHash, const Amg ...@@ -197,7 +197,7 @@ double SiLorentzAngleTool::getValue(const IdentifierHash& elementHash, const Amg
// The Lorentz eta shift very small and so can be ignored, but we include it for completeness. // The Lorentz eta shift very small and so can be ignored, but we include it for completeness.
// It is < ~0.1 um in the pixel. // It is < ~0.1 um in the pixel.
// In the SCT its largest in the stereo side of the barrel modules where it is about 0.3 micron along the strip. // In the SCT its largest in the stereo side of the barrel modules where it is about 0.3 micron along the strip.
if (variable==TanLorentzAngleEta and variable==LorentzShiftEta) { if (variable==TanLorentzAngleEta or variable==LorentzShiftEta) {
double tanLorentzAngleEta{element->design().readoutSide()*mobility*element->hitDepthDirection()*element->hitEtaDirection()*(element->normal().cross(magneticField)).dot(element->etaAxis())}; double tanLorentzAngleEta{element->design().readoutSide()*mobility*element->hitDepthDirection()*element->hitEtaDirection()*(element->normal().cross(magneticField)).dot(element->etaAxis())};
if (variable==TanLorentzAngleEta) { if (variable==TanLorentzAngleEta) {
return correctionFactor*tanLorentzAngleEta; return correctionFactor*tanLorentzAngleEta;
......
...@@ -150,7 +150,7 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r ...@@ -150,7 +150,7 @@ SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& r
uint32_t robid{robFrag.rod_source_id()}; uint32_t robid{robFrag.rod_source_id()};
/**determine whether this data was generated using the ROD simulator */ /**determine whether this data was generated using the ROD simulator */
uint32_t rod_datatype{robFrag.rod_detev_type()}; uint32_t rod_datatype{robFrag.rod_detev_type()};
const bool rodSimulatedData{(rod_datatype >> 20) & 1}; const bool rodSimulatedData{static_cast<bool>((rod_datatype >> 20) & 1)};
if (rodSimulatedData) m_byteStreamErrSvc->setRODSimulatedData(); if (rodSimulatedData) m_byteStreamErrSvc->setRODSimulatedData();
if (bsFracCont) bsFracCont->insert(SCT_ByteStreamFractionContainer::SimulatedData, robid, rodSimulatedData); if (bsFracCont) bsFracCont->insert(SCT_ByteStreamFractionContainer::SimulatedData, robid, rodSimulatedData);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment