From 02b7d0a2abf3d1cc9f5e9e79fd4f779c387d0d82 Mon Sep 17 00:00:00 2001 From: Srecko Morovic Date: Mon, 4 Dec 2017 22:29:53 +0100 Subject: [PATCH 01/18] micro-merging in output module was not thread safe because of calls to EvFDaqDirector service which causes races when EoL runs in paralel. Fixed by moving file locking to the output module. This mechanism is however deprecated and not used by default in production hlt where hltd enforces merging within the micro-merging script. --- .../Utilities/interface/EvFDaqDirector.h | 6 ---- .../plugins/RecoEventOutputModuleForFU.h | 36 ++++++++++++++++--- EventFilter/Utilities/src/EvFDaqDirector.cc | 27 +------------- 3 files changed, 33 insertions(+), 36 deletions(-) diff --git a/EventFilter/Utilities/interface/EvFDaqDirector.h b/EventFilter/Utilities/interface/EvFDaqDirector.h index 624225dce14bb..bb18781905868 100644 --- a/EventFilter/Utilities/interface/EvFDaqDirector.h +++ b/EventFilter/Utilities/interface/EvFDaqDirector.h @@ -104,8 +104,6 @@ namespace evf{ FileStatus updateFuLock(unsigned int& ls, std::string& nextFile, uint32_t& fsize, uint64_t& lockWaitTime); void tryInitializeFuLockFile(); unsigned int getRunNumber() const { return run_; } - FILE * maybeCreateAndLockFileHeadForStream(unsigned int ls, std::string &stream); - void unlockAndCloseMergeStream(); void lockInitLock(); void unlockInitLock(); void setFMS(evf::FastMonitoringService* fms) {fms_=fms;} @@ -164,7 +162,6 @@ namespace evf{ int bu_readlock_fd_; int bu_writelock_fd_; int fu_readwritelock_fd_; - int data_readwrite_fd_; int fulocal_rwlock_fd_; int fulocal_rwlock_fd2_; @@ -173,7 +170,6 @@ namespace evf{ FILE * fu_rw_lock_stream; FILE * bu_w_monitor_stream; FILE * bu_t_monitor_stream; - FILE * data_rw_stream; DirManager dirManager_; @@ -185,8 +181,6 @@ namespace evf{ struct flock bu_r_fulk; struct flock fu_rw_flk; struct flock fu_rw_fulk; - struct flock data_rw_flk; - struct flock data_rw_fulk; //struct flock fulocal_rw_flk; //struct flock fulocal_rw_fulk; //struct flock fulocal_rw_flk2; diff --git a/EventFilter/Utilities/plugins/RecoEventOutputModuleForFU.h b/EventFilter/Utilities/plugins/RecoEventOutputModuleForFU.h index fa3fca1bab617..9993111b828ab 100644 --- a/EventFilter/Utilities/plugins/RecoEventOutputModuleForFU.h +++ b/EventFilter/Utilities/plugins/RecoEventOutputModuleForFU.h @@ -20,6 +20,18 @@ namespace evf { + + namespace { + struct flock make_flock(short type, short whence, off_t start, off_t len, pid_t pid) + { +#ifdef __APPLE__ + return {start, len, pid, type, whence}; +#else + return {type, whence, start, len, pid}; +#endif + } + } + template class RecoEventOutputModuleForFU : public edm::StreamerOutputModuleBase { @@ -68,7 +80,8 @@ namespace evf { jsoncollector::DataPointDefinition outJsonDef_; unsigned char* outBuf_=nullptr; bool readAdler32Check_=false; - + struct flock data_rw_flk; + struct flock data_rw_fulk; }; //end-of-class-def @@ -89,7 +102,10 @@ namespace evf { transferDestination_(), mergeType_(), hltErrorEvents_(0), - outBuf_(new unsigned char[1024*1024]) + outBuf_(new unsigned char[1024*1024]), + data_rw_flk( evf::make_flock( F_WRLCK, SEEK_SET, 0, 0, getpid() )), + data_rw_fulk( evf:: make_flock( F_UNLCK, SEEK_SET, 0, 0, getpid() )) + { //replace hltOutoputA with stream if the HLT menu uses this convention std::string testPrefix="hltOutput"; @@ -304,7 +320,15 @@ namespace evf { //lock struct stat istat; if (!edm::Service()->microMergeDisabled()) { - FILE *des = edm::Service()->maybeCreateAndLockFileHeadForStream(ls.luminosityBlock(),stream_label_); + + //create if does not exist then lock the merge destination file + FILE *des = fopen(edm::Service()->getMergedDatFilePath(ls.luminosityBlock(),stream_label_).c_str(), "a"); //open stream for appending + int data_readwrite_fd_ = fileno(des); + if (data_readwrite_fd_ == -1) + edm::LogError("RecoEventOutputModuleForFU") << "problem with creating filedesc for datamerge " << strerror(errno); + else + LogDebug("RecoEventOutputModuleForFU") << "creating filedesc for datamerge -: " << data_readwrite_fd_; + fcntl(data_readwrite_fd_, F_SETLKW, &data_rw_flk); std::string deschecksum = edm::Service()->getMergedDatChecksumFilePath(ls.luminosityBlock(), stream_label_); @@ -348,7 +372,11 @@ namespace evf { fprintf(cf,"%u",mergedAdler32); fclose(cf); - edm::Service()->unlockAndCloseMergeStream(); + //unlock and close output file + fflush(des); + fcntl(data_readwrite_fd_, F_SETLKW, &data_rw_fulk); + fclose(des); + fclose(src); if (readAdler32Check_ && ((adlerb << 16) | adlera) != fileAdler32_.value()) { diff --git a/EventFilter/Utilities/src/EvFDaqDirector.cc b/EventFilter/Utilities/src/EvFDaqDirector.cc index 7a9de7e7ad432..fbbdb74024a7f 100644 --- a/EventFilter/Utilities/src/EvFDaqDirector.cc +++ b/EventFilter/Utilities/src/EvFDaqDirector.cc @@ -62,7 +62,6 @@ namespace evf { bu_readlock_fd_(-1), bu_writelock_fd_(-1), fu_readwritelock_fd_(-1), - data_readwrite_fd_(-1), fulocal_rwlock_fd_(-1), fulocal_rwlock_fd2_(-1), @@ -71,7 +70,6 @@ namespace evf { fu_rw_lock_stream(nullptr), //bu_w_monitor_stream(0), //bu_t_monitor_stream(0), - data_rw_stream(nullptr), dirManager_(base_dir_), @@ -82,9 +80,7 @@ namespace evf { bu_w_fulk( make_flock( F_UNLCK, SEEK_SET, 0, 0, 0 )), bu_r_fulk( make_flock( F_UNLCK, SEEK_SET, 0, 0, 0 )), fu_rw_flk( make_flock ( F_WRLCK, SEEK_SET, 0, 0, getpid() )), - fu_rw_fulk( make_flock( F_UNLCK, SEEK_SET, 0, 0, getpid() )), - data_rw_flk( make_flock ( F_WRLCK, SEEK_SET, 0, 0, getpid() )), - data_rw_fulk( make_flock( F_UNLCK, SEEK_SET, 0, 0, getpid() )) + fu_rw_fulk( make_flock( F_UNLCK, SEEK_SET, 0, 0, getpid() )) //fulocal_rw_flk( make_flock( F_WRLCK, SEEK_SET, 0, 0, getpid() )), //fulocal_rw_fulk( make_flock( F_UNLCK, SEEK_SET, 0, 0, getpid() )), //fulocal_rw_flk2( make_flock( F_WRLCK, SEEK_SET, 0, 0, getpid() )), @@ -820,27 +816,6 @@ namespace evf { fu_rw_lock_stream = fdopen(fu_readwritelock_fd_, "r+"); } - //create if does not exist then lock the merge destination file - FILE *EvFDaqDirector::maybeCreateAndLockFileHeadForStream(unsigned int ls, std::string &stream) { - data_rw_stream = fopen(getMergedDatFilePath(ls,stream).c_str(), "a"); //open stream for appending - data_readwrite_fd_ = fileno(data_rw_stream); - if (data_readwrite_fd_ == -1) - edm::LogError("EvFDaqDirector") << "problem with creating filedesc for datamerge " - << strerror(errno); - else - LogDebug("EvFDaqDirector") << "creating filedesc for datamerge -: " - << data_readwrite_fd_; - fcntl(data_readwrite_fd_, F_SETLKW, &data_rw_flk); - - return data_rw_stream; - } - - void EvFDaqDirector::unlockAndCloseMergeStream() { - fflush(data_rw_stream); - fcntl(data_readwrite_fd_, F_SETLKW, &data_rw_fulk); - fclose(data_rw_stream); - } - void EvFDaqDirector::lockInitLock() { pthread_mutex_lock(&init_lock_); } From c771ed409c65cde08be1ed984a69fd5d453af468 Mon Sep 17 00:00:00 2001 From: Srecko Morovic Date: Tue, 5 Dec 2017 22:37:38 +0100 Subject: [PATCH 02/18] make_flock shared by output module and DAQ director --- .../Utilities/interface/EvFDaqDirector.h | 8 ++---- .../plugins/RecoEventOutputModuleForFU.h | 17 +++--------- EventFilter/Utilities/src/EvFDaqDirector.cc | 26 +++++++------------ 3 files changed, 15 insertions(+), 36 deletions(-) diff --git a/EventFilter/Utilities/interface/EvFDaqDirector.h b/EventFilter/Utilities/interface/EvFDaqDirector.h index bb18781905868..694f40c5f35f6 100644 --- a/EventFilter/Utilities/interface/EvFDaqDirector.h +++ b/EventFilter/Utilities/interface/EvFDaqDirector.h @@ -18,8 +18,8 @@ #include //system headers -//#include #include +#include #include #include #include @@ -125,7 +125,7 @@ namespace evf{ std::string getStreamMergeType(std::string const& stream, MergeType defaultType); bool emptyLumisectionMode() const {return emptyLumisectionMode_;} bool microMergeDisabled() const {return microMergeDisabled_;} - + static struct flock make_flock(short type, short whence, off_t start, off_t len, pid_t pid); private: //bool bulock(); @@ -181,10 +181,6 @@ namespace evf{ struct flock bu_r_fulk; struct flock fu_rw_flk; struct flock fu_rw_fulk; - //struct flock fulocal_rw_flk; - //struct flock fulocal_rw_fulk; - //struct flock fulocal_rw_flk2; - //struct flock fulocal_rw_fulk2; evf::FastMonitoringService * fms_ = nullptr; diff --git a/EventFilter/Utilities/plugins/RecoEventOutputModuleForFU.h b/EventFilter/Utilities/plugins/RecoEventOutputModuleForFU.h index 9993111b828ab..973e87d60bbe4 100644 --- a/EventFilter/Utilities/plugins/RecoEventOutputModuleForFU.h +++ b/EventFilter/Utilities/plugins/RecoEventOutputModuleForFU.h @@ -21,17 +21,6 @@ namespace evf { - namespace { - struct flock make_flock(short type, short whence, off_t start, off_t len, pid_t pid) - { -#ifdef __APPLE__ - return {start, len, pid, type, whence}; -#else - return {type, whence, start, len, pid}; -#endif - } - } - template class RecoEventOutputModuleForFU : public edm::StreamerOutputModuleBase { @@ -103,8 +92,8 @@ namespace evf { mergeType_(), hltErrorEvents_(0), outBuf_(new unsigned char[1024*1024]), - data_rw_flk( evf::make_flock( F_WRLCK, SEEK_SET, 0, 0, getpid() )), - data_rw_fulk( evf:: make_flock( F_UNLCK, SEEK_SET, 0, 0, getpid() )) + data_rw_flk( evf::EvFDaqDirector::make_flock( F_WRLCK, SEEK_SET, 0, 0, getpid() )), + data_rw_fulk( evf::EvFDaqDirector::make_flock( F_UNLCK, SEEK_SET, 0, 0, getpid() )) { //replace hltOutoputA with stream if the HLT menu uses this convention @@ -167,7 +156,7 @@ namespace evf { std::string outJsonDefName = ss.str(); edm::Service()->lockInitLock(); - struct stat fstat; + struct stat fstat; if (stat (outJsonDefName.c_str(), &fstat) != 0) { //file does not exist LogDebug("RecoEventOutputModuleForFU") << "writing output definition file -: " << outJsonDefName; std::string content; diff --git a/EventFilter/Utilities/src/EvFDaqDirector.cc b/EventFilter/Utilities/src/EvFDaqDirector.cc index fbbdb74024a7f..ea15cc24c8c16 100644 --- a/EventFilter/Utilities/src/EvFDaqDirector.cc +++ b/EventFilter/Utilities/src/EvFDaqDirector.cc @@ -19,7 +19,6 @@ #include #include #include -#include #include #include @@ -33,17 +32,6 @@ namespace evf { //for enum MergeType const std::vector EvFDaqDirector::MergeTypeNames_ = {"","DAT","PB","JSNDATA"}; - namespace { - struct flock make_flock(short type, short whence, off_t start, off_t len, pid_t pid) - { -#ifdef __APPLE__ - return {start, len, pid, type, whence}; -#else - return {type, whence, start, len, pid}; -#endif - } - } - EvFDaqDirector::EvFDaqDirector(const edm::ParameterSet &pset, edm::ActivityRegistry& reg) : base_dir_(pset.getUntrackedParameter ("baseDir", ".")), @@ -81,10 +69,6 @@ namespace evf { bu_r_fulk( make_flock( F_UNLCK, SEEK_SET, 0, 0, 0 )), fu_rw_flk( make_flock ( F_WRLCK, SEEK_SET, 0, 0, getpid() )), fu_rw_fulk( make_flock( F_UNLCK, SEEK_SET, 0, 0, getpid() )) - //fulocal_rw_flk( make_flock( F_WRLCK, SEEK_SET, 0, 0, getpid() )), - //fulocal_rw_fulk( make_flock( F_UNLCK, SEEK_SET, 0, 0, getpid() )), - //fulocal_rw_flk2( make_flock( F_WRLCK, SEEK_SET, 0, 0, getpid() )), - //fulocal_rw_fulk2( make_flock( F_UNLCK, SEEK_SET, 0, 0, getpid() )) { reg.watchPreallocate(this, &EvFDaqDirector::preallocate); @@ -1011,4 +995,14 @@ namespace evf { close(proc_flag_fd); } + struct flock EvFDaqDirector::make_flock(short type, short whence, off_t start, off_t len, pid_t pid) + { +#ifdef __APPLE__ + return {start, len, pid, type, whence}; +#else + return {type, whence, start, len, pid}; +#endif + } + } + From 73bfe32b2773578ff3149b745283d00e4f2da85e Mon Sep 17 00:00:00 2001 From: Srecko Morovic Date: Tue, 5 Dec 2017 22:47:03 +0100 Subject: [PATCH 03/18] naming conventions --- .../plugins/RecoEventOutputModuleForFU.h | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/EventFilter/Utilities/plugins/RecoEventOutputModuleForFU.h b/EventFilter/Utilities/plugins/RecoEventOutputModuleForFU.h index 973e87d60bbe4..bb2ccbedeb912 100644 --- a/EventFilter/Utilities/plugins/RecoEventOutputModuleForFU.h +++ b/EventFilter/Utilities/plugins/RecoEventOutputModuleForFU.h @@ -50,7 +50,7 @@ namespace evf { private: std::auto_ptr c_; - std::string stream_label_; + std::string streamLabel_; boost::filesystem::path openDatFilePath_; boost::filesystem::path openDatChecksumFilePath_; jsoncollector::IntJ processed_; @@ -69,8 +69,8 @@ namespace evf { jsoncollector::DataPointDefinition outJsonDef_; unsigned char* outBuf_=nullptr; bool readAdler32Check_=false; - struct flock data_rw_flk; - struct flock data_rw_fulk; + struct flock dataRwFlk_; + struct flock dataRwFulk_; }; //end-of-class-def @@ -79,7 +79,7 @@ namespace evf { edm::one::OutputModuleBase::OutputModuleBase(ps), edm::StreamerOutputModuleBase(ps), c_(new Consumer(ps)), - stream_label_(ps.getParameter("@module_label")), + streamLabel_(ps.getParameter("@module_label")), processed_(0), accepted_(0), errorEvents_(0), @@ -92,23 +92,23 @@ namespace evf { mergeType_(), hltErrorEvents_(0), outBuf_(new unsigned char[1024*1024]), - data_rw_flk( evf::EvFDaqDirector::make_flock( F_WRLCK, SEEK_SET, 0, 0, getpid() )), - data_rw_fulk( evf::EvFDaqDirector::make_flock( F_UNLCK, SEEK_SET, 0, 0, getpid() )) + dataRwFlk_( evf::EvFDaqDirector::make_flock( F_WRLCK, SEEK_SET, 0, 0, getpid() )), + dataRwFulk_( evf::EvFDaqDirector::make_flock( F_UNLCK, SEEK_SET, 0, 0, getpid() )) { //replace hltOutoputA with stream if the HLT menu uses this convention std::string testPrefix="hltOutput"; - if (stream_label_.find(testPrefix)==0) - stream_label_=std::string("stream")+stream_label_.substr(testPrefix.size()); + if (streamLabel_.find(testPrefix)==0) + streamLabel_=std::string("stream")+streamLabel_.substr(testPrefix.size()); - if (stream_label_.find("_")!=std::string::npos) { + if (streamLabel_.find("_")!=std::string::npos) { throw cms::Exception("RecoEventOutputModuleForFU") - << "Underscore character is reserved can not be used for stream names in FFF, but was detected in stream name -: " << stream_label_; + << "Underscore character is reserved can not be used for stream names in FFF, but was detected in stream name -: " << streamLabel_; } - std::string stream_label_lo = stream_label_; - boost::algorithm::to_lower(stream_label_lo); - auto streampos = stream_label_lo.rfind("stream"); + std::string streamLabelLow = streamLabel_; + boost::algorithm::to_lower(streamLabelLow); + auto streampos = streamLabelLow.rfind("stream"); if (streampos !=0 && streampos!=std::string::npos) throw cms::Exception("RecoEventOutputModuleForFU") << "stream (case-insensitive) sequence was found in stream suffix. This is reserved and can not be used for names in FFF based HLT, but was detected in stream name"; @@ -191,7 +191,7 @@ namespace evf { RecoEventOutputModuleForFU::start() { initRun(); - const std::string openInitFileName = edm::Service()->getOpenInitFilePath(stream_label_); + const std::string openInitFileName = edm::Service()->getOpenInitFilePath(streamLabel_); edm::LogInfo("RecoEventOutputModuleForFU") << "start() method, initializing streams. init stream -: " << openInitFileName; c_->setInitMessageFile(openInitFileName); @@ -212,7 +212,7 @@ namespace evf { { c_->doOutputHeader(init_message); - const std::string openIniFileName = edm::Service()->getOpenInitFilePath(stream_label_); + const std::string openIniFileName = edm::Service()->getOpenInitFilePath(streamLabel_); struct stat istat; stat(openIniFileName.c_str(), &istat); //read back file to check integrity of what was written @@ -238,8 +238,8 @@ namespace evf { << " expected:" << c_->get_adler32_ini() << " obtained:" << adler32c; } else { - edm::LogWarning("RecoEventOutputModuleForFU") << "Ini file checksum -: "<< stream_label_ << " " << adler32c; - boost::filesystem::rename(openIniFileName,edm::Service()->getInitFilePath(stream_label_)); + edm::LogWarning("RecoEventOutputModuleForFU") << "Ini file checksum -: "<< streamLabel_ << " " << adler32c; + boost::filesystem::rename(openIniFileName,edm::Service()->getInitFilePath(streamLabel_)); } } @@ -274,8 +274,8 @@ namespace evf { void RecoEventOutputModuleForFU::beginJob() { //get stream transfer destination - transferDestination_ = edm::Service()->getStreamDestinations(stream_label_); - mergeType_ = edm::Service()->getStreamMergeType(stream_label_,evf::MergeTypeDAT); + transferDestination_ = edm::Service()->getStreamDestinations(streamLabel_); + mergeType_ = edm::Service()->getStreamMergeType(streamLabel_,evf::MergeTypeDAT); } @@ -283,8 +283,8 @@ namespace evf { void RecoEventOutputModuleForFU::beginLuminosityBlock(edm::LuminosityBlockForOutput const& ls) { //edm::LogInfo("RecoEventOutputModuleForFU") << "begin lumi"; - openDatFilePath_ = edm::Service()->getOpenDatFilePath(ls.luminosityBlock(),stream_label_); - openDatChecksumFilePath_ = edm::Service()->getOpenDatFilePath(ls.luminosityBlock(),stream_label_); + openDatFilePath_ = edm::Service()->getOpenDatFilePath(ls.luminosityBlock(),streamLabel_); + openDatChecksumFilePath_ = edm::Service()->getOpenDatFilePath(ls.luminosityBlock(),streamLabel_); c_->setOutputFile(openDatFilePath_.string()); filelist_ = openDatFilePath_.filename().string(); } @@ -311,15 +311,15 @@ namespace evf { if (!edm::Service()->microMergeDisabled()) { //create if does not exist then lock the merge destination file - FILE *des = fopen(edm::Service()->getMergedDatFilePath(ls.luminosityBlock(),stream_label_).c_str(), "a"); //open stream for appending - int data_readwrite_fd_ = fileno(des); - if (data_readwrite_fd_ == -1) + FILE *des = fopen(edm::Service()->getMergedDatFilePath(ls.luminosityBlock(),streamLabel_).c_str(), "a"); //open stream for appending + int data_readwrite_fd = fileno(des); + if (data_readwrite_fd == -1) edm::LogError("RecoEventOutputModuleForFU") << "problem with creating filedesc for datamerge " << strerror(errno); else - LogDebug("RecoEventOutputModuleForFU") << "creating filedesc for datamerge -: " << data_readwrite_fd_; - fcntl(data_readwrite_fd_, F_SETLKW, &data_rw_flk); + LogDebug("RecoEventOutputModuleForFU") << "creating filedesc for datamerge -: " << data_readwrite_fd; + fcntl(data_readwrite_fd, F_SETLKW, &dataRwFlk_); - std::string deschecksum = edm::Service()->getMergedDatChecksumFilePath(ls.luminosityBlock(), stream_label_); + std::string deschecksum = edm::Service()->getMergedDatChecksumFilePath(ls.luminosityBlock(), streamLabel_); struct stat istat; FILE * cf = nullptr; @@ -363,7 +363,7 @@ namespace evf { //unlock and close output file fflush(des); - fcntl(data_readwrite_fd_, F_SETLKW, &data_rw_fulk); + fcntl(data_readwrite_fd, F_SETLKW, &dataRwFulk_); fclose(des); fclose(src); @@ -377,7 +377,7 @@ namespace evf { else { //no micromerge by HLT stat(openDatFilePath_.string().c_str(), &istat); filesize = istat.st_size; - boost::filesystem::rename(openDatFilePath_.string().c_str(), edm::Service()->getDatFilePath(ls.luminosityBlock(),stream_label_)); + boost::filesystem::rename(openDatFilePath_.string().c_str(), edm::Service()->getDatFilePath(ls.luminosityBlock(),streamLabel_)); } } else { //return if not in empty lumisection mode @@ -395,7 +395,7 @@ namespace evf { jsonMonitor_->snap(ls.luminosityBlock()); const std::string outputJsonNameStream = - edm::Service()->getOutputJsonFilePath(ls.luminosityBlock(),stream_label_); + edm::Service()->getOutputJsonFilePath(ls.luminosityBlock(),streamLabel_); jsonMonitor_->outputFullJSON(outputJsonNameStream,ls.luminosityBlock()); // reset monitoring params From 0b3dd3d005f5ffd6ade79249f15604a4a72c05ef Mon Sep 17 00:00:00 2001 From: Srecko Morovic Date: Tue, 5 Dec 2017 23:08:07 +0100 Subject: [PATCH 04/18] RAII approach as suggested by @Dr15Jones --- .../plugins/RecoEventOutputModuleForFU.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/EventFilter/Utilities/plugins/RecoEventOutputModuleForFU.h b/EventFilter/Utilities/plugins/RecoEventOutputModuleForFU.h index bb2ccbedeb912..8707c5ed3dc6c 100644 --- a/EventFilter/Utilities/plugins/RecoEventOutputModuleForFU.h +++ b/EventFilter/Utilities/plugins/RecoEventOutputModuleForFU.h @@ -313,6 +313,16 @@ namespace evf { //create if does not exist then lock the merge destination file FILE *des = fopen(edm::Service()->getMergedDatFilePath(ls.luminosityBlock(),streamLabel_).c_str(), "a"); //open stream for appending int data_readwrite_fd = fileno(des); + + //deleter function: unlock and close file + auto finishFile = [des, data_readwrite_fd, this](FILE* f) { + fflush(f); + fcntl(data_readwrite_fd,F_SETLKW, &dataRwFulk_); + fclose(des); + }; + + std::unique_ptr desGuard{des,finishFile}; + if (data_readwrite_fd == -1) edm::LogError("RecoEventOutputModuleForFU") << "problem with creating filedesc for datamerge " << strerror(errno); else @@ -361,11 +371,6 @@ namespace evf { fprintf(cf,"%u",mergedAdler32); fclose(cf); - //unlock and close output file - fflush(des); - fcntl(data_readwrite_fd, F_SETLKW, &dataRwFulk_); - fclose(des); - fclose(src); if (readAdler32Check_ && ((adlerb << 16) | adlera) != fileAdler32_.value()) { From dc9e7bbd89a8e2dab2e3532b54a2c49d80ce2ea8 Mon Sep 17 00:00:00 2001 From: Sam Harper Date: Thu, 14 Dec 2017 09:35:40 +0000 Subject: [PATCH 05/18] making methods that should be virtual actually virtual --- DataFormats/EgammaCandidates/interface/GsfElectron.h | 6 +++--- DataFormats/PatCandidates/interface/Electron.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/DataFormats/EgammaCandidates/interface/GsfElectron.h b/DataFormats/EgammaCandidates/interface/GsfElectron.h index 0063b31173390..9b6ac31109a90 100644 --- a/DataFormats/EgammaCandidates/interface/GsfElectron.h +++ b/DataFormats/EgammaCandidates/interface/GsfElectron.h @@ -187,7 +187,7 @@ class GsfElectron : public RecoCandidate float ctfGsfOverlap() const { return core()->ctfGsfOverlap() ; } bool ecalDrivenSeed() const { return core()->ecalDrivenSeed() ; } bool trackerDrivenSeed() const { return core()->trackerDrivenSeed() ; } - SuperClusterRef parentSuperCluster() const { return core()->parentSuperCluster() ; } + virtual SuperClusterRef parentSuperCluster() const { return core()->parentSuperCluster() ; } // backward compatibility struct ClosestCtfTrack @@ -198,8 +198,8 @@ class GsfElectron : public RecoCandidate ClosestCtfTrack( TrackRef track, float sh ) : ctfTrack(track), shFracInnerHits(sh) {} } ; float shFracInnerHits() const { return core()->ctfGsfOverlap() ; } - TrackRef closestCtfTrackRef() const { return core()->ctfTrack() ; } - ClosestCtfTrack closestCtfTrack() const { return ClosestCtfTrack(core()->ctfTrack(),core()->ctfGsfOverlap()) ; } + virtual TrackRef closestCtfTrackRef() const { return core()->ctfTrack() ; } + virtual ClosestCtfTrack closestCtfTrack() const { return ClosestCtfTrack(core()->ctfTrack(),core()->ctfGsfOverlap()) ; } private: diff --git a/DataFormats/PatCandidates/interface/Electron.h b/DataFormats/PatCandidates/interface/Electron.h index 8a689ae426a39..8677d42905e78 100644 --- a/DataFormats/PatCandidates/interface/Electron.h +++ b/DataFormats/PatCandidates/interface/Electron.h @@ -77,11 +77,11 @@ namespace pat { /// override the reco::GsfElectron::superCluster method, to access the internal storage of the supercluster reco::SuperClusterRef superCluster() const; /// override the reco::GsfElectron::pflowSuperCluster method, to access the internal storage of the pflowSuperCluster - reco::SuperClusterRef parentSuperCluster() const; + reco::SuperClusterRef parentSuperCluster() const override; /// returns nothing. Use either gsfTrack or closestCtfTrack reco::TrackRef track() const; /// override the reco::GsfElectron::closestCtfTrackRef method, to access the internal storage of the track - reco::TrackRef closestCtfTrackRef() const; + reco::TrackRef closestCtfTrackRef() const override; /// direct access to the seed cluster reco::CaloClusterPtr seed() const; From 99bd26d96ef837c3caeba72564f006b2d5706abf Mon Sep 17 00:00:00 2001 From: jean-roch Date: Mon, 18 Dec 2017 11:54:08 +0100 Subject: [PATCH 06/18] re-simple change to the merge configuration to allow the merging of NANOAOD --- Configuration/DataProcessing/python/Merge.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Configuration/DataProcessing/python/Merge.py b/Configuration/DataProcessing/python/Merge.py index 61f96599a9ae4..66169aa471982 100644 --- a/Configuration/DataProcessing/python/Merge.py +++ b/Configuration/DataProcessing/python/Merge.py @@ -38,7 +38,7 @@ def mergeProcess(*inputFiles, **options): outputLFN = options.get("output_lfn", None) dropDQM = options.get("drop_dqm", False) newDQMIO = options.get("newDQMIO", False) - + mergeNANO = options.get("mergeNANO", False) # // # // build process #// @@ -63,8 +63,11 @@ def mergeProcess(*inputFiles, **options): #// if newDQMIO: outMod = OutputModule("DQMRootOutputModule") + elif mergeNANO: + outMod = OutputModule("NanoAODOutputModule") else: outMod = OutputModule("PoolOutputModule") + outMod.fileName = CfgTypes.untracked.string(outputFilename) if outputLFN != None: outMod.logicalFileName = CfgTypes.untracked.string(outputLFN) From 569b506842b4f081ecded7c678931e614be67878 Mon Sep 17 00:00:00 2001 From: Matthew Date: Thu, 21 Dec 2017 11:09:03 +0100 Subject: [PATCH 07/18] Keep HI Gen collections when pp reco is customized for XeXe (94X backport) --- .../Configuration/python/SimGeneral_EventContent_cff.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SimGeneral/Configuration/python/SimGeneral_EventContent_cff.py b/SimGeneral/Configuration/python/SimGeneral_EventContent_cff.py index 64fe66910593a..d6f5a9bb932e8 100644 --- a/SimGeneral/Configuration/python/SimGeneral_EventContent_cff.py +++ b/SimGeneral/Configuration/python/SimGeneral_EventContent_cff.py @@ -43,3 +43,9 @@ phase2_timing.toModify( SimGeneralFEVTDEBUG, outputCommands = SimGeneralFEVTDEBUG.outputCommands + _phase2_timing_extraCommands ) phase2_timing.toModify( SimGeneralRECO, outputCommands = SimGeneralRECO.outputCommands + _phase2_timing_extraCommands ) +_pp_on_XeXe_extraCommands = ['keep CrossingFramePlaybackInfoNew_mix_*_*','keep *_heavyIon_*_*'] +from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017 +pp_on_XeXe_2017.toModify( SimGeneralRAW, outputCommands = SimGeneralRAW.outputCommands + _pp_on_XeXe_extraCommands ) +pp_on_XeXe_2017.toModify( SimGeneralFEVTDEBUG, outputCommands = SimGeneralFEVTDEBUG.outputCommands + _pp_on_XeXe_extraCommands ) +pp_on_XeXe_2017.toModify( SimGeneralRECO, outputCommands = SimGeneralRECO.outputCommands + _pp_on_XeXe_extraCommands ) +pp_on_XeXe_2017.toModify( SimGeneralAOD, outputCommands = SimGeneralAOD.outputCommands + _pp_on_XeXe_extraCommands ) From a4eb862797981feffadb95c85bb760df31b6a3aa Mon Sep 17 00:00:00 2001 From: George Stephans Date: Fri, 12 Jan 2018 16:42:56 +0100 Subject: [PATCH 08/18] Adding XeXe, fixed PbPb, and 5 TeV pp (2017) placeholder --- .../StandardSequences/python/VtxSmeared.py | 4 +- .../python/VtxSmearedParameters_cfi.py | 47 ++++++++++++++++++- ...SmearedRealistic5TeVppCollision2017_cfi.py | 7 +++ ...SmearedRealisticHICollisionFixZ2015_cfi.py | 10 ++++ ...txSmearedRealisticXeXeCollision2017_cfi.py | 10 ++++ 5 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 IOMC/EventVertexGenerators/python/VtxSmearedRealistic5TeVppCollision2017_cfi.py create mode 100644 IOMC/EventVertexGenerators/python/VtxSmearedRealisticHICollisionFixZ2015_cfi.py create mode 100644 IOMC/EventVertexGenerators/python/VtxSmearedRealisticXeXeCollision2017_cfi.py diff --git a/Configuration/StandardSequences/python/VtxSmeared.py b/Configuration/StandardSequences/python/VtxSmeared.py index 2126e995c7d61..ca2359c60587e 100644 --- a/Configuration/StandardSequences/python/VtxSmeared.py +++ b/Configuration/StandardSequences/python/VtxSmeared.py @@ -46,11 +46,13 @@ 'Shifted15mmCollision2015' : 'IOMC.EventVertexGenerators.VtxSmearedShifted15mmCollision2015_cfi', 'NominalCollision2015' : 'IOMC.EventVertexGenerators.VtxSmearedNominalCollision2015_cfi', 'NominalHICollision2015': 'IOMC.EventVertexGenerators.VtxSmearedNominalHICollision2015_cfi', - 'RealisticHICollision2015': 'IOMC.EventVertexGenerators.VtxSmearedRealisticHICollision2015_cfi', + 'RealisticHICollisionFixZ2015': 'IOMC.EventVertexGenerators.VtxSmearedRealisticHICollisionFixZ2015_cfi', + 'RealisticXeXeCollision2017': 'IOMC.EventVertexGenerators.VtxSmearedRealisticXeXeCollision2017_cfi', 'ZeroTeslaRun247324Collision' : 'IOMC.EventVertexGenerators.VtxSmearedZeroTeslaRun247324Collision_cfi', 'Realistic50ns13TeVCollisionZeroTesla': 'IOMC.EventVertexGenerators.VtxSmearedRealistic50ns13TeVCollisionZeroTesla_cfi', 'Realistic50ns13TeVCollision': 'IOMC.EventVertexGenerators.VtxSmearedRealistic50ns13TeVCollision_cfi', 'Nominal5TeVpp2015Collision': 'IOMC.EventVertexGenerators.VtxSmearedNominal5TeVpp2015Collision_cfi', + 'Realistic5TeVppCollision2017': 'IOMC.EventVertexGenerators.VtxSmearedRealistic5TeVppCollision2017_cfi', 'Realistic25ns13TeV2016Collision': 'IOMC.EventVertexGenerators.VtxSmearedRealistic25ns13TeV2016Collision_cfi', 'Realistic100ns13TeVCollisionBetaStar90m' : 'IOMC.EventVertexGenerators.VtxSmearedRealistic100ns13TeVCollisionBetaStar90m_cfi', 'Realistic100ns13TeVCollisionBetaStar90mLowBunches' : 'IOMC.EventVertexGenerators.VtxSmearedRealistic100ns13TeVCollisionBetaStar90mLowBunches_cfi', diff --git a/IOMC/EventVertexGenerators/python/VtxSmearedParameters_cfi.py b/IOMC/EventVertexGenerators/python/VtxSmearedParameters_cfi.py index d7caba84db4a0..b53f54a4104bd 100644 --- a/IOMC/EventVertexGenerators/python/VtxSmearedParameters_cfi.py +++ b/IOMC/EventVertexGenerators/python/VtxSmearedParameters_cfi.py @@ -581,6 +581,20 @@ Z0 = cms.double(0.82054 ) ) +# Placeholder for beam spot extracted from data for 2017 pp run @ 5 TeV +# For now using the same parameters as Realistic25ns13TeVEarly2017Collision +Realistic5TeVppCollision2017VtxSmearingParameters = cms.PSet( + Phi = cms.double(0.0), + BetaStar = cms.double(40.0), + Emittance = cms.double(3.319e-8), + Alpha = cms.double(0.0), + SigmaZ = cms.double(3.5), + TimeOffset = cms.double(0.0), + X0 = cms.double(-0.024755), + Y0 = cms.double(0.069233 ), + Z0 = cms.double(0.82054 ) +) + # Test HF offset ShiftedCollision2015VtxSmearingParameters = cms.PSet( Phi = cms.double(0.0), @@ -631,7 +645,23 @@ ) # updated numbers based on beamspot fits to 2015 PbPb data -RealisticHICollision2015VtxSmearingParameters = cms.PSet( +# Later found to be incorrect, see following entry +# RealisticHICollision2015VtxSmearingParameters = cms.PSet( +# Phi = cms.double(0.0), +# BetaStar = cms.double(60.0), +# Emittance = cms.double(1.70e-07), +# Alpha = cms.double(0.0), +# SigmaZ = cms.double(5.2278), +# TimeOffset = cms.double(0.0), +# X0 = cms.double(0.1025), +# Y0 = cms.double(0.1654), +# Z0 = cms.double(3.2528) +#) +# updated numbers for 2015 PbPb data with Z centroid from fixed beamspot fits +# See discussion here https://hypernews.cern.ch/HyperNews/CMS/get/hi-general/3968.html +# See plot of difference here: https://www.dropbox.com/s/tsnkgvvpkdqjtyq/vzDataMCOverlay_c_20170420.pdf?dl=0 +# +RealisticHICollisionFixZ2015VtxSmearingParameters = cms.PSet( Phi = cms.double(0.0), BetaStar = cms.double(60.0), Emittance = cms.double(1.70e-07), @@ -640,8 +670,21 @@ TimeOffset = cms.double(0.0), X0 = cms.double(0.1025), Y0 = cms.double(0.1654), - Z0 = cms.double(3.2528) + Z0 = cms.double(0.771) ) +# Numbers based on beamspot fits to 2017 XeXe data +# Documentation here: https://twiki.cern.ch/twiki/pub/CMS/XeXeRereco/IanLRU_AlCaTkAlBS_20171130_approvedByLucaSara.pdf +RealisticXeXeCollision2017VtxSmearingParameters = cms.PSet( + Phi = cms.double(0.0), + BetaStar = cms.double(30.0), + Emittance = cms.double(4.33e-08), + Alpha = cms.double(0.0), + SigmaZ = cms.double(4.64), + TimeOffset = cms.double(0.0), + X0 = cms.double(-0.026), + Y0 = cms.double(0.081), + Z0 = cms.double(0.645) +) # Estimate for 2015 pp collisions at 5.02 TeV, based on feedback from accelerator: beta* ~ 400cm, normalized emittance = 2.5 um, SigmaZ similar to RunIIWinter15GS Nominal5TeVpp2015VtxSmearingParameters = cms.PSet( diff --git a/IOMC/EventVertexGenerators/python/VtxSmearedRealistic5TeVppCollision2017_cfi.py b/IOMC/EventVertexGenerators/python/VtxSmearedRealistic5TeVppCollision2017_cfi.py new file mode 100644 index 0000000000000..7e87d58a7598d --- /dev/null +++ b/IOMC/EventVertexGenerators/python/VtxSmearedRealistic5TeVppCollision2017_cfi.py @@ -0,0 +1,7 @@ +import FWCore.ParameterSet.Config as cms + +from IOMC.EventVertexGenerators.VtxSmearedParameters_cfi import Realistic5TeVppCollision2017VtxSmearingParameters,VtxSmearedCommon +VtxSmeared = cms.EDProducer("BetafuncEvtVtxGenerator", + Realistic5TeVppCollision2017VtxSmearingParameters, + VtxSmearedCommon +) diff --git a/IOMC/EventVertexGenerators/python/VtxSmearedRealisticHICollisionFixZ2015_cfi.py b/IOMC/EventVertexGenerators/python/VtxSmearedRealisticHICollisionFixZ2015_cfi.py new file mode 100644 index 0000000000000..4e41b2c1ffe07 --- /dev/null +++ b/IOMC/EventVertexGenerators/python/VtxSmearedRealisticHICollisionFixZ2015_cfi.py @@ -0,0 +1,10 @@ +import FWCore.ParameterSet.Config as cms + +from IOMC.EventVertexGenerators.VtxSmearedParameters_cfi import RealisticHICollisionFixZ2015VtxSmearingParameters,VtxSmearedCommon +VtxSmeared = cms.EDProducer("BetafuncEvtVtxGenerator", + RealisticHICollisionFixZ2015VtxSmearingParameters, + VtxSmearedCommon +) + + + diff --git a/IOMC/EventVertexGenerators/python/VtxSmearedRealisticXeXeCollision2017_cfi.py b/IOMC/EventVertexGenerators/python/VtxSmearedRealisticXeXeCollision2017_cfi.py new file mode 100644 index 0000000000000..1a05bc450824c --- /dev/null +++ b/IOMC/EventVertexGenerators/python/VtxSmearedRealisticXeXeCollision2017_cfi.py @@ -0,0 +1,10 @@ +import FWCore.ParameterSet.Config as cms + +from IOMC.EventVertexGenerators.VtxSmearedParameters_cfi import RealisticXeXeCollision2017VtxSmearingParameters,VtxSmearedCommon +VtxSmeared = cms.EDProducer("BetafuncEvtVtxGenerator", + RealisticXeXeCollision2017VtxSmearingParameters, + VtxSmearedCommon +) + + + From 90fbec330197f3c9845524e10489934108b9aa53 Mon Sep 17 00:00:00 2001 From: George Stephans Date: Fri, 12 Jan 2018 18:29:38 +0100 Subject: [PATCH 09/18] Fixed typo in mixing scenario names --- .../StandardSequences/python/Mixing.py | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Configuration/StandardSequences/python/Mixing.py b/Configuration/StandardSequences/python/Mixing.py index c42bc38a558a1..02cc229f5def7 100644 --- a/Configuration/StandardSequences/python/Mixing.py +++ b/Configuration/StandardSequences/python/Mixing.py @@ -22,21 +22,21 @@ def addMixingScenario(label,dict): addMixingScenario("E10TeV_L21E31_BX432",{'file': 'SimGeneral.MixingModule.mix_E10TeV_L21E31_BX432_cfi'}) addMixingScenario("E14TeV_L10E33_BX2808",{'file': 'SimGeneral.MixingModule.mix_E14TeV_L10E33_BX2808_cfi'}) addMixingScenario("E14TeV_L28E32_BX2808",{'file': 'SimGeneral.MixingModule.mix_E14TeV_L28E32_BX2808_cfi'}) -addMixingScenario("E7TeV_AVE_01_BX2808",{'file': 'SimGeneral.MixingModule.mix_POISSON_avergage_cfi', 'BX': 25, 'B': (-5,3), 'N': 0.1}) -addMixingScenario("E7TeV_AVE_02_BX2808",{'file': 'SimGeneral.MixingModule.mix_POISSON_avergage_cfi', 'BX': 25, 'B': (-5,3), 'N': 0.2}) -addMixingScenario("E7TeV_AVE_05_BX2808",{'file': 'SimGeneral.MixingModule.mix_POISSON_avergage_cfi', 'BX': 25, 'B': (-5,3), 'N': 0.5}) -addMixingScenario("E7TeV_AVE_1_BX2808",{'file': 'SimGeneral.MixingModule.mix_POISSON_avergage_cfi', 'BX': 25, 'B': (-5,3), 'N': 1.}) -addMixingScenario("E7TeV_AVE_2_BX2808",{'file': 'SimGeneral.MixingModule.mix_POISSON_avergage_cfi', 'BX': 25, 'B': (-5,3), 'N': 2.}) -addMixingScenario("E7TeV_AVE_5_BX2808",{'file': 'SimGeneral.MixingModule.mix_POISSON_avergage_cfi', 'BX': 25, 'B': (-5,3), 'N': 5.}) -addMixingScenario("E7TeV_AVE_10_BX2808",{'file': 'SimGeneral.MixingModule.mix_POISSON_avergage_cfi', 'BX': 25, 'B': (-5,3), 'N': 10.}) -addMixingScenario("E7TeV_AVE_20_BX2808",{'file': 'SimGeneral.MixingModule.mix_POISSON_avergage_cfi', 'BX': 25, 'B': (-5,3), 'N': 20.}) -addMixingScenario("E7TeV_AVE_50_BX2808",{'file': 'SimGeneral.MixingModule.mix_POISSON_avergage_cfi', 'BX': 25, 'B': (-5,3), 'N': 50.}) -addMixingScenario("E7TeV_AVE_1_BX156",{'file': 'SimGeneral.MixingModule.mix_POISSON_avergage_cfi', 'BX': 450, 'B': (-5,3), 'N': 1.}) -addMixingScenario("E7TeV_AVE_2_BX156",{'file': 'SimGeneral.MixingModule.mix_POISSON_avergage_cfi', 'BX': 450, 'B': (-5,3), 'N': 2.}) -addMixingScenario("E7TeV_AVE_3_BX156",{'file': 'SimGeneral.MixingModule.mix_POISSON_avergage_cfi', 'BX': 450, 'B': (-5,3), 'N': 3.}) -addMixingScenario("E7TeV_AVE_5_BX156",{'file': 'SimGeneral.MixingModule.mix_POISSON_avergage_cfi', 'BX': 450, 'B': (-5,3), 'N': 5.}) -addMixingScenario("E7TeV_AVE_2_8_BX_50ns",{'file': 'SimGeneral.MixingModule.mix_POISSON_avergage_cfi', 'BX': 50, 'B': (-3,2), 'N': 2.8}) -addMixingScenario("E7TeV_AVE_2_8_BXgt50ns_intime_only",{'file': 'SimGeneral.MixingModule.mix_POISSON_avergage_cfi', 'BX': 450, 'B': (0,0), 'N': 2.8}) +addMixingScenario("E7TeV_AVE_01_BX2808",{'file': 'SimGeneral.MixingModule.mix_POISSON_average_cfi', 'BX': 25, 'B': (-5,3), 'N': 0.1}) +addMixingScenario("E7TeV_AVE_02_BX2808",{'file': 'SimGeneral.MixingModule.mix_POISSON_average_cfi', 'BX': 25, 'B': (-5,3), 'N': 0.2}) +addMixingScenario("E7TeV_AVE_05_BX2808",{'file': 'SimGeneral.MixingModule.mix_POISSON_average_cfi', 'BX': 25, 'B': (-5,3), 'N': 0.5}) +addMixingScenario("E7TeV_AVE_1_BX2808",{'file': 'SimGeneral.MixingModule.mix_POISSON_average_cfi', 'BX': 25, 'B': (-5,3), 'N': 1.}) +addMixingScenario("E7TeV_AVE_2_BX2808",{'file': 'SimGeneral.MixingModule.mix_POISSON_average_cfi', 'BX': 25, 'B': (-5,3), 'N': 2.}) +addMixingScenario("E7TeV_AVE_5_BX2808",{'file': 'SimGeneral.MixingModule.mix_POISSON_average_cfi', 'BX': 25, 'B': (-5,3), 'N': 5.}) +addMixingScenario("E7TeV_AVE_10_BX2808",{'file': 'SimGeneral.MixingModule.mix_POISSON_average_cfi', 'BX': 25, 'B': (-5,3), 'N': 10.}) +addMixingScenario("E7TeV_AVE_20_BX2808",{'file': 'SimGeneral.MixingModule.mix_POISSON_average_cfi', 'BX': 25, 'B': (-5,3), 'N': 20.}) +addMixingScenario("E7TeV_AVE_50_BX2808",{'file': 'SimGeneral.MixingModule.mix_POISSON_average_cfi', 'BX': 25, 'B': (-5,3), 'N': 50.}) +addMixingScenario("E7TeV_AVE_1_BX156",{'file': 'SimGeneral.MixingModule.mix_POISSON_average_cfi', 'BX': 450, 'B': (-5,3), 'N': 1.}) +addMixingScenario("E7TeV_AVE_2_BX156",{'file': 'SimGeneral.MixingModule.mix_POISSON_average_cfi', 'BX': 450, 'B': (-5,3), 'N': 2.}) +addMixingScenario("E7TeV_AVE_3_BX156",{'file': 'SimGeneral.MixingModule.mix_POISSON_average_cfi', 'BX': 450, 'B': (-5,3), 'N': 3.}) +addMixingScenario("E7TeV_AVE_5_BX156",{'file': 'SimGeneral.MixingModule.mix_POISSON_average_cfi', 'BX': 450, 'B': (-5,3), 'N': 5.}) +addMixingScenario("E7TeV_AVE_2_8_BX_50ns",{'file': 'SimGeneral.MixingModule.mix_POISSON_average_cfi', 'BX': 50, 'B': (-3,2), 'N': 2.8}) +addMixingScenario("E7TeV_AVE_2_8_BXgt50ns_intime_only",{'file': 'SimGeneral.MixingModule.mix_POISSON_average_cfi', 'BX': 450, 'B': (0,0), 'N': 2.8}) addMixingScenario("E7TeV_FIX_1_BX156",{'file': 'SimGeneral.MixingModule.mix_FIX_average_cfi', 'BX': 450, 'B': (-5,3), 'N': 1}) addMixingScenario("E7TeV_FIX_2_BX156",{'file': 'SimGeneral.MixingModule.mix_FIX_average_cfi', 'BX': 450, 'B': (-5,3), 'N': 2}) addMixingScenario("E7TeV_FIX_3_BX156",{'file': 'SimGeneral.MixingModule.mix_FIX_average_cfi', 'BX': 450, 'B': (-5,3), 'N': 3}) From 9a900daf2571bba9e21ee441ee8321a96f5b5c25 Mon Sep 17 00:00:00 2001 From: Andrea Date: Wed, 17 Jan 2018 12:28:21 +0100 Subject: [PATCH 10/18] Import event content as in cmsDriver for nanoaodOutMod --- Configuration/DataProcessing/python/Merge.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Configuration/DataProcessing/python/Merge.py b/Configuration/DataProcessing/python/Merge.py index 66169aa471982..c5d416286c3e2 100644 --- a/Configuration/DataProcessing/python/Merge.py +++ b/Configuration/DataProcessing/python/Merge.py @@ -10,6 +10,7 @@ from FWCore.ParameterSet.Config import Process, EndPath from FWCore.ParameterSet.Modules import OutputModule, Source, Service +from Configuration.EventContent.EventContent_cff import NANOAODEventContent import FWCore.ParameterSet.Types as CfgTypes @@ -64,7 +65,7 @@ def mergeProcess(*inputFiles, **options): if newDQMIO: outMod = OutputModule("DQMRootOutputModule") elif mergeNANO: - outMod = OutputModule("NanoAODOutputModule") + outMod = OutputModule("NanoAODOutputModule",NANOAODEventContent.clone()) else: outMod = OutputModule("PoolOutputModule") From 5d7e4686a8f80cebe606a45f38459bece53fdf4e Mon Sep 17 00:00:00 2001 From: Fabio Cossutti Date: Thu, 18 Jan 2018 17:34:57 +0100 Subject: [PATCH 11/18] Fix PyRelVal wf 145.0 for modified 2015 HI Vtx smearing name --- Configuration/PyReleaseValidation/python/relval_steps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 05d70f6d35992..0d9458fe3d68b 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -711,7 +711,7 @@ def genS(fragment,howMuch): hiDefaults2018=merge([hiAlca2018,{'--scenario':'HeavyIons','-n':2}]) steps['HydjetQ_B12_5020GeV_2011']=merge([{'-n':1,'--beamspot':'RealisticHI2011Collision'},hiDefaults2011,genS('Hydjet_Quenched_B12_5020GeV_cfi',U2000by1)]) -steps['HydjetQ_B12_5020GeV_2015']=merge([{'-n':1,'--beamspot':'RealisticHICollision2015'},hiDefaults2015,genS('Hydjet_Quenched_B12_5020GeV_cfi',U2000by1)]) +steps['HydjetQ_B12_5020GeV_2015']=merge([{'-n':1,'--beamspot':'RealisticHICollisionFixZ2015'},hiDefaults2015,genS('Hydjet_Quenched_B12_5020GeV_cfi',U2000by1)]) steps['HydjetQ_MinBias_XeXe_5442GeV_2017']=merge([{'-n':1},hiDefaults2017,gen2017('Hydjet_Quenched_MinBias_XeXe_5442GeV_cfi',U2000by1)]) steps['HydjetQ_B12_5020GeV_2018']=merge([{'-n':1},hiDefaults2018,gen2017('Hydjet_Quenched_B12_5020GeV_cfi',U2000by1)]) From fd5377c273d5376e2f4e3cdcdc0eb82728804804 Mon Sep 17 00:00:00 2001 From: Fabio Cossutti Date: Fri, 19 Jan 2018 13:21:15 +0100 Subject: [PATCH 12/18] Fix order in sequence of LepHTMonitor_cff, minor addition --- DQMOffline/Trigger/python/LepHTMonitor_cff.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DQMOffline/Trigger/python/LepHTMonitor_cff.py b/DQMOffline/Trigger/python/LepHTMonitor_cff.py index aa19531721dac..8e1818cc11fe4 100644 --- a/DQMOffline/Trigger/python/LepHTMonitor_cff.py +++ b/DQMOffline/Trigger/python/LepHTMonitor_cff.py @@ -187,8 +187,7 @@ from DQMOffline.Trigger.HLTEGTnPMonitor_cfi import egmGsfElectronIDsForDQM -LepHTMonitor = cms.Sequence( egmGsfElectronIDsForDQM # Use of electron VID requires this module being executed first - + DQMOffline_Ele15_HT600 +LepHTMonitor = cms.Sequence( DQMOffline_Ele15_HT600 + DQMOffline_Ele15_HT450 + DQMOffline_Ele50_HT450 + DQMOffline_Mu15_HT600 @@ -199,7 +198,8 @@ + DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350_DZ + DQMOffline_DoubleEle8_CaloIdM_TrackIdM_Mass8_PFHT350 + DQMOffline_DoubleMu4_Mass8_PFHT350 - + DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350 + + DQMOffline_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT350, + cms.Task(egmGsfElectronIDsForDQM) # Use of electron VID requires this module being executed first ) LepHTClient = cms.Sequence( DQMOffline_LepHT_POSTPROCESSING ) From 38b36b5faf57c98039e7970520cf9683165205da Mon Sep 17 00:00:00 2001 From: Salvatore Rappoccio Date: Fri, 19 Jan 2018 13:04:41 -0600 Subject: [PATCH 13/18] Adding an accessor for groomed jet mass for convenience, particularly nanoaod --- DataFormats/PatCandidates/interface/Jet.h | 22 ++++++++++++++++++---- DataFormats/PatCandidates/src/Jet.cc | 4 ++-- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/DataFormats/PatCandidates/interface/Jet.h b/DataFormats/PatCandidates/interface/Jet.h index 885367cf21a20..636d09d895fc1 100644 --- a/DataFormats/PatCandidates/interface/Jet.h +++ b/DataFormats/PatCandidates/interface/Jet.h @@ -47,6 +47,8 @@ #include "DataFormats/Common/interface/OwnVector.h" #include "DataFormats/Common/interface/AtomicPtrCache.h" +#include + // Define typedefs for convenience namespace pat { @@ -498,13 +500,13 @@ namespace pat { /// String access to subjet list - pat::JetPtrCollection const & subjets( std::string label ) const ; + pat::JetPtrCollection const & subjets( std::string const & label ) const ; /// Add new set of subjets - void addSubjets( pat::JetPtrCollection const & pieces, std::string label = "" ); + void addSubjets( pat::JetPtrCollection const & pieces, std::string const & label = "" ); /// Check to see if the subjet collection exists - bool hasSubjets( std::string label ) const { return find( subjetLabels_.begin(), subjetLabels_.end(), label) != subjetLabels_.end(); } + bool hasSubjets( std::string const & label ) const { return find( subjetLabels_.begin(), subjetLabels_.end(), label) != subjetLabels_.end(); } /// Number of subjet collections unsigned int nSubjetCollections( ) const { return subjetCollections_.size(); } @@ -512,7 +514,19 @@ namespace pat { /// Subjet collection names std::vector const & subjetCollectionNames() const { return subjetLabels_; } - + /// Access to mass of subjets + double groomedMass(unsigned int index = 0) const{ + return nSubjetCollections() > 0 && !subjets(index).empty() ? + std::accumulate( subjets(index).begin(), subjets(index).end(), + reco::Candidate::LorentzVector(), [] (reco::Candidate::LorentzVector a, reco::CandidatePtr const & b){return a + b->p4();}).mass() : + -1.0; + } + double groomedMass(std::string const & label) const{ + return hasSubjets(label) && !subjets(label).empty() ? + std::accumulate( subjets(label).begin(), subjets(label).end(), + reco::Candidate::LorentzVector(), [] (reco::Candidate::LorentzVector a, reco::CandidatePtr const & b){return a + b->p4();}).mass() : + -1.0; + } protected: diff --git a/DataFormats/PatCandidates/src/Jet.cc b/DataFormats/PatCandidates/src/Jet.cc index 215d3e4930132..592ef17fe5528 100644 --- a/DataFormats/PatCandidates/src/Jet.cc +++ b/DataFormats/PatCandidates/src/Jet.cc @@ -599,7 +599,7 @@ pat::JetPtrCollection const & Jet::subjets( unsigned int index) const { /// String access to subjet list -pat::JetPtrCollection const & Jet::subjets( std::string label ) const { +pat::JetPtrCollection const & Jet::subjets( std::string const & label ) const { auto found = find( subjetLabels_.begin(), subjetLabels_.end(), label ); if ( found != subjetLabels_.end() ){ auto index = std::distance( subjetLabels_.begin(), found ); @@ -611,7 +611,7 @@ pat::JetPtrCollection const & Jet::subjets( std::string label ) const { } /// Add new set of subjets -void Jet::addSubjets( pat::JetPtrCollection const & pieces, std::string label ) { +void Jet::addSubjets( pat::JetPtrCollection const & pieces, std::string const & label ) { subjetCollections_.push_back( pieces ); subjetLabels_.push_back( label ); } From 7fec886b84a5f27781ef00d5e3960e36ef743a21 Mon Sep 17 00:00:00 2001 From: rappoccio Date: Wed, 24 Jan 2018 11:20:09 -0500 Subject: [PATCH 14/18] Update Jet.h Backport of Slava's changes. --- DataFormats/PatCandidates/interface/Jet.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/DataFormats/PatCandidates/interface/Jet.h b/DataFormats/PatCandidates/interface/Jet.h index 636d09d895fc1..88a8eed200691 100644 --- a/DataFormats/PatCandidates/interface/Jet.h +++ b/DataFormats/PatCandidates/interface/Jet.h @@ -516,15 +516,19 @@ namespace pat { /// Access to mass of subjets double groomedMass(unsigned int index = 0) const{ - return nSubjetCollections() > 0 && !subjets(index).empty() ? - std::accumulate( subjets(index).begin(), subjets(index).end(), - reco::Candidate::LorentzVector(), [] (reco::Candidate::LorentzVector a, reco::CandidatePtr const & b){return a + b->p4();}).mass() : + auto const& sub = subjets(index); + return nSubjetCollections() > index && !sub.empty() ? + std::accumulate( sub.begin(), sub.end(), + reco::Candidate::LorentzVector(), + [] (reco::Candidate::LorentzVector const & a, reco::CandidatePtr const & b){return a + b->p4();}).mass() : -1.0; } double groomedMass(std::string const & label) const{ - return hasSubjets(label) && !subjets(label).empty() ? - std::accumulate( subjets(label).begin(), subjets(label).end(), - reco::Candidate::LorentzVector(), [] (reco::Candidate::LorentzVector a, reco::CandidatePtr const & b){return a + b->p4();}).mass() : + auto const& sub = subjets(label); + return hasSubjets(label) && !sub.empty() ? + std::accumulate( sub.begin(), sub.end(), + reco::Candidate::LorentzVector(), + [] (reco::Candidate::LorentzVector const & a, reco::CandidatePtr const & b){return a + b->p4();}).mass() : -1.0; } From 94e42f029b9350c56f7cbce8c7c19f89c56e75ec Mon Sep 17 00:00:00 2001 From: Vladimir Date: Tue, 30 Jan 2018 12:03:40 +0100 Subject: [PATCH 15/18] pileup --- Mixing/Base/src/PileUp.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mixing/Base/src/PileUp.cc b/Mixing/Base/src/PileUp.cc index eec86569e2796..6442045938e3e 100644 --- a/Mixing/Base/src/PileUp.cc +++ b/Mixing/Base/src/PileUp.cc @@ -68,7 +68,7 @@ namespace edm { Source_type_(config->sourcename_), averageNumber_(config->averageNumber_), intAverage_(static_cast(averageNumber_)), - histo_(config->histo_), + histo_(std::make_shared(*config->histo_)), histoDistribution_(type_ == "histo"), probFunctionDistribution_(type_ == "probFunction"), poisson_(type_ == "poisson"), From 7611eb0b714038f0a43432f51a385b8cae9544c7 Mon Sep 17 00:00:00 2001 From: Francesco Date: Tue, 30 Jan 2018 17:14:57 +0100 Subject: [PATCH 16/18] restoring egamma sequence for allForPrompt dqm sequence --- DQMOffline/Configuration/python/autoDQM.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DQMOffline/Configuration/python/autoDQM.py b/DQMOffline/Configuration/python/autoDQM.py index a62ae8e8d6b76..9cbc8fd634901 100644 --- a/DQMOffline/Configuration/python/autoDQM.py +++ b/DQMOffline/Configuration/python/autoDQM.py @@ -41,9 +41,9 @@ 'express': ['@commonSiStripZeroBias+@muon+@hcal+@jetmet+@ecal', 'PostDQMOffline', '@commonSiStripZeroBias+@muon+@hcal+@jetmet+@ecal'], - 'allForPrompt': ['@common+@muon+@hcal+@jetmet+@ecal', + 'allForPrompt': ['@common+@muon+@hcal+@jetmet+@ecal+@egamma', 'PostDQMOffline', - '@common+@muon+@hcal+@jetmet+@ecal'], + '@common+@muon+@hcal+@jetmet+@ecal+@egamma'], 'miniAODDQM': ['DQMOfflineMiniAOD', 'PostDQMOfflineMiniAOD', 'DQMHarvestMiniAOD'], From e7fd3a4148538f5682ed2b0808c880a53927035e Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Wed, 31 Jan 2018 23:29:24 +0100 Subject: [PATCH 17/18] Have TTreeCache work with EmbeddedRootSource The EmbeddedRootSource calls different functions of RootFile and RootTree. This was causing it to not properly use the TTreeCache. Now we will use the TTreeCache in that case and properly handle the case where we start reading near the end of the file and then jump back to the beginning before training has completed. --- IOPool/Input/src/RootFile.h | 2 +- IOPool/Input/src/RootTree.cc | 30 ++++++++++++++++++++++++++++-- IOPool/Input/src/RootTree.h | 1 + 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/IOPool/Input/src/RootFile.h b/IOPool/Input/src/RootFile.h index 9745042b3cd9b..12d3e1cef900c 100644 --- a/IOPool/Input/src/RootFile.h +++ b/IOPool/Input/src/RootFile.h @@ -202,7 +202,7 @@ namespace edm { bool skipEntries(unsigned int& offset) {return eventTree_.skipEntries(offset);} bool skipEvents(int& offset); bool goToEvent(EventID const& eventID); - bool nextEventEntry() {return eventTree_.next();} + bool nextEventEntry() {return eventTree_.nextWithCache();} IndexIntoFile::EntryType getNextItemType(RunNumber_t& run, LuminosityBlockNumber_t& lumi, EventNumber_t& event); std::shared_ptr branchIDListHelper() const {return get_underlying_safe(branchIDListHelper_);} std::shared_ptr& branchIDListHelper() {return get_underlying_safe(branchIDListHelper_);} diff --git a/IOPool/Input/src/RootTree.cc b/IOPool/Input/src/RootTree.cc index d91f537217bb0..d7d8a156c5a90 100644 --- a/IOPool/Input/src/RootTree.cc +++ b/IOPool/Input/src/RootTree.cc @@ -192,6 +192,15 @@ namespace edm { if (treeMaxVirtualSize >= 0) tree_->SetMaxVirtualSize(static_cast(treeMaxVirtualSize)); } + bool + RootTree::nextWithCache() { + bool returnValue = ++entryNumber_ < entries_; + if(returnValue) { + setEntryNumber(entryNumber_); + } + return returnValue; + } + void RootTree::setEntryNumber(EntryNumber theEntryNumber) { filePtr_->SetCacheRead(treeCache_.get()); @@ -201,6 +210,16 @@ namespace edm { // However, because reading one event in the cluster is supposed to be equivalent to reading all events in the cluster, // we're not incurring additional over-reading - we're just doing it more efficiently. // NOTE: Constructor guarantees treeAutoFlush_ is positive, even if TTree->GetAutoFlush() is negative. + if(theEntryNumber < entryNumber_ and theEntryNumber >=0) { + //We started reading the file near the end, now we need to correct for the learning length + if(switchOverEntry_ >tree_->GetEntries()) { + switchOverEntry_ = switchOverEntry_-tree_->GetEntries(); + if(rawTreeCache_) { + rawTreeCache_->SetEntryRange(theEntryNumber, switchOverEntry_); + rawTreeCache_->FillBuffer(); + } + } + } if ((theEntryNumber < static_cast(entryNumber_-treeAutoFlush_)) && (treeCache_) && (!treeCache_->IsLearning()) && (entries_ > 0) && (switchOverEntry_ >= 0)) { treeCache_->SetEntryRange(theEntryNumber, entries_); @@ -382,12 +401,19 @@ namespace edm { filePtr_->SetCacheRead(nullptr); rawTreeCache_->SetLearnEntries(0); switchOverEntry_ = entryNumber_ + learningEntries_; + auto rawStart = entryNumber_; + auto rawEnd = switchOverEntry_; + auto treeStart =switchOverEntry_; + if(switchOverEntry_ >= tree_->GetEntries()) { + treeStart = switchOverEntry_-tree_->GetEntries(); + rawEnd = tree_->GetEntries(); + } rawTreeCache_->StartLearningPhase(); - rawTreeCache_->SetEntryRange(entryNumber_, switchOverEntry_); + rawTreeCache_->SetEntryRange(rawStart, rawEnd); rawTreeCache_->AddBranch("*", kTRUE); rawTreeCache_->StopLearningPhase(); treeCache_->StartLearningPhase(); - treeCache_->SetEntryRange(switchOverEntry_, tree_->GetEntries()); + treeCache_->SetEntryRange(treeStart, tree_->GetEntries()); // Make sure that 'branchListIndexes' branch exist in input file if (filePtr_->Get(poolNames::branchListIndexesBranchName().c_str()) != nullptr) { treeCache_->AddBranch(poolNames::branchListIndexesBranchName().c_str(), kTRUE); diff --git a/IOPool/Input/src/RootTree.h b/IOPool/Input/src/RootTree.h index 1712422c0e396..7da13921beee5 100644 --- a/IOPool/Input/src/RootTree.h +++ b/IOPool/Input/src/RootTree.h @@ -93,6 +93,7 @@ namespace edm { std::string const& oldBranchName); bool next() {return ++entryNumber_ < entries_;} + bool nextWithCache(); bool previous() {return --entryNumber_ >= 0;} bool current() const {return entryNumber_ < entries_ && entryNumber_ >= 0;} bool current(EntryNumber entry) const {return entry < entries_ && entry >= 0;} From c1de9f1d345fa3923c9dd2b5c7be488537b7539e Mon Sep 17 00:00:00 2001 From: Francesco Date: Tue, 6 Feb 2018 12:43:45 +0100 Subject: [PATCH 18/18] adding harvesting step for NANOAOD workflows --- .../PyReleaseValidation/python/relval_standard.py | 9 ++++----- Configuration/PyReleaseValidation/python/relval_steps.py | 8 ++++++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_standard.py b/Configuration/PyReleaseValidation/python/relval_standard.py index 406605de1d33a..25b712711f0a3 100644 --- a/Configuration/PyReleaseValidation/python/relval_standard.py +++ b/Configuration/PyReleaseValidation/python/relval_standard.py @@ -222,7 +222,7 @@ # reminiAOD wf on 2016H 80X input workflows[136.7721] = ['',['RunJetHT2016H_reminiaod','REMINIAOD_data2016','HARVESTDR2_REMINIAOD_data2016']] # nanoAOD wf on 2016H 80X input -workflows[136.7722] = ['',['RunJetHT2016H_nano','NANOEDM2016_80X']] +workflows[136.7722] = ['',['RunJetHT2016H_nano','NANOEDM2016_80X','HARVESTNANOAOD2016_80X']] ### run 2017B ### workflows[136.780] = ['',['RunHLTPhy2017B','HLTDR2_2017','RECODR2_2017reHLT_Prompt','HARVEST2017']] @@ -378,11 +378,10 @@ # nanoaod wf without intermediate EDM, starting from existing MINIAOD inputs workflows[1325.6] = ['', ['TTbar_13_94XNanoAODINPUT','NANOAODMC2017']] # nanoaod wf with intermediate EDM and merge step, starting from existing MINIAOD inputs -workflows[1325.7] = ['', ['TTbar_13_94XNanoAODINPUT','NANOEDMMC2017']] -workflows[1325.8] = ['', ['TTbar_13_92XNanoAODINPUT','NANOEDMMC2017_92X']] +workflows[1325.7] = ['', ['TTbar_13_94XNanoAODINPUT','NANOEDMMC2017','HARVESTNANOAODMC2017']] +workflows[1325.8] = ['', ['TTbar_13_92XNanoAODINPUT','NANOEDMMC2017_92X','HARVESTNANOAODMC2017_92X']] #using ZEE as I cannot find TT at CERN -workflows[1329.1] = ['', ['ZEE_13_80XNanoAODINPUT','NANOEDMMC2016_80X']] - +workflows[1329.1] = ['', ['ZEE_13_80XNanoAODINPUT','NANOEDMMC2016_80X','HARVESTNANOAODMC2016_80X']] workflows[1326] = ['', ['WE_13','DIGIUP15','RECOUP15','HARVESTUP15']] diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 0d9458fe3d68b..8a6781b040d6e 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -2020,6 +2020,14 @@ def gen2018HiMix(fragment,howMuch): steps['NANOEDM2017_92X'] = merge([{'--era': 'Run2_2017,run2_nanoAOD_92X'}, steps['NANOEDM2017'] ]) steps['NANOEDM2016_80X'] = merge([{'--era': 'Run2_2016,run2_miniAOD_80XLegacy'}, steps['NANOEDM2017'] ]) +steps['HARVESTNANOAODMC2017']=merge([{'-s':'HARVESTING:@nanoAODDQM','--conditions': 'auto:phase1_2017_realistic','--era': 'Run2_2017'},steps['HARVESTUP15']]) +steps['HARVESTNANOAODMC2017_92X']=merge([{'--era': 'Run2_2017,run2_nanoAOD_92X'},steps['HARVESTNANOAODMC2017']]) +steps['HARVESTNANOAODMC2016_80X']=merge([{'--conditions': 'auto:run2_mc','--era': 'Run2_2016,run2_miniAOD_80XLegacy'},steps['HARVESTNANOAODMC2017']]) + +steps['HARVESTNANOAOD2017']=merge([{'--data':'','-s':'HARVESTING:@nanoAODDQM','--conditions':'auto:run2_data_relval','--era':'Run2_2017'},steps['HARVESTDR2']]) +steps['HARVESTNANOAOD2017_92X']=merge([{'--era': 'Run2_2017,run2_nanoAOD_92X'},steps['HARVESTNANOAOD2017']]) +steps['HARVESTNANOAOD2016_80X']=merge([{'--era': 'Run2_2016,run2_miniAOD_80XLegacy'},steps['HARVESTNANOAOD2017']]) + steps['NANOMERGE'] = { '-s': 'ENDJOB', '-n': 1000 , '--eventcontent' : 'NANOAODSIM','--datatier': 'NANOAODSIM', '--conditions': 'auto:run2_mc' } #################################################################################