Skip to content

Commit

Permalink
resolve merge conflicts with CMSSW_9_3_X
Browse files Browse the repository at this point in the history
  • Loading branch information
fwyzard committed Jul 27, 2017
2 parents 273afba + 29a96fd commit 62bb99a
Show file tree
Hide file tree
Showing 49 changed files with 466 additions and 365 deletions.
5 changes: 2 additions & 3 deletions Alignment/MillePedeAlignmentAlgorithm/scripts/mps_alisetup.py
Expand Up @@ -258,11 +258,10 @@ def create_mass_storage_directory(mps_dir_name, general_options):

# set directory on eos
mss_dir = general_options.get("massStorageDir",
"/store/caf/user/"+os.environ["USER"])
"/eos/cms/store/caf/user/"+os.environ["USER"])
mss_dir = os.path.join(mss_dir, "MPproduction", mps_dir_name)

cmd = ["/afs/cern.ch/project/eos/installation/cms/bin/eos.select",
"mkdir", "-p", mss_dir]
cmd = ["mkdir", "-p", mss_dir]

# create directory
if not general_options.get("testMode", False):
Expand Down
5 changes: 1 addition & 4 deletions Alignment/MillePedeAlignmentAlgorithm/scripts/mps_check.py
Expand Up @@ -20,10 +20,7 @@
lib.read_db()

# create a list of eos ls entries containing files on eos
# previously 'cmsLs -l $mssDir' -> deprecated command. Removed in January 2016
# the simple command "eos ls -l" doesn't work. Exact location of application must be specified.
eos = '/afs/cern.ch/project/eos/installation/cms/bin/eos.select'
command = eos+' ls -l '+lib.mssDir
command = ' ls -l '+lib.mssDir
eoslsoutput = subprocess.check_output(command, stderr=subprocess.STDOUT, shell=True).split('\n')

# loop over FETCH jobs
Expand Down
Expand Up @@ -33,13 +33,12 @@
occurences.append(lib.JOBSP3.count(items[i]))

# copy files from eos and combine root-files of each dataset with "hadd"
eos = '/afs/cern.ch/project/eos/installation/cms/bin/eos.select'
counter = 0
for i in xrange(len(items)):
command = 'hadd '
command += 'monitormerge_'+items[i]+'.root '
for j in xrange(occurences[i]):
os.system(eos+' cp /eos/cms'+eosDir+'/millePedeMonitor%03d.root .' % (counter+j+1))
os.system('cp '+eosDir+'/millePedeMonitor%03d.root .' % (counter+j+1))
command += 'millePedeMonitor%03d.root ' % (counter+j+1)
os.system(command)
for j in xrange(occurences[i]):
Expand Down
Expand Up @@ -6,10 +6,6 @@
#
# In the very beginning of this script, stager requests for the files will be added.

EOS="/afs/cern.ch/project/eos/installation/cms/bin/eos.select"
EOSPREFIX="root://eoscms//eos/cms"


# these defaults will be overwritten by MPS
RUNDIR=$HOME/scratch0/some/path
MSSDIR=/castor/cern.ch/user/u/username/another/path
Expand Down Expand Up @@ -67,9 +63,9 @@ if [ "$MSSDIRPOOL" != "cmscafuser" ]; then
rfcp millePedeMonitor*root $MSSDIR/millePedeMonitorISN.root
else
MSSCAFDIR=`echo $MSSDIR | perl -pe 's/\/castor\/cern.ch\/cms//gi'`
${EOS} mkdir -p ${MSSCAFDIR} # ensure the directory exists
echo "xrdcp -f milleBinaryISN.dat.gz ${EOSPREFIX}${MSSCAFDIR}/milleBinaryISN.dat.gz > /dev/null"
xrdcp -f milleBinaryISN.dat.gz ${EOSPREFIX}${MSSCAFDIR}/milleBinaryISN.dat.gz > /dev/null
xrdcp -f treeFile*root ${EOSPREFIX}${MSSCAFDIR}/treeFileISN.root > /dev/null
xrdcp -f millePedeMonitor*root ${EOSPREFIX}${MSSCAFDIR}/millePedeMonitorISN.root > /dev/null
mkdir -p ${MSSCAFDIR} # ensure the directory exists
echo "xrdcp -f milleBinaryISN.dat.gz ${MSSCAFDIR}/milleBinaryISN.dat.gz > /dev/null"
xrdcp -f milleBinaryISN.dat.gz ${MSSCAFDIR}/milleBinaryISN.dat.gz > /dev/null
xrdcp -f treeFile*root ${MSSCAFDIR}/treeFileISN.root > /dev/null
xrdcp -f millePedeMonitor*root ${MSSCAFDIR}/millePedeMonitorISN.root > /dev/null
fi
Expand Up @@ -7,9 +7,6 @@
#temporary fix (?):
#unset PYTHONHOME

EOS="/afs/cern.ch/project/eos/installation/cms/bin/eos.select"
EOSPREFIX="root://eoscms//eos/cms"

cd ${CMSSW_BASE}/src
eval `scramv1 runtime -sh`
cd -
Expand All @@ -28,7 +25,7 @@ if [ "${MSSDIRPOOL}" != "cmscafuser" ]
then
: # do nothing
else
TREEFILELIST=`${EOS} ls -l ${MSSDIR} | grep -i treeFile | grep -i root`
TREEFILELIST=`ls -l ${MSSDIR} | grep -i treeFile | grep -i root`
fi
if [[ -z "${TREEFILELIST}" ]]
then
Expand Down Expand Up @@ -120,8 +117,8 @@ if [ "${MSSDIRPOOL}" != "cmscafuser" ]; then
echo copytreefile rfcp ${MSSDIR}/treeFileISN.root ${BATCH_DIR} >> parallel-copy-commands.txt
else
MSSCAFDIR=`echo ${MSSDIR} | perl -pe 's/\/castor\/cern.ch\/cms//gi'`
echo untilSuccess xrdcp ${EOSPREFIX}${MSSCAFDIR}/milleBinaryISN.dat.gz milleBinaryISN.dat.gz >> parallel-copy-commands.txt
echo copytreefile xrdcp ${EOSPREFIX}${MSSCAFDIR}/treeFileISN.root treeFileISN.root >> parallel-copy-commands.txt
echo untilSuccess xrdcp ${MSSCAFDIR}/milleBinaryISN.dat.gz milleBinaryISN.dat.gz >> parallel-copy-commands.txt
echo copytreefile xrdcp ${MSSCAFDIR}/treeFileISN.root treeFileISN.root >> parallel-copy-commands.txt
fi
xargs -a stager_get-commands.txt -n 1 -P 10 -I {} bash -c '$@' _ {}
xargs -a parallel-copy-commands.txt -n 1 -P 10 -I {} bash -c '$@' _ {}
Expand Down
Expand Up @@ -9,7 +9,8 @@
SelectEvents = cms.vstring('pathALCARECOHcalCalMinBias')
),
outputCommands = cms.untracked.vstring(
'keep *_gtDigisAlCaMB_*_*',
'keep *_hltTriggerSummaryAOD_*_*',
'keep *_TriggerResults_*_*',
'keep HBHERecHitsSorted_hbhereco_*_*',
'keep HORecHitsSorted_horeco_*_*',
'keep HFRecHitsSorted_hfreco_*_*',
Expand Down
Expand Up @@ -9,7 +9,8 @@
SelectEvents = cms.vstring('pathALCARECOHcalCalMinBias')
),
outputCommands = cms.untracked.vstring(
'keep *_gtDigisAlCaMB_*_*',
'keep *_hltTriggerSummaryAOD_*_*',
'keep *_TriggerResults_*_*',
'keep HBHERecHitsSorted_hbherecoMBNZS_*_*',
'keep HORecHitsSorted_horecoMBNZS_*_*',
'keep HFRecHitsSorted_hfrecoMBNZS_*_*',
Expand Down
Expand Up @@ -9,7 +9,8 @@
SelectEvents = cms.vstring('pathALCARECOHcalCalPedestal')
),
outputCommands = cms.untracked.vstring(
'keep *_gtDigisAlCaPedestal_*_*',
'keep *_hltTriggerSummaryAOD_*_*',
'keep *_TriggerResults_*_*',
'keep HBHERecHitsSorted_hbherecoPedestal_*_*',
'keep HORecHitsSorted_horecoPedestal_*_*',
'keep HFRecHitsSorted_hfrecoPedestal_*_*')
Expand Down
6 changes: 6 additions & 0 deletions CommonTools/Utils/interface/ExpressionEvaluatorTemplates.h
Expand Up @@ -12,17 +12,20 @@ namespace reco {
template<typename Ret, typename... Args>
struct genericExpression {
virtual Ret operator()(Args ...) const =0;
virtual ~genericExpression(){};
};


template<typename Object>
struct CutOnObject {
virtual bool eval(Object const&) const = 0;
virtual ~CutOnObject(){};
};

template<typename Object>
struct ValueOnObject {
virtual double eval(Object const&) const =0;
virtual ~ValueOnObject(){};
};

template<typename Object>
Expand All @@ -35,6 +38,7 @@ namespace reco {
std::transform(cands.begin(),cands.end(),mask.begin(), [&](typename Collection::value_type const & c){ return f(*c);});
}
virtual void eval(Collection const&, Mask&) const = 0;
virtual ~MaskCollection(){};
};

template<typename Object>
Expand All @@ -45,6 +49,7 @@ namespace reco {
cands.erase(std::remove_if(cands.begin(),cands.end(),[&](typename Collection::value_type const &c){return !f(*c);}),cands.end());
}
virtual void eval(Collection&) const = 0;
virtual ~SelectInCollection(){};
};

template<typename Object>
Expand All @@ -57,6 +62,7 @@ namespace reco {
for (auto const & c : cands) { if(f(*c)) inds.push_back(i); ++i; }
}
virtual void eval(Collection const&, Indices&) const = 0;
virtual ~SelectIndecesInCollection(){};
};


Expand Down
11 changes: 9 additions & 2 deletions CondFormats/Calibration/interface/BlobComplex.h
Expand Up @@ -7,7 +7,11 @@
#include <utility>

struct BlobComplexData {
BlobComplexData() {}
BlobComplexData(){
a = 0;
b = 0;
}


void fill(unsigned int &serial);
void print() const;
Expand Down Expand Up @@ -40,7 +44,10 @@ struct BlobComplexContent {
};

struct BlobComplexObjects {
BlobComplexObjects() {}
BlobComplexObjects() {
a = 0;
b = 0;
}

void fill(unsigned int &serial);
void print() const;
Expand Down
4 changes: 3 additions & 1 deletion Configuration/DataProcessing/python/RecoTLR.py
Expand Up @@ -44,7 +44,9 @@ def customisePostEra_Run2_2016(process):
return process

def customisePostEra_Run2_2017(process):
_hcalCustoms25ns(process)
import RecoLocalCalo.HcalRecAlgos.RemoveAddSevLevel as HcalRemoveAddSevLevel
HcalRemoveAddSevLevel.AddFlag(process.hcalRecAlgos,"HBHEFlatNoise",8)
HcalRemoveAddSevLevel.RemoveFlag(process.hcalRecAlgos,"HFDigiTime")
return process

def customisePostEra_Run2_2017_express_trackingOnly(process):
Expand Down
9 changes: 8 additions & 1 deletion Configuration/Skimming/python/PDWG_EXOMONOPOLE_cff.py
Expand Up @@ -5,9 +5,16 @@
hltMonopole = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone()
hltMonopole.TriggerResultsTag = cms.InputTag( "TriggerResults", "", "HLT" )
hltMonopole.HLTPaths = cms.vstring(
#2016
"HLT_Photon175_v*",
"HLT_PFMET300_v*",
"HLT_PFMET170_HBHE_BeamHaloCleaned_v*"
"HLT_PFMET170_HBHE_BeamHaloCleaned_v*",
#2017
"HLT_Photon200_v*",
"HLT_Photon300_NoHE_v*",
"HLT_PFMET140_PFMHT140_IDTight_v*",
"HLT_PFMET250_HBHECleaned_v*",
"HLT_PFMET300_HBHECleaned_v*"
)
hltMonopole.throw = False
hltMonopole.andOr = True
Expand Down
Expand Up @@ -18,7 +18,7 @@


import RecoLocalCalo.HcalRecAlgos.RemoveAddSevLevel as HcalRemoveAddSevLevel
HcalRemoveAddSevLevel.AddFlag(hcalRecAlgos,"HFDigiTime",11)
HcalRemoveAddSevLevel.AddFlag(hcalRecAlgos,"HFDigiTime",11,verbose=False)
HcalRemoveAddSevLevel.AddFlag(hcalRecAlgos,"HBHEFlatNoise",12)
HcalRemoveAddSevLevel.AddFlag(hcalRecAlgos,"HBHENegativeNoise",12)

Expand Down
10 changes: 10 additions & 0 deletions Configuration/StandardSequences/python/Skims_cff.py
Expand Up @@ -23,6 +23,16 @@ def documentSkims():
print 'possible cmsDriver options for skimming:'
print 'SKIM:'+'+'.join(listOfOptions)

def getSkimDataTier(skimname):
import Configuration.StandardSequences.Skims_cff as Skims

for skim in Skims.__dict__:
skimstream = getattr(Skims,skim)
if (not isinstance(skimstream,cms.FilteredStream)): continue

if skimname == skimstream['name']:
return skimstream['dataTier']
return None

### DPG skims ###
from DPGAnalysis.Skims.Skims_DPG_cff import *
Expand Down
2 changes: 1 addition & 1 deletion DPGAnalysis/SiStripTools/bin/OccupancyPlotMacros.cc
Expand Up @@ -463,7 +463,7 @@ TCanvas* drawMap(const char* cname, const TH1* hval, const TProfile* averadius,

for(int i=1;i<hval->GetNbinsX();++i) {

if(averadius->GetBinEntries(i)*avez->GetBinEntries(i)) {
if( (averadius->GetBinEntries(i)*avez->GetBinEntries(i)) != 0) {

double dz = -1.;
double dr = -1.;
Expand Down
40 changes: 25 additions & 15 deletions DQM/SiPixelPhase1Summary/src/SiPixelPhase1Summary.cc
Expand Up @@ -213,7 +213,7 @@ void SiPixelPhase1Summary::fillSummaries(DQMStore::IBooker & iBooker, DQMStore::
continue; // Ignore non-existing MEs, as this can cause the whole thing to crash
}

if (!summaryMap_[name]){
if (summaryMap_[name]==nullptr){
edm::LogWarning("SiPixelPhase1Summary") << "Summary map " << name << " is not available !!";
continue; // Based on reported errors it seems possible that we're trying to access a non-existant summary map, so if the map doesn't exist but we're trying to access it here we'll skip it instead.
}
Expand All @@ -226,15 +226,15 @@ void SiPixelPhase1Summary::fillSummaries(DQMStore::IBooker & iBooker, DQMStore::
float sumOfNonNegBins = 0.;
//Now we will use the other summary maps to create the overall map.
for (int i = 0; i < 12; i++){ // !??!?!? xAxisLabels_.size() ?!?!
if (!summaryMap_["Grand"]){
if (summaryMap_["Grand"]==nullptr){
edm::LogWarning("SiPixelPhase1Summary") << "Grand summary does not exist!";
break;
}
for (int j = 0; j < 4; j++){ // !??!?!? yAxisLabels_.size() ?!?!?!
summaryMap_["Grand"]->setBinContent(i+1,j+1,1); // This resets the map to be good. We only then set it to 0 if there has been a problem in one of the other summaries.
for (auto const mapInfo: summaryPlotName_){ //Check summary maps
auto name = mapInfo.first;
if (!summaryMap_[name]){
if (summaryMap_[name]==nullptr){
edm::LogWarning("SiPixelPhase1Summary") << "Summary " << name << " does not exist!";
continue;
}
Expand All @@ -255,7 +255,6 @@ void SiPixelPhase1Summary::fillTrendPlots(DQMStore::IBooker & iBooker, DQMStore:
// If we're running in online mode and the lumi section is not modulo 10, return. Offline running always uses lumiSec=0, so it will pass this test.
if (lumiSec%10 != 0) return;

std::ostringstream histNameStream;
std::string histName;


Expand All @@ -265,27 +264,21 @@ void SiPixelPhase1Summary::fillTrendPlots(DQMStore::IBooker & iBooker, DQMStore:
std::vector<int> hiEffROCs(trendOrder.size(),0);
std::vector<int> nRocsPerTrend = {1536,3584,5632,8192,4224,6528};
std::vector<string> trendNames = {};
string name = "";

for (auto it : {1,2,3,4}) {
histNameStream.str("");
histNameStream << "PXBarrel/digi_occupancy_per_SignedModuleCoord_per_SignedLadderCoord_PXLayer_" << it;
histName = histNameStream.str();
histName = "PXBarrel/digi_occupancy_per_SignedModuleCoord_per_SignedLadderCoord_PXLayer_" + std::to_string(it);
trendNames.push_back(histName);
}
for (auto it : {1,2}) {
histNameStream.str("");
histNameStream << "PXForward/digi_occupancy_per_SignedDiskCoord_per_SignedBladePanelCoord_PXRing_" << it;;
histName = histNameStream.str();
histName = "PXForward/digi_occupancy_per_SignedDiskCoord_per_SignedBladePanelCoord_PXRing_" + std::to_string(it);
trendNames.push_back(histName);
}
//Loop over layers. This will also do the rings, but we'll skip the ring calculation for
for (unsigned int trendIt = 0; trendIt < trendOrder.size(); trendIt++){
iGetter.cd();
histNameStream.str("");
histNameStream << "PixelPhase1/Phase1_MechanicalView/" << trendNames[trendIt];
histName = histNameStream.str();
histName = "PixelPhase1/Phase1_MechanicalView/" + trendNames[trendIt];
MonitorElement * tempLayerME = iGetter.get(histName);
if (!tempLayerME) continue;
if (tempLayerME==nullptr) continue;
float lowEffValue = 0.25 * (tempLayerME->getTH1()->Integral() / nRocsPerTrend[trendIt]);
for (int i=1; i<=tempLayerME->getTH1()->GetXaxis()->GetNbins(); i++){
for (int j=1; j<=tempLayerME->getTH1()->GetYaxis()->GetNbins(); j++){
Expand All @@ -311,6 +304,23 @@ void SiPixelPhase1Summary::fillTrendPlots(DQMStore::IBooker & iBooker, DQMStore:
}
}

if (!runOnEndLumi_) return; // The following only occurs in the online
//Reset some MEs every 10LS here
for (auto it : {1,2,3,4}) { //PXBarrel
histName = "PixelPhase1/Phase1_MechanicalView/PXBarrel/clusterposition_zphi_PXLayer_" +std::to_string(it);
MonitorElement * toReset = iGetter.get(histName);
if (toReset!=nullptr) {
toReset->Reset();
}
}
for (auto it : {-3,-2,-1,1,2,3}){ //PXForward
histName = "PixelPhase1/Phase1_MechanicalView/PXForward/clusterposition_xy_PXDisk_" + std::to_string(it);
MonitorElement * toReset = iGetter.get(histName);
if (toReset!=nullptr) {
toReset->Reset();
}
}

}

//define this as a plug-in
Expand Down
4 changes: 2 additions & 2 deletions DQM/TrackerCommon/bin/TrackerRunCertification.C
Expand Up @@ -954,7 +954,7 @@ void certifyRun()
Bool_t flagDet( fCertificates_[ "SiStripReportSummary" ] > minGood_ );
Bool_t flagDAQ( fCertificates_[ "SiStripDAQSummary" ] == ( Double_t )EXCL || fCertificates_[ "SiStripDAQSummary" ] > minGood_ );
Bool_t flagDCS( fCertificates_[ "SiStripDCSSummary" ] == ( Double_t )EXCL || fCertificates_[ "SiStripDCSSummary" ] == ( Double_t )GOOD );
Bool_t flagDQM( flagDet * flagDAQ * flagDCS );
Bool_t flagDQM( (flagDet * flagDAQ * flagDCS) != 0 );
Bool_t flagCert( iFlagsRRTracker_[ sSubSys_[ SiStrip ] ] );
// iFlags[ sSubSys_[ SiStrip ] ] = ( Int_t )( flagDQM * bSiStripOn_ * flagCert );
iFlags[ sSubSys_[ SiStrip ] ] = ( Int_t )( flagDQM * flagCert );
Expand Down Expand Up @@ -1019,7 +1019,7 @@ void certifyRun()
Bool_t flagChi2( fCertificates_[ "ReportTrackChi2" ] > maxBad_ );
Bool_t flagRate( fCertificates_[ "ReportTrackRate" ] > maxBad_ );
Bool_t flagRecHits( fCertificates_[ "ReportTrackRecHits" ] > maxBad_ );
flagDQM = flagChi2 * flagRate * flagRecHits;
flagDQM = (flagChi2 * flagRate * flagRecHits) != 0 ;
if ( ! flagChi2 ) comments.push_back( "Chi2/DoF too low" );
if ( ! flagRate ) comments.push_back( "Track rate too low" );
if ( ! flagRecHits ) comments.push_back( "Too few RecHits" );
Expand Down
4 changes: 1 addition & 3 deletions DQMOffline/Trigger/plugins/TopMonitor.cc
Expand Up @@ -62,7 +62,6 @@ TopMonitor::TopMonitor( const edm::ParameterSet& iConfig ) :
, metSelection_ ( iConfig.getParameter<std::string>("metSelection") )
, jetSelection_ ( iConfig.getParameter<std::string>("jetSelection") )
, eleSelection_ ( iConfig.getParameter<std::string>("eleSelection") )
, eleSelection1_ ( iConfig.getParameter<std::string>("eleSelection1") )
, muoSelection_ ( iConfig.getParameter<std::string>("muoSelection") )
, HTdefinition_ ( iConfig.getParameter<std::string>("HTdefinition") )
, vtxSelection_ ( iConfig.getParameter<std::string>("vertexSelection") )
Expand Down Expand Up @@ -590,7 +589,7 @@ void TopMonitor::analyze(edm::Event const& iEvent, edm::EventSetup const& iSetup
std::vector<reco::GsfElectron> electrons;
if ( eleHandle->size() < nelectrons_ ) return;
for ( auto const & e : *eleHandle ) {
if ( eleSelection_( e ) || eleSelection1_( e ) ) electrons.push_back(e);
if (eleSelection_(e)) electrons.push_back(e);
//Suvankar
if ( usePVcuts_ &&
(std::fabs(e.gsfTrack()->dxy(pv->position())) >= lepPVcuts_.dxy || std::fabs(e.gsfTrack()->dz(pv->position())) >= lepPVcuts_.dz) ) continue;
Expand Down Expand Up @@ -960,7 +959,6 @@ void TopMonitor::fillDescriptions(edm::ConfigurationDescriptions & descriptions)
desc.add<std::string>("metSelection", "pt > 0");
desc.add<std::string>("jetSelection", "pt > 0");
desc.add<std::string>("eleSelection", "pt > 0");
desc.add<std::string>("eleSelection1", "pt > 0");
desc.add<std::string>("muoSelection", "pt > 0");
desc.add<std::string>("HTdefinition", "pt > 0");
//Suvankar
Expand Down

0 comments on commit 62bb99a

Please sign in to comment.