Skip to content

Commit

Permalink
Merge branch 'from-CMSSW_10_1_X_2018-03-12-2300' into CMSSW_10_1_X_ta…
Browse files Browse the repository at this point in the history
…u-pog_recoOnMiniAOD
  • Loading branch information
roger-wolf committed Mar 13, 2018
2 parents 4bdc092 + 78e824d commit 8001aa7
Show file tree
Hide file tree
Showing 606 changed files with 21,260 additions and 6,347 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,25 +357,25 @@ Double_t &TEcnaNArrayD::operator()(Int_t i1,Int_t i2,Int_t i3,Int_t i4,Int_t i5,
}
const Double_t &TEcnaNArrayD::operator()(Int_t i1) const
{
return (Double_t&)(this->operator()(i1));
return const_cast< TEcnaNArrayD *>(this)->operator()(i1);
}
const Double_t &TEcnaNArrayD::operator()(Int_t i1,Int_t i2) const
{
return (Double_t&)(this->operator()(i1,i2));
return const_cast< TEcnaNArrayD *>(this)->operator()(i1,i2);
}
const Double_t &TEcnaNArrayD::operator()(Int_t i1,Int_t i2,Int_t i3) const
{
return (Double_t&)(this->operator()(i1,i2,i3));
return const_cast< TEcnaNArrayD *>(this)->operator()(i1,i2,i3);
}
const Double_t &TEcnaNArrayD::operator()(Int_t i1,Int_t i2,Int_t i3,Int_t i4) const
{
return (Double_t&)(this->operator()(i1,i2,i3,i4));
return const_cast< TEcnaNArrayD *>(this)->operator()(i1,i2,i3,i4);
}
const Double_t &TEcnaNArrayD::operator()(Int_t i1,Int_t i2,Int_t i3,Int_t i4,Int_t i5) const
{
return (Double_t&)(this->operator()(i1,i2,i3,i4,i5));
return const_cast< TEcnaNArrayD *>(this)->operator()(i1,i2,i3,i4,i5);
}
const Double_t &TEcnaNArrayD::operator()(Int_t i1,Int_t i2,Int_t i3,Int_t i4,Int_t i5,Int_t i6) const
{
return (Double_t&)(this->operator()(i1,i2,i3,i4,i5,i6));
return const_cast< TEcnaNArrayD *>(this)->operator()(i1,i2,i3,i4,i5,i6);
}
7 changes: 4 additions & 3 deletions CalibCalorimetry/EcalPedestalOffsets/src/testChannel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "DataFormats/EcalRawData/interface/EcalRawDataCollections.h"

#include "TFile.h"
#include "TString.h"

#include "CalibCalorimetry/EcalPedestalOffsets/interface/testChannel.h"

Expand All @@ -25,9 +26,9 @@ testChannel::testChannel (const edm::ParameterSet& paramSet) :
m_bestPed (paramSet.getParameter<int> ("bestPed")) ,
m_xtal (paramSet.getParameter<int> ("xtal")) ,
m_pedVSDAC ("pedVSDAC","pedVSDAC",100,150,250,m_DACmax-m_DACmin,m_DACmin,m_DACmax) ,
m_singlePedVSDAC_1 ("singlePedVSDAC_1","pedVSDAC (g1) for xtal "+m_xtal,100,150,250,m_DACmax-m_DACmin,m_DACmin,m_DACmax) ,
m_singlePedVSDAC_2 ("singlePedVSDAC_2","pedVSDAC (g2) for xtal "+m_xtal,100,150,250,m_DACmax-m_DACmin,m_DACmin,m_DACmax) ,
m_singlePedVSDAC_3 ("singlePedVSDAC_3","pedVSDAC (g3) for xtal "+m_xtal,100,150,250,m_DACmax-m_DACmin,m_DACmin,m_DACmax)
m_singlePedVSDAC_1 ("singlePedVSDAC_1","pedVSDAC (g1) for xtal "+TString(m_xtal),100,150,250,m_DACmax-m_DACmin,m_DACmin,m_DACmax) ,
m_singlePedVSDAC_2 ("singlePedVSDAC_2","pedVSDAC (g2) for xtal "+TString(m_xtal),100,150,250,m_DACmax-m_DACmin,m_DACmin,m_DACmax) ,
m_singlePedVSDAC_3 ("singlePedVSDAC_3","pedVSDAC (g3) for xtal "+TString(m_xtal),100,150,250,m_DACmax-m_DACmin,m_DACmin,m_DACmax)
{
edm::LogInfo ("testChannel") << " reading "
<< " m_DACmin: " << m_DACmin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ EcalTrivialConditionRetriever::EcalTrivialConditionRetriever( const edm::Paramet
mappingFile_ = ps.getUntrackedParameter<std::string>("mappingFile","");

if ( producedEcalMappingElectronics_ ) {
if ( mappingFile_ != "" ) { // if file provided read channel map
if ( !mappingFile_.empty() ) { // if file provided read channel map
setWhatProduced( this, &EcalTrivialConditionRetriever::getMappingFromConfiguration );
} else {
setWhatProduced( this, &EcalTrivialConditionRetriever::produceEcalMappingElectronics );
Expand Down Expand Up @@ -229,7 +229,7 @@ EcalTrivialConditionRetriever::EcalTrivialConditionRetriever( const edm::Paramet
linearCorrectionsFile_ = ps.getUntrackedParameter<std::string>("linearCorrectionsFile","") ;

if (producedEcalLinearCorrections_) { // user asks to produce constants
if(linearCorrectionsFile_ != "") { // if file provided read constants
if(!linearCorrectionsFile_.empty()) { // if file provided read constants
setWhatProduced (this, &EcalTrivialConditionRetriever::produceEcalLinearCorrections );
} else { // set all constants to 1. or smear as specified by user
setWhatProduced (this, &EcalTrivialConditionRetriever::produceEcalLinearCorrections ) ;
Expand All @@ -246,7 +246,7 @@ EcalTrivialConditionRetriever::EcalTrivialConditionRetriever( const edm::Paramet
intercalibConstantsMCFile_ = ps.getUntrackedParameter<std::string>("intercalibConstantsMCFile","") ;

if (producedEcalIntercalibConstants_) { // user asks to produce constants
if(intercalibConstantsFile_ != "") { // if file provided read constants
if(!intercalibConstantsFile_.empty()) { // if file provided read constants
setWhatProduced (this, &EcalTrivialConditionRetriever::getIntercalibConstantsFromConfiguration ) ;
} else { // set all constants to 1. or smear as specified by user
setWhatProduced (this, &EcalTrivialConditionRetriever::produceEcalIntercalibConstants ) ;
Expand All @@ -257,7 +257,7 @@ EcalTrivialConditionRetriever::EcalTrivialConditionRetriever( const edm::Paramet
producedEcalIntercalibConstantsMC_ = ps.getUntrackedParameter<bool>("producedEcalIntercalibConstantsMC",true);

if (producedEcalIntercalibConstantsMC_) { // user asks to produce constants
if(intercalibConstantsMCFile_ != "") { // if file provided read constants
if(!intercalibConstantsMCFile_.empty()) { // if file provided read constants
setWhatProduced (this, &EcalTrivialConditionRetriever::getIntercalibConstantsMCFromConfiguration ) ;
} else { // set all constants to 1. or smear as specified by user
setWhatProduced (this, &EcalTrivialConditionRetriever::produceEcalIntercalibConstantsMC ) ;
Expand All @@ -270,7 +270,7 @@ EcalTrivialConditionRetriever::EcalTrivialConditionRetriever( const edm::Paramet
intercalibErrorsFile_ = ps.getUntrackedParameter<std::string>("intercalibErrorsFile","") ;

if (producedEcalIntercalibErrors_) { // user asks to produce constants
if(intercalibErrorsFile_ != "") { // if file provided read constants
if(!intercalibErrorsFile_.empty()) { // if file provided read constants
setWhatProduced (this, &EcalTrivialConditionRetriever::getIntercalibErrorsFromConfiguration ) ;
} else { // set all constants to 1. or smear as specified by user
setWhatProduced (this, &EcalTrivialConditionRetriever::produceEcalIntercalibErrors ) ;
Expand All @@ -283,7 +283,7 @@ EcalTrivialConditionRetriever::EcalTrivialConditionRetriever( const edm::Paramet
timeCalibConstantsFile_ = ps.getUntrackedParameter<std::string>("timeCalibConstantsFile","") ;

if (producedEcalTimeCalibConstants_) { // user asks to produce constants
if(timeCalibConstantsFile_ != "") { // if file provided read constants
if(!timeCalibConstantsFile_.empty()) { // if file provided read constants
setWhatProduced (this, &EcalTrivialConditionRetriever::getTimeCalibConstantsFromConfiguration ) ;
} else { // set all constants to 1. or smear as specified by user
setWhatProduced (this, &EcalTrivialConditionRetriever::produceEcalTimeCalibConstants ) ;
Expand All @@ -296,7 +296,7 @@ EcalTrivialConditionRetriever::EcalTrivialConditionRetriever( const edm::Paramet
timeCalibErrorsFile_ = ps.getUntrackedParameter<std::string>("timeCalibErrorsFile","") ;

if (producedEcalTimeCalibErrors_) { // user asks to produce constants
if(timeCalibErrorsFile_ != "") { // if file provided read constants
if(!timeCalibErrorsFile_.empty()) { // if file provided read constants
setWhatProduced (this, &EcalTrivialConditionRetriever::getTimeCalibErrorsFromConfiguration ) ;
} else { // set all constants to 1. or smear as specified by user
setWhatProduced (this, &EcalTrivialConditionRetriever::produceEcalTimeCalibErrors ) ;
Expand Down Expand Up @@ -372,7 +372,7 @@ EcalTrivialConditionRetriever::EcalTrivialConditionRetriever( const edm::Paramet
channelStatusFile_ = ps.getUntrackedParameter<std::string>("channelStatusFile","");

if ( producedEcalChannelStatus_ ) {
if ( channelStatusFile_ != "" ) { // if file provided read channel map
if ( !channelStatusFile_.empty() ) { // if file provided read channel map
setWhatProduced( this, &EcalTrivialConditionRetriever::getChannelStatusFromConfiguration );
} else { // set all channels to working -- FIXME might be changed
setWhatProduced( this, &EcalTrivialConditionRetriever::produceEcalChannelStatus );
Expand Down Expand Up @@ -409,7 +409,7 @@ EcalTrivialConditionRetriever::EcalTrivialConditionRetriever( const edm::Paramet
trgChannelStatusFile_ = ps.getUntrackedParameter<std::string>("trgChannelStatusFile","");

if ( producedEcalTrgChannelStatus_ ) {
if ( trgChannelStatusFile_ != "" ) { // if file provided read channel map
if ( !trgChannelStatusFile_.empty() ) { // if file provided read channel map
setWhatProduced( this, &EcalTrivialConditionRetriever::getTrgChannelStatusFromConfiguration );
} else { // set all channels to working -- FIXME might be changed
setWhatProduced( this, &EcalTrivialConditionRetriever::produceEcalTrgChannelStatus );
Expand Down Expand Up @@ -1101,7 +1101,7 @@ EcalTrivialConditionRetriever::produceEcalLaserAlphas( const EcalLaserAlphasRcd&
}
ical->setValue( ebdetid, alpha );

if((ic==1650 )){
if( ic==1650 ){
std::cout << " ic/alpha "<<ic<<"/"<<alpha<<std::endl;
}

Expand All @@ -1124,7 +1124,7 @@ EcalTrivialConditionRetriever::produceEcalLaserAlphas( const EcalLaserAlphasRcd&
ical->setValue( ebid, alpha );
std::cout << " ieta/iphi/alpha "<<ieta<<"/"<<iphi<<"/"<<alpha<<std::endl;
}
if((ieta==10)){
if( ieta==10 ){
std::cout << "I will print some alphas from the file... ieta/iphi/alpha "<<ieta<<"/"<<iphi<<"/"<<alpha<<std::endl;
}
}
Expand Down
3 changes: 1 addition & 2 deletions CalibCalorimetry/HcalAlgos/src/HcalLogicalMapGenerator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1659,10 +1659,9 @@ void HcalLogicalMapGenerator::buildCALIBMap(const HcalTopology* topo,
}
}
}
ic++;

/*HO calibration channels*/
for(ic=ic; ic<NCALIBCR; ic++){
for(ic=ic+1 ; ic<NCALIBCR; ic++){
icrate=calibcrate[ic];
irm_fi = 1;// everything other than he is on A
ifed=fedcalibnum[ic][idcc-1];
Expand Down
2 changes: 1 addition & 1 deletion CalibCalorimetry/HcalPlugins/src/HcalTextCalibrations.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ HcalTextCalibrations::HcalTextCalibrations ( const edm::ParameterSet& iConfig )
setWhatProduced (this, &HcalTextCalibrations::producePedestalWidths);
findingRecord <HcalPedestalWidthsRcd> ();
}
if (objectName == "EffectivePedestals") {
else if (objectName == "EffectivePedestals") {
setWhatProduced (this, &HcalTextCalibrations::produceEffectivePedestals, edm::es::Label("effective"));
findingRecord <HcalPedestalsRcd> ();
}
Expand Down
3 changes: 3 additions & 0 deletions CalibFormats/SiPixelObjects/interface/PixelTrimCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ namespace pos{

void writeASCII(std::string filename) const override ;
void writeXML( pos::PixelConfigKey key, int version, std::string path) const override {;}
using PixelTrimBase::writeXMLHeader;
using PixelTrimBase::writeXML;
using PixelTrimBase::writeXMLTrailer;
void writeXMLHeader(pos::PixelConfigKey key, int version, std::string path, std::ofstream *out) const override {;}
void writeXML( std::ofstream *out) const override {;}
void writeXMLTrailer( std::ofstream *out) const override {;}
Expand Down
2 changes: 1 addition & 1 deletion CalibMuon/DTCalibration/test/stubs/DTTimeBoxPlotter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ TCanvas * DTTimeBoxPlotter::newCanvas(TString name, TString title,
int xdiv, int ydiv, int form, int w){
static int i = 1;
if (name == "") {
name = TString("Canvas "+i);
name = TString("Canvas ") + TString(i);
i++;
}
TCanvas *c = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ SiPixelErrorsDigisToCalibDigis::endJob() {
if (!outputFilename_.empty() && createOutputFile_)
{
edm::LogInfo("SiPixelErrorCalibDigis") << "Writing ROOT file to: " << outputFilename_ << std::endl;
if ( &*edm::Service<DQMStore>()) edm::Service<DQMStore>()->save (outputFilename_);
if ( edm::Service<DQMStore>().isAvailable() ) edm::Service<DQMStore>()->save (outputFilename_);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ unsigned int SiPixelFedFillerWordEventNumber ::CalibStatFillWord(unsigned int to
// according to the value of the totword.
if ((status == 0x1)||(status == 0x9)){
CalibFiller1 = Filler1;
if((status == 0x9)){CalibFiller2 = Filler14;}
if( status == 0x9 ){CalibFiller2 = Filler14;}
}
if ((status == 0x2)||(status == 0xa)){
CalibFiller1 = Filler2;
if((status == 0xa)){CalibFiller2 = Filler24;}
if( status == 0xa ){CalibFiller2 = Filler24;}
}
if ((status == 0x4)||(status == 0xc)){
CalibFiller1 = Filler3;
if((status == 0xc)){CalibFiller2 = Filler4;}
if( status == 0xc ){CalibFiller2 = Filler4;}
}
if ((status == 0x8)){CalibFiller2 = Filler4;}
if ( status == 0x8 ){CalibFiller2 = Filler4;}
if((status == 0x7)||(status == 0xf)){
if((Filler1 == Filler2)&&(Filler1 == Filler3)&&(Filler2 == Filler3)){
CalibFiller1 = Filler1;
Expand All @@ -81,7 +81,7 @@ unsigned int SiPixelFedFillerWordEventNumber ::CalibStatFillWord(unsigned int to
}
}
if((status == 0x3)||(status == 0xb)){
if((Filler1 == Filler2)){
if( Filler1 == Filler2 ){
CalibFiller1 = Filler1;
BoolStat = true;
if(status == 0xb){CalibFiller2 = Filler14;}
Expand All @@ -93,7 +93,7 @@ unsigned int SiPixelFedFillerWordEventNumber ::CalibStatFillWord(unsigned int to
}
}
if((status == 0x5)||(status == 0xd)){
if((Filler1 == Filler3)){
if( Filler1 == Filler3 ){
CalibFiller1 = Filler1;
BoolStat = true;
if(status == 0xd){CalibFiller2 = Filler4;}
Expand All @@ -105,7 +105,7 @@ unsigned int SiPixelFedFillerWordEventNumber ::CalibStatFillWord(unsigned int to
}
}
if((status == 0x6)||(status == 0xe)){
if((Filler2 == Filler3)){
if( Filler2 == Filler3 ){
CalibFiller1 = Filler2;
BoolStat = true;
if(status == 0xe){CalibFiller2 = Filler4;}
Expand Down Expand Up @@ -135,7 +135,7 @@ unsigned int SiPixelFedFillerWordEventNumber ::CalibStatFillWord(unsigned int to
if((status == 0x9)||(status == 0xa)||(status == 0xc)){
vecFillerWordsEventNumber2.push_back((((CalibFiller2%65536)&(0xff00))>>8));
edm::LogInfo("AnazrFedFillerWords")<<"Filler2 Event ID:"<<(((CalibFiller2%65536)&(0xff00))>>8)<<std::endl;
}else if((status == 0x8)){
}else if( status == 0x8 ){
edm::LogError("AnazrFedFillerWords")<<"Status: "<<status
<<" No Filler1 found, is not possible get any Event ID Number"
<<std::endl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ class SiStripGainsPCLWorker : public DQMEDAnalyzer {
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

private:
virtual void beginJob() ;
void beginJob() override;
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
void dqmBeginRun(edm::Run const&, edm::EventSetup const&) override;
void analyze(const edm::Event&, const edm::EventSetup&) override;
virtual void endJob() ;
void endJob() override;

void processEvent(const TrackerTopology* topo); //what really does the job
virtual void checkBookAPVColls(const edm::EventSetup& setup);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class SiStripHitEffFromCalibTree : public ConditionDBWriter<SiStripBadStrip> {
~SiStripHitEffFromCalibTree() override;

private:
virtual void algoBeginJob();
void algoBeginJob(const edm::EventSetup&) override;
void algoEndJob() override;
void algoAnalyze(const edm::Event& e, const edm::EventSetup& c) override;
void SetBadComponents(int i, int component,SiStripQuality::BadComponent& BC, std::stringstream ssV[4][19], int NBadComponent[4][19][4]);
Expand Down Expand Up @@ -199,7 +199,7 @@ SiStripHitEffFromCalibTree::SiStripHitEffFromCalibTree(const edm::ParameterSet&

SiStripHitEffFromCalibTree::~SiStripHitEffFromCalibTree() { }

void SiStripHitEffFromCalibTree::algoBeginJob() {
void SiStripHitEffFromCalibTree::algoBeginJob(const edm::EventSetup&) {
//I have no idea what goes here
//fs->make<TTree>("HitEffHistos","Tree of the inefficient hit histograms");
}
Expand All @@ -223,7 +223,7 @@ void SiStripHitEffFromCalibTree::algoAnalyze(const edm::Event& e, const edm::Eve
// read bad modules to mask
ifstream badModules_file;
set<uint32_t> badModules_list;
if(_badModulesFile!="") {
if(!_badModulesFile.empty()) {
badModules_file.open(_badModulesFile.c_str());
uint32_t badmodule_detid;
int mods, fiber1, fiber2, fiber3;
Expand Down
4 changes: 2 additions & 2 deletions Calibration/EcalCalibAlgos/interface/ECALpedestalPCLworker.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ class ECALpedestalPCLworker : public DQMEDAnalyzer {


private:
virtual void beginJob() ;
void beginJob() override;
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
void analyze(const edm::Event&, const edm::EventSetup&) override ;
virtual void endJob() ;
void endJob() override;


edm::EDGetTokenT<EBDigiCollection> digiTokenEB_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
),
outputCommands = cms.untracked.vstring(
'keep *_hbhereco_*_*',
'keep *_hbheprereco_*_*',
'keep *_ecalRecHit_*_*',
'keep *_offlineBeamSpot_*_*',
'keep *_TriggerResults_*_*',
Expand All @@ -23,6 +22,7 @@
'keep recoTracks_tevMuons_*_*',
'keep recoTrackExtras_tevMuons_*_*',
'keep *_offlinePrimaryVertices_*_*',
'keep *_scalersRawToDigi_*_*',
'keep *_muons_*_*',
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
SelectEvents = cms.vstring('pathALCARECOHcalCalIterativePhiSym')
),
outputCommands = cms.untracked.vstring(

"keep *_horeco_*_*",
"keep *_hfreco_*_*",
"keep *_hbhereco_*_*",
"keep *_offlinePrimaryVertices_*_*",
"keep *_scalersRawToDigi_*_*",
"keep edmTriggerResults_*_*_HLT")

)
Expand Down
16 changes: 16 additions & 0 deletions Calibration/HcalCalibAlgos/macros/CalibCorr.C
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,22 @@ unsigned int truncateId(unsigned int detId, int truncateFlag, bool debug=false){
return id;
}

double puFactor(int ieta, double pmom, double eHcal, double ediff) {

double fac(1.0);
static const double frac(0.02);
if (pmom > 0 && ediff > frac*pmom) {
double a1(-0.35), a2(-0.65);
if (std::abs(ieta) == 25) {
a2 = -0.30;
} else if (std::abs(ieta) > 25) {
a1 = -0.45; a2 = -0.10;
}
fac = (1.0+a1*(eHcal/pmom)*(ediff/pmom)*(1+a2*(ediff/pmom)));
}
return fac;
}

class CalibCorr {
public :
CalibCorr(const char* infile, bool debug=false);
Expand Down
11 changes: 2 additions & 9 deletions Calibration/HcalCalibAlgos/macros/CalibMonitor.C
Original file line number Diff line number Diff line change
Expand Up @@ -978,15 +978,8 @@ bool CalibMonitor::GoodTrack(double& eHcal, double &cuti, bool debug) {
}
ediff = (Etot3-Etot1);
}
if (ediff > 0.02*pmom) {
double a1(-0.35), a2(-0.65);
if (std::abs(t_ieta) == 25) {
a2 = -0.30;
} else if (std::abs(t_ieta) > 25) {
a1 = -0.45; a2 = -0.10;
}
double fac = (1.0+a1*(t_eHcal/pmom)*(ediff/pmom)*(1+a2*(ediff/pmom)));
eHcal *= fac;
double fac = puFactor(t_ieta,pmom,eHcal,ediff);
eHcal *= fac;
}
}
select = ((t_qltyFlag) && (t_selectTk) && (t_hmaxNearP < cut) &&
Expand Down
Loading

0 comments on commit 8001aa7

Please sign in to comment.