Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another round of clang RecoVertex warnings / errors fixes #3873

Merged
merged 14 commits into from May 15, 2014
Expand Up @@ -213,7 +213,6 @@ class AdaptiveVertexFitter : public VertexFitter<5> {
VertexTrackCompatibilityEstimator<5> * theComp;
const AbstractLTSFactory<5> * theLinTrkFactory;
bool gsfIntermediarySmoothing_;
mutable int mctr_;
};

#endif
6 changes: 3 additions & 3 deletions RecoVertex/BeamSpotProducer/interface/BeamFitter.h
Expand Up @@ -140,7 +140,7 @@ class BeamFitter {
reco::BeamSpot fbeamspot;
reco::BeamSpot fbeamWidthFit;
std::map< int, reco::BeamSpot> fbspotPVMap;
BSFitter *fmyalgo;
// BSFitter *fmyalgo;
std::ofstream fasciiFile;
std::ofstream fasciiDIP;

Expand Down Expand Up @@ -205,8 +205,8 @@ class BeamFitter {
int fnTECLayerMeas;
int fnPXBLayerMeas;
int fnPXFLayerMeas;
double fd0phi_chi2;
double fd0phi_d0;
// double fd0phi_chi2;
// double fd0phi_d0;
double fcov[7][7];
double fvx;
double fvy;
Expand Down
4 changes: 2 additions & 2 deletions RecoVertex/BeamSpotProducer/interface/BeamSpotAnalyzer.h
Expand Up @@ -40,7 +40,7 @@ class BeamSpotAnalyzer : public edm::EDAnalyzer {
int ftotalevents;
int fitNLumi_;
int resetFitNLumi_;
int countEvt_; //counter
// int countEvt_; //counter
int countLumi_; //counter
int Org_resetFitNLumi_;
int previousLumi_;
Expand All @@ -53,7 +53,7 @@ class BeamSpotAnalyzer : public edm::EDAnalyzer {
bool write2DB_;
bool runbeamwidthfit_;
bool runallfitters_;
double inputBeamWidth_;
// double inputBeamWidth_;

BeamFitter * theBeamFitter;
};
Expand Down
16 changes: 8 additions & 8 deletions RecoVertex/BeamSpotProducer/interface/PVFitter.h
Expand Up @@ -145,7 +145,7 @@ class PVFitter {
bool debug_;
bool do3DFit_;
edm::EDGetTokenT<reco::VertexCollection> vertexToken_;
bool writeTxt_;
// bool writeTxt_;
std::string outputTxt_;

unsigned int maxNrVertices_;
Expand All @@ -159,8 +159,8 @@ class PVFitter {
double errorScale_;
double sigmaCut_;

int frun;
int flumi;
// int frun;
// int flumi;
std::time_t freftime[2];

TH2F* hPVx; TH2F* hPVy;
Expand All @@ -174,19 +174,19 @@ class PVFitter {

//beam fit results
//TTree* ftreeFit_;
int frunFit;
// int frunFit;
int fbeginLumiOfFit;
int fendLumiOfFit;
char fbeginTimeOfFit[32];
char fendTimeOfFit[32];
// char fbeginTimeOfFit[32];
// char fendTimeOfFit[32];
double fwidthX;
double fwidthY;
double fwidthZ;
double fwidthXerr;
double fwidthYerr;
double fwidthZerr;

double fx;
/* double fx;
double fy;
double fz;
double fsigmaZ;
Expand All @@ -197,7 +197,7 @@ class PVFitter {
double fzErr;
double fsigmaZErr;
double fdxdzErr;
double fdydzErr;
double fdydzErr;*/

std::vector<BeamSpotFitPVData> pvStore_; //< cache for PV data
std::map< int, std::vector<BeamSpotFitPVData> > bxMap_; // store PV data as a function of bunch crossings
Expand Down
4 changes: 0 additions & 4 deletions RecoVertex/GhostTrackFitter/src/AnnealingGhostTrackFitter.cc
Expand Up @@ -9,10 +9,6 @@

using namespace reco;

namespace {
static inline double sqr(double arg) { return arg * arg; }
}

AnnealingGhostTrackFitter::AnnealingGhostTrackFitter()
{
annealing.reset(new GeometricAnnealing(3.0, 64.0, 0.25));
Expand Down
3 changes: 2 additions & 1 deletion RecoVertex/GhostTrackFitter/src/GhostTrackPrediction.cc
Expand Up @@ -17,8 +17,9 @@
using namespace reco;

namespace {
#ifndef __clang__
inline double sqr(double arg) { return arg * arg; }

#endif
typedef ROOT::Math::SMatrix<double, 3, 4> Matrix34;
typedef ROOT::Math::SMatrix<double, 4, 5> Matrix45;
typedef ROOT::Math::SMatrix<double, 5, 4> Matrix54;
Expand Down
3 changes: 2 additions & 1 deletion RecoVertex/GhostTrackFitter/src/KalmanGhostTrackUpdater.cc
Expand Up @@ -17,8 +17,9 @@
using namespace reco;

namespace {
#ifndef __clang__
static inline double sqr(double arg) { return arg * arg; }

#endif
using namespace ROOT::Math;

typedef SVector<double, 4> Vector4;
Expand Down
3 changes: 2 additions & 1 deletion RecoVertex/GhostTrackFitter/src/VertexGhostTrackState.cc
Expand Up @@ -13,8 +13,9 @@
using namespace reco;

namespace {
#ifndef __clang__
static inline double sqr(double arg) { return arg * arg; }

#endif
using namespace ROOT::Math;

typedef SVector<double, 3> Vector3;
Expand Down
@@ -1,5 +1,5 @@
#ifndef KinematicPerigeeConversions_H
#define KinematicPerigeeConversions_h
#define KinematicPerigeeConversions_H

#include "RecoVertex/KinematicFitPrimitives/interface/KinematicParameters.h"
#include "RecoVertex/KinematicFitPrimitives/interface/KinematicState.h"
Expand Down
Expand Up @@ -34,6 +34,7 @@ inline GlobalPoint operator / ( const GlobalPoint & a, const double b )
return GlobalPoint ( a.x() / b, a.y() / b, a.z() / b );
}

#ifndef __clang__
inline GlobalPoint operator * ( const GlobalPoint & a, const double b )
{
return GlobalPoint ( a.x() * b, a.y() * b, a.z() * b );
Expand All @@ -43,6 +44,7 @@ inline GlobalPoint operator * ( const double b , const GlobalPoint & a )
{
return GlobalPoint ( a.x() * b, a.y() * b, a.z() * b );
}
#endif

inline unsigned int sum ( unsigned int nr )
{
Expand Down
7 changes: 0 additions & 7 deletions RecoVertex/MultiVertexFit/src/LinTrackCache.cc
Expand Up @@ -5,13 +5,6 @@ using namespace std;

namespace
{
inline int verbose()
{
static const int ret = 0; /* SimpleConfigurable<int>
(0, "LinTrackCache:Debug").value(); */
return ret;
}

float maxRelinDistance()
{
// maximum distance before relinearizing
Expand Down
11 changes: 6 additions & 5 deletions RecoVertex/MultiVertexFit/src/MultiVertexBSeeder.cc
Expand Up @@ -31,23 +31,21 @@ namespace {
return ret;
}

inline int verbose()
{
return 0;
}

#ifndef __clang__
inline GlobalPoint & operator += ( GlobalPoint & a, const GlobalPoint & b )
{
a = GlobalPoint ( a.x() + b.x(), a.y() + b.y(), a.z() + b.z() );
return a;
}
#endif

inline GlobalPoint & operator /= ( GlobalPoint & a, float b )
{
a = GlobalPoint ( a.x() / b, a.y() / b, a.z() / b );
return a;
}

#ifndef __clang__
inline bool element ( const reco::TransientTrack & rt, const TransientVertex & rv )
{
const vector < reco::TransientTrack > trks = rv.originalTracks();
Expand All @@ -57,6 +55,7 @@ namespace {
};
return false;
}
#endif

GlobalPoint toPoint ( const GlobalVector & v )
{
Expand Down Expand Up @@ -151,13 +150,15 @@ namespace {
return pts;
}

#ifndef __clang__
inline GlobalPoint computePos ( const GlobalTrajectoryParameters & jet,
double s )
{
GlobalPoint ret = jet.position();
ret += s * jet.momentum();
return ret;
}
#endif

TransientVertex pseudoVertexFit ( const Cluster1D < reco::TransientTrack > & src,
bool ascending=false, bool kalmanfit=false )
Expand Down
2 changes: 1 addition & 1 deletion RecoVertex/MultiVertexFit/src/MultiVertexFitter.cc
Expand Up @@ -652,7 +652,7 @@ void MultiVertexFitter::printSeeds() const

void MultiVertexFitter::lostVertexClaimer()
{
if ( !theReviveBelow < 0. ) return;
if ( !(theReviveBelow < 0.) ) return;
// this experimental method is used to get almost lost vertices
// back into the play by upweighting vertices with very low total weights

Expand Down
2 changes: 2 additions & 0 deletions RecoVertex/MultiVertexFit/src/MultiVertexReconstructor.cc
Expand Up @@ -10,12 +10,14 @@ namespace {
return 0;
}

#ifndef __clang__
inline void remove ( vector < TransientVertex > & vtces,
const vector < reco::TransientTrack > & trks )
{
cout << "[MultiVertexReconstructor] fixme remove not yet implemented" << endl;
// remove trks from vtces
}
#endif

vector < vector < TrackAndWeight > > recover (
const vector < TransientVertex > & vtces, const vector < reco::TransientTrack > & trks )
Expand Down
Expand Up @@ -82,6 +82,7 @@ class PrimaryVertexProducerAlgorithm : public VertexReconstructor {
edm::InputTag trackLabel;
edm::InputTag beamSpotLabel;
private:
using VertexReconstructor::vertices;
// ----------member data ---------------------------
TrackFilterForPVFindingBase* theTrackFilter;
TrackClusterizerInZ* theTrackClusterizer;
Expand Down
4 changes: 2 additions & 2 deletions RecoVertex/TertiaryTracksVertexFinder/interface/AddTvTrack.h
Expand Up @@ -60,11 +60,11 @@ class AddTvTrack {
// Set parameters
inline void setPrimaryVertices(std::vector<TransientVertex> &
ThePrimaryVertices) {
thePrimaryVertices = thePrimaryVertices; // TYPO ?!?!?!?!?!?!?!
thePrimaryVertices = &ThePrimaryVertices;
}
inline void setSecondaryVertices(std::vector<TransientVertex> &
TheSecondaryVertices) {
theSecondaryVertices = theSecondaryVertices; // TYPO ?!?!?!?!?!?
theSecondaryVertices = &TheSecondaryVertices;
}
inline void setMaxSigOnDistTrackToB(double maxSigOnDistTrackToB) {
MaxSigOnDistTrackToB = maxSigOnDistTrackToB;
Expand Down
Expand Up @@ -61,7 +61,7 @@ class ConfigurableTrimmedVertexFinder : public VertexReconstructor {
std::vector<TransientVertex>
vertices( const std::vector<reco::TransientTrack> & tracks,
std::vector<reco::TransientTrack>& unused,
const reco::BeamSpot & spot, bool use_spot ) const;
const reco::BeamSpot & spot, bool use_spot) const;

/** Access to parameters
*/
Expand Down Expand Up @@ -115,6 +115,8 @@ class ConfigurableTrimmedVertexFinder : public VertexReconstructor {

private:

using VertexReconstructor::vertices;

// separate tracks passing the filter
// void separateTracks(std::vector<TransientTrack>& filtered,
// std::vector<TransientTrack>& unused) const;
Expand Down
Expand Up @@ -86,6 +86,7 @@ class KalmanTrimmedVertexFinder
private:

ConfigurableTrimmedVertexFinder * theFinder;
using VertexReconstructor::vertices;

};

Expand Down
4 changes: 2 additions & 2 deletions RecoVertex/V0Producer/interface/V0Fitter.h
Expand Up @@ -77,7 +77,7 @@ class V0Fitter {
const MagneticField* magField;

bool useRefTrax;
bool storeRefTrax;
// bool storeRefTrax;
bool doKshorts;
bool doLambdas;

Expand All @@ -90,7 +90,7 @@ class V0Fitter {
int tkNhitsCut;
double rVtxCut;
double vtxSigCut;
double vtxSigCut3D;
// double vtxSigCut3D;
double collinCut;
double kShortMassCut;
double lambdaMassCut;
Expand Down
2 changes: 1 addition & 1 deletion RecoVertex/V0Producer/test/V0Analyzer.cc
Expand Up @@ -129,7 +129,7 @@ class V0Analyzer : public edm::EDAnalyzer {
TH1D* rVtxHisto1;
TH1D* vtxSigHisto1;
TH1D* rVtxHisto2;
TH1D* simRHisto;
// TH1D* simRHisto;
TH1D* vtxSigHisto2;

TH1D* rErrorHisto;
Expand Down