Commit 9b759dd9 authored by Jochen Meyer's avatar Jochen Meyer Committed by Graeme Stewart
Browse files

addressing coverity defects (MuonHoughPatternTools-01-00-23)

	* addressing coverity defects 13815, 13617
	* MuonHoughPatternTools-01-00-23

2015-04-29 Jochen Meyer
	* addressing coverity defect 14546
	* MuonHoughPatternTools-01-00-22

2015-04-02  scott snyder  <snyder@bnl.gov>

	* Tagging MuonHoughPatternTools-01-00-21.
	* Fix clang warnings (unused members).

	* Tagging MuonHoughPatternTools-01-00-20.
	* AthenaBaseComps migration.

02-18-2015 David Quarrie <David.Quarrie@cern.ch>
	* cmt/requirements
		Remove the space character in the list of files in the apply_pattern dual_use_library line
		(files= *.cxx) since these cause the CMT to cmake converter to ignore the list of files.
	* MuonHoughPatternTools-01-00-19
...
(Long ChangeLog diff - truncated)
parent 8552944c
......@@ -11,7 +11,7 @@
#include "MuonRecToolInterfaces/IMuonHoughPatternFinderTool.h"
#include "MuonRecToolInterfaces/IMuonCombinePatternTool.h"
#include "GaudiKernel/AlgTool.h"
#include "AthenaBaseComps/AthAlgTool.h"
#include "GaudiKernel/ToolHandle.h"
#include "MuonSegment/MuonSegmentCombinationCollection.h"
......@@ -44,7 +44,7 @@ class TgcIdHelper;
namespace Muon {
class MuonHoughPatternFinderTool : virtual public IMuonHoughPatternFinderTool, public AlgTool
class MuonHoughPatternFinderTool : virtual public IMuonHoughPatternFinderTool, public AthAlgTool
{
public:
/** constructor */
......@@ -128,13 +128,6 @@ namespace Muon {
void addToStationMap(std::map<int,std::vector<std::pair<int, int> > > &stationmap, std::map<int,std::vector<std::pair<int, int> > >::iterator &it, int &stationcode, const int &hit_begin, const int &hit_end);
/** class member version of retrieving MsgStream */
mutable MsgStream m_log;
bool m_debug;
bool m_verbose;
StoreGateSvc* m_storeGate;
/** Pointer to Detectormanager */
const MuonGM::MuonDetectorManager* m_detMgr;
......
......@@ -192,7 +192,7 @@ class MuonHoughPatternTool : virtual public IMuonHoughPatternTool, public AthAlg
int m_number_of_maxima;
/** use rpc phi strips in phi-patterns (true) */
const bool m_use_rpc_measures_phi;
//const bool m_use_rpc_measures_phi;
/** use rpc eta strips in eta-patterns (true) */
const bool m_use_rpc_measures_eta;
/** use interaction point constraint (true) */
......@@ -220,7 +220,7 @@ class MuonHoughPatternTool : virtual public IMuonHoughPatternTool, public AthAlg
/** use hough correction
* to correct the maximum found in rz-plane slightly as there is a bias in the houghtransform
*/
const bool m_use_hough_correction;
//const bool m_use_hough_correction;
/** constant 1 for z for hough correction */
const double m_z_cor_constant;
/** constant 2 for z for hough correction */
......@@ -258,7 +258,7 @@ class MuonHoughPatternTool : virtual public IMuonHoughPatternTool, public AthAlg
/** max range of angle in rz in degrees (180) */
const double m_detectorsize_angle_rz;
/** max range of 1/sqrt(curvature) for curved transform, corresponds to 0.02 ~ 2,5m ~ 1.6GeV */
const double m_detectorsize_inv_sqrt_curvature;
//const double m_detectorsize_inv_sqrt_curvature;
// properties of histograms:
......@@ -281,7 +281,7 @@ class MuonHoughPatternTool : virtual public IMuonHoughPatternTool, public AthAlg
/** bin width for angle in rzcosmics */
const double m_stepsize_per_angle_rz_cosmics;
/** bin width for 1/sqrt(curvature) */
const double m_stepsize_per_inv_sqrt_curvature;
//const double m_stepsize_per_inv_sqrt_curvature;
/** new curved properties */
const int m_nbins_curved;
......
......@@ -86,6 +86,7 @@ namespace Muon {
struct HoughDataPerSector {
HoughDataPerSector() {
sector = -1;
hitVec.resize(MuonStationIndex::sectorLayerHashMax());
maxVec.resize(MuonStationIndex::sectorLayerHashMax());
phiHitVec.resize(MuonStationIndex::DetectorRegionIndexMax);
......
......@@ -41,7 +41,7 @@ branches MuonHoughPatternTools src
#should be component library? but interface is also in this package
#apply_pattern component_library
apply_pattern dual_use_library files= *.cxx
apply_pattern dual_use_library files=*.cxx
private
#macro cppdebugflags '$(cppdebugflags_s)'
......
......@@ -29,7 +29,7 @@ MuonHoughPatternTool::MuonHoughPatternTool(const std::string& type, const std::s
AthAlgTool(type,name,parent),
m_number_of_ids(7),
m_number_of_maxima(5),
m_use_rpc_measures_phi(true),
//m_use_rpc_measures_phi(true),
m_use_rpc_measures_eta(true),
m_use_ip(false),
m_thresholdpattern_xyz(1),
......@@ -38,7 +38,7 @@ MuonHoughPatternTool::MuonHoughPatternTool(const std::string& type, const std::s
m_maximum_residu_mm_cosmics(2000.),
m_maximum_residu_angle(3.),
m_maximum_level(5),
m_use_hough_correction(true),
//m_use_hough_correction(true),
m_z_cor_constant(-10000.),
m_z_cor_constant2(6000.),
m_theta_cor_constant(-0.042),
......@@ -51,7 +51,7 @@ MuonHoughPatternTool::MuonHoughPatternTool(const std::string& type, const std::s
m_detectorsize_rz_ip(1500.),
m_detectorsize_angle_xyz(360.),
m_detectorsize_angle_rz(180.),
m_detectorsize_inv_sqrt_curvature(0.015),
//m_detectorsize_inv_sqrt_curvature(0.015),
m_stepsize_xy(75.),
m_stepsize_yz(250.),
m_stepsize_rz(75.),
......@@ -61,7 +61,7 @@ MuonHoughPatternTool::MuonHoughPatternTool(const std::string& type, const std::s
m_stepsize_per_angle_rz(0.25),
m_stepsize_per_angle_xy_cosmics(1.),
m_stepsize_per_angle_rz_cosmics(2.),
m_stepsize_per_inv_sqrt_curvature(0.001),
//m_stepsize_per_inv_sqrt_curvature(0.001),
m_nbins_curved(160),
m_weightmdt(0.),
m_thresholdhisto_xyz(0.9),
......@@ -552,7 +552,7 @@ int MuonHoughPatternTool::numberOfHits(const MuonHoughHitContainer* event)const
}
}
if (number_of_hits_left <0) {ATH_MSG_WARNING("number of hits smaller than 0");}
// logically impossible --- if (number_of_hits_left <0) {ATH_MSG_WARNING("number of hits smaller than 0");}
ATH_MSG_VERBOSE("numberOfHits left: " << number_of_hits_left);
ATH_MSG_VERBOSE("number_of_hits: " << number_of_hits);
......@@ -922,8 +922,10 @@ MuonHoughTransformSteering* MuonHoughPatternTool::whichHoughTransform(int id_num
default: ATH_MSG_WARNING("no valid id");
}
houghtransformer->useNegativeWeights(m_use_negative_weights);
houghtransformer->setIP(!m_use_cosmics);
if(houghtransformer) {
houghtransformer->useNegativeWeights(m_use_negative_weights);
houghtransformer->setIP(!m_use_cosmics);
}
ATH_MSG_DEBUG("**** histo houghtransformer: ****");
ATH_MSG_DEBUG("Id number: " << id_number);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment