Skip to content

Commit

Permalink
Merge pull request #17 from cms-sw/CMSSW_7_1_X
Browse files Browse the repository at this point in the history
Merge cms-sw CMSSW_7_1_X into my CMSSW_7_1_X
  • Loading branch information
venturia committed May 2, 2014
2 parents 4799f61 + 6099be8 commit 5824050
Show file tree
Hide file tree
Showing 688 changed files with 29,213 additions and 17,181 deletions.
3 changes: 2 additions & 1 deletion Alignment/OfflineValidation/plugins/EopTreeWriter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ EopTreeWriter::EopTreeWriter(const edm::ParameterSet& iConfig) :

// TrackAssociator parameters
edm::ParameterSet parameters = iConfig.getParameter<edm::ParameterSet>("TrackAssociatorParameters");
parameters_.loadParameters( parameters );
edm::ConsumesCollector iC = consumesCollector();
parameters_.loadParameters( parameters, iC );

tree_ = fs_->make<TTree>("EopTree","EopTree");
treeMemPtr_ = new EopVariables;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class BeamSpotTransientTrackingRecHit GCC11_FINAL : public TValidTrackingRecHit
}

virtual AlgebraicMatrix projectionMatrix() const {
if (!isInitialized) initialize();
return theProjectionMatrix;
}

Expand All @@ -83,9 +82,7 @@ class BeamSpotTransientTrackingRecHit GCC11_FINAL : public TValidTrackingRecHit
return new BeamSpotTransientTrackingRecHit(*this);
}

static bool isInitialized;
static AlgebraicMatrix theProjectionMatrix;
void initialize() const;
static const AlgebraicMatrix theProjectionMatrix;
};

#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@ AlgebraicSymMatrix BeamSpotTransientTrackingRecHit::parametersError() const
return m;
}

void BeamSpotTransientTrackingRecHit::initialize() const

static AlgebraicMatrix initialize()
{
theProjectionMatrix = AlgebraicMatrix( 1, 5, 0);
theProjectionMatrix[0][3] = 1;

isInitialized = true;
AlgebraicMatrix ret( 1, 5, 0);
ret[0][3] = 1;
return ret;
}

bool BeamSpotTransientTrackingRecHit::isInitialized(false);
AlgebraicMatrix BeamSpotTransientTrackingRecHit::theProjectionMatrix;
const AlgebraicMatrix BeamSpotTransientTrackingRecHit::theProjectionMatrix=initialize();
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ class TEcnaHeader : public TNamed {
void HeaderParameters( const TString&, const Int_t&, const Int_t&,
const Int_t&, const Int_t&, const Int_t&, const Int_t&, const Int_t&);

using TNamed::Print;
void Print();
ClassDef(TEcnaHeader,1) //Header of CNA ROOT file
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8597,7 +8597,7 @@ Int_t TEcnaHistos::GetHistoryRunListParameters(const TString& list_of_run_file_n
Int_t nb_of_runs_in_list = 0;

//========= immediate return if file name is an empty string
if( list_of_run_file_name.Data() == '\0' )
if( !strcmp(list_of_run_file_name.Data(), "\0") )
{
std::cout << "!TEcnaHistos::GetHistoryRunListParameters(...)> *** ERROR *** =====> "
<< " EMPTY STRING for list of run file name." << fTTBELL << std::endl;
Expand Down Expand Up @@ -12809,7 +12809,7 @@ void TEcnaHistos::PlotCloneOfCurrentCanvas()
{
if( (TCanvasImp*)fCurrentCanvas->GetCanvasImp() != 0 )
{
(TCanvas*)fCurrentCanvas->DrawClone();
static_cast<TCanvas*>(fCurrentCanvas)->DrawClone();
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ AlCaIsoTracksProducer::AlCaIsoTracksProducer(const edm::ParameterSet& iConfig)
// Parameters for track associator ===========================
//
edm::ParameterSet parameters = iConfig.getParameter<edm::ParameterSet>("TrackAssociatorParameters");
parameters_.loadParameters( parameters );
edm::ConsumesCollector iC = consumesCollector();
parameters_.loadParameters( parameters, iC );
trackAssociator_.useDefaultPropagator();
// ===============================================================

Expand Down
3 changes: 2 additions & 1 deletion Calibration/HcalCalibAlgos/plugins/HcalCorrPFCalculation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ HcalCorrPFCalculation::HcalCorrPFCalculation(edm::ParameterSet const& iConfig) {
//energyECALmip = iConfig.getParameter<double>("energyECALmip");

edm::ParameterSet parameters = iConfig.getParameter<edm::ParameterSet>("TrackAssociatorParameters");
parameters_.loadParameters( parameters );
edm::ConsumesCollector iC = consumesCollector();
parameters_.loadParameters( parameters, iC );
trackAssociator_.useDefaultPropagator();

associationConeSize_=iConfig.getParameter<double>("associationConeSize");
Expand Down
3 changes: 2 additions & 1 deletion Calibration/HcalCalibAlgos/plugins/ValidIsoTrkCalib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ ValidIsoTrkCalib::ValidIsoTrkCalib(const edm::ParameterSet& iConfig)
maxPNear = iConfig.getParameter<double>("maxPNear");

edm::ParameterSet parameters = iConfig.getParameter<edm::ParameterSet>("TrackAssociatorParameters");
parameters_.loadParameters( parameters );
edm::ConsumesCollector iC = consumesCollector();
parameters_.loadParameters( parameters, iC );
trackAssociator_.useDefaultPropagator();

// taECALCone_=iConfig.getUntrackedParameter<double>("TrackAssociatorECALCone",0.5);
Expand Down
3 changes: 2 additions & 1 deletion Calibration/HcalCalibAlgos/src/HcalIsoTrkAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ HcalIsoTrkAnalyzer::HcalIsoTrkAnalyzer(const edm::ParameterSet& iConfig)
EcalConeOuter = iConfig.getParameter<double>("EcalConeOuter");

edm::ParameterSet parameters = iConfig.getParameter<edm::ParameterSet>("TrackAssociatorParameters");
parameters_.loadParameters( parameters );
edm::ConsumesCollector iC = consumesCollector();
parameters_.loadParameters( parameters, iC );
trackAssociator_.useDefaultPropagator();

}
Expand Down
3 changes: 2 additions & 1 deletion Calibration/IsolatedParticles/plugins/IsolatedTracksCone.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ IsolatedTracksCone::IsolatedTracksCone(const edm::ParameterSet& iConfig) {

edm::ParameterSet parameters =
iConfig.getParameter<edm::ParameterSet>("TrackAssociatorParameters");
parameters_.loadParameters( parameters );
edm::ConsumesCollector iC = consumesCollector();
parameters_.loadParameters( parameters, iC );
trackAssociator_ = new TrackDetectorAssociator();
trackAssociator_->useDefaultPropagator();

Expand Down
2 changes: 1 addition & 1 deletion Calibration/Tools/interface/MinL3AlgoUnivErr.h
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ getMeanPartialSolution( IDdet id ) const
{
int i = cell->second;
int n = sumPartSolu0[ i ];
float meanX = sumPartSolu1[ i ] / n;
meanX = sumPartSolu1[ i ] / n;
}
return meanX;

Expand Down
3 changes: 2 additions & 1 deletion CaloOnlineTools/EcalTools/plugins/EcalCosmicsHists.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ EcalCosmicsHists::EcalCosmicsHists(const edm::ParameterSet& iConfig) :

// TrackAssociator parameters
edm::ParameterSet trkParameters = iConfig.getParameter<edm::ParameterSet>("TrackAssociatorParameters");
trackParameters_.loadParameters( trkParameters );
edm::ConsumesCollector iC = consumesCollector();
trackParameters_.loadParameters( trkParameters, iC );
trackAssociator_.useDefaultPropagator();

string title1 = "Seed Energy for All Feds; Seed Energy (GeV)";
Expand Down
2 changes: 1 addition & 1 deletion CondCore/CondDB/src/ConnectionPool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ namespace cond {
if( it == m_dbTypes.end() ){
bt = checkBackendType( coralSession, connectionString );
if( bt == UNKNOWN_DB && writeCapable) bt = backType;
m_dbTypes.insert( std::make_pair( connectionString, bt ) ).first;
m_dbTypes.insert( std::make_pair( connectionString, bt ) );
} else {
bt = (BackendType) it->second;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,69 +1,77 @@
#ifndef UTIL_H
#define UTIL_H
#ifndef CondFormats_JetMETObjects_Utilities_h
#define CondFormats_JetMETObjects_Utilities_h

#ifdef STANDALONE
#include <stdexcept>
#else
#include "FWCore/Utilities/interface/Exception.h"
#endif

#include <cstdlib>
#include <sstream>
#include <string>
#include <vector>
#include <cmath>


namespace
{
void handleError(const std::string& fClass, const std::string& fMessage)
{
#ifdef STANDALONE
#include <stdexcept>
std::stringstream sserr;
sserr<<fClass<<" ERROR: "<<fMessage;
throw std::runtime_error(sserr.str());
#else
#include "FWCore/Utilities/interface/Exception.h"
throw cms::Exception(fClass)<<fMessage;
#endif

namespace
{
void handleError(const std::string& fClass, const std::string& fMessage);
}
//----------------------------------------------------------------------
float getFloat(const std::string& token)
float getFloat(const std::string& token)
{
char* endptr;
float result = strtod (token.c_str(), &endptr);
if (endptr == token.c_str())
if (endptr == token.c_str())
{
std::stringstream sserr;
std::stringstream sserr;
sserr<<"can't convert token "<<token<<" to float value";
handleError("getFloat",sserr.str());
}
return result;
}
}
//----------------------------------------------------------------------
unsigned getUnsigned(const std::string& token)
unsigned getUnsigned(const std::string& token)
{
char* endptr;
unsigned result = strtoul (token.c_str(), &endptr, 0);
if (endptr == token.c_str())
if (endptr == token.c_str())
{
std::stringstream sserr;
std::stringstream sserr;
sserr<<"can't convert token "<<token<<" to unsigned value";
handleError("getUnsigned",sserr.str());
}
return result;
}
//----------------------------------------------------------------------
std::string getSection(const std::string& token)
std::string getSection(const std::string& token)
{
size_t iFirst = token.find ('[');
size_t iLast = token.find (']');
if (iFirst != std::string::npos && iLast != std::string::npos && iFirst < iLast)
return std::string (token, iFirst+1, iLast-iFirst-1);
return std::string (token, iFirst+1, iLast-iFirst-1);
return "";
}
//----------------------------------------------------------------------
std::vector<std::string> getTokens(const std::string& fLine)
{
std::vector<std::string> tokens;
std::string currentToken;
for (unsigned ipos = 0; ipos < fLine.length (); ++ipos)
for (unsigned ipos = 0; ipos < fLine.length (); ++ipos)
{
char c = fLine[ipos];
if (c == '#') break; // ignore comments
else if (c == ' ')
else if (c == ' ')
{ // flush current token if any
if (!currentToken.empty())
if (!currentToken.empty())
{
tokens.push_back(currentToken);
currentToken.clear();
Expand All @@ -72,30 +80,19 @@ namespace
else
currentToken += c;
}
if (!currentToken.empty()) tokens.push_back(currentToken); // flush end
if (!currentToken.empty()) tokens.push_back(currentToken); // flush end
return tokens;
}
//----------------------------------------------------------------------
std::string getDefinitions(const std::string& token)
//----------------------------------------------------------------------
std::string getDefinitions(const std::string& token)
{
size_t iFirst = token.find ('{');
size_t iLast = token.find ('}');
if (iFirst != std::string::npos && iLast != std::string::npos && iFirst < iLast)
return std::string (token, iFirst+1, iLast-iFirst-1);
return std::string (token, iFirst+1, iLast-iFirst-1);
return "";
}
//------------------------------------------------------------------------
void handleError(const std::string& fClass, const std::string& fMessage)
{
#ifdef STANDALONE
std::stringstream sserr;
sserr<<fClass<<" ERROR: "<<fMessage;
throw std::runtime_error(sserr.str());
#else
throw cms::Exception(fClass)<<fMessage;
#endif
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
float quadraticInterpolation(float fZ, const float fX[3], const float fY[3])
{
// Quadratic interpolation through the points (x[i],y[i]). First find the parabola that
Expand Down
14 changes: 7 additions & 7 deletions CondFormats/JetMETObjects/src/FactorizedJetCorrector.cc
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
// This is the file "FactorizedJetCorrector.cc".
// This is the file "FactorizedJetCorrector.cc".
// This is the implementation of the class FactorizedJetCorrector.
// Author: Konstantinos Kousouris, Philipp Schieferdecker
// Email: [email protected], [email protected]

#include "CondFormats/JetMETObjects/interface/FactorizedJetCorrector.h"
#include "CondFormats/JetMETObjects/interface/SimpleJetCorrector.h"
#include "CondFormats/JetMETObjects/interface/JetCorrectorParameters.h"
#include "CondFormats/JetMETObjects/src/Utilities.cc"
#include "CondFormats/JetMETObjects/interface/Utilities.h"
#include "Math/PtEtaPhiE4D.h"
#include "Math/Vector3D.h"
#include "Math/LorentzVector.h"
#include <vector>
#include <string>
#include <sstream>

//------------------------------------------------------------------------
//------------------------------------------------------------------------
//--- Default FactorizedJetCorrector constructor -------------------------
//------------------------------------------------------------------------
FactorizedJetCorrector::FactorizedJetCorrector()
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
//--- FactorizedJetCorrector constructor ---------------------------------
//------------------------------------------------------------------------
FactorizedJetCorrector::FactorizedJetCorrector(const std::string& fLevels, const std::string& fFiles, const std::string& fOptions):
Expand All @@ -35,21 +35,21 @@ FactorizedJetCorrector::FactorizedJetCorrector(const std::vector<JetCorrectorPar
{
}

//------------------------------------------------------------------------
//------------------------------------------------------------------------
//--- Returns the correction ---------------------------------------------
//------------------------------------------------------------------------
float FactorizedJetCorrector::getCorrection()
{
return mCalc.getCorrection(mValues);
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
//--- Returns the vector of subcorrections, up to a given level ----------
//------------------------------------------------------------------------
std::vector<float> FactorizedJetCorrector::getSubCorrections()
{
return mCalc.getSubCorrections(mValues);
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
//--- Setters ------------------------------------------------------------
//------------------------------------------------------------------------
void FactorizedJetCorrector::setNPV(int fNPV)
Expand Down
Loading

0 comments on commit 5824050

Please sign in to comment.