Skip to content

Commit

Permalink
Merged CMSSW_7_5_X from repository cms-sw
Browse files Browse the repository at this point in the history
  • Loading branch information
perrotta committed May 20, 2015
2 parents 4c2fa6e + 83151f6 commit 1c1719f
Show file tree
Hide file tree
Showing 14 changed files with 168 additions and 75 deletions.
2 changes: 1 addition & 1 deletion CommonTools/Utils/src/ExpressionVar.cc
Expand Up @@ -74,7 +74,7 @@ bool
ExpressionVar::makeStorage(edm::ObjectWithDict& obj,
const edm::TypeWithDict& retType)
{
static edm::TypeWithDict tVoid(edm::TypeWithDict::byName("void"));
static const edm::TypeWithDict tVoid(edm::TypeWithDict::byName("void"));
bool ret = false;
if (retType == tVoid) {
obj = edm::ObjectWithDict::byType(tVoid);
Expand Down
9 changes: 7 additions & 2 deletions Configuration/PyReleaseValidation/python/relval_standard.py
Expand Up @@ -239,14 +239,19 @@
workflows[1354] = ['WpToENu_M-2000_13TeV', ['WpToENu_M-2000_13TeV','DIGIUP15','RECOUP15','HARVESTUP15','MINIAODMCUP15']]

### HI test ###
workflows[140] = ['',['HydjetQ_MinBias_2760GeV','DIGIHI','RECOHI','HARVESTHI']]

### Run I cond.
workflows[140] = ['',['HydjetQ_MinBias_2760GeV','DIGIHI2011','RECOHI2011','HARVESTHI2011']]
workflows[140.1] = ['',['QCD_Pt_80_120_13_HI','DIGIHI','RECOHI','HARVESTHI']]
workflows[140.2] = ['',['PhotonJets_Pt_10_13_HI','DIGIHI','RECOHI','HARVESTHI']]
workflows[140.3] = ['',['ZMM_13_HI','DIGIHI','RECOHI','HARVESTHI']]
workflows[140.4] = ['',['ZEEMM_13_HI','DIGIHI','RECOHI','HARVESTHI']]

# legacy: 141 => B0; 143 => B3 ; 144 => B5
# legacy: 141 => B0; 143 => B3 ; 144 => B5
#workflows[142] = ['',['HydjetQ_B8_2760GeV','DIGIHI','RECOHI','HARVESTHI','MINIAODMCUP15HI']]

### Run II cond.
workflows[145] = ['',['HydjetQ_MinBias_5020GeV','DIGIHI','RECOHI','HARVESTHI']]

### pPb test ###
workflows[280]= ['',['AMPT_PPb_5020GeV_MinimumBias','DIGI','RECO','HARVEST']]
25 changes: 18 additions & 7 deletions Configuration/PyReleaseValidation/python/relval_steps.py
Expand Up @@ -565,9 +565,15 @@ def genS(fragment,howMuch):
U80by1={'--relval': '80,1'}

hiAlca = {'--conditions':'auto:run2_mc_HIon', '--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_HI'}
hiAlca2011 = {'--conditions':'auto:run1_mc_hi', '--customise':'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_HI'}

hiDefaults2011=merge([hiAlca2011,{'--scenario':'HeavyIons','-n':2,'--beamspot':'RealisticHI2011Collision'}])
hiDefaults=merge([hiAlca,{'--scenario':'HeavyIons','-n':2,'--beamspot':'RealisticHI2011Collision'}])

steps['HydjetQ_MinBias_2760GeV']=merge([{'-n':1},hiDefaults,genS('Hydjet_Quenched_MinBias_2760GeV_cfi',U2000by1)])
steps['HydjetQ_MinBias_5020GeV']=merge([{'-n':1},hiDefaults,genS('Hydjet_Quenched_MinBias_5020GeV_cfi',U2000by1)])
steps['HydjetQ_MinBias_5020GeVINPUT']={'INPUT':InputInfo(dataSet='/RelValHydjetQ_MinBias_5020GeV/%s/GEN-SIM'%(baseDataSetRelease[1],),location='STD',split=5)}

steps['HydjetQ_MinBias_2760GeV']=merge([{'-n':1},hiDefaults2011,genS('Hydjet_Quenched_MinBias_2760GeV_cfi',U2000by1)])
steps['HydjetQ_MinBias_2760GeVINPUT']={'INPUT':InputInfo(dataSet='/RelValHydjetQ_MinBias_2760GeV/%s/GEN-SIM'%(baseDataSetRelease[1],),location='STD',split=5)}
steps['HydjetQ_MinBias_2760GeV_UP15']=merge([{'-n':1},hiDefaults,genS('Hydjet_Quenched_MinBias_2760GeV_cfi',U2000by1)])
steps['HydjetQ_MinBias_2760GeV_UP15INPUT']={'INPUT':InputInfo(dataSet='/RelValHydjetQ_MinBias_2760GeV/%s/GEN-SIM'%(baseDataSetRelease[1],),location='STD',split=5)}
Expand Down Expand Up @@ -842,7 +848,8 @@ def genvalid(fragment,d,suffix='all',fi='',dataSet=''):
#steps['RESIMDIGI']=merge([{'-s':'reGEN,reSIM,DIGI,L1,DIGI2RAW,HLT:@fake,RAW2DIGI,L1Reco','-n':10,'--restoreRNDSeeds':'','--process':'HLT'},steps['DIGI']])


steps['DIGIHI']=merge([{'--conditions':'auto:run2_mc_HIon', '-s':'DIGI:pdigi_valid,L1,DIGI2RAW,HLT:HIon,RAW2DIGI,L1Reco', '-n':2}, hiDefaults, step2Upg2015Defaults])
steps['DIGIHI']=merge([{'-s':'DIGI:pdigi_valid,L1,DIGI2RAW,HLT:HIon,RAW2DIGI,L1Reco'}, hiDefaults, step2Upg2015Defaults])
steps['DIGIHI2011']=merge([{'-s':'DIGI:pdigi_valid,L1,DIGI2RAW,HLT:HIon,RAW2DIGI,L1Reco'}, hiDefaults2011, step2Defaults])



Expand Down Expand Up @@ -1051,6 +1058,9 @@ def genvalid(fragment,d,suffix='all',fi='',dataSet=''):
steps['RECOUP15_ID']=merge([{'--hltProcess':'HLT2'},steps['RECOUP15']])

steps['RECOHI']=merge([hiDefaults,{'-s':'RAW2DIGI,L1Reco,RECO,VALIDATION,DQM'},step3Up2015Defaults])
steps['RECOHI2011']=merge([hiDefaults2011,{'-s':'RAW2DIGI,L1Reco,RECO,VALIDATION,DQM'},step3Defaults])


#wmsplit['RECOHI']=5

steps['DIGIHISt3']=steps['DIGIHI']
Expand Down Expand Up @@ -1183,13 +1193,14 @@ def genvalid(fragment,d,suffix='all',fi='',dataSet=''):
'--mc':'',
'--filetype':'DQM',
'--scenario':'pp'}
steps['HARVESTHI']={'-s':'HARVESTING:validationHarvesting+dqmHarvesting',
'--conditions':'auto:run2_mc_HIon',
steps['HARVESTHI']=merge([hiDefaults,{'-s':'HARVESTING:validationHarvesting+dqmHarvesting',
'--magField' : '38T_PostLS1',
'--mc':'',
'--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1_HI',
'--filetype':'DQM',
'--scenario':'HeavyIons'}
'--filetype':'DQM'}])
steps['HARVESTHI2011']=merge([hiDefaults2011,{'-s':'HARVESTING:validationHarvesting+dqmHarvesting',
'--magField' : '38T_PostLS1',
'--mc':'',
'--filetype':'DQM'}])
steps['HARVESTUP15']={'-s':'HARVESTING:validationHarvesting+dqmHarvesting', # todo: remove UP from label
'--conditions':'auto:run2_mc',
'--magField' : '38T_PostLS1',
Expand Down
7 changes: 4 additions & 3 deletions FWCore/Framework/bin/cmsRun.cpp
Expand Up @@ -54,6 +54,7 @@ static char const* const kHelpOpt = "help";
static char const* const kHelpCommandOpt = "help,h";
static char const* const kStrictOpt = "strict";

constexpr unsigned int kDefaultSizeOfStackForThreadsInKB = 10*1024; //10MB
// -----------------------------------------------
namespace {
class EventProcessorWithSentry {
Expand Down Expand Up @@ -235,7 +236,7 @@ int main(int argc, char* argv[]) {
if(vm.count(kNumberOfThreadsOpt)) {
setNThreadsOnCommandLine=true;
unsigned int nThreads = vm[kNumberOfThreadsOpt].as<unsigned int>();
unsigned int stackSize=0;
unsigned int stackSize=kDefaultSizeOfStackForThreadsInKB;
if(vm.count(kSizeOfStackForThreadOpt)) {
stackSize=vm[kSizeOfStackForThreadOpt].as<unsigned int>();
}
Expand Down Expand Up @@ -295,8 +296,8 @@ int main(int argc, char* argv[]) {
auto const& ops = pset->getUntrackedParameterSet("options");
if(ops.existsAs<unsigned int>("numberOfThreads",false)) {
unsigned int nThreads = ops.getUntrackedParameter<unsigned int>("numberOfThreads");
unsigned int stackSize=0;
if(ops.existsAs<unsigned int>("sizeOfStackForThreadsInKB",0)) {
unsigned int stackSize=kDefaultSizeOfStackForThreadsInKB;
if(ops.existsAs<unsigned int>("sizeOfStackForThreadsInKB",false)) {
stackSize = ops.getUntrackedParameter<unsigned int>("sizeOfStackForThreadsInKB");
}
const auto nThreadsUsed = setNThreads(nThreads,stackSize,tsiPtr);
Expand Down
8 changes: 4 additions & 4 deletions HLTrigger/JetMET/plugins/PixelJetPuId.cc
Expand Up @@ -24,7 +24,7 @@

// user include files
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDProducer.h"
#include "FWCore/Framework/interface/global/EDProducer.h"

#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
Expand All @@ -51,15 +51,15 @@
// class declaration
//

class PixelJetPuId : public edm::EDProducer {
class PixelJetPuId : public edm::global::EDProducer <>{
public:
PixelJetPuId(const edm::ParameterSet&);
virtual ~PixelJetPuId();

static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

private:
virtual void produce(edm::Event&, const edm::EventSetup&);
virtual void produce(edm::StreamID sid, edm::Event&, const edm::EventSetup&) const override;


// ----------member data ---------------------------
Expand Down Expand Up @@ -139,7 +139,7 @@ PixelJetPuId::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
//

// ------------ method called on each new Event ------------
void PixelJetPuId::produce(edm::Event& iEvent, const edm::EventSetup& iSetup)
void PixelJetPuId::produce(edm::StreamID sid, edm::Event& iEvent, const edm::EventSetup& iSetup) const
{
using namespace edm;
std::auto_ptr<std::vector<reco::CaloJet> > pOut(new std::vector<reco::CaloJet> );
Expand Down
1 change: 1 addition & 0 deletions IOPool/Input/src/RootFile.h
Expand Up @@ -138,6 +138,7 @@ namespace edm {
indexIntoFileIter_ = indexIntoFileEnd_;
}

bool skipEntries(unsigned int& offset) {return eventTree_.skipEntries(offset);}
bool skipEvents(int& offset);
bool goToEvent(EventID const& eventID);
bool nextEventEntry() {return eventTree_.next();}
Expand Down
22 changes: 10 additions & 12 deletions IOPool/Input/src/RootInputFileSequence.cc
Expand Up @@ -703,19 +703,17 @@ namespace edm {

void
RootInputFileSequence::skipEntries(unsigned int offset) {
while(offset > 0) {
while(offset > 0 && rootFile_->nextEventEntry()) {
--offset;
}
if(offset > 0) {
++fileIter_;
if(fileIter_ == fileIterEnd_) {
fileIter_ = fileIterBegin_;
}
initFile(false);
assert(rootFile_);
rootFile_->setAtEventEntry(IndexIntoFile::invalidEntry);
// offset is decremented by the number of events actually skipped.
bool completed = rootFile_->skipEntries(offset);
while(!completed) {
++fileIter_;
if(fileIter_ == fileIterEnd_) {
fileIter_ = fileIterBegin_;
}
initFile(false);
assert(rootFile_);
rootFile_->setAtEventEntry(IndexIntoFile::invalidEntry);
completed = rootFile_->skipEntries(offset);
}
}

Expand Down
16 changes: 16 additions & 0 deletions IOPool/Input/src/RootTree.cc
Expand Up @@ -368,6 +368,22 @@ namespace edm {
}
}

bool
RootTree::skipEntries(unsigned int& offset) {
entryNumber_ += offset;
bool retval = (entryNumber_ < entries_);
if(retval) {
offset = 0;
} else {
// Not enough entries in the file to skip.
// The +1 is needed because entryNumber_ is -1 at the initialization of the tree, not 0.
long long overshoot = entryNumber_ + 1 - entries_;
entryNumber_ = entries_;
offset = overshoot;
}
return retval;
}

void
RootTree::startTraining() {
if (cacheSize_ == 0) {
Expand Down
1 change: 1 addition & 0 deletions IOPool/Input/src/RootTree.h
Expand Up @@ -90,6 +90,7 @@ namespace edm {
bool current(EntryNumber entry) const {return entry < entries_ && entry >= 0;}
void rewind() {entryNumber_ = 0;}
void close();
bool skipEntries(unsigned int& offset);
EntryNumber const& entryNumber() const {return entryNumber_;}
EntryNumber const& entryNumberForIndex(unsigned int index) const;
EntryNumber const& entries() const {return entries_;}
Expand Down
Expand Up @@ -60,6 +60,10 @@ void ElectronMcSignalPostValidator::finalize( DQMStore::IBooker & iBooker, DQMSt
}/**/

// profiles from 2D histos
profileX(iBooker, iGetter, "scl_EoEtrueVsrecOfflineVertices","E/Etrue vs number of primary vertices","N_{primary vertices}","E/E_{true}");
profileX(iBooker, iGetter, "scl_EoEtrueVsrecOfflineVertices_barrel","E/Etrue vs number of primary vertices , barrel","N_{primary vertices}","E/E_{true}");
profileX(iBooker, iGetter, "scl_EoEtrueVsrecOfflineVertices_endcaps","E/Etrue vs number of primary vertices , endcaps","N_{primary vertices}","E/E_{true}");

profileX(iBooker, iGetter, "PoPtrueVsEta","mean ele momentum / gen momentum vs eta","#eta","<P/P_{gen}>");
profileX(iBooker, iGetter, "PoPtrueVsPhi","mean ele momentum / gen momentum vs phi","#phi (rad)","<P/P_{gen}>");
profileX(iBooker, iGetter, "EoEtruePfVsEg","mean pflow sc energy / true energy vs e/g sc energy","E/E_{gen} (e/g)","<E/E_{gen}> (pflow)") ;
Expand Down

0 comments on commit 1c1719f

Please sign in to comment.