diff --git a/Alignment/CommonAlignmentProducer/python/ALCARECOTkAlMinBiasHI_cff.py b/Alignment/CommonAlignmentProducer/python/ALCARECOTkAlMinBiasHI_cff.py index a6c6dff7ca17a..675b8f1f170ba 100644 --- a/Alignment/CommonAlignmentProducer/python/ALCARECOTkAlMinBiasHI_cff.py +++ b/Alignment/CommonAlignmentProducer/python/ALCARECOTkAlMinBiasHI_cff.py @@ -10,7 +10,7 @@ ALCARECOTkAlMinBiasHIDCSFilter = ALCARECOTkAlMinBiasDCSFilter.clone() ALCARECOTkAlMinBiasHI = ALCARECOTkAlMinBias.clone( - src = 'hiGeneralTracks' + src = 'hiSelectedTracks' ) seqALCARECOTkAlMinBiasHI = cms.Sequence(ALCARECOTkAlMinBiasHIHLT+ALCARECOTkAlMinBiasHIDCSFilter+ALCARECOTkAlMinBiasHI) diff --git a/Alignment/HIPAlignmentAlgorithm/src/LhcTrackAnalyzer.cc b/Alignment/HIPAlignmentAlgorithm/src/LhcTrackAnalyzer.cc index 791bc885d55a3..c4952ce76d27a 100644 --- a/Alignment/HIPAlignmentAlgorithm/src/LhcTrackAnalyzer.cc +++ b/Alignment/HIPAlignmentAlgorithm/src/LhcTrackAnalyzer.cc @@ -162,14 +162,14 @@ LhcTrackAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetu int myalgo=-88; if(track->algo()==reco::TrackBase::undefAlgorithm)myalgo=0; if(track->algo()==reco::TrackBase::ctf)myalgo=1; - if(track->algo()==reco::TrackBase::initialStep)myalgo=4; - if(track->algo()==reco::TrackBase::lowPtTripletStep)myalgo=5; - if(track->algo()==reco::TrackBase::pixelPairStep)myalgo=6; - if(track->algo()==reco::TrackBase::detachedTripletStep)myalgo=7; - if(track->algo()==reco::TrackBase::mixedTripletStep)myalgo=8; - if(track->algo()==reco::TrackBase::pixelLessStep)myalgo=9; - if(track->algo()==reco::TrackBase::tobTecStep)myalgo=10; - if(track->algo()==reco::TrackBase::jetCoreRegionalStep)myalgo=11; + if(track->algo()==reco::TrackBase::iter0)myalgo=4; + if(track->algo()==reco::TrackBase::iter1)myalgo=5; + if(track->algo()==reco::TrackBase::iter2)myalgo=6; + if(track->algo()==reco::TrackBase::iter3)myalgo=7; + if(track->algo()==reco::TrackBase::iter4)myalgo=8; + if(track->algo()==reco::TrackBase::iter5)myalgo=9; + if(track->algo()==reco::TrackBase::iter6)myalgo=10; + if(track->algo()==reco::TrackBase::iter7)myalgo=11; trkAlgo_[nTracks_] = myalgo; int myquality=-99; diff --git a/CalibTracker/SiPixelConnectivity/test/SiPixelFedCablingMapWriter_cfg.py b/CalibTracker/SiPixelConnectivity/test/write_cfg.py similarity index 83% rename from CalibTracker/SiPixelConnectivity/test/SiPixelFedCablingMapWriter_cfg.py rename to CalibTracker/SiPixelConnectivity/test/write_cfg.py index 4cfad9be94924..32cd37b8825c3 100644 --- a/CalibTracker/SiPixelConnectivity/test/SiPixelFedCablingMapWriter_cfg.py +++ b/CalibTracker/SiPixelConnectivity/test/write_cfg.py @@ -5,11 +5,8 @@ process.CondDBCommon.connect = cms.string("sqlite_file:cabling.db") process.load("Configuration.StandardSequences.Geometry_cff") -process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff") -from Configuration.AlCa.autoCond_condDBv2 import autoCond -process.GlobalTag.globaltag = autoCond['run2_design'] -#In case you of conditions missing, or if you want to test a specific GT -#process.GlobalTag.globaltag = 'PRE_DES72_V6' +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +process.GlobalTag.globaltag = 'MC_3XY_V15::All' process.source = cms.Source("EmptyIOVSource", timetype = cms.string('runnumber'), diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOSiStripCalMinBiasHI_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOSiStripCalMinBiasHI_cff.py index aee0eba876a34..e7e0938b27c76 100644 --- a/Calibration/TkAlCaRecoProducers/python/ALCARECOSiStripCalMinBiasHI_cff.py +++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOSiStripCalMinBiasHI_cff.py @@ -28,7 +28,7 @@ ALCARECOSiStripCalMinBias = Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi.AlignmentTrackSelector.clone() ALCARECOSiStripCalMinBias.filter = True ##do not store empty events -ALCARECOSiStripCalMinBias.src = 'hiGeneralTracks' +ALCARECOSiStripCalMinBias.src = 'hiSelectedTracks' ALCARECOSiStripCalMinBias.applyBasicCuts = True ALCARECOSiStripCalMinBias.ptMin = 0.8 ##GeV ALCARECOSiStripCalMinBias.nHitMin = 6 ## at least 6 hits required diff --git a/Calibration/TkAlCaRecoProducers/python/AlcaBeamSpotProducer_cfi.py b/Calibration/TkAlCaRecoProducers/python/AlcaBeamSpotProducer_cfi.py index 739f67d726f3c..ca98991b82935 100644 --- a/Calibration/TkAlCaRecoProducers/python/AlcaBeamSpotProducer_cfi.py +++ b/Calibration/TkAlCaRecoProducers/python/AlcaBeamSpotProducer_cfi.py @@ -28,7 +28,7 @@ MinimumTotalLayers = cms.untracked.int32(11), MinimumPixelLayers = cms.untracked.int32(3), MaximumNormChi2 = cms.untracked.double(2.0), - TrackAlgorithm = cms.untracked.vstring('initialStep'), ## ctf,rs,cosmics,initialStep,lowPtTripletStep...; for all algos, leave it blank + TrackAlgorithm = cms.untracked.vstring('iter0'), ## ctf,rs,cosmics,iter0,iter1...; for all algos, leave it blank TrackQuality = cms.untracked.vstring(), ## loose, tight, highPurity...; for all qualities, leave it blank InputBeamWidth = cms.untracked.double(-1.0), ## if -1 use the value calculated by the analyzer FractionOfFittedTrks = cms.untracked.double(0.9), diff --git a/CommonTools/Utils/test/testExpressionParser.cc b/CommonTools/Utils/test/testExpressionParser.cc index 88cff79d65b83..32e21bbf55f0e 100755 --- a/CommonTools/Utils/test/testExpressionParser.cc +++ b/CommonTools/Utils/test/testExpressionParser.cc @@ -138,7 +138,7 @@ void testExpressionParser::checkAll() { edm::TestHandle h(&trkExtras, pid); reco::TrackExtraRef trkExtraRef(h, 0); trk.setExtra(trkExtraRef); - trk.setAlgorithm(reco::Track::pixelPairStep); + trk.setAlgorithm(reco::Track::iter2); { edm::TypeWithDict t(typeid(reco::Track)); o = edm::ObjectWithDict(t, & trk); @@ -152,7 +152,7 @@ void testExpressionParser::checkAll() { checkTrack("hitPattern.numberOfValidHits", trk.hitPattern().numberOfValidHits()); checkTrack("extra.outerPhi", trk.extra()->outerPhi()); checkTrack("referencePoint.R", trk.referencePoint().R()); - checkTrack("algo", reco::Track::pixelPairStep); + checkTrack("algo", reco::Track::iter2); checkTrack("quality('highPurity')", trk.quality(reco::TrackBase::highPurity)); checkTrack("cosh(theta)", cosh(trk.theta())); checkTrack("hypot(px, py)", hypot(trk.px(), trk.py())); diff --git a/CondCore/CondDB/interface/ConnectionPool.h b/CondCore/CondDB/interface/ConnectionPool.h index 5119aa8ec2135..7a4eba9e81d9d 100644 --- a/CondCore/CondDB/interface/ConnectionPool.h +++ b/CondCore/CondDB/interface/ConnectionPool.h @@ -14,7 +14,6 @@ namespace edm { namespace coral { class IConnectionServiceConfiguration; - class ISessionProxy; } namespace cond { @@ -42,12 +41,8 @@ namespace cond { void configure(); Session createSession( const std::string& connectionString, bool writeCapable=false, BackendType backType=DEFAULT_DB ); Session createReadOnlySession( const std::string& connectionString, const std::string& transactionId ); - boost::shared_ptr createCoralSession( const std::string& connectionString, bool writeCapable=false ); private: - boost::shared_ptr createCoralSession( const std::string& connectionString, - const std::string& transactionId, - bool writeCapable=false ); Session createSession( const std::string& connectionString, const std::string& transactionId, bool writeCapable=false, diff --git a/CondCore/CondDB/src/ConnectionPool.cc b/CondCore/CondDB/src/ConnectionPool.cc index d57eb1cae3a1f..971a3bfa61cae 100644 --- a/CondCore/CondDB/src/ConnectionPool.cc +++ b/CondCore/CondDB/src/ConnectionPool.cc @@ -132,28 +132,6 @@ namespace cond { configure( connServ.configuration() ); } - boost::shared_ptr ConnectionPool::createCoralSession( const std::string& connectionString, - const std::string& transactionId, - bool writeCapable ){ - coral::ConnectionService connServ; - std::pair fullConnectionPars = getConnectionParams( connectionString, transactionId ); - if( !fullConnectionPars.second.empty() ) { - // the olds formats - connServ.webCacheControl().refreshTable( fullConnectionPars.second, POOL_IOV_TABLE_DATA ); - connServ.webCacheControl().refreshTable( fullConnectionPars.second, ORA_IOV_TABLE_1 ); - connServ.webCacheControl().refreshTable( fullConnectionPars.second, ORA_IOV_TABLE_2 ); - connServ.webCacheControl().refreshTable( fullConnectionPars.second, ORA_IOV_TABLE_3 ); - // the new schema... - connServ.webCacheControl().setTableTimeToLive( fullConnectionPars.second, TAG::tname, 1 ); - connServ.webCacheControl().setTableTimeToLive( fullConnectionPars.second, IOV::tname, 1 ); - connServ.webCacheControl().setTableTimeToLive( fullConnectionPars.second, PAYLOAD::tname, 3 ); - } - - return boost::shared_ptr( connServ.connect( fullConnectionPars.first, - writeCapable?Auth::COND_WRITER_ROLE:Auth::COND_READER_ROLE, - writeCapable?coral::Update:coral::ReadOnly ) ); - } - Session ConnectionPool::createSession( const std::string& connectionString, const std::string& transactionId, bool writeCapable, @@ -172,8 +150,9 @@ namespace cond { connServ.webCacheControl().setTableTimeToLive( fullConnectionPars.second, PAYLOAD::tname, 3 ); } - boost::shared_ptr coralSession = createCoralSession( connectionString, transactionId, writeCapable ); - + boost::shared_ptr coralSession( connServ.connect( fullConnectionPars.first, + writeCapable?Auth::COND_WRITER_ROLE:Auth::COND_READER_ROLE, + writeCapable?coral::Update:coral::ReadOnly ) ); BackendType bt; auto it = m_dbTypes.find( connectionString); if( it == m_dbTypes.end() ){ @@ -195,12 +174,6 @@ namespace cond { Session ConnectionPool::createReadOnlySession( const std::string& connectionString, const std::string& transactionId ){ return createSession( connectionString, transactionId ); } - - boost::shared_ptr ConnectionPool::createCoralSession( const std::string& connectionString, - bool writeCapable ){ - return createCoralSession( connectionString, "", writeCapable ); - } - void ConnectionPool::setMessageVerbosity( coral::MsgLevel level ){ m_messageLevel = level; } diff --git a/CondCore/CondDB/src/OraDbSchema.cc b/CondCore/CondDB/src/OraDbSchema.cc index 8431bcd8f5ece..0c3e51e309245 100644 --- a/CondCore/CondDB/src/OraDbSchema.cc +++ b/CondCore/CondDB/src/OraDbSchema.cc @@ -233,29 +233,19 @@ namespace cond { const boost::posix_time::ptime& ){ if(!m_cache.load(tag)) throwException("Tag "+tag+" has not been found in the database.", "OraIOVTable::insertOne"); - if( m_cache.editor().timetype() != cond::hash ){ - m_cache.editor().append( since, payloadHash ); - } else { - m_cache.editor().freeInsert( since, payloadHash ); - } + m_cache.editor().append( since, payloadHash ); } void OraIOVTable::insertMany( const std::string& tag, const std::vector >& iovs ){ if(!m_cache.load(tag)) throwException("Tag "+tag+" has not been found in the database.", "OraIOVTable::insertOne"); - if( m_cache.editor().timetype() != cond::hash ){ - std::vector > data; - data.reserve( iovs.size() ); - for( auto v : iovs ){ - data.push_back( std::make_pair( std::get<0>(v), std::get<1>(v) ) ); - } - m_cache.editor().bulkAppend( data ); - } else { - for( auto v: iovs ){ - insertOne( tag, std::get<0>(v), std::get<1>(v), std::get<2>(v) ); - } + std::vector > data; + data.reserve( iovs.size() ); + for( auto v : iovs ){ + data.push_back( std::make_pair( std::get<0>(v), std::get<1>(v) ) ); } + m_cache.editor().bulkAppend( data ); } void OraIOVTable::erase( const std::string& ){ diff --git a/CondCore/CondDB/src/Session.cc b/CondCore/CondDB/src/Session.cc index 1c58651c650a2..4a5a712cb70e2 100644 --- a/CondCore/CondDB/src/Session.cc +++ b/CondCore/CondDB/src/Session.cc @@ -253,6 +253,7 @@ namespace cond { std::string Session::parsePoolToken( const std::string& poolToken ){ m_session->openIovDb(); + //std::cout <<"## parsing pool token="<iovSchema().parsePoolToken( poolToken ); } diff --git a/CondCore/DBOutputService/interface/PoolDBOutputService.h b/CondCore/DBOutputService/interface/PoolDBOutputService.h index 6a57f74e6f7e4..bde20edd2a82a 100644 --- a/CondCore/DBOutputService/interface/PoolDBOutputService.h +++ b/CondCore/DBOutputService/interface/PoolDBOutputService.h @@ -2,8 +2,8 @@ #define CondCore_PoolDBOutputService_h #include "FWCore/ServiceRegistry/interface/ActivityRegistry.h" #include "FWCore/Utilities/interface/TypeID.h" -#include "CondCore/DBCommon/interface/Logger.h" -#include "CondCore/DBCommon/interface/LogDBEntry.h" +//#include "CondCore/DBCommon/interface/Logger.h" +//#include "CondCore/DBCommon/interface/LogDBEntry.h" //#include "CondCore/DBCommon/interface/TagInfo.h" #include "CondCore/CondDB/interface/Session.h" #include @@ -51,7 +51,7 @@ namespace cond{ // std::string tag( const std::string& recordName ); bool isNewTagRequest( const std::string& recordName ); - const cond::Logger& queryLog() const; + //const cond::Logger& queryLog() const; // template @@ -190,7 +190,7 @@ namespace cond{ void initDB( bool forReading=true ); Record & lookUpRecord(const std::string& recordName); - cond::UserLogInfo& lookUpUserLogInfo(const std::string& recordName); + //cond::UserLogInfo& lookUpUserLogInfo(const std::string& recordName); private: std::recursive_mutex m_mutex; @@ -199,14 +199,14 @@ namespace cond{ std::vector m_currentTimes; cond::persistency::Session m_session; - std::string m_logConnectionString; - std::auto_ptr m_logdb; + //std::string m_logConnectionString; + //std::auto_ptr m_logdb; bool m_dbstarted; std::map m_callbacks; - std::vector< std::pair > m_newtags; + //std::vector< std::pair > m_newtags; bool m_closeIOV; - std::map m_logheaders; + //std::map m_logheaders; };//PoolDBOutputService }//ns service diff --git a/CondCore/DBOutputService/src/PoolDBOutputService.cc b/CondCore/DBOutputService/src/PoolDBOutputService.cc index 6d9797a80dba7..4e6b5d65bbbe6 100644 --- a/CondCore/DBOutputService/src/PoolDBOutputService.cc +++ b/CondCore/DBOutputService/src/PoolDBOutputService.cc @@ -10,8 +10,6 @@ #include "FWCore/ServiceRegistry/interface/GlobalContext.h" #include "FWCore/ServiceRegistry/interface/SystemBounds.h" #include "CondCore/CondDB/interface/Exception.h" -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/DbSession.h" // #include #include @@ -32,27 +30,29 @@ cond::service::PoolDBOutputService::fillRecord( edm::ParameterSet & pset) { thisrecord.m_closeIOV = pset.getUntrackedParameter("closeIOV", m_closeIOV); + //thisrecord.m_timetype=cond::findSpecs(pset.getUntrackedParameter< std::string >("timetype",m_timetypestr)).type; thisrecord.m_timetype = cond::time::timeTypeFromName( pset.getUntrackedParameter< std::string >("timetype",m_timetypestr) ); m_callbacks.insert(std::make_pair(thisrecord.m_idName,thisrecord)); - // *** THE NEW LOGGING has still to be defined and implemented. - if( !m_logConnectionString.empty() ){ - cond::UserLogInfo userloginfo; - m_logheaders.insert(std::make_pair(thisrecord.m_idName,userloginfo)); - } + // *** THE LOGGING has still to be defined and implemented. + //if( !m_logConnectionString.empty() ){ + // cond::UserLogInfo userloginfo; + // m_logheaders.insert(std::make_pair(thisrecord.m_idName,userloginfo)); + //} } cond::service::PoolDBOutputService::PoolDBOutputService(const edm::ParameterSet & iConfig,edm::ActivityRegistry & iAR ): m_timetypestr(""), m_currentTimes{}, m_session(), - m_logConnectionString(""), - m_logdb(), + //m_logConnectionString(""), + //m_logdb(), m_dbstarted( false ), m_callbacks(), - m_closeIOV(false), - m_logheaders() + //m_newtags(), + m_closeIOV(false)//, + //m_logheaders() { m_closeIOV=iConfig.getUntrackedParameter("closeIOV",m_closeIOV); @@ -68,14 +68,11 @@ cond::service::PoolDBOutputService::PoolDBOutputService(const edm::ParameterSet if( backType == UNKNOWN_DB ) backType = DEFAULT_DB; m_session = connection.createSession( connectionString, true, backType ); - if( iConfig.exists("logconnect") ){ - m_logConnectionString = iConfig.getUntrackedParameter("logconnect"); - cond::DbConnection conn; - conn.configuration().setParameters( connectionPset ); - conn.configure(); - cond::DbSession logSession = conn.createSession(); - m_logdb.reset( new cond::Logger( logSession ) ); - } + //if( iConfig.exists("logconnect") ){ + // m_logConnectionString = iConfig.getUntrackedParameter("logconnect"); + // cond::DbSession logSession = connection.createSession(); + // m_logdb.reset( new cond::Logger( logSession ) ); + //} typedef std::vector< edm::ParameterSet > Parameters; Parameters toPut=iConfig.getParameter("toPut"); @@ -131,10 +128,10 @@ cond::service::PoolDBOutputService::initDB( bool forReading ) if( !m_session.existsDatabase() ) m_session.createDatabase(); } //init logdb if required - if(!m_logConnectionString.empty()){ - m_logdb->connect( m_logConnectionString ); - m_logdb->createLogDBIfNonExist(); - } + //if(!m_logConnectionString.empty()){ + // m_logdb->connect( m_logConnectionString ); + // m_logdb->createLogDBIfNonExist(); + //} } catch( const std::exception& er ){ cond::throwException( std::string(er.what()),"PoolDBOutputService::initDB" ); } @@ -216,10 +213,13 @@ cond::service::PoolDBOutputService::createNewIOV( const std::string& firstPayloa cond::throwException( myrecord.m_tag + " is not a new tag", "PoolDBOutputService::createNewIOV"); } std::string iovToken; - if( withlogging && m_logConnectionString.empty() ) - cond::throwException("Log db was not set from PoolDBOutputService::createNewIOV", - "PoolDBOutputService::createNewIOV"); - + //if(withlogging){ + // if( m_logConnectionString.empty() ) { + // throw cond::db::Exception("Log db was not set from PoolDBOutputService::createNewIOV", + // "PoolDBOutputService::createNewIOV"); + // } + //} + try{ // FIX ME: synchronization type and description have to be passed as the other parameters? cond::persistency::IOVEditor editor = m_session.createIov( payloadType, myrecord.m_tag, myrecord.m_timetype, cond::OFFLINE ); @@ -227,19 +227,19 @@ cond::service::PoolDBOutputService::createNewIOV( const std::string& firstPayloa editor.insert( firstSinceTime, firstPayloadId ); editor.flush(); myrecord.m_isNewTag=false; - if(withlogging){ - std::string destconnect=m_session.connectionString(); - cond::UserLogInfo a=this->lookUpUserLogInfo(recordName); - m_logdb->logOperationNow(a,destconnect,payloadType,firstPayloadId,myrecord.m_tag,myrecord.timetypestr(),0,firstSinceTime); - } + //if(withlogging){ + // std::string destconnect=m_session.connectionString(); + // cond::UserLogInfo a=this->lookUpUserLogInfo(recordName); + // m_logdb->logOperationNow(a,destconnect,objClass,objToken,myrecord.m_tag,myrecord.timetypestr(),payloadIdx,firstSinceTime); + //} }catch(const std::exception& er){ - if(withlogging){ - std::string destconnect=m_session.connectionString(); - cond::UserLogInfo a=this->lookUpUserLogInfo(recordName); - m_logdb->logFailedOperationNow(a,destconnect,payloadType,firstPayloadId,myrecord.m_tag,myrecord.timetypestr(),0,firstSinceTime,std::string(er.what())); - } + //if(withlogging){ + // std::string destconnect=m_session.connectionString(); + // cond::UserLogInfo a=this->lookUpUserLogInfo(recordName); + // m_logdb->logFailedOperationNow(a,destconnect,objClass,objToken,myrecord.m_tag,myrecord.timetypestr(),payloadIdx,firstSinceTime,std::string(er.what())); + //} cond::throwException(std::string(er.what()) + " from PoolDBOutputService::createNewIOV ", - "PoolDBOutputService::createNewIOV"); + "PoolDBOutputService::createNewIOV"); } scope.close(); } @@ -257,30 +257,14 @@ cond::service::PoolDBOutputService::createNewIOV( const std::string& firstPayloa cond::throwException( myrecord.m_tag + " is not a new tag", "PoolDBOutputService::createNewIOV"); } std::string iovToken; - if( withlogging && m_logConnectionString.empty() ) - cond::throwException("Log db was not set from PoolDBOutputService::createNewIOV", - "PoolDBOutputService::createNewIOV"); - - std::string payloadType(""); try{ // FIX ME: synchronization type and description have to be passed as the other parameters? cond::persistency::IOVEditor editor = m_session.createIovForPayload( firstPayloadId, myrecord.m_tag, myrecord.m_timetype, cond::OFFLINE ); editor.setDescription( "New Tag" ); - payloadType = editor.payloadType(); editor.insert( firstSinceTime, firstPayloadId ); editor.flush(); myrecord.m_isNewTag=false; - if(withlogging){ - std::string destconnect=m_session.connectionString(); - cond::UserLogInfo a=this->lookUpUserLogInfo(recordName); - m_logdb->logOperationNow(a,destconnect,payloadType,firstPayloadId,myrecord.m_tag,myrecord.timetypestr(),0,firstSinceTime); - } }catch(const std::exception& er){ - if(withlogging){ - std::string destconnect=m_session.connectionString(); - cond::UserLogInfo a=this->lookUpUserLogInfo(recordName); - m_logdb->logFailedOperationNow(a,destconnect,payloadType,firstPayloadId,myrecord.m_tag,myrecord.timetypestr(),0,firstSinceTime,std::string(er.what())); - } cond::throwException(std::string(er.what()) + " from PoolDBOutputService::createNewIOV ", "PoolDBOutputService::createNewIOV"); } @@ -299,27 +283,28 @@ cond::service::PoolDBOutputService::appendSinceTime( const std::string& payloadI cond::throwException(std::string("Cannot append to non-existing tag ") + myrecord.m_tag, "PoolDBOutputService::appendSinceTime"); } - if( withlogging && m_logConnectionString.empty() ) - cond::throwException("Log db was not set from PoolDBOutputService::createNewIOV", - "PoolDBOutputService::createNewIOV"); - std::string payloadType(""); + //if(withlogging){ + // if( m_logConnectionString.empty() ) { + // throw cond::Exception("Log db was not set from PoolDBOutputService::add"); + // } + //} + try{ cond::persistency::IOVEditor editor = m_session.editIov( myrecord.m_tag ); - payloadType = editor.payloadType(); editor.insert( time, payloadId ); editor.flush(); - if(withlogging){ - std::string destconnect=m_session.connectionString(); - cond::UserLogInfo a=this->lookUpUserLogInfo(recordName); - m_logdb->logOperationNow(a,destconnect,payloadType,payloadId,myrecord.m_tag,myrecord.timetypestr(),0,time); - } + //if(withlogging){ + // std::string destconnect=m_session.connectionString(); + // cond::UserLogInfo a=this->lookUpUserLogInfo(recordName); + // m_logdb->logOperationNow(a,destconnect,objClass,objToken,myrecord.m_tag,myrecord.timetypestr(),payloadIdx,time); + //} }catch(const std::exception& er){ - if(withlogging){ - std::string destconnect=m_session.connectionString(); - cond::UserLogInfo a=this->lookUpUserLogInfo(recordName); - m_logdb->logFailedOperationNow(a,destconnect,payloadType,payloadId,myrecord.m_tag,myrecord.timetypestr(),0,time,std::string(er.what())); - } + //if(withlogging){ + // std::string destconnect=m_session.connectionString(); + // cond::UserLogInfo a=this->lookUpUserLogInfo(recordName); + // m_logdb->logFailedOperationNow(a,destconnect,objClass,objToken,myrecord.m_tag,myrecord.timetypestr(),payloadIdx,time,std::string(er.what())); + //} cond::throwException(std::string(er.what()), "PoolDBOutputService::appendSinceTime"); } @@ -344,12 +329,12 @@ cond::service::PoolDBOutputService::lookUpRecord(const std::string& recordName){ return it->second; } -cond::UserLogInfo& -cond::service::PoolDBOutputService::lookUpUserLogInfo(const std::string& recordName){ - std::map::iterator it=m_logheaders.find(recordName); - if(it==m_logheaders.end()) throw cond::Exception("Log db was not set for record " + recordName + " from PoolDBOutputService::lookUpUserLogInfo"); - return it->second; -} +//cond::UserLogInfo& +//cond::service::PoolDBOutputService::lookUpUserLogInfo(const std::string& recordName){ +// std::map::iterator it=m_logheaders.find(recordName); +// if(it==m_logheaders.end()) throw cond::Exception("Log db was not set for record " + recordName + " from PoolDBOutputService::lookUpUserLogInfo"); +// return it->second; +//} void cond::service::PoolDBOutputService::closeIOV(Time_t lastTill, const std::string& recordName, @@ -373,17 +358,17 @@ cond::service::PoolDBOutputService::closeIOV(Time_t lastTill, const std::string& void cond::service::PoolDBOutputService::setLogHeaderForRecord(const std::string& recordName,const std::string& dataprovenance,const std::string& usertext) { - cond::UserLogInfo& myloginfo=this->lookUpUserLogInfo(recordName); - myloginfo.provenance=dataprovenance; - myloginfo.usertext=usertext; + //cond::UserLogInfo& myloginfo=this->lookUpUserLogInfo(recordName); + //myloginfo.provenance=dataprovenance; + //myloginfo.usertext=usertext; } // -const cond::Logger& -cond::service::PoolDBOutputService::queryLog()const{ - if( !m_logdb.get() ) throw cond::Exception("Log database is not set from PoolDBOutputService::queryLog"); - return *m_logdb; -} +//const cond::Logger& +//cond::service::PoolDBOutputService::queryLog()const{ +// if( !m_logdb.get() ) throw cond::Exception("Log database is not set from PoolDBOutputService::queryLog"); +// return *m_logdb; +//} // Still required. void diff --git a/CondCore/PopCon/interface/PopCon.h b/CondCore/PopCon/interface/PopCon.h index 99093667f5b7a..df7fa2c004193 100644 --- a/CondCore/PopCon/interface/PopCon.h +++ b/CondCore/PopCon/interface/PopCon.h @@ -15,7 +15,7 @@ #include "FWCore/ParameterSet/interface/ParameterSetfwd.h" #include "CondCore/CondDB/interface/Time.h" -#include "CondCore/DBCommon/interface/LogDBEntry.h" + #include #include @@ -51,35 +51,27 @@ namespace popcon { private: - cond::persistency::Session initialize(); + void initialize(); void finalize(Time_t lastTill); private: edm::Service m_dbService; - - cond::persistency::Session m_targetSession; - - std::string m_targetConnectionString; - - std::string m_authPath; - - int m_authSys; std::string m_record; std::string m_payload_name; bool m_LoggingOn; - - bool m_IsDestDbCheckedInQueryLog; + bool m_IsDestDbCheckedInQueryLog; + std::string m_tag; cond::TagInfo_t m_tagInfo; - cond::LogDBEntry m_logDBEntry; + cond::LogDBEntry_t m_logDBEntry; bool m_close; Time_t m_lastTill; @@ -126,7 +118,8 @@ namespace popcon { typedef typename Source::value_type value_type; typedef typename Source::Container Container; - std::pair ret = source(initialize(), + initialize(); + std::pair ret = source(m_dbService->session(), m_tagInfo,m_logDBEntry); Container const & payloads = *ret.first; diff --git a/CondCore/PopCon/interface/PopConSourceHandler.h b/CondCore/PopCon/interface/PopConSourceHandler.h index 3df83c9b877d0..b13d218d38b1a 100644 --- a/CondCore/PopCon/interface/PopConSourceHandler.h +++ b/CondCore/PopCon/interface/PopConSourceHandler.h @@ -7,7 +7,7 @@ #include "CondCore/CondDB/interface/Session.h" #include "CondCore/CondDB/interface/Time.h" //#include "CondCore/DBCommon/interface/TagInfo.h" -#include "CondCore/DBCommon/interface/LogDBEntry.h" +//#include "CondCore/DBCommon/interface/LogDBEntry.h" #include #include @@ -108,11 +108,11 @@ namespace popcon { } // return last successful log entry for the tag in question - cond::LogDBEntry const & logDBEntry() const { return *m_logDBEntry; } + cond::LogDBEntry_t const & logDBEntry() const { return *m_logDBEntry; } // FIX ME void initialize (const cond::persistency::Session& dbSession, - cond::TagInfo_t const & tagInfo, cond::LogDBEntry const & logDBEntry) { + cond::TagInfo_t const & tagInfo, cond::LogDBEntry_t const & logDBEntry) { m_session = dbSession; m_tagInfo = &tagInfo; m_logDBEntry = &logDBEntry; @@ -121,7 +121,7 @@ namespace popcon { // this is the only mandatory interface std::pair operator()(const cond::persistency::Session& session, cond::TagInfo_t const & tagInfo, - cond::LogDBEntry const & logDBEntry) const { + cond::LogDBEntry_t const & logDBEntry) const { const_cast(this)->initialize(session, tagInfo, logDBEntry); return std::pair(&(const_cast(this)->returnData()), userTextLog()); } @@ -181,7 +181,7 @@ namespace popcon { cond::TagInfo_t const * m_tagInfo; - cond::LogDBEntry const * m_logDBEntry; + cond::LogDBEntry_t const * m_logDBEntry; protected: diff --git a/CondCore/PopCon/src/PopCon.cc b/CondCore/PopCon/src/PopCon.cc index 46bc02bfb5164..f4dc6e2c225be 100644 --- a/CondCore/PopCon/src/PopCon.cc +++ b/CondCore/PopCon/src/PopCon.cc @@ -2,20 +2,15 @@ #include "CondCore/PopCon/interface/Exception.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "CondCore/CondDB/interface/ConnectionPool.h" #include namespace popcon { PopCon::PopCon(const edm::ParameterSet& pset): - m_targetSession(), - m_targetConnectionString(pset.getUntrackedParameter< std::string >("targetDBConnectionString","")), - m_authPath( pset.getUntrackedParameter("authenticationPath","")), - m_authSys( pset.getUntrackedParameter("authenticationSystem",1)), m_record(pset.getParameter ("record")), m_payload_name(pset.getUntrackedParameter ("name","")), m_LoggingOn(pset.getUntrackedParameter< bool > ("loggingOn",true)), - m_IsDestDbCheckedInQueryLog( pset.getUntrackedParameter< bool >("IsDestDbCheckedInQueryLog",true)), + m_IsDestDbCheckedInQueryLog(pset.getUntrackedParameter< bool > ("IsDestDbCheckedInQueryLog",true)), m_close(pset.getUntrackedParameter< bool > ("closeIOV",false)), m_lastTill(pset.getUntrackedParameter< bool > ("lastTill",0)) { @@ -24,61 +19,43 @@ namespace popcon { edm::LogInfo ("PopCon") << "This is PopCon (Populator of Condition) V4.0\n" << "Please report any problem and feature request through the savannah portal under the category conditions\n" ; + } - PopCon::~PopCon(){ - if( !m_targetConnectionString.empty() ) { - m_targetSession.transaction().commit(); - } - } + PopCon::~PopCon(){} - cond::persistency::Session PopCon::initialize() { + void PopCon::initialize() { edm::LogInfo ("PopCon")<<"payload name "<session().connectionString(); m_tag = m_dbService->tag(m_record); m_tagInfo.name = m_tag; - if( m_targetConnectionString.empty() ) m_targetSession = m_dbService->session(); - else { - cond::persistency::ConnectionPool connPool; - connPool.setAuthenticationPath( m_authPath ); - connPool.setAuthenticationSystem( m_authSys ); - connPool.configure(); - m_targetSession = connPool.createSession( m_targetConnectionString ); - m_targetSession.transaction().start(); - } - if( m_targetSession.existsIov( m_tag ) ){ - cond::persistency::IOVProxy iov = m_targetSession.readIov( m_tag ); - m_tagInfo.name = m_tag; - m_tagInfo.size = iov.sequenceSize(); - if( m_tagInfo.size>0 ){ - cond::Iov_t last = iov.getLast(); - m_tagInfo.lastInterval = cond::ValidityInterval( last.since, last.till ); - m_tagInfo.lastPayloadToken = last.payloadId; - } - - if( m_IsDestDbCheckedInQueryLog ) { - m_dbService->queryLog().LookupLastEntryByTag( m_tag, connectionStr, m_logDBEntry ); - std::cout <<" ------ log info searched in the same db: "<< connectionStr << "------" <isNewTagRequest(m_record) ) { + m_dbService->tagInfo(m_record,m_tagInfo); + /** + // m_dbService->queryLog().LookupLastEntryByTag(m_tag, m_logDBEntry); + if(m_IsDestDbCheckedInQueryLog) { + m_dbService->queryLog().LookupLastEntryByTag(m_tag, connectionStr , m_logDBEntry); + std::cout << " ------ log info searched in the same db: " << connectionStr << "------" <queryLog().LookupLastEntryByTag( m_tag, m_logDBEntry ); - std::cout <<" ------ log info found in another db "<< "------" <queryLog().LookupLastEntryByTag(m_tag , m_logDBEntry); + std::cout << " ------ log info found in another db " << "------" <lastTill) lastTill=m_lastTill; m_dbService->closeIOV(lastTill,m_record); } - if( !m_targetConnectionString.empty() ) { - m_targetSession.transaction().commit(); - } } } diff --git a/CondCore/PopCon/test/PopConEffExampleTargetDB.py b/CondCore/PopCon/test/PopConEffExampleTargetDB.py deleted file mode 100755 index be4ebb566b142..0000000000000 --- a/CondCore/PopCon/test/PopConEffExampleTargetDB.py +++ /dev/null @@ -1,104 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -process = cms.Process("ProcessOne") -process.load("CondCore.DBCommon.CondDBCommon_cfi") - -process.CondDBCommon.connect = 'sqlite_file:pop_test2.db' - -process.MessageLogger = cms.Service("MessageLogger", - cout = cms.untracked.PSet( - threshold = cms.untracked.string('INFO') - ), - destinations = cms.untracked.vstring('cout') -) - -process.source = cms.Source("EmptyIOVSource", - firstValue = cms.uint64(1), - lastValue = cms.uint64(1), - timetype = cms.string('runnumber'), - interval = cms.uint64(1) -) - -process.PoolDBOutputService = cms.Service("PoolDBOutputService", - process.CondDBCommon, - withWrapper = cms.untracked.bool(True), - logconnect = cms.untracked.string('sqlite_file:log.db'), - timetype = cms.untracked.string('runnumber'), - toPut = cms.VPSet(cms.PSet( - record = cms.string('ThisJob'), - tag = cms.string('Example_tag1') - ) - ) -) - -process.Test1 = cms.EDAnalyzer("ExPopConEfficiency", - record = cms.string('ThisJob'), - Source = cms.PSet( - params = cms.untracked.vdouble(0.1, 0.95, 1.0, 5.5), - since = cms.untracked.int64(701), - type = cms.untracked.string('Pt') - ), - targetDBConnectionString = cms.untracked.string('sqlite_file:pop_test.db'), - loggingOn = cms.untracked.bool(True), - IsDestDbCheckedInQueryLog = cms.untracked.bool(True) -) - -process.Test2 = cms.EDAnalyzer("ExPopConEfficiency", - record = cms.string('ThisJob'), - Source = cms.PSet( - params = cms.untracked.vdouble(0.85, 0.0, 0.9, 2.3), - since = cms.untracked.int64(930), - type = cms.untracked.string('Eta') - ), - targetDBConnectionString = cms.untracked.string('sqlite_file:pop_test.db'), - loggingOn = cms.untracked.bool(True), - IsDestDbCheckedInQueryLog = cms.untracked.bool(True) -) - -process.Test3 = cms.EDAnalyzer("ExPopConEfficiency", - record = cms.string('ThisJob'), - Source = cms.PSet( - params = cms.untracked.vdouble(0.92, 0.0, 0.8, 2.5), - since = cms.untracked.int64(1240), - type = cms.untracked.string('Eta') - ), - targetDBConnectionString = cms.untracked.string('sqlite_file:pop_test.db'), - loggingOn = cms.untracked.bool(True), - IsDestDbCheckedInQueryLog = cms.untracked.bool(True) -) - -process.Test4 = cms.EDAnalyzer("ExPopConEfficiency", - record = cms.string('ThisJob'), - Source = cms.PSet( - params = cms.untracked.vdouble(0.1, 0.95, 1.0, 9.5), - since = cms.untracked.int64(1511), - type = cms.untracked.string('Pt') - ), - targetDBConnectionString = cms.untracked.string('sqlite_file:pop_test.db'), - loggingOn = cms.untracked.bool(True), - IsDestDbCheckedInQueryLog = cms.untracked.bool(True) -) - -process.p = cms.Path(process.Test1 + - process.Test2 + - process.Test3 + - process.Test4 - ) - - -# process.p = cms.Path(process.TestN) - - - - - - - - - - - - - - - diff --git a/CondCore/PopCon/test/popcon2dropbox.json b/CondCore/PopCon/test/popcon2dropbox.json deleted file mode 100644 index 4984d7d12d77a..0000000000000 --- a/CondCore/PopCon/test/popcon2dropbox.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "destinationDatabase": "oracle://cms_orcoff_prep/CMS_COND_TEMP", - "authenticationPath": "/nfshome0/popcondev/conddb/", - "authenticationSystem": 2, - "logDbFileName": "log.db", - "records": { - "DTCCBConfigRcd":{ - "destinationTag":"DTCCBConfig_TESTPOPCON", - "timetype":"runnumber", - "outputRecord":"DTCCBConfigRcd", - "comment":"upload #0" - }, - "DTKeyedConfigListRcd":{ - "destinationTag":"DTKeyedConfigList_TESTPOPCON", - "timetype":"runnumber", - "outputRecord":"keyedConfListIOV", - "sqliteTag":"DTKeyedConfigList_V06_hlt", - "comment":"upload #1" - }, - "DTKeyedConfigContainerRcd":{ - "destinationTag":"DTKeyedConfig_TESTPOPCON", - "timetype":"hash", - "outputRecord":"keyedConfBricks", - "comment":"upload #2" - } - } -} diff --git a/CondCore/PopCon/test/popcon2dropbox_job.py b/CondCore/PopCon/test/popcon2dropbox_job.py deleted file mode 100644 index 74fe032ef9971..0000000000000 --- a/CondCore/PopCon/test/popcon2dropbox_job.py +++ /dev/null @@ -1,30 +0,0 @@ -from popcon2dropbox_job_conf import md -from popcon2dropbox_job_conf import process - -process.conf_o2o = cms.EDAnalyzer("DTKeyedConfigPopConAnalyzer", - name = cms.untracked.string('DTCCBConfig'), - Source = cms.PSet( - DBParameters = cms.PSet( - ), - onlineDB = cms.string('oracle://cms_omds_lb/CMS_DT_ELEC_CONF'), - minBrick = cms.untracked.int32(0), - maxBrick = cms.untracked.int32(99999999), - minRun = cms.untracked.int32(146960), - maxRun = cms.untracked.int32(999999999), - tag = cms.string('DTCCBConfig_V06_hlt'), - container = cms.string('keyedConfBricks'), - onlineAuthentication = cms.string( str(md.authPath()) ), - onlineAuthSys = cms.untracked.int32( int(md.authSys()) ) - ), - #targetDBConnectionString = cms.untracked.string('oracle://cms_orcon_prod/CMS_COND_31X_DT'), - targetDBConnectionString = cms.untracked.string(str(md.destinationDatabase())), - authenticationPath = cms.untracked.string( str(md.authPath()) ), - authenticationSystem = cms.untracked.int32( int(md.authSys()) ), - SinceAppendMode = cms.bool(True), - record = cms.string('DTCCBConfigRcd'), - loggingOn = cms.untracked.bool(True), - debug = cms.bool(False) -) - -process.p = cms.Path(process.conf_o2o) - diff --git a/CondCore/PopCon/test/run_popcon2dropbox.py b/CondCore/PopCon/test/run_popcon2dropbox.py deleted file mode 100644 index b6bbe44cfe78f..0000000000000 --- a/CondCore/PopCon/test/run_popcon2dropbox.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python -'''Script that directs the popcon output to the dropbox -''' - -__author__ = 'Giacomo Govi' - -import sys -import popcon2dropbox - -cmssw_dir = '/data/cmssw' -release_dir = '/nfshome0/popcondev/popcon2dropbox' -release = 'CMSSW_7_2_0_pre6' -scram_arch = 'slc5_amd64_gcc481' -job_file = 'popcon2dropbox_job.py' -log_file = 'popcon.log' - -def main(): - print popcon2dropbox.runO2O( cmssw_dir, release_dir, release, scram_arch, job_file, log_file ) - popcon2dropbox.upload_to_dropbox() - -if __name__ == '__main__': - sys.exit(main()) - - diff --git a/CondCore/PopCon/test/stubs/EffSourceHandler.cc b/CondCore/PopCon/test/stubs/EffSourceHandler.cc index 15b08f0e76a6e..470f98d487888 100644 --- a/CondCore/PopCon/test/stubs/EffSourceHandler.cc +++ b/CondCore/PopCon/test/stubs/EffSourceHandler.cc @@ -73,16 +73,16 @@ void popcon::ExEffSource::getNewObjects() { edm::LogInfo ("ExEffsSource")<<" unable to build "<< m_type << std::endl; return; } - - if( (unsigned long long)m_since > tagInfo().lastInterval.first ) { - m_to_transfer.push_back(std::make_pair(p0,(unsigned long long)m_since)); - std::ostringstream ss; - ss << "type=" << m_type - << ",since=" << m_since; + m_to_transfer.push_back(std::make_pair(p0,(unsigned long long)m_since)); + + + std::ostringstream ss; + ss << "type=" << m_type + << ",since=" << m_since; + + m_userTextLog = ss.str()+ ";" ; - m_userTextLog = ss.str()+ ";" ; - } edm::LogInfo ("ExEffsSource") << "------- " << m_name << " - > getNewObjects" << std::endl; diff --git a/CondCore/Utilities/python/popcon2dropbox.py b/CondCore/Utilities/python/popcon2dropbox.py deleted file mode 100644 index 9e492d4f44c32..0000000000000 --- a/CondCore/Utilities/python/popcon2dropbox.py +++ /dev/null @@ -1,87 +0,0 @@ -import subprocess -import json -from os import rename -from os import remove -from os import path - -confFileName ='popcon2dropbox.json' -fileNameForDropBox = 'input_for_dropbox' -dbFileForDropBox = '%s.db' %fileNameForDropBox -dbLogFile = '%s_log.db' %fileNameForDropBox - -class CondMetaData(object): - def __init__( self ): - self.md = {} - with open(confFileName) as jf: - self.md = json.load(jf) - - def authPath( self ): - return self.md.get('authenticationPath') - - def authSys( self ): - return self.md.get('authenticationSystem') - - def destinationDatabase( self ): - return self.md.get('destinationDatabase') - - def logDbFileName( self ): - return self.md.get('logDbFileName') - - def records( self ): - return self.md.get('records') - - def dumpMetadataForUpload( self, inputtag, desttag, comment ): - uploadMd = {} - uploadMd['destinationDatabase'] = self.destinationDatabase() - tags = {} - tagInfo = {} - tagInfo['dependencies'] = {} - tagInfo['synchronizeTo'] = 'offline' - tags[ desttag ] = tagInfo - print tags - uploadMd['destinationTags'] = tags - uploadMd['inputTag'] = inputtag - uploadMd['since'] = None - uploadMd['userText'] = comment - with open( '%s.txt' %fileNameForDropBox, 'wb') as jf: - jf.write( json.dumps( uploadMd, sort_keys=True, indent = 2 ) ) - jf.write('\n') - -def runO2O( cmsswdir, releasepath, release, arch, jobfilename, logfilename ): - command = 'export SCRAM_ARCH=%s;' %arch - command += 'CMSSWDIR=%s;' %cmsswdir - command += 'source ${CMSSWDIR}/cmsset_default.sh;' - command += 'cd %s/%s/src;' %(releasepath,release) - command += 'eval `scramv1 runtime -sh`;' - command += 'cd -;' - command += 'pwd;' - command += 'cmsRun %s 2>&1' %jobfilename - print '## about to execute: %s' %command - pipe = subprocess.Popen( command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT ) - stdout_val = pipe.communicate()[0] - return stdout_val - -def upload_to_dropbox(): - md = CondMetaData() - # first remove any existing file... - if path.exists( '%s.txt' %fileNameForDropBox ): - remove( '%s.txt' %fileNameForDropBox ) - for k,v in md.records().items(): - destTag = v.get("destinationTag") - inputTag = v.get("sqliteTag") - if inputTag == None: - inputTag = destTag - comment = v.get("comment") - md.dumpMetadataForUpload( inputTag, destTag, comment ) - command = 'export http_proxy=http://cmsproxy.cms:3128/;' - command += 'export https_proxy=https://cmsproxy.cms:3128/;' - command += 'python upload_popcon.py %s -b offline' %dbFileForDropBox - print 'executing command:%s' %command - pipe = subprocess.Popen( command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT ) - print pipe.communicate()[0] - rename( '%s.txt' %fileNameForDropBox, '%s.txt' %destTag ) - - - - - diff --git a/CondCore/Utilities/python/popcon2dropbox_job_conf.py b/CondCore/Utilities/python/popcon2dropbox_job_conf.py deleted file mode 100644 index 478212aee421a..0000000000000 --- a/CondCore/Utilities/python/popcon2dropbox_job_conf.py +++ /dev/null @@ -1,60 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -#toPut = cms.VPSet( [ cms.PSet( record = k, -# tag = v.get('destinationTag'), -# timetype = v.get('timetype') -# ) for k,v in md.outputRecords().items()] ) - -import popcon2dropbox -md = popcon2dropbox.CondMetaData() -psetForRec = [] -for k,v in md.records().items(): - psetForRec.append( cms.PSet( record = cms.string(str(k)), - tag = cms.string(str(v.get('destinationTag'))), - ) - ) -print '#### 1' - -psetForOutRec = [] -for k,v in md.records().items(): - outRec = v.get('outputRecord') - if outRec == None: - outRec = k - sqliteTag = v.get('sqliteTag') - if sqliteTag == None: - sqliteTag = v.get('destinationTag') - psetForOutRec.append( cms.PSet( record = cms.string(str( outRec )), - tag = cms.string(str( sqliteTag )), - timetype = cms.untracked.string(str(v.get('timetype'))) - ) - ) -print psetForOutRec - -process = cms.Process("TEST") -process.load("CondCore.CondDB.CondDB_cfi") -process.CondDB.connect = 'sqlite:%s' %popcon2dropbox.dbFileForDropBox - -process.PoolDBOutputService = cms.Service("PoolDBOutputService", - process.CondDB, - logconnect = cms.untracked.string('sqlite:%s' %popcon2dropbox.dbLogFile), - toPut = cms.VPSet( psetForOutRec ) -) - -process.source = cms.Source("EmptyIOVSource", - timetype = cms.string('runnumber'), - firstValue = cms.uint64(1), - lastValue = cms.uint64(1), - interval = cms.uint64(1) -) - -print process.CondDB.connect - -process.essource = cms.ESSource("PoolDBESSource", - #connect = cms.string('oracle://cms_orcon_prod/CMS_COND_31X_DT'), - connect = cms.string( str(md.destinationDatabase()) ), - DBParameters = cms.PSet( authenticationPath = cms.untracked.string( str(md.authPath()) ), - authenticationSystem = cms.untracked.int32( int(md.authSys()) ) - ), - DumpStat=cms.untracked.bool(True), - toGet = cms.VPSet( psetForRec ) -) diff --git a/CondFormats/HIObjects/src/T_EventSetup_CentralityCuts.cc b/CondFormats/HIObjects/src/T_EventSetup_CentralityCuts.cc index 1fa67d886fb83..6ec03c6177c61 100644 --- a/CondFormats/HIObjects/src/T_EventSetup_CentralityCuts.cc +++ b/CondFormats/HIObjects/src/T_EventSetup_CentralityCuts.cc @@ -1,6 +1,5 @@ #include "CondFormats/HIObjects/interface/CentralityTable.h" #include "CondFormats/HIObjects/interface/RPFlatParams.h" - #include "FWCore/Utilities/interface/typelookup.h" TYPELOOKUP_DATA_REG(CentralityTable); diff --git a/CondFormats/HIObjects/src/classes.h b/CondFormats/HIObjects/src/classes.h index b6aee43bebffc..3ca6e441cab84 100644 --- a/CondFormats/HIObjects/src/classes.h +++ b/CondFormats/HIObjects/src/classes.h @@ -1,5 +1,6 @@ #include "CondFormats/HIObjects/src/headers.h" + namespace CondFormats_HIObjects { struct dictionary{ std::vector dummy; diff --git a/CondTools/DT/interface/DTKeyedConfigHandler.h b/CondTools/DT/interface/DTKeyedConfigHandler.h index 8c485c7e59f6b..7feced3fc995d 100644 --- a/CondTools/DT/interface/DTKeyedConfigHandler.h +++ b/CondTools/DT/interface/DTKeyedConfigHandler.h @@ -24,10 +24,6 @@ #include "CondFormats/DTObjects/interface/DTCCBConfig.h" #include -namespace coral { - class ISessionProxy; -} - namespace cond { namespace persistency { class KeyList; @@ -74,12 +70,11 @@ class DTKeyedConfigHandler: public popcon::PopConSourceHandler { std::string dataTag; std::string onlineConnect; std::string onlineAuthentication; - int onlineAuthSys; std::string brickContainer; DTCCBConfig* ccbConfig; cond::persistency::ConnectionPool connection; - boost::shared_ptr isession; + cond::persistency::Session isession; void chkConfigList(); static bool sameConfigList( const std::vector& cfgl, const std::vector& cfgr ); diff --git a/CondTools/DT/interface/DTUserKeyedConfigHandler.h b/CondTools/DT/interface/DTUserKeyedConfigHandler.h index d0282824442cf..9b3522c1b665a 100644 --- a/CondTools/DT/interface/DTUserKeyedConfigHandler.h +++ b/CondTools/DT/interface/DTUserKeyedConfigHandler.h @@ -24,10 +24,6 @@ #include "CondFormats/DTObjects/interface/DTCCBConfig.h" #include -namespace coral { - class ISessionProxy; -} - namespace cond { namespace persistency { class KeyList; @@ -69,7 +65,6 @@ class DTUserKeyedConfigHandler: public popcon::PopConSourceHandler std::string dataTag; std::string onlineConnect; std::string onlineAuthentication; - int onlineAuthSys; std::string brickContainer; std::vector userConf; bool writeKeys; @@ -77,7 +72,7 @@ class DTUserKeyedConfigHandler: public popcon::PopConSourceHandler DTCCBConfig* ccbConfig; cond::persistency::ConnectionPool connection; - boost::shared_ptr isession; + cond::persistency::Session isession; void chkConfigList( const std::map& userBricks ); bool userDiscardedKey( int key ); static bool sameConfigList( const std::vector& cfgl, diff --git a/CondTools/DT/src/DTKeyedConfigHandler.cc b/CondTools/DT/src/DTKeyedConfigHandler.cc index 0b6a8bc6db058..17e04f80a0e61 100644 --- a/CondTools/DT/src/DTKeyedConfigHandler.cc +++ b/CondTools/DT/src/DTKeyedConfigHandler.cc @@ -21,8 +21,6 @@ #include "CondCore/DBOutputService/interface/KeyedElement.h" #include "CondCore/CondDB/interface/KeyList.h" -#include "RelationalAccess/ISessionProxy.h" -#include "RelationalAccess/ITransaction.h" #include "RelationalAccess/ISchema.h" #include "RelationalAccess/ITable.h" #include "RelationalAccess/ICursor.h" @@ -55,7 +53,6 @@ DTKeyedConfigHandler::DTKeyedConfigHandler( const edm::ParameterSet& ps ): onlineConnect( ps.getParameter ( "onlineDB" ) ), onlineAuthentication( ps.getParameter ( "onlineAuthentication" ) ), - onlineAuthSys( ps.getUntrackedParameter( "onlineAuthSys",1 ) ), brickContainer( ps.getParameter ( "container" ) ), connection(), isession() { @@ -119,21 +116,21 @@ void DTKeyedConfigHandler::getNewObjects() { std::cout << "configure DbConnection" << std::endl; // conn->configure( cond::CmsDefaults ); connection.setAuthenticationPath( onlineAuthentication ); - connection.setAuthenticationSystem( onlineAuthSys ); connection.configure(); std::cout << "create/open DbSession" << std::endl; - isession = connection.createCoralSession( onlineConnect ); + isession = connection.createSession( onlineConnect ); std::cout << "start transaction" << std::endl; - isession->transaction().start( true ); + isession.transaction().start(); // =========== Update configuration data chkConfigList(); + // =========== Find latest runs std::cout << "get run config..." << std::endl; std::map*> runMap; std::map*> rhcMap; coral::ITable& runHistoryTable = - isession->nominalSchema().tableHandle( "RUNHISTORY" ); + isession.nominalSchema().tableHandle( "RUNHISTORY" ); std::auto_ptr runHistoryQuery( runHistoryTable.newQuery() ); runHistoryQuery->addToOutputList( "RUN" ); @@ -170,7 +167,7 @@ void DTKeyedConfigHandler::getNewObjects() { std::cout << "retrieve CCB map" << std::endl; std::map ccbMap; coral::ITable& ccbMapTable = - isession->nominalSchema().tableHandle( "CCBMAP" ); + isession.nominalSchema().tableHandle( "CCBMAP" ); std::auto_ptr ccbMapQuery( ccbMapTable.newQuery() ); ccbMapQuery->addToOutputList( "CCBID" ); @@ -196,7 +193,7 @@ void DTKeyedConfigHandler::getNewObjects() { std::map bktMap; coral::AttributeList emptyBindVariableList; std::auto_ptr - brickTypeQuery( isession->nominalSchema().newQuery() ); + brickTypeQuery( isession.nominalSchema().newQuery() ); brickTypeQuery->addToTableList( "CFGBRICKS" ); brickTypeQuery->addToTableList( "BRKT2CSETT" ); // ----------- join brick type (1-11) to subsystem part (1-6) @@ -219,7 +216,7 @@ void DTKeyedConfigHandler::getNewObjects() { std::cout << "retrieve RH relations" << std::endl; std::map cfgMap; coral::ITable& rhcRelTable = - isession->nominalSchema().tableHandle( "RHRELATIONS" ); + isession.nominalSchema().tableHandle( "RHRELATIONS" ); std::auto_ptr rhcRelQuery( rhcRelTable.newQuery() ); rhcRelQuery->addToOutputList( "RHID" ); @@ -252,7 +249,7 @@ void DTKeyedConfigHandler::getNewObjects() { std::map*> keyMap; std::map cckMap; coral::ITable& ccbRelTable = - isession->nominalSchema().tableHandle( "CCBRELATIONS" ); + isession.nominalSchema().tableHandle( "CCBRELATIONS" ); std::auto_ptr ccbRelQuery( ccbRelTable.newQuery() ); ccbRelQuery->addToOutputList( "CONFKEY" ); @@ -293,7 +290,7 @@ void DTKeyedConfigHandler::getNewObjects() { std::cout << "retrieve CCB configuration bricks" << std::endl; std::map*> brkMap; coral::ITable& confBrickTable = - isession->nominalSchema().tableHandle( "CFG2BRKREL" ); + isession.nominalSchema().tableHandle( "CFG2BRKREL" ); std::auto_ptr confBrickQuery( confBrickTable.newQuery() ); confBrickQuery->addToOutputList( "CONFID" ); @@ -436,7 +433,8 @@ void DTKeyedConfigHandler::getNewObjects() { << " ) " << std::endl; } - isession->transaction().commit(); + isession.transaction().commit(); + isession.close(); return; @@ -451,7 +449,7 @@ void DTKeyedConfigHandler::chkConfigList() { std::cout << "start queries " << std::endl; std::map activeConfigMap; coral::ITable& fullConfigTable = - isession->nominalSchema().tableHandle( "CONFIGSETS" ); + isession.nominalSchema().tableHandle( "CONFIGSETS" ); std::auto_ptr fullConfigQuery( fullConfigTable.newQuery() ); fullConfigQuery->addToOutputList( "CONFKEY" ); @@ -472,7 +470,7 @@ void DTKeyedConfigHandler::chkConfigList() { // std::cout << " =============== CCB config list" << std::endl; std::map activeCCBCfgMap; coral::ITable& fullCCBCfgTable = - isession->nominalSchema().tableHandle( "CCBRELATIONS" ); + isession.nominalSchema().tableHandle( "CCBRELATIONS" ); std::auto_ptr fullCCBCfgQuery( fullCCBCfgTable.newQuery() ); fullCCBCfgQuery->addToOutputList( "CONFKEY" ); @@ -496,7 +494,7 @@ void DTKeyedConfigHandler::chkConfigList() { // std::cout << " =============== config brick list" << std::endl; std::map activeCfgBrkMap; coral::ITable& ccbConfBrkTable = - isession->nominalSchema().tableHandle( "CFG2BRKREL" ); + isession.nominalSchema().tableHandle( "CFG2BRKREL" ); std::auto_ptr ccbConfBrickQuery( ccbConfBrkTable.newQuery() ); ccbConfBrickQuery->addToOutputList( "CONFID" ); @@ -520,7 +518,7 @@ void DTKeyedConfigHandler::chkConfigList() { // std::cout << " ===============" << std::endl; coral::ITable& brickConfigTable = - isession->nominalSchema().tableHandle( "CFGBRICKS" ); + isession.nominalSchema().tableHandle( "CFGBRICKS" ); std::auto_ptr brickConfigQuery( brickConfigTable.newQuery() ); brickConfigQuery->addToOutputList( "BRKID" ); @@ -571,7 +569,7 @@ void DTKeyedConfigHandler::chkConfigList() { bindVariableList.extend( "brickId", typeid(int) ); bindVariableList["brickId"].data() = brickConfigId; std::auto_ptr - brickDataQuery( isession->nominalSchema().newQuery() ); + brickDataQuery( isession.nominalSchema().newQuery() ); brickDataQuery->addToTableList( "CFGRELATIONS" ); brickDataQuery->addToTableList( "CONFIGCMDS" ); std::string diff --git a/CondTools/DT/src/DTUserKeyedConfigHandler.cc b/CondTools/DT/src/DTUserKeyedConfigHandler.cc index 1cfdaa4fcc551..e31c6e261a668 100644 --- a/CondTools/DT/src/DTUserKeyedConfigHandler.cc +++ b/CondTools/DT/src/DTUserKeyedConfigHandler.cc @@ -22,8 +22,6 @@ #include "CondCore/DBOutputService/interface/KeyedElement.h" #include "CondCore/CondDB/interface/KeyList.h" -#include "RelationalAccess/ISessionProxy.h" -#include "RelationalAccess/ITransaction.h" #include "RelationalAccess/ISchema.h" #include "RelationalAccess/ITable.h" #include "RelationalAccess/ICursor.h" @@ -52,7 +50,6 @@ DTUserKeyedConfigHandler::DTUserKeyedConfigHandler( const edm::ParameterSet& ps onlineConnect( ps.getParameter ( "onlineDB" ) ), onlineAuthentication( ps.getParameter ( "onlineAuthentication" ) ), - onlineAuthSys( ps.getUntrackedParameter( "onlineAuthSys",1 ) ), brickContainer( ps.getParameter ( "container" ) ), writeKeys( ps.getParameter ( "writeKeys" ) ), writeData( ps.getParameter ( "writeData" ) ), @@ -124,18 +121,17 @@ void DTUserKeyedConfigHandler::getNewObjects() { std::cout << "configure DbConnection" << std::endl; // conn->configure( cond::CmsDefaults ); connection.setAuthenticationPath( onlineAuthentication ); - connection.setAuthenticationSystem( onlineAuthSys ); connection.configure(); std::cout << "create/open DbSession" << std::endl; - isession = connection.createCoralSession( onlineConnect ); + isession = connection.createSession( onlineConnect ); std::cout << "start transaction" << std::endl; - isession->transaction().start( true ); + isession.transaction().start(); // get ccb identifiers map std::cout << "retrieve CCB map" << std::endl; std::map ccbMap; coral::ITable& ccbMapTable = - isession->nominalSchema().tableHandle( "CCBMAP" ); + isession.nominalSchema().tableHandle( "CCBMAP" ); std::auto_ptr ccbMapQuery( ccbMapTable.newQuery() ); ccbMapQuery->addToOutputList( "CCBID" ); @@ -161,7 +157,7 @@ void DTUserKeyedConfigHandler::getNewObjects() { std::map bktMap; coral::AttributeList emptyBindVariableList; std::auto_ptr - brickTypeQuery( isession->nominalSchema().newQuery() ); + brickTypeQuery( isession.nominalSchema().newQuery() ); brickTypeQuery->addToTableList( "CFGBRICKS" ); brickTypeQuery->addToTableList( "BRKT2CSETT" ); std::string bTypeCondition = "CFGBRICKS.BRKTYPE=BRKT2CSETT.BRKTYPE"; @@ -184,7 +180,7 @@ void DTUserKeyedConfigHandler::getNewObjects() { std::map*> keyMap; std::map cckMap; coral::ITable& ccbRelTable = - isession->nominalSchema().tableHandle( "CCBRELATIONS" ); + isession.nominalSchema().tableHandle( "CCBRELATIONS" ); std::auto_ptr ccbRelQuery( ccbRelTable.newQuery() ); ccbRelQuery->addToOutputList( "CONFKEY" ); @@ -222,7 +218,7 @@ void DTUserKeyedConfigHandler::getNewObjects() { std::cout << "retrieve CCB configuration bricks" << std::endl; std::map*> brkMap; coral::ITable& confBrickTable = - isession->nominalSchema().tableHandle( "CFG2BRKREL" ); + isession.nominalSchema().tableHandle( "CFG2BRKREL" ); std::auto_ptr confBrickQuery( confBrickTable.newQuery() ); confBrickQuery->addToOutputList( "CONFID" ); @@ -321,7 +317,8 @@ void DTUserKeyedConfigHandler::getNewObjects() { << " ) " << std::endl; if ( writeData ) chkConfigList( userBricks ); - isession->transaction().commit(); + isession.transaction().commit(); + isession.close(); return; @@ -338,7 +335,7 @@ void DTUserKeyedConfigHandler::chkConfigList( std::map::const_iterator uBrkIend = userBricks.end(); coral::ITable& brickConfigTable = - isession->nominalSchema().tableHandle( "CFGBRICKS" ); + isession.nominalSchema().tableHandle( "CFGBRICKS" ); std::auto_ptr brickConfigQuery( brickConfigTable.newQuery() ); brickConfigQuery->addToOutputList( "BRKID" ); @@ -388,7 +385,7 @@ void DTUserKeyedConfigHandler::chkConfigList( bindVariableList.extend( "brickId", typeid(int) ); bindVariableList["brickId"].data() = brickConfigId; std::auto_ptr - brickDataQuery( isession->nominalSchema().newQuery() ); + brickDataQuery( isession.nominalSchema().newQuery() ); brickDataQuery->addToTableList( "CFGRELATIONS" ); brickDataQuery->addToTableList( "CONFIGCMDS" ); std::string diff --git a/CondTools/RunInfo/src/RunInfoHandler.cc b/CondTools/RunInfo/src/RunInfoHandler.cc index 6862ee0bd8851..c5d78e2bbcea5 100644 --- a/CondTools/RunInfo/src/RunInfoHandler.cc +++ b/CondTools/RunInfo/src/RunInfoHandler.cc @@ -9,7 +9,7 @@ RunInfoHandler::RunInfoHandler(const edm::ParameterSet& pset) : m_name(pset.getUntrackedParameter("name","RunInfoHandler")) ,m_user(pset.getUntrackedParameter("OnlineDBUser","CMS_RUNINFO_R")) ,m_pass(pset.getUntrackedParameter("OnlineDBPass","PASSWORD")) { - m_connectionString= "oracle://cms_omds_adg/CMS_RUNINFO"; + m_connectionString= "oracle://cms_omds_lb/CMS_RUNINFO"; } RunInfoHandler::~RunInfoHandler() {} diff --git a/CondTools/RunInfo/src/RunInfoRead.cc b/CondTools/RunInfo/src/RunInfoRead.cc index 9ab056d982877..3070e6a67f60b 100644 --- a/CondTools/RunInfo/src/RunInfoRead.cc +++ b/CondTools/RunInfo/src/RunInfoRead.cc @@ -20,10 +20,6 @@ #include #include -std::string quoted( const std::string& s ){ - return "\""+s+"\""; -} - RunInfoRead::RunInfoRead(const std::string& connectionString, const std::string& user, const std::string& pass): @@ -73,7 +69,7 @@ RunInfoRead::readData(const std::string & table, coral::AttributeList conditionData; conditionData.extend( "n_run" ); conditionData[0].data() = r_number; - std::string condition1 = m_tableToRead + ".RUNNUMBER=:n_run AND " + m_tableToRead + ".NAME='CMS.LVL0:START_TIME_T'"; + std::string condition1 = m_tableToRead + ".runnumber=:n_run AND " + m_tableToRead + ".name='CMS.LVL0:START_TIME_T'"; queryI->setCondition(condition1, conditionData); coral::ICursor& cursorI = queryI->execute(); if( cursorI.next() ) { @@ -98,7 +94,7 @@ RunInfoRead::readData(const std::string & table, coral::AttributeList conditionData2; conditionData2.extend( "n_id" ); conditionData2[0].data() = id_start; - std::string condition2 = m_tableToRead_date + ".RUNSESSION_PARAMETER_ID=:n_id"; + std::string condition2 = m_tableToRead_date + ".runsession_parameter_id=:n_id"; queryII->setCondition(condition2, conditionData2); coral::ICursor& cursorII = queryII->execute(); coral::TimeStamp start; //now all times are UTC! @@ -136,7 +132,7 @@ RunInfoRead::readData(const std::string & table, //implementing the query here....... queryIII->addToOutputList(m_tableToRead + "." + m_columnToRead_id, m_columnToRead_id); //condition - std::string condition3 = m_tableToRead + ".RUNNUMBER=:n_run AND " + m_tableToRead + ".NAME='CMS.LVL0:STOP_TIME_T'"; + std::string condition3 = m_tableToRead + ".runnumber=:n_run AND " + m_tableToRead + ".name='CMS.LVL0:STOP_TIME_T'"; queryIII->setCondition(condition3, conditionData); coral::ICursor& cursorIII = queryIII->execute(); long long id_stop = 0; @@ -159,7 +155,7 @@ RunInfoRead::readData(const std::string & table, coral::AttributeList conditionData4; conditionData4.extend( "n_id" ); conditionData4[0].data() = id_stop; - std::string condition4 = m_tableToRead_date + ".RUNSESSION_PARAMETER_ID=:n_id"; + std::string condition4 = m_tableToRead_date + ".runsession_parameter_id=:n_id"; queryIV->setCondition(condition4, conditionData4); coral::ICursor& cursorIV = queryIV->execute(); coral::TimeStamp stop; @@ -244,7 +240,7 @@ RunInfoRead::readData(const std::string & table, std::string m_columnToRead_cur= "CURRENT"; std::string m_columnToRead_date= "CHANGE_DATE"; coral::IQuery* queryVI = schema2.tableHandle(m_tableToRead_cur).newQuery(); - queryVI->addToOutputList(m_tableToRead_cur + "." + quoted(m_columnToRead_cur), m_columnToRead_cur); + queryVI->addToOutputList(m_tableToRead_cur + "." + m_columnToRead_cur, m_columnToRead_cur); queryVI->addToOutputList(m_tableToRead_cur + "." + m_columnToRead_date, m_columnToRead_date); //condition coral::AttributeList conditionData6; @@ -254,7 +250,7 @@ RunInfoRead::readData(const std::string & table, conditionData6.extend( "runstop_time" ); conditionData6["runstart_time"].data() = start; //start_time ; conditionData6["runstop_time"].data() = stop; //stop_time ; - std::string conditionVI = " NOT " + m_tableToRead_cur + "." + quoted(m_columnToRead_cur) + " IS NULL AND " + std::string conditionVI = " NOT " + m_tableToRead_cur + "." + m_columnToRead_cur + " IS NULL AND " + m_tableToRead_cur + "." + m_columnToRead_date + ">:runstart_time AND " + m_tableToRead_cur + "." + m_columnToRead_date + "<:runstop_time" /*" ORDER BY " + m_columnToRead_date + " DESC"*/; queryVI->setCondition(conditionVI, conditionData6); @@ -263,7 +259,7 @@ RunInfoRead::readData(const std::string & table, std::cout << "run stop null" << std::endl; conditionData6.extend( "runstart_time" ); conditionData6["runstart_time"].data() = start; //start_time ; - std::string conditionVI = " NOT " + m_tableToRead_cur + "." + quoted(m_columnToRead_cur) + " IS NULL AND " + std::string conditionVI = " NOT " + m_tableToRead_cur + "." + m_columnToRead_cur + " IS NULL AND " + m_tableToRead_cur + "." + m_columnToRead_date + "<:runstart_time" /*" ORDER BY " + m_columnToRead_date + " DESC"*/; queryVI->setCondition(conditionVI, conditionData6); queryVI->addToOrderList(m_tableToRead_cur + "." + m_columnToRead_date + " DESC"); @@ -279,10 +275,10 @@ RunInfoRead::readData(const std::string & table, coral::AttributeList conditionData6bis; conditionData6bis.extend( "runstop_time" ); conditionData6bis["runstop_time"].data() = stop; //stop_time ; - std::string conditionVIbis = " NOT " + m_tableToRead_cur + "." + quoted(m_columnToRead_cur) + " IS NULL AND " + std::string conditionVIbis = " NOT " + m_tableToRead_cur + "." + m_columnToRead_cur + " IS NULL AND " + m_tableToRead_cur + "." + m_columnToRead_date + " <:runstop_time" /*" ORDER BY " + m_columnToRead_date + " DESC"*/; coral::IQuery* queryVIbis = schema2.tableHandle(m_tableToRead_cur).newQuery(); - queryVIbis->addToOutputList(m_tableToRead_cur + "." + quoted(m_columnToRead_cur), m_columnToRead_cur); + queryVIbis->addToOutputList(m_tableToRead_cur + "." + m_columnToRead_cur, m_columnToRead_cur); queryVIbis->setCondition(conditionVIbis, conditionData6bis); queryVIbis->addToOrderList(m_tableToRead_cur + "." + m_columnToRead_date + " DESC"); coral::ICursor& cursorVIbis= queryVIbis->execute(); diff --git a/CondTools/RunInfo/test/RunInfoPopConAnalyzer.py b/CondTools/RunInfo/test/RunInfoPopConAnalyzer.py index d3e80e75c25ce..868976007a1d0 100644 --- a/CondTools/RunInfo/test/RunInfoPopConAnalyzer.py +++ b/CondTools/RunInfo/test/RunInfoPopConAnalyzer.py @@ -2,7 +2,7 @@ process = cms.Process("ProcessOne") process.load("CondCore.DBCommon.CondDBCommon_cfi") -process.CondDBCommon.connect = 'sqlite_file:dbox_upload.db' +process.CondDBCommon.connect = 'sqlite_file:runinfo_pop_test.db' process.CondDBCommon.DBParameters.authenticationPath = '.' process.CondDBCommon.DBParameters.messageLevel=cms.untracked.int32(3) @@ -26,18 +26,16 @@ timetype = cms.untracked.string('runnumber'), toPut = cms.VPSet(cms.PSet( record = cms.string('RunInfoRcd'), - tag = cms.string('runinfo_31X_hlt') + tag = cms.string('runinfo_test') )) ) process.Test1 = cms.EDAnalyzer("RunInfoPopConAnalyzer", SinceAppendMode = cms.bool(True), record = cms.string('RunInfoRcd'), - Source = cms.PSet( - OnlineDBPass = cms.untracked.string('MICKEY2MOUSE')), + Source = cms.PSet(), loggingOn = cms.untracked.bool(True), - IsDestDbCheckedInQueryLog = cms.untracked.bool(False), - targetDBConnectionString = cms.untracked.string('sqlite_file:run_info_popcontest.db') + IsDestDbCheckedInQueryLog = cms.untracked.bool(False) ) process.p = cms.Path(process.Test1) diff --git a/CondTools/SiPixel/test/SiPixel2DTemplateDBObjectUploader.cc b/CondTools/SiPixel/test/SiPixel2DTemplateDBObjectUploader.cc index 7ad459e9761bf..375b20fb7d95f 100644 --- a/CondTools/SiPixel/test/SiPixel2DTemplateDBObjectUploader.cc +++ b/CondTools/SiPixel/test/SiPixel2DTemplateDBObjectUploader.cc @@ -6,12 +6,12 @@ #include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h" #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" -#include "Geometry/Records/interface/IdealGeometryRecord.h" #include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetUnit.h" #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" #include "DataFormats/DetId/interface/DetId.h" -#include "DataFormats/TrackerCommon/interface/TrackerTopology.h" +#include "DataFormats/SiPixelDetId/interface/PXBDetId.h" +#include "DataFormats/SiPixelDetId/interface/PXFDetId.h" #include #include @@ -105,11 +105,6 @@ SiPixel2DTemplateDBObjectUploader::analyze(const edm::Event& iEvent, const edm:: cout << "Error opening File " << tempfile << "\n"; } } - - //Retrieve tracker topology from geometry - edm::ESHandle tTopoHandle; - es.get().get(tTopoHandle); - const TrackerTopology* const tTopo = tTopoHandle.product(); edm::ESHandle pDD; es.get().get( pDD ); @@ -123,16 +118,16 @@ SiPixel2DTemplateDBObjectUploader::analyze(const edm::Event& iEvent, const edm:: if( (*it)!=0){ // Here is the actual looping step over all DetIds: DetId detid=(*it)->geographicalId(); - const DetId detidc = (*it)->geographicalId(); unsigned int layer=0, disk=0, side=0, blade=0, panel=0, module=0; // Now we sort them into the Barrel and Endcap: if(detid.subdetId() == 1) { - - layer=tTopo->pxbLayer(detidc.rawId()); - module=tTopo->pxbModule(detidc.rawId()); - + PXBDetId pdetId = PXBDetId(detid); + //unsigned int detTypeP=pdetId.det(); + //unsigned int subidP=pdetId.subdetId(); + layer=pdetId.layer(); + module=pdetId.module(); if(detid.subdetId() == static_cast(PixelSubdetector::PixelBarrel)){ if (layer == 1) { if (module == 1) { @@ -268,13 +263,12 @@ SiPixel2DTemplateDBObjectUploader::analyze(const edm::Event& iEvent, const edm:: } } if(detid.subdetId() == 2) { - - disk=tTopo->pxfDisk(detidc.rawId()); //1,2,3 - blade=tTopo->pxfBlade(detidc.rawId()); //1-24 - side=tTopo->pxfSide(detidc.rawId()); //size=1 for -z, 2 for +z - panel=tTopo->pxfPanel(detidc.rawId()); //panel=1,2 - module=tTopo->pxfModule(detidc.rawId()); // plaquette - + PXFDetId pdetId = PXFDetId(detid); + disk=pdetId.disk(); //1,2,3 + blade=pdetId.blade(); //1-24 + side=pdetId.side(); //size=1 for -z, 2 for +z + panel=pdetId.panel(); //panel=1,2 + module=pdetId.module(); // plaquette //short temp123abc = (short) theTemplIds[1]; if(detid.subdetId() == static_cast(PixelSubdetector::PixelEndcap)){ if (side ==1 ){ diff --git a/CondTools/SiPixel/test/SiPixelInclusiveBuilder_cfg.py b/CondTools/SiPixel/test/SiPixelInclusiveBuilder_cfg.py index e3ac73a1ce334..bd2ab03690c22 100644 --- a/CondTools/SiPixel/test/SiPixelInclusiveBuilder_cfg.py +++ b/CondTools/SiPixel/test/SiPixelInclusiveBuilder_cfg.py @@ -218,6 +218,15 @@ ###### LORENTZ ANGLE OBJECT ###### process.SiPixelLorentzAngle = cms.EDAnalyzer("SiPixelLorentzAngleDB", magneticField = cms.double(3.8), +# bPixLorentzAnglePerTesla = cms.double(0.106), +# bPixLorentzAnglePerTesla_layer1 = cms.double(0.115), +# bPixLorentzAnglePerTesla_layer2 = cms.double(0.124), +# bPixLorentzAnglePerTesla_layer3 = cms.double(0.133), +# fPixLorentzAnglePerTesla = cms.double(0.091), +# fPixLorentzAnglePerTesla_side1_disk1 = cms.double(0.092), +# fPixLorentzAnglePerTesla_side1_disk2 = cms.double(0.102), +# fPixLorentzAnglePerTesla_side2_disk1 = cms.double(0.082), +# fPixLorentzAnglePerTesla_side2_disk2 = cms.double(0.071), #in case of PSet BPixParameters = cms.untracked.VPSet( cms.PSet( @@ -399,6 +408,8 @@ process.SiPixelLorentzAngleSim = cms.EDAnalyzer("SiPixelLorentzAngleDB", magneticField = cms.double(3.8), + #bPixLorentzAnglePerTesla = cms.double(0.106), + #fPixLorentzAnglePerTesla = cms.double(0.091), #in case lorentz angle values for bpix should be read from file -> not implemented yet useFile = cms.bool(False), record = cms.untracked.string('SiPixelLorentzAngleSimRcd'), diff --git a/CondTools/SiPixel/test/SiPixelLorentzAngleDB.cc b/CondTools/SiPixel/test/SiPixelLorentzAngleDB.cc index 4b584e8f9d6d7..41c034e349ead 100755 --- a/CondTools/SiPixel/test/SiPixelLorentzAngleDB.cc +++ b/CondTools/SiPixel/test/SiPixelLorentzAngleDB.cc @@ -4,13 +4,11 @@ #include #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" #include "CondTools/SiPixel/test/SiPixelLorentzAngleDB.h" -#include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetUnit.h" +#include "DataFormats/SiPixelDetId/interface/PXBDetId.h" +#include "DataFormats/SiPixelDetId/interface/PXFDetId.h" #include "CondFormats/SiPixelObjects/interface/SiPixelLorentzAngle.h" #include "FWCore/Framework/interface/ESHandle.h" - -#include "DataFormats/TrackerCommon/interface/TrackerTopology.h" -#include "Geometry/Records/interface/IdealGeometryRecord.h" - +#include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetUnit.h" #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" #include "FWCore/ServiceRegistry/interface/Service.h" @@ -29,6 +27,8 @@ SiPixelLorentzAngleDB::SiPixelLorentzAngleDB(edm::ParameterSet const& conf) : conf_(conf){ magneticField_ = conf_.getParameter("magneticField"); recordName_ = conf_.getUntrackedParameter("record","SiPixelLorentzAngleRcd"); +// bPixLorentzAnglePerTesla_ = (float)conf_.getParameter("bPixLorentzAnglePerTesla"); +// fPixLorentzAnglePerTesla_ = (float)conf_.getParameter("fPixLorentzAnglePerTesla"); useFile_ = conf_.getParameter("useFile"); fileName_ = conf_.getParameter("fileName"); @@ -41,7 +41,6 @@ SiPixelLorentzAngleDB::SiPixelLorentzAngleDB(edm::ParameterSet const& conf) : void SiPixelLorentzAngleDB::beginJob(){ } - // Virtual destructor needed. SiPixelLorentzAngleDB::~SiPixelLorentzAngleDB() { @@ -54,35 +53,32 @@ void SiPixelLorentzAngleDB::analyze(const edm::Event& e, const edm::EventSetup& { SiPixelLorentzAngle* LorentzAngle = new SiPixelLorentzAngle(); - - - //Retrieve tracker topology from geometry - edm::ESHandle tTopoHandle; - es.get().get(tTopoHandle); - const TrackerTopology* const tTopo = tTopoHandle.product(); - - + - //Retrieve old style tracker geometry from geometry edm::ESHandle pDD; es.get().get( pDD ); - edm::LogInfo("SiPixelLorentzAngle (old)") <<" There are "<detUnits().size() <<" detectors (old)"<detUnits().size() <<" detectors"<detUnits().begin(); it != pDD->detUnits().end(); it++){ if( dynamic_cast((*it))!=0){ DetId detid=(*it)->geographicalId(); - const DetId detidc = (*it)->geographicalId(); // fill bpix values for LA if(detid.subdetId() == static_cast(PixelSubdetector::PixelBarrel)) { - cout << " pixel barrel:" << " layer=" << tTopo->pxbLayer(detidc.rawId()) << " ladder=" << tTopo->pxbLadder(detidc.rawId()) << " module=" << tTopo->pxbModule(detidc.rawId()) << endl; + PXBDetId pxdetid = PXBDetId(detid); + cout << " hp:barrel:" << " layer=" << pxdetid.layer() << " ladder=" << pxdetid.ladder() << " module=" << pxdetid.module() << endl; if(!useFile_){ - +/*hp + if ( ! LorentzAngle->putLorentzAngle(detid.rawId(),bPixLorentzAnglePerTesla_) ) + edm::LogError("SiPixelLorentzAngleDB")<<"[SiPixelLorentzAngleDB::analyze] detid already exists"<getParameter("module") == tTopo->pxbModule(detidc.rawId()) && it->getParameter("layer") == tTopo->pxbLayer(detidc.rawId()) ) +// cout << " PSet: " << *it << ", module = " << it->getParameter("module") << endl; + if( it->getParameter("module") == pxdetid.module() && it->getParameter("layer") == pxdetid.layer() ) { float lorentzangle = (float)it->getParameter("angle"); LorentzAngle->putLorentzAngle(detid.rawId(),lorentzangle); @@ -90,17 +86,24 @@ void SiPixelLorentzAngleDB::analyze(const edm::Event& e, const edm::EventSetup& } } else { +// cout << "method for reading file not implemented yet" << endl; edm::LogError("SiPixelLorentzAngleDB")<<"[SiPixelLorentzAngleDB::analyze] method for reading file not implemented yet" << std::endl; } // fill fpix values for LA } else if(detid.subdetId() == static_cast(PixelSubdetector::PixelEndcap)) { - cout << " pixel endcap:" << " side=" << tTopo->pxfSide(detidc.rawId()) << " disk=" << tTopo->pxfDisk(detidc.rawId()) << " blade=" << tTopo->pxfBlade(detidc.rawId()) << " panel=" << tTopo->pxfPanel(detidc.rawId()) << " module=" << tTopo->pxfModule(detidc.rawId()) << endl; - - +//hp + PXFDetId pxdetid = PXFDetId(detid); + cout << " hp:endcap:" << " side=" << pxdetid.side() << " disk=" << pxdetid.disk() << " blade=" << pxdetid.blade() << " panel=" << pxdetid.panel() << " module=" << pxdetid.module() << endl; +/*hp + if ( ! LorentzAngle->putLorentzAngle(detid.rawId(),fPixLorentzAnglePerTesla_) ) edm::LogError("SiPixelLorentzAngleDB")<<"[SiPixelLorentzAngleDB::analyze] detid already exists"<getParameter("side") == tTopo->pxfSide(detidc.rawId()) && it->getParameter("disk") == tTopo->pxfDisk(detidc.rawId()) && it->getParameter("HVgroup") == HVgroup( tTopo->pxfPanel(detidc.rawId()), tTopo->pxfModule(detidc.rawId()) ) ) +// cout << " PSet: " << *it << ", module = " << it->getParameter("module") << endl; + if( it->getParameter("side") == pxdetid.side() && it->getParameter("disk") == pxdetid.disk() && it->getParameter("HVgroup") == HVgroup(pxdetid.panel(),pxdetid.module()) ) { float lorentzangle = (float)it->getParameter("angle"); LorentzAngle->putLorentzAngle(detid.rawId(),lorentzangle); diff --git a/CondTools/SiPixel/test/SiPixelLorentzAngleDB.h b/CondTools/SiPixel/test/SiPixelLorentzAngleDB.h index 0157613ea9831..1c134bf89f93d 100755 --- a/CondTools/SiPixel/test/SiPixelLorentzAngleDB.h +++ b/CondTools/SiPixel/test/SiPixelLorentzAngleDB.h @@ -18,6 +18,7 @@ #include "MagneticField/Engine/interface/MagneticField.h" #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" +// #include "CalibTracker/SiStripLorentzAngle/interface/SiStripLorentzAngleAlgorithm.h" class SiPixelLorentzAngleDB : public edm::EDAnalyzer { @@ -27,6 +28,8 @@ class SiPixelLorentzAngleDB : public edm::EDAnalyzer virtual ~SiPixelLorentzAngleDB(); + // virtual void beginJob(const edm::EventSetup& c); + virtual void beginJob(); virtual void endJob(); @@ -42,7 +45,9 @@ class SiPixelLorentzAngleDB : public edm::EDAnalyzer edm::ParameterSet conf_; double magneticField_; std::string recordName_; - +// float bPixLorentzAnglePerTesla_; +// float fPixLorentzAnglePerTesla_; +//hp typedef std::vector< edm::ParameterSet > Parameters; Parameters BPixParameters_; Parameters FPixParameters_; diff --git a/CondTools/SiPixel/test/SiPixelLorentzAngleDB_cfg.py b/CondTools/SiPixel/test/SiPixelLorentzAngleDB_cfg.py index 6e86c633db924..cfb809234d2c2 100644 --- a/CondTools/SiPixel/test/SiPixelLorentzAngleDB_cfg.py +++ b/CondTools/SiPixel/test/SiPixelLorentzAngleDB_cfg.py @@ -12,9 +12,6 @@ process.load("Configuration.StandardSequences.MagneticField_cff") -#hptopo -process.load("Configuration.StandardSequences.GeometryIdeal_cff") - process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi") process.load("CalibTracker.Configuration.TrackerAlignment.TrackerAlignment_Fake_cff") @@ -47,15 +44,15 @@ # user = subprocess.call('whoami') # # user = commands.getoutput('whoami') -#file = "/tmp/" + user + "/SiPixelLorentzAngle.db" -file = "siPixelLorentzAngle.db" +#file = "/tmp/" + user + "/prova.db" +file = "prova.db" sqlfile = "sqlite_file:" + file print '\n-> Uploading as user %s into file %s, i.e. %s\n' % (user, file, sqlfile) #standard python libraries instead of spawn processes -shutil.move("siPixelLorentzAngle.db", "siPixelLorentzAngle_old.db") -#subprocess.call(["/bin/cp", "siPixelLorentzAngle.db", file]) -#subprocess.call(["/bin/mv", "siPixelLorentzAngle.db", "siPixelLorentzAngle.db"]) +shutil.move("prova.db", "prova_old.db") +#subprocess.call(["/bin/cp", "prova.db", file]) +#subprocess.call(["/bin/mv", "prova.db", "prova_old.db"]) ##### DATABASE CONNNECTION AND INPUT TAGS ###### process.PoolDBOutputService = cms.Service("PoolDBOutputService", @@ -76,11 +73,11 @@ toPut = cms.VPSet( cms.PSet( record = cms.string('SiPixelLorentzAngleRcd'), - tag = cms.string('SiPixelLorentzAngle_v1') + tag = cms.string('SiPixelLorentzAngle_v01') ), ### cms.PSet( ### record = cms.string('SiPixelLorentzAngleSimRcd'), -### tag = cms.string('SiPixelLorentzAngleSim_v1') +### tag = cms.string('SiPixelLorentzAngleSim_v01') ### ), ) ) @@ -93,6 +90,15 @@ ###### LORENTZ ANGLE OBJECT ###### process.SiPixelLorentzAngle = cms.EDAnalyzer("SiPixelLorentzAngleDB", magneticField = cms.double(3.8), +# bPixLorentzAnglePerTesla = cms.double(0.106), +# bPixLorentzAnglePerTesla_layer1 = cms.double(0.115), +# bPixLorentzAnglePerTesla_layer2 = cms.double(0.124), +# bPixLorentzAnglePerTesla_layer3 = cms.double(0.133), +# fPixLorentzAnglePerTesla = cms.double(0.091), +# fPixLorentzAnglePerTesla_side1_disk1 = cms.double(0.092), +# fPixLorentzAnglePerTesla_side1_disk2 = cms.double(0.102), +# fPixLorentzAnglePerTesla_side2_disk1 = cms.double(0.082), +# fPixLorentzAnglePerTesla_side2_disk2 = cms.double(0.071), #in case of PSet BPixParameters = cms.untracked.VPSet( cms.PSet( @@ -274,6 +280,8 @@ process.SiPixelLorentzAngleSim = cms.EDAnalyzer("SiPixelLorentzAngleDB", magneticField = cms.double(3.8), + #bPixLorentzAnglePerTesla = cms.double(0.106), + #fPixLorentzAnglePerTesla = cms.double(0.091), #in case lorentz angle values for bpix should be read from file -> not implemented yet useFile = cms.bool(False), record = cms.untracked.string('SiPixelLorentzAngleSimRcd'), diff --git a/CondTools/SiPixel/test/SiPixelLorentzAngleReader_cfg.py b/CondTools/SiPixel/test/SiPixelLorentzAngleReader_cfg.py index e33a2b159914f..ff5c119271933 100644 --- a/CondTools/SiPixel/test/SiPixelLorentzAngleReader_cfg.py +++ b/CondTools/SiPixel/test/SiPixelLorentzAngleReader_cfg.py @@ -13,7 +13,7 @@ process.TFileService = cms.Service("TFileService", - fileName = cms.string("siPixelLorentzAngle_histo.root") + fileName = cms.string("histo.root") ) @@ -26,11 +26,9 @@ process.Timing = cms.Service("Timing") -process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff") -from Configuration.AlCa.autoCond_condDBv2 import autoCond -process.GlobalTag.globaltag = autoCond['run2_design'] -#In case you of conditions missing, or if you want to test a specific GT -#process.GlobalTag.globaltag = 'PRE_DES72_V6' +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +#process.GlobalTag.globaltag = "GR_R_70_V1::All" +process.GlobalTag.globaltag = 'FT_R_53_V21::All' process.load("Configuration.StandardSequences.GeometryIdeal_cff") @@ -44,16 +42,16 @@ cms.PSet( record = cms.string("SiPixelLorentzAngleRcd"), #tag = cms.string("trivial_LorentzAngle") - tag = cms.string("SiPixelLorentzAngle_v1") + tag = cms.string("SiPixelLorentzAngle_v01") ), # cms.PSet( # record = cms.string("SiPixelLorentzAngleSimRcd"), # tag = cms.string("trivial_LorentzAngle_Sim") # ) ), - connect = cms.string('sqlite_file:siPixelLorentzAngle.db') + #connect = cms.string('sqlite_file:SiPixelLorentzAngle.db') #connect = cms.string('sqlite_file:prova_LA_2012_IOV7.db') - #connect = cms.string('sqlite_file:/afs/cern.ch/user/h/hidaspal/public/tracker/SiPixelLorentzAngle/pixelLorentzAngle_original_private_production_stuff/mytest/prova_LA_2012_IOV7.db') + connect = cms.string('sqlite_file:/afs/cern.ch/user/h/hidaspal/public/tracker/SiPixelLorentzAngle/pixelLorentzAngle_original_private_production_stuff/mytest/prova_LA_2012_IOV7.db') ) process.es_prefer_QualityReader = cms.ESPrefer("PoolDBESSource","QualityReader") diff --git a/Configuration/Applications/python/ConfigBuilder.py b/Configuration/Applications/python/ConfigBuilder.py index 2be054dff4f33..cc5cf30a653ac 100644 --- a/Configuration/Applications/python/ConfigBuilder.py +++ b/Configuration/Applications/python/ConfigBuilder.py @@ -75,7 +75,6 @@ class Options: defaultOptions.runsAndWeightsForMC = None defaultOptions.runsScenarioForMC = None defaultOptions.runUnscheduled = False -defaultOptions.timeoutOutput = False # some helper routines def dumpPython(process,name): @@ -397,11 +396,6 @@ def filesFromOption(self): self.process.source=cms.Source("DQMRootSource", fileNames = cms.untracked.vstring()) filesFromOption(self) - - elif self._options.filetype == "DQMDAQ": - # FIXME: how to configure it if there are no input files specified? - self.process.source=cms.Source("DQMStreamerReader") - if ('HARVESTING' in self.stepMap.keys() or 'ALCAHARVEST' in self.stepMap.keys()) and (not self._options.filetype == "DQM"): self.process.source.processingMode = cms.untracked.string("RunsAndLumis") @@ -521,8 +515,6 @@ def anyOf(listOfKeys,dict,opt=None): theFilterName='StreamALCACombined' CppType='PoolOutputModule' - if self._options.timeoutOutput: - CppType='TimeoutPoolOutputModule' if theStreamType=='DQM' and theTier=='DQMIO': CppType='DQMRootOutputModule' output = cms.OutputModule(CppType, theEventContent.clone(), @@ -584,8 +576,6 @@ def doNotInlineEventContent(instance,label = "cms.untracked.vstring(process."+th theFileName=self._options.outfile_name.replace('.root','_in'+streamType+'.root') theFilterName=self._options.filtername CppType='PoolOutputModule' - if self._options.timeoutOutput: - CppType='TimeoutPoolOutputModule' if streamType=='DQM' and tier=='DQMIO': CppType='DQMRootOutputModule' output = cms.OutputModule(CppType, theEventContent, diff --git a/Configuration/Applications/python/Options.py b/Configuration/Applications/python/Options.py index a0a13f40a4702..4b69bb8701275 100644 --- a/Configuration/Applications/python/Options.py +++ b/Configuration/Applications/python/Options.py @@ -59,7 +59,7 @@ help="The type of the infile (EDM, LHE or MCDB).", default=defaultOptions.filetype, dest="filetype", - choices=['EDM','DAT','LHE','MDCB','DQM','DQMDAQ'] + choices=['EDM','DAT','LHE','MDCB','DQM'] ) parser.add_option("-n", "--number", @@ -372,9 +372,3 @@ default=None, dest='lumiToProcess' ) - -expertSettings.add_option("--timeoutOutput", - help="use a TimeoutPoolOutputModule instead of a PoolOutputModule (needed for evt. display)", - default=False, - dest='timeoutOutput' - ) diff --git a/Configuration/DataProcessing/python/Impl/cosmics.py b/Configuration/DataProcessing/python/Impl/cosmics.py index 0385ec4c72b6d..b4b910d149e9d 100644 --- a/Configuration/DataProcessing/python/Impl/cosmics.py +++ b/Configuration/DataProcessing/python/Impl/cosmics.py @@ -52,20 +52,6 @@ def expressProcessing(self, globalTag, **args): customiseCosmicData(process) return process - def visualizationProcessing(self, globalTag, **args): - """ - _visualizationProcessing_ - - Cosmic data taking visualization processing - - """ - - process = Reco.visualizationProcessing(self,globalTag, **args) - - customiseCosmicData(process) - process.reconstructionCosmics.remove(process.lumiProducer) - - return process def alcaHarvesting(self, globalTag, datasetName, **args): """ diff --git a/Configuration/DataProcessing/python/Impl/cosmicsRun2.py b/Configuration/DataProcessing/python/Impl/cosmicsRun2.py index ac9c70e8233a1..ba4f5886faa83 100644 --- a/Configuration/DataProcessing/python/Impl/cosmicsRun2.py +++ b/Configuration/DataProcessing/python/Impl/cosmicsRun2.py @@ -55,20 +55,6 @@ def expressProcessing(self, globalTag, **args): customiseCosmicDataRun2(process) return process - def visualizationProcessing(self, globalTag, **args): - """ - _visualizationProcessing_ - - Cosmic data taking visualization processing - - """ - - process = Reco.visualizationProcessing(self,globalTag, **args) - - customiseCosmicDataRun2(process) - process.reconstructionCosmics.remove(process.lumiProducer) - - return process def alcaHarvesting(self, globalTag, datasetName, **args): """ diff --git a/Configuration/DataProcessing/python/Impl/pp.py b/Configuration/DataProcessing/python/Impl/pp.py index 874104fbfe9c6..f85e597918ac9 100644 --- a/Configuration/DataProcessing/python/Impl/pp.py +++ b/Configuration/DataProcessing/python/Impl/pp.py @@ -55,18 +55,6 @@ def expressProcessing(self, globalTag, **args): return process - def visualizationProcessing(self, globalTag, **args): - """ - _visualizationProcessing_ - - Proton collision data taking visualization processing - - """ - process = Reco.visualizationProcessing(self,globalTag, **args) - - customiseExpress(process) - - return process def alcaHarvesting(self, globalTag, datasetName, **args): """ diff --git a/Configuration/DataProcessing/python/Impl/ppRun2.py b/Configuration/DataProcessing/python/Impl/ppRun2.py index 8dfb1f23e0855..5dd11c9f2fbc4 100644 --- a/Configuration/DataProcessing/python/Impl/ppRun2.py +++ b/Configuration/DataProcessing/python/Impl/ppRun2.py @@ -58,18 +58,6 @@ def expressProcessing(self, globalTag, **args): return process - def visualizationProcessing(self, globalTag, **args): - """ - _visualizationProcessing_ - - Proton collision data taking visualization processing - - """ - process = Reco.visualizationProcessing(self,globalTag, **args) - - customiseExpressRun2(process) - - return process def alcaHarvesting(self, globalTag, datasetName, **args): """ diff --git a/Configuration/DataProcessing/python/Reco.py b/Configuration/DataProcessing/python/Reco.py index a7059d9b8bbeb..7927235e17147 100644 --- a/Configuration/DataProcessing/python/Reco.py +++ b/Configuration/DataProcessing/python/Reco.py @@ -79,7 +79,7 @@ def expressProcessing(self, globalTag, **args): options.conditions = globalTag options.filein = 'tobeoverwritten.xyz' if 'inputSource' in args: - options.filetype = args['inputSource'] + options.fileType = args['inputSource'] process = cms.Process('RECO') cb = ConfigBuilder(options, process = process, with_output = True, with_input = True) @@ -90,53 +90,6 @@ def expressProcessing(self, globalTag, **args): return process - def visualizationProcessing(self, globalTag, **args): - """ - _visualizationProcessing_ - - """ - - options = Options() - options.__dict__.update(defaultOptions.__dict__) - options.scenario = self.cbSc - # FIXME: do we need L1Reco here? - options.step ='' - if 'preFilter' in args: - options.step +='FILTER:'+args['preFilter']+',' - - options.step += 'RAW2DIGI,L1Reco,RECO,ENDJOB' - - - dictIO(options,args) - options.conditions = globalTag - options.timeoutOutput = True - # FIXME: maybe can go...maybe not - options.filein = 'tobeoverwritten.xyz' - - if 'inputSource' in args: - options.filetype = args['inputSource'] - else: - # this is the default as this is what is needed on the OnlineCluster - options.filetype = 'DQMDAQ' - - print "Using %s source"%options.filetype - - process = cms.Process('RECO') - cb = ConfigBuilder(options, process = process, with_output = True, with_input = True) - - cb.prepare() - - - - - # FIXME: not sure abou this one...drop for the moment - # addMonitoring(process) - - return process - - - - def alcaSkim(self, skims, **args): """ _alcaSkim_ diff --git a/Configuration/DataProcessing/python/Scenario.py b/Configuration/DataProcessing/python/Scenario.py index 95720e9f9735c..8cd9cad9ffb1d 100644 --- a/Configuration/DataProcessing/python/Scenario.py +++ b/Configuration/DataProcessing/python/Scenario.py @@ -70,28 +70,6 @@ def expressProcessing(self, globalTag, **options): raise NotImplementedError, msg - - def visualizationProcessing(self, globalTag, **options): - """ - _expressProcessing_ - - Build a configuration for the visualization processing for this scenario. - - Visualization processing runs unpacking, and reco on - streamer files and it is equipped to run on the online cluster - and writes RECO or FEVT files, - - writeTiers is list of tiers to write out. - - - """ - msg = "Scenario Implementation %s\n" % self.__class__.__name__ - msg += "Does not contain an implementation for visualizationProcessing" - raise NotImplementedError, msg - - - - def alcaSkim(self, skims, **options): """ _alcaSkim_ diff --git a/Configuration/DataProcessing/test/RunVisualizationProcessing.py b/Configuration/DataProcessing/test/RunVisualizationProcessing.py deleted file mode 100644 index 56f6b21cd6516..0000000000000 --- a/Configuration/DataProcessing/test/RunVisualizationProcessing.py +++ /dev/null @@ -1,165 +0,0 @@ -#!/usr/bin/env python -""" -_RunVisualizationProcessing_ - -Test wrapper to generate an express processing config and actually push -it into cmsRun for testing with a few input files etc from the command line - -""" - -import sys -import getopt - -from Configuration.DataProcessing.GetScenario import getScenario - - - -class RunVisualizationProcessing: - - def __init__(self): - self.scenario = None - self.writeRaw = False - self.writeReco = False - self.writeFevt = False - self.writeAlca = False - self.writeDqm = False - self.noOutput = False - self.globalTag = None - self.inputLFN = None - self.preFilter = None - - - #FIXME: should add an option to specify an EDM input source? - - - def __call__(self): - if self.scenario == None: - msg = "No --scenario specified" - raise RuntimeError, msg - if self.globalTag == None: - msg = "No --global-tag specified" - raise RuntimeError, msg - - - - try: - scenario = getScenario(self.scenario) - except Exception, ex: - msg = "Error getting Scenario implementation for %s\n" % ( - self.scenario,) - msg += str(ex) - raise RuntimeError, msg - - print "Retrieved Scenario: %s" % self.scenario - print "Using Global Tag: %s" % self.globalTag - - dataTiers = [] - if self.writeRaw: - dataTiers.append("RAW") - print "Configuring to Write out Raw..." - if self.writeReco: - dataTiers.append("RECO") - print "Configuring to Write out Reco..." - if self.writeFevt: - dataTiers.append("FEVT") - print "Configuring to Write out Fevt..." - if self.writeAlca: - dataTiers.append("ALCARECO") - print "Configuring to Write out Alca..." - if self.writeDqm: - dataTiers.append("DQM") - print "Configuring to Write out Dqm..." - - - - try: - kwds = {} - if self.inputLFN != None: - kwds['inputSource'] = 'EDM' - - if self.noOutput: - # get config without any output - kwds['writeTiers'] = [] - - elif len(dataTiers) > 0: - # get config with specified output - kwds['writeTiers'] = dataTiers - - if self.preFilter: - kwds['preFilter'] = self.preFilter - - - # if none of the above use default output data tiers - - process = scenario.visualizationProcessing(self.globalTag, **kwds) - - except NotImplementedError, ex: - print "This scenario does not support Visualization Processing:\n" - return - except Exception, ex: - msg = "Error creating Visualization Processing config:\n" - msg += str(ex) - raise RuntimeError, msg - - if self.inputLFN != None: - process.source.fileNames = [self.inputLFN] - - import FWCore.ParameterSet.Config as cms - - process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10) ) - - psetFile = open("RunVisualizationProcessingCfg.py", "w") - psetFile.write(process.dumpPython()) - psetFile.close() - cmsRun = "cmsRun -e RunVisualizationProcessingCfg.py" - print "Now do:\n%s" % cmsRun - - - -if __name__ == '__main__': - valid = ["scenario=", "reco", "fevt", "no-output", - "global-tag=", "lfn=",'preFilter='] - usage = \ -""" -RunVisualizationProcessing.py - -Where options are: - --scenario=ScenarioName - --reco (to enable RECO output) - --fevt (to enable FEVT output) - --no-output (create config with no output, overrides other settings) - --global-tag=GlobalTag - --lfn=/store/input/lfn - --preFilter=/sybsystem/package/filtername.sequence - -Example: -python RunVisualizationProcessing.py --scenario cosmics --global-tag GLOBALTAG::ALL --lfn /store/whatever --reco - -""" - try: - opts, args = getopt.getopt(sys.argv[1:], "", valid) - except getopt.GetoptError, ex: - print usage - print str(ex) - sys.exit(1) - - - visualizator = RunVisualizationProcessing() - - for opt, arg in opts: - if opt == "--scenario": - visualizator.scenario = arg - if opt == "--reco": - visualizator.writeReco = True - if opt == "--fevt": - visualizator.writeFevt = True - if opt == "--no-output": - visualizator.noOutput = True - if opt == "--global-tag": - visualizator.globalTag = arg - if opt == "--lfn" : - visualizator.inputLFN = arg - if opt == "--preFilter": - visualizator.preFilter = arg - - visualizator() diff --git a/Configuration/DataProcessing/test/run_CfgTest.sh b/Configuration/DataProcessing/test/run_CfgTest.sh index 9926b11ccf193..c9bb02839d5c8 100755 --- a/Configuration/DataProcessing/test/run_CfgTest.sh +++ b/Configuration/DataProcessing/test/run_CfgTest.sh @@ -1,7 +1,7 @@ #!/bin/bash # Test suite for various ConfigDP scenarios -# run using: scram build runtests +# run using: scram build runtest # feel free to contribute with your favourite configuration @@ -67,11 +67,3 @@ runTest "${INPUT} --scenario cosmicsRun2 --lfn /store/whatever --run 12345 --dat runTest "${INPUT} --scenario AlCaLumiPixels --lfn /store/whatever --run 12345 --dataset /A/B/C --global-tag GLOBALTAG::ALL" #runTest "${INPUT} --scenario AlCaP0 --lfn /store/whatever --run 12345 --dataset /A/B/C --global-tag GLOBALTAG::ALL" #runTest "${INPUT} --scenario AlCaPhiSymEcal --lfn /store/whatever --run 12345 --dataset /A/B/C --global-tag GLOBALTAG::ALL" - -INPUT=${LOCAL_TEST_DIR}/RunVisualizationProcessing.py - -runTest "${INPUT} --scenario pp --lfn /store/whatever --global-tag GLOBALTAG::ALL --fevt" -runTest "${INPUT} --scenario cosmics --lfn /store/whatever --global-tag GLOBALTAG::ALL --fevt" -runTest "${INPUT} --scenario ppRun2 --lfn /store/whatever --global-tag GLOBALTAG::ALL --fevt" -runTest "${INPUT} --scenario cosmicsRun2 --lfn /store/whatever --global-tag GLOBALTAG::ALL --fevt" -runTest "${INPUT} --scenario HeavyIons --lfn /store/whatever --global-tag GLOBALTAG::ALL --fevt" diff --git a/Configuration/Generator/python/DYToLL_M-50_13TeV_pythia8_cff.py b/Configuration/Generator/python/DYToLL_M-50_13TeV_pythia8_cff.py index 50dbdf5594ff9..d0b78ba33d462 100644 --- a/Configuration/Generator/python/DYToLL_M-50_13TeV_pythia8_cff.py +++ b/Configuration/Generator/python/DYToLL_M-50_13TeV_pythia8_cff.py @@ -1,8 +1,5 @@ import FWCore.ParameterSet.Config as cms -from Configuration.Generator.Pythia8CommonSettings_cfi import * -from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * - source = cms.Source("EmptySource") generator = cms.EDFilter("Pythia8GeneratorFilter", @@ -13,21 +10,19 @@ pythiaHepMCVerbosity = cms.untracked.bool(False), pythiaPylistVerbosity = cms.untracked.int32(1), PythiaParameters = cms.PSet( - pythia8CommonSettingsBlock, - pythia8CUEP8M1SettingsBlock, - processParameters = cms.vstring( - 'WeakSingleBoson:ffbar2gmZ = on', - '23:onMode = off', - '23:onIfAny = 11', - '23:onIfAny = 13', - '23:onIfAny = 15', - '23:mMin = 50.', - ), - parameterSets = cms.vstring('pythia8CommonSettings', - 'pythia8CUEP8M1Settings', - 'processParameters', - ) - ) + processParameters = cms.vstring( + 'Main:timesAllowErrors = 10000', + 'ParticleDecays:limitTau0 = on', + 'ParticleDecays:tauMax = 10', + 'Tune:ee 3', + 'Tune:pp 5', + 'WeakSingleBoson:ffbar2gmZ = on', + '23:onMode = off', + '23:onIfAny = 11,13,15', + '23:mMin = 50.', + ), + parameterSets = cms.vstring('processParameters') + ) ) ProductionFilterSequence = cms.Sequence(generator) diff --git a/Configuration/Generator/python/GGToHtautau_13TeV_pythia8_Tauola_cff.py b/Configuration/Generator/python/GGToHtautau_13TeV_pythia8_Tauola_cff.py index 9f2b9bc549bd4..0e975ca622197 100644 --- a/Configuration/Generator/python/GGToHtautau_13TeV_pythia8_Tauola_cff.py +++ b/Configuration/Generator/python/GGToHtautau_13TeV_pythia8_Tauola_cff.py @@ -1,8 +1,5 @@ import FWCore.ParameterSet.Config as cms -from Configuration.Generator.Pythia8CommonSettings_cfi import * -from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * - source = cms.Source("EmptySource") generator = cms.EDFilter("Pythia8GeneratorFilter", @@ -25,19 +22,19 @@ pythiaHepMCVerbosity = cms.untracked.bool(False), pythiaPylistVerbosity = cms.untracked.int32(1), PythiaParameters = cms.PSet( - pythia8CommonSettingsBlock, - pythia8CUEP8M1SettingsBlock, - processParameters = cms.vstring( - 'HiggsSM:gg2H = on', - '25:onMode = off', - '25:onIfAny = 15', - '25:mMin = 50.', - ), - parameterSets = cms.vstring('pythia8CommonSettings', - 'pythia8CUEP8M1Settings', - 'processParameters', - ) - ) + processParameters = cms.vstring( + 'Main:timesAllowErrors = 10000', + 'ParticleDecays:limitTau0 = on', + 'ParticleDecays:tauMax = 10', + 'Tune:ee 3', + 'Tune:pp 5', + 'HiggsSM:gg2H = on', + '25:onMode = off', + '25:onIfAny = 15', + '25:mMin = 50.', + ), + parameterSets = cms.vstring('processParameters') + ) ) ProductionFilterSequence = cms.Sequence(generator) diff --git a/Configuration/Generator/python/GGToHtautau_13TeV_pythia8_Tauola_taupinu_cff.py b/Configuration/Generator/python/GGToHtautau_13TeV_pythia8_Tauola_taupinu_cff.py index 195559311a309..594933392eba6 100644 --- a/Configuration/Generator/python/GGToHtautau_13TeV_pythia8_Tauola_taupinu_cff.py +++ b/Configuration/Generator/python/GGToHtautau_13TeV_pythia8_Tauola_taupinu_cff.py @@ -1,8 +1,5 @@ import FWCore.ParameterSet.Config as cms -from Configuration.Generator.Pythia8CommonSettings_cfi import * -from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * - source = cms.Source("EmptySource") generator = cms.EDFilter("Pythia8GeneratorFilter", @@ -11,33 +8,33 @@ filterEfficiency = cms.untracked.double(1), maxEventsToPrint = cms.untracked.int32(1), ExternalDecays = cms.PSet( - Tauola = cms.untracked.PSet( - UseTauolaPolarization = cms.bool(True), - InputCards = cms.PSet( - mdtau = cms.int32(0), - pjak2 = cms.int32(3), - pjak1 = cms.int32(3) - ) - ), - parameterSets = cms.vstring('Tauola') - ), + Tauola = cms.untracked.PSet( + UseTauolaPolarization = cms.bool(True), + InputCards = cms.PSet( + mdtau = cms.int32(0), + pjak2 = cms.int32(3), + pjak1 = cms.int32(3) + ) + ), + parameterSets = cms.vstring('Tauola') + ), UseExternalGenerators = cms.untracked.bool(True), pythiaHepMCVerbosity = cms.untracked.bool(False), pythiaPylistVerbosity = cms.untracked.int32(1), PythiaParameters = cms.PSet( - pythia8CommonSettingsBlock, - pythia8CUEP8M1SettingsBlock, - processParameters = cms.vstring( - 'HiggsSM:gg2H = on', - '25:onMode = off', - '25:onIfAny = 15', - '25:mMin = 50.', - ), - parameterSets = cms.vstring('pythia8CommonSettings', - 'pythia8CUEP8M1Settings', - 'processParameters', - ) - ) + processParameters = cms.vstring( + 'Main:timesAllowErrors = 10000', + 'ParticleDecays:limitTau0 = on', + 'ParticleDecays:tauMax = 10', + 'Tune:ee 3', + 'Tune:pp 5', + 'HiggsSM:gg2H = on', + '25:onMode = off', + '25:onIfAny = 15', + '25:mMin = 50.', + ), + parameterSets = cms.vstring('processParameters') + ) ) ProductionFilterSequence = cms.Sequence(generator) diff --git a/Configuration/Generator/python/GGToHtautau_13TeV_pythia8_Tauola_taurhonu_cff.py b/Configuration/Generator/python/GGToHtautau_13TeV_pythia8_Tauola_taurhonu_cff.py index fc3cc1c15f400..de9f030d0c931 100644 --- a/Configuration/Generator/python/GGToHtautau_13TeV_pythia8_Tauola_taurhonu_cff.py +++ b/Configuration/Generator/python/GGToHtautau_13TeV_pythia8_Tauola_taurhonu_cff.py @@ -1,8 +1,5 @@ import FWCore.ParameterSet.Config as cms -from Configuration.Generator.Pythia8CommonSettings_cfi import * -from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * - source = cms.Source("EmptySource") generator = cms.EDFilter("Pythia8GeneratorFilter", @@ -25,19 +22,19 @@ pythiaHepMCVerbosity = cms.untracked.bool(False), pythiaPylistVerbosity = cms.untracked.int32(1), PythiaParameters = cms.PSet( - pythia8CommonSettingsBlock, - pythia8CUEP8M1SettingsBlock, - processParameters = cms.vstring( - 'HiggsSM:gg2H = on', - '25:onMode = off', - '25:onIfAny = 15', - '25:mMin = 50.', - ), - parameterSets = cms.vstring('pythia8CommonSettings', - 'pythia8CUEP8M1Settings', - 'processParameters', - ) - ) + processParameters = cms.vstring( + 'Main:timesAllowErrors = 10000', + 'ParticleDecays:limitTau0 = on', + 'ParticleDecays:tauMax = 10', + 'Tune:ee 3', + 'Tune:pp 5', + 'HiggsSM:gg2H = on', + '25:onMode = off', + '25:onIfAny = 15', + '25:mMin = 50.', + ), + parameterSets = cms.vstring('processParameters') + ) ) ProductionFilterSequence = cms.Sequence(generator) diff --git a/Configuration/Generator/python/GGToHtautau_13TeV_pythia8_cff.py b/Configuration/Generator/python/GGToHtautau_13TeV_pythia8_cff.py index 2525e78362706..9bd1e807f6b50 100644 --- a/Configuration/Generator/python/GGToHtautau_13TeV_pythia8_cff.py +++ b/Configuration/Generator/python/GGToHtautau_13TeV_pythia8_cff.py @@ -1,8 +1,5 @@ import FWCore.ParameterSet.Config as cms -from Configuration.Generator.Pythia8CommonSettings_cfi import * -from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * - source = cms.Source("EmptySource") generator = cms.EDFilter("Pythia8GeneratorFilter", @@ -13,19 +10,19 @@ pythiaHepMCVerbosity = cms.untracked.bool(False), pythiaPylistVerbosity = cms.untracked.int32(1), PythiaParameters = cms.PSet( - pythia8CommonSettingsBlock, - pythia8CUEP8M1SettingsBlock, - processParameters = cms.vstring( - 'HiggsSM:gg2H = on', - '25:onMode = off', - '25:onIfAny = 15', - '25:mMin = 50.', - ), - parameterSets = cms.vstring('pythia8CommonSettings', - 'pythia8CUEP8M1Settings', - 'processParameters', - ) - ) + processParameters = cms.vstring( + 'Main:timesAllowErrors = 10000', + 'ParticleDecays:limitTau0 = on', + 'ParticleDecays:tauMax = 10', + 'Tune:ee 3', + 'Tune:pp 5', + 'HiggsSM:gg2H = on', + '25:onMode = off', + '25:onIfAny = 15', + '25:mMin = 50.', + ), + parameterSets = cms.vstring('processParameters') + ) ) ProductionFilterSequence = cms.Sequence(generator) diff --git a/Configuration/Generator/python/GGToHtautau_13TeV_pythia8_taurhonu_cff.py b/Configuration/Generator/python/GGToHtautau_13TeV_pythia8_taurhonu_cff.py index 8540d07f89903..fa88e63fd606f 100644 --- a/Configuration/Generator/python/GGToHtautau_13TeV_pythia8_taurhonu_cff.py +++ b/Configuration/Generator/python/GGToHtautau_13TeV_pythia8_taurhonu_cff.py @@ -1,8 +1,5 @@ import FWCore.ParameterSet.Config as cms -from Configuration.Generator.Pythia8CommonSettings_cfi import * -from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * - source = cms.Source("EmptySource") generator = cms.EDFilter("Pythia8GeneratorFilter", @@ -13,21 +10,21 @@ pythiaHepMCVerbosity = cms.untracked.bool(False), pythiaPylistVerbosity = cms.untracked.int32(1), PythiaParameters = cms.PSet( - pythia8CommonSettingsBlock, - pythia8CUEP8M1SettingsBlock, - processParameters = cms.vstring( - 'HiggsSM:gg2H = on', - '25:onMode = off', - '25:onIfAny = 15', - '25:mMin = 50.', - '15:onMode = off', - '15:onIfMatch = 16 -211 111' - ), - parameterSets = cms.vstring('pythia8CommonSettings', - 'pythia8CUEP8M1Settings', - 'processParameters', - ) - ) + processParameters = cms.vstring( + 'Main:timesAllowErrors = 10000', + 'ParticleDecays:limitTau0 = on', + 'ParticleDecays:tauMax = 10', + 'Tune:ee 3', + 'Tune:pp 5', + 'HiggsSM:gg2H = on', + '25:onMode = off', + '25:onIfAny = 15', + '25:mMin = 50.', + '15:onMode = off', + '15:onIfMatch = 16 -211 111' + ), + parameterSets = cms.vstring('processParameters') + ) ) ProductionFilterSequence = cms.Sequence(generator) diff --git a/Configuration/Generator/python/Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_EvtGen_cff.py b/Configuration/Generator/python/Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_EvtGen_cff.py similarity index 100% rename from Configuration/Generator/python/Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_EvtGen_cff.py rename to Configuration/Generator/python/Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_EvtGen_cff.py diff --git a/Configuration/Generator/python/Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_Tauola_cff.py b/Configuration/Generator/python/Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_Tauola_cff.py index 11d84041434b3..b93109d9d10f8 100644 --- a/Configuration/Generator/python/Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_Tauola_cff.py +++ b/Configuration/Generator/python/Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_Tauola_cff.py @@ -1,14 +1,15 @@ # Copied from https://github.com/cms-sw/genproductions for RelVal June 5, 2014 import FWCore.ParameterSet.Config as cms from GeneratorInterface.ExternalDecays.TauolaSettings_cff import * + generator = cms.EDFilter("Pythia8HadronizerFilter", ExternalDecays = cms.PSet( - Tauola = cms.untracked.PSet( - TauolaPolar, - TauolaDefaultInputCards - ), - parameterSets = cms.vstring('Tauola') - ), + Tauola = cms.untracked.PSet( + TauolaPolar, + TauolaDefaultInputCards + ), + parameterSets = cms.vstring('Tauola') + ), UseExternalGenerators = cms.untracked.bool(True), maxEventsToPrint = cms.untracked.int32(1), pythiaPylistVerbosity = cms.untracked.int32(1), @@ -16,27 +17,26 @@ pythiaHepMCVerbosity = cms.untracked.bool(False), comEnergy = cms.double(13000.), jetMatching = cms.untracked.PSet( - scheme = cms.string("Madgraph"), - mode = cms.string("auto"),# soup, or "inclusive" / "exclusive" - MEMAIN_etaclmax = cms.double(-1), - MEMAIN_qcut = cms.double(-1), - MEMAIN_minjets = cms.int32(-1), - MEMAIN_maxjets = cms.int32(-1), - MEMAIN_showerkt = cms.double(0), # use 1=yes only for pt-ordered showers ! - MEMAIN_nqmatch = cms.int32(5), #PID of the flavor until which the QCD radiation are kept in the matching procedure; - # if nqmatch=4, then all showered partons from b's are NOT taken into account - # Note (JY): I think the default should be 5 (b); anyway, don't try -1 as it'll result in a throw... - MEMAIN_excres = cms.string(""), - outTree_flag = cms.int32(0) # 1=yes, write out the tree for future sanity check - ), + scheme = cms.string("Madgraph"), + mode = cms.string("auto"),# soup, or "inclusive" / "exclusive" + MEMAIN_etaclmax = cms.double(-1), + MEMAIN_qcut = cms.double(-1), + MEMAIN_minjets = cms.int32(-1), + MEMAIN_maxjets = cms.int32(-1), + MEMAIN_showerkt = cms.double(0), # use 1=yes only for pt-ordered showers ! + MEMAIN_nqmatch = cms.int32(5), #PID of the flavor until which the QCD radiation are kept in the matching procedure; + # if nqmatch=4, then all showered partons from b's are NOT taken into account + # Note (JY): I think the default should be 5 (b); anyway, don't try -1 as it'll result in a throw... + MEMAIN_excres = cms.string(""), + outTree_flag = cms.int32(0) # 1=yes, write out the tree for future sanity check + ), PythiaParameters = cms.PSet( - processParameters = cms.vstring( - 'Main:timesAllowErrors = 10000', - 'ParticleDecays:limitTau0 = on', - 'ParticleDecays:tauMax = 10', - 'Tune:ee 3', - 'Tune:pp 5'), - parameterSets = cms.vstring('processParameters') - ) + processParameters = cms.vstring( + 'Main:timesAllowErrors = 10000', + 'ParticleDecays:limitTau0 = on', + 'ParticleDecays:tauMax = 10', + 'Tune:ee 3', + 'Tune:pp 5'), + parameterSets = cms.vstring('processParameters') + ) ) - diff --git a/Configuration/Generator/python/Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_Tauola_taupinu_cff.py b/Configuration/Generator/python/Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_Tauola_taupinu_cff.py new file mode 100644 index 0000000000000..01dbc1b875cdf --- /dev/null +++ b/Configuration/Generator/python/Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_Tauola_taupinu_cff.py @@ -0,0 +1,47 @@ +# Copied from https://github.com/cms-sw/genproductions for RelVal June 5, 2014 +import FWCore.ParameterSet.Config as cms +from GeneratorInterface.ExternalDecays.TauolaSettings_cff import * + +generator = cms.EDFilter("Pythia8HadronizerFilter", + ExternalDecays = cms.PSet( + Tauola = cms.untracked.PSet( + UseTauolaPolarization = cms.bool(True), + InputCards = cms.PSet( + mdtau = cms.int32(0), + pjak2 = cms.int32(3), + pjak1 = cms.int32(3) + ) + ), + parameterSets = cms.vstring('Tauola') + ), + UseExternalGenerators = cms.untracked.bool(True), + maxEventsToPrint = cms.untracked.int32(1), + pythiaPylistVerbosity = cms.untracked.int32(1), + filterEfficiency = cms.untracked.double(1.0), + pythiaHepMCVerbosity = cms.untracked.bool(False), + comEnergy = cms.double(13000.), + jetMatching = cms.untracked.PSet( + scheme = cms.string("Madgraph"), + mode = cms.string("auto"),# soup, or "inclusive" / "exclusive" + MEMAIN_etaclmax = cms.double(-1), + MEMAIN_qcut = cms.double(-1), + MEMAIN_minjets = cms.int32(-1), + MEMAIN_maxjets = cms.int32(-1), + MEMAIN_showerkt = cms.double(0), # use 1=yes only for pt-ordered showers ! + MEMAIN_nqmatch = cms.int32(5), #PID of the flavor until which the QCD radiation are kept in the matching procedure; + # if nqmatch=4, then all showered partons from b's are NOT taken into account + # Note (JY): I think the default should be 5 (b); anyway, don't try -1 as it'll result in a throw... + MEMAIN_excres = cms.string(""), + outTree_flag = cms.int32(0) # 1=yes, write out the tree for future sanity check + ), + PythiaParameters = cms.PSet( + processParameters = cms.vstring( + 'Main:timesAllowErrors = 10000', + 'ParticleDecays:limitTau0 = on', + 'ParticleDecays:tauMax = 10', + 'Tune:ee 3', + 'Tune:pp 5'), + parameterSets = cms.vstring('processParameters') + ) + ) +ProductionFilterSequence = cms.Sequence(generator) diff --git a/Configuration/Generator/python/Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_taurhonu_cff.py b/Configuration/Generator/python/Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_Tauola_taurhonu_cff.py similarity index 67% rename from Configuration/Generator/python/Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_taurhonu_cff.py rename to Configuration/Generator/python/Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_Tauola_taurhonu_cff.py index 65a89363a5e33..cb61772570bff 100644 --- a/Configuration/Generator/python/Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_taurhonu_cff.py +++ b/Configuration/Generator/python/Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_Tauola_taurhonu_cff.py @@ -1,10 +1,20 @@ # Copied from https://github.com/cms-sw/genproductions for RelVal June 5, 2014 import FWCore.ParameterSet.Config as cms - -from Configuration.Generator.Pythia8CommonSettings_cfi import * -from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * +from GeneratorInterface.ExternalDecays.TauolaSettings_cff import * generator = cms.EDFilter("Pythia8HadronizerFilter", + ExternalDecays = cms.PSet( + Tauola = cms.untracked.PSet( + UseTauolaPolarization = cms.bool(True), + InputCards = cms.PSet( + mdtau = cms.int32(0), + pjak2 = cms.int32(4), + pjak1 = cms.int32(4) + ) + ), + parameterSets = cms.vstring('Tauola') + ), + UseExternalGenerators = cms.untracked.bool(True), maxEventsToPrint = cms.untracked.int32(1), pythiaPylistVerbosity = cms.untracked.int32(1), filterEfficiency = cms.untracked.double(1.0), @@ -25,14 +35,12 @@ outTree_flag = cms.int32(0) # 1=yes, write out the tree for future sanity check ), PythiaParameters = cms.PSet( - pythia8CommonSettingsBlock, - pythia8CUEP8M1SettingsBlock, - processParameters = cms.vstring( - '15:onMode = off', - '15:onIfMatch = 16 -211 111'), - parameterSets = cms.vstring('pythia8CommonSettings', - 'pythia8CUEP8M1Settings', - 'processParameters', - ) - ) + processParameters = cms.vstring( + 'Main:timesAllowErrors = 10000', + 'ParticleDecays:limitTau0 = on', + 'ParticleDecays:tauMax = 10', + 'Tune:ee 3', + 'Tune:pp 5'), + parameterSets = cms.vstring('processParameters') + ) ) diff --git a/Configuration/Generator/python/Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_cff.py b/Configuration/Generator/python/Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_cff.py index 3aa2dc0bb69f9..4650f1b3dc9e2 100644 --- a/Configuration/Generator/python/Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_cff.py +++ b/Configuration/Generator/python/Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_cff.py @@ -1,5 +1,6 @@ # Copied from https://github.com/cms-sw/genproductions for RelVal June 5, 2014 import FWCore.ParameterSet.Config as cms + generator = cms.EDFilter("Pythia8HadronizerFilter", maxEventsToPrint = cms.untracked.int32(1), pythiaPylistVerbosity = cms.untracked.int32(1), @@ -7,27 +8,29 @@ pythiaHepMCVerbosity = cms.untracked.bool(False), comEnergy = cms.double(13000.), jetMatching = cms.untracked.PSet( - scheme = cms.string("Madgraph"), - mode = cms.string("auto"),# soup, or "inclusive" / "exclusive" - MEMAIN_etaclmax = cms.double(-1), - MEMAIN_qcut = cms.double(-1), - MEMAIN_minjets = cms.int32(-1), - MEMAIN_maxjets = cms.int32(-1), - MEMAIN_showerkt = cms.double(0), # use 1=yes only for pt-ordered showers ! - MEMAIN_nqmatch = cms.int32(5), #PID of the flavor until which the QCD radiation are kept in the matching procedure; - # if nqmatch=4, then all showered partons from b's are NOT taken into account - # Note (JY): I think the default should be 5 (b); anyway, don't try -1 as it'll result in a throw... - MEMAIN_excres = cms.string(""), - outTree_flag = cms.int32(0) # 1=yes, write out the tree for future sanity check - ), + scheme = cms.string("Madgraph"), + mode = cms.string("auto"),# soup, or "inclusive" / "exclusive" + MEMAIN_etaclmax = cms.double(-1), + MEMAIN_qcut = cms.double(-1), + MEMAIN_minjets = cms.int32(-1), + MEMAIN_maxjets = cms.int32(-1), + MEMAIN_showerkt = cms.double(0), # use 1=yes only for pt-ordered showers ! + MEMAIN_nqmatch = cms.int32(5), #PID of the flavor until which the QCD radiation are kept in the matching procedure; + # if nqmatch=4, then all showered partons from b's are NOT taken into account + # Note (JY): I think the default should be 5 (b); anyway, don't try -1 as it'll result in a throw... + MEMAIN_excres = cms.string(""), + outTree_flag = cms.int32(0) # 1=yes, write out the tree for future sanity check + ), PythiaParameters = cms.PSet( - processParameters = cms.vstring( - 'Main:timesAllowErrors = 10000', - 'ParticleDecays:limitTau0 = on', - 'ParticleDecays:tauMax = 10', - 'Tune:ee 3', - 'Tune:pp 5'), - parameterSets = cms.vstring('processParameters') - ) + processParameters = cms.vstring( + 'Main:timesAllowErrors = 10000', + 'ParticleDecays:limitTau0 = on', + 'ParticleDecays:tauMax = 10', + 'Tune:ee 3', + 'Tune:pp 5'), + parameterSets = cms.vstring('processParameters') + ) ) + ProductionFilterSequence = cms.Sequence(generator) + diff --git a/Configuration/Generator/python/Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_cff.py b/Configuration/Generator/python/Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_taupinu_cff.py similarity index 76% rename from Configuration/Generator/python/Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_cff.py rename to Configuration/Generator/python/Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_taupinu_cff.py index d59bd8a35872a..1bc8795cc1d92 100644 --- a/Configuration/Generator/python/Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_cff.py +++ b/Configuration/Generator/python/Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_taupinu_cff.py @@ -1,9 +1,6 @@ # Copied from https://github.com/cms-sw/genproductions for RelVal June 5, 2014 import FWCore.ParameterSet.Config as cms -from Configuration.Generator.Pythia8CommonSettings_cfi import * -from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * - generator = cms.EDFilter("Pythia8HadronizerFilter", maxEventsToPrint = cms.untracked.int32(1), pythiaPylistVerbosity = cms.untracked.int32(1), @@ -25,14 +22,14 @@ outTree_flag = cms.int32(0) # 1=yes, write out the tree for future sanity check ), PythiaParameters = cms.PSet( - pythia8CommonSettingsBlock, - pythia8CUEP8M1SettingsBlock, - parameterSets = cms.vstring('pythia8CommonSettings', - 'pythia8CUEP8M1Settings', - ) - - ) + processParameters = cms.vstring( + 'Main:timesAllowErrors = 10000', + 'ParticleDecays:limitTau0 = on', + 'ParticleDecays:tauMax = 10', + '15:onMode = off', + '15:onIfMatch = 16 -211', + 'Tune:ee 3', + 'Tune:pp 5'), + parameterSets = cms.vstring('processParameters') + ) ) - -ProductionFilterSequence = cms.Sequence(generator) - diff --git a/Configuration/Generator/python/Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_taupinu_cff.py b/Configuration/Generator/python/Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_taurhonu_cff.py similarity index 72% rename from Configuration/Generator/python/Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_taupinu_cff.py rename to Configuration/Generator/python/Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_taurhonu_cff.py index 65dfa922a9440..3c8858ef1d4b9 100644 --- a/Configuration/Generator/python/Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_taupinu_cff.py +++ b/Configuration/Generator/python/Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_taurhonu_cff.py @@ -1,9 +1,6 @@ # Copied from https://github.com/cms-sw/genproductions for RelVal June 5, 2014 import FWCore.ParameterSet.Config as cms -from Configuration.Generator.Pythia8CommonSettings_cfi import * -from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * - generator = cms.EDFilter("Pythia8HadronizerFilter", maxEventsToPrint = cms.untracked.int32(1), pythiaPylistVerbosity = cms.untracked.int32(1), @@ -25,14 +22,14 @@ outTree_flag = cms.int32(0) # 1=yes, write out the tree for future sanity check ), PythiaParameters = cms.PSet( - pythia8CommonSettingsBlock, - pythia8CUEP8M1SettingsBlock, - processParameters = cms.vstring( - '15:onMode = off', - '15:onIfMatch = 16 -211'), - parameterSets = cms.vstring('pythia8CommonSettings', - 'pythia8CUEP8M1Settings', - 'processParameters', - ) - ) + processParameters = cms.vstring( + 'Main:timesAllowErrors = 10000', + 'ParticleDecays:limitTau0 = on', + 'ParticleDecays:tauMax = 10', + '15:onMode = off', + '15:onIfMatch = 16 -211 111', + 'Tune:ee 3', + 'Tune:pp 5'), + parameterSets = cms.vstring('processParameters') + ) ) diff --git a/Configuration/Generator/python/Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_Tauola_cff.py b/Configuration/Generator/python/Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_Tauola_cff.py deleted file mode 100644 index 975f56c2b0892..0000000000000 --- a/Configuration/Generator/python/Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_Tauola_cff.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copied from https://github.com/cms-sw/genproductions for RelVal June 5, 2014 -import FWCore.ParameterSet.Config as cms -from GeneratorInterface.ExternalDecays.TauolaSettings_cff import * - -from Configuration.Generator.Pythia8CommonSettings_cfi import * -from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * - -generator = cms.EDFilter("Pythia8HadronizerFilter", - ExternalDecays = cms.PSet( - Tauola = cms.untracked.PSet( - TauolaPolar, - TauolaDefaultInputCards - ), - parameterSets = cms.vstring('Tauola') - ), - UseExternalGenerators = cms.untracked.bool(True), - maxEventsToPrint = cms.untracked.int32(1), - pythiaPylistVerbosity = cms.untracked.int32(1), - filterEfficiency = cms.untracked.double(1.0), - pythiaHepMCVerbosity = cms.untracked.bool(False), - comEnergy = cms.double(13000.), - jetMatching = cms.untracked.PSet( - scheme = cms.string("Madgraph"), - mode = cms.string("auto"),# soup, or "inclusive" / "exclusive" - MEMAIN_etaclmax = cms.double(-1), - MEMAIN_qcut = cms.double(-1), - MEMAIN_minjets = cms.int32(-1), - MEMAIN_maxjets = cms.int32(-1), - MEMAIN_showerkt = cms.double(0), # use 1=yes only for pt-ordered showers ! - MEMAIN_nqmatch = cms.int32(5), #PID of the flavor until which the QCD radiation are kept in the matching procedure; - # if nqmatch=4, then all showered partons from b's are NOT taken into account - # Note (JY): I think the default should be 5 (b); anyway, don't try -1 as it'll result in a throw... - MEMAIN_excres = cms.string(""), - outTree_flag = cms.int32(0) # 1=yes, write out the tree for future sanity check - ), - PythiaParameters = cms.PSet( - pythia8CommonSettingsBlock, - pythia8CUEP8M1SettingsBlock, - parameterSets = cms.vstring('pythia8CommonSettings', - 'pythia8CUEP8M1Settings' - ) - ) - ) diff --git a/Configuration/Generator/python/Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_Tauola_taupinu_cff.py b/Configuration/Generator/python/Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_Tauola_taupinu_cff.py deleted file mode 100644 index 5085bf031970f..0000000000000 --- a/Configuration/Generator/python/Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_Tauola_taupinu_cff.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copied from https://github.com/cms-sw/genproductions for RelVal June 5, 2014 -import FWCore.ParameterSet.Config as cms -from GeneratorInterface.ExternalDecays.TauolaSettings_cff import * - -from Configuration.Generator.Pythia8CommonSettings_cfi import * -from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * - -generator = cms.EDFilter("Pythia8HadronizerFilter", - ExternalDecays = cms.PSet( - Tauola = cms.untracked.PSet( - UseTauolaPolarization = cms.bool(True), - InputCards = cms.PSet( - mdtau = cms.int32(0), - pjak2 = cms.int32(3), - pjak1 = cms.int32(3) - ) - ), - parameterSets = cms.vstring('Tauola') - ), - UseExternalGenerators = cms.untracked.bool(True), - maxEventsToPrint = cms.untracked.int32(1), - pythiaPylistVerbosity = cms.untracked.int32(1), - filterEfficiency = cms.untracked.double(1.0), - pythiaHepMCVerbosity = cms.untracked.bool(False), - comEnergy = cms.double(13000.), - jetMatching = cms.untracked.PSet( - scheme = cms.string("Madgraph"), - mode = cms.string("auto"),# soup, or "inclusive" / "exclusive" - MEMAIN_etaclmax = cms.double(-1), - MEMAIN_qcut = cms.double(-1), - MEMAIN_minjets = cms.int32(-1), - MEMAIN_maxjets = cms.int32(-1), - MEMAIN_showerkt = cms.double(0), # use 1=yes only for pt-ordered showers ! - MEMAIN_nqmatch = cms.int32(5), #PID of the flavor until which the QCD radiation are kept in the matching procedure; - # if nqmatch=4, then all showered partons from b's are NOT taken into account - # Note (JY): I think the default should be 5 (b); anyway, don't try -1 as it'll result in a throw... - MEMAIN_excres = cms.string(""), - outTree_flag = cms.int32(0) # 1=yes, write out the tree for future sanity check - ), - PythiaParameters = cms.PSet( - pythia8CommonSettingsBlock, - pythia8CUEP8M1SettingsBlock, - parameterSets = cms.vstring('pythia8CommonSettings', - 'pythia8CUEP8M1Settings' - ) - ) - ) - -ProductionFilterSequence = cms.Sequence(generator) diff --git a/Configuration/Generator/python/Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_Tauola_taurhonu_cff.py b/Configuration/Generator/python/Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_Tauola_taurhonu_cff.py deleted file mode 100644 index 6ecf1b4795495..0000000000000 --- a/Configuration/Generator/python/Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_Tauola_taurhonu_cff.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copied from https://github.com/cms-sw/genproductions for RelVal June 5, 2014 -import FWCore.ParameterSet.Config as cms -from GeneratorInterface.ExternalDecays.TauolaSettings_cff import * - -from Configuration.Generator.Pythia8CommonSettings_cfi import * -from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * - -generator = cms.EDFilter("Pythia8HadronizerFilter", - ExternalDecays = cms.PSet( - Tauola = cms.untracked.PSet( - UseTauolaPolarization = cms.bool(True), - InputCards = cms.PSet( - mdtau = cms.int32(0), - pjak2 = cms.int32(4), - pjak1 = cms.int32(4) - ) - ), - parameterSets = cms.vstring('Tauola') - ), - UseExternalGenerators = cms.untracked.bool(True), - maxEventsToPrint = cms.untracked.int32(1), - pythiaPylistVerbosity = cms.untracked.int32(1), - filterEfficiency = cms.untracked.double(1.0), - pythiaHepMCVerbosity = cms.untracked.bool(False), - comEnergy = cms.double(13000.), - jetMatching = cms.untracked.PSet( - scheme = cms.string("Madgraph"), - mode = cms.string("auto"),# soup, or "inclusive" / "exclusive" - MEMAIN_etaclmax = cms.double(-1), - MEMAIN_qcut = cms.double(-1), - MEMAIN_minjets = cms.int32(-1), - MEMAIN_maxjets = cms.int32(-1), - MEMAIN_showerkt = cms.double(0), # use 1=yes only for pt-ordered showers ! - MEMAIN_nqmatch = cms.int32(5), #PID of the flavor until which the QCD radiation are kept in the matching procedure; - # if nqmatch=4, then all showered partons from b's are NOT taken into account - # Note (JY): I think the default should be 5 (b); anyway, don't try -1 as it'll result in a throw... - MEMAIN_excres = cms.string(""), - outTree_flag = cms.int32(0) # 1=yes, write out the tree for future sanity check - ), - PythiaParameters = cms.PSet( - pythia8CommonSettingsBlock, - pythia8CUEP8M1SettingsBlock, - parameterSets = cms.vstring('pythia8CommonSettings', - 'pythia8CUEP8M1Settings', - ) - ) - ) diff --git a/Configuration/Generator/python/MinBias_13TeV_pythia8_cff.py b/Configuration/Generator/python/MinBias_13TeV_pythia8_cff.py index c6f16eadfcd3f..70e32fb2f55b9 100644 --- a/Configuration/Generator/python/MinBias_13TeV_pythia8_cff.py +++ b/Configuration/Generator/python/MinBias_13TeV_pythia8_cff.py @@ -1,8 +1,5 @@ import FWCore.ParameterSet.Config as cms -from Configuration.Generator.Pythia8CommonSettings_cfi import * -from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * - source = cms.Source("EmptySource") generator = cms.EDFilter("Pythia8GeneratorFilter", @@ -12,19 +9,19 @@ filterEfficiency = cms.untracked.double(1.0), pythiaHepMCVerbosity = cms.untracked.bool(False), comEnergy = cms.double(13000.0), - PythiaParameters = cms.PSet( - pythia8CommonSettingsBlock, - pythia8CUEP8M1SettingsBlock, + PythiaParameters = cms.PSet( processParameters = cms.vstring( +'Main:timesAllowErrors = 10000', + 'ParticleDecays:limitTau0 = on', +'ParticleDecays:tauMax = 10', 'SoftQCD:nonDiffractive = on', 'SoftQCD:singleDiffractive = on', - 'SoftQCD:doubleDiffractive = on'), - parameterSets = cms.vstring('pythia8CommonSettings', - 'pythia8CUEP8M1Settings', - 'processParameters', - ) - ) - ) + 'SoftQCD:doubleDiffractive = on', + 'Tune:pp 2', + 'Tune:ee 3'), + parameterSets = cms.vstring('processParameters') + ) +) ProductionFilterSequence = cms.Sequence(generator) diff --git a/Configuration/Generator/python/QCD_Pt_30_13TeV_pythia8_cff.py b/Configuration/Generator/python/QCD_Pt_30_13TeV_pythia8_cff.py index 85658a4f00118..9bd41835ccd4b 100644 --- a/Configuration/Generator/python/QCD_Pt_30_13TeV_pythia8_cff.py +++ b/Configuration/Generator/python/QCD_Pt_30_13TeV_pythia8_cff.py @@ -1,8 +1,5 @@ import FWCore.ParameterSet.Config as cms -from Configuration.Generator.Pythia8CommonSettings_cfi import * -from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * - source = cms.Source("EmptySource") generator = cms.EDFilter("Pythia8GeneratorFilter", @@ -13,17 +10,16 @@ pythiaHepMCVerbosity = cms.untracked.bool(False), comEnergy = cms.double(13000.0), PythiaParameters = cms.PSet( - pythia8CommonSettingsBlock, - pythia8CUEP8M1SettingsBlock, processParameters = cms.vstring( +'Main:timesAllowErrors = 10000', + 'ParticleDecays:limitTau0 = on', +'ParticleDecays:tauMax = 10', 'HardQCD:all = on', - 'PhaseSpace:pTHatMin = 30.'), - parameterSets = cms.vstring('pythia8CommonSettings', - 'pythia8CUEP8M1Settings', - 'processParameters', - ) - - ) - ) + 'PhaseSpace:pTHatMin = 30.', + 'Tune:pp 2', + 'Tune:ee 3'), + parameterSets = cms.vstring('processParameters') + ) +) ProductionFilterSequence = cms.Sequence(generator) diff --git a/Configuration/Generator/python/SoftQCDDiffractive_13TeV_pythia8_cff.py b/Configuration/Generator/python/SoftQCDDiffractive_13TeV_pythia8_cff.py index ddb1483dc4337..1539e661a5101 100644 --- a/Configuration/Generator/python/SoftQCDDiffractive_13TeV_pythia8_cff.py +++ b/Configuration/Generator/python/SoftQCDDiffractive_13TeV_pythia8_cff.py @@ -1,29 +1,25 @@ import FWCore.ParameterSet.Config as cms -from Configuration.Generator.Pythia8CommonSettings_cfi import * -from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * - source = cms.Source("EmptySource") generator = cms.EDFilter("Pythia8GeneratorFilter", - crossSection = cms.untracked.double(71.39e+09), - maxEventsToPrint = cms.untracked.int32(0), - pythiaPylistVerbosity = cms.untracked.int32(1), - filterEfficiency = cms.untracked.double(1.0), - pythiaHepMCVerbosity = cms.untracked.bool(False), - comEnergy = cms.double(13000.0), - PythiaParameters = cms.PSet( - pythia8CommonSettingsBlock, - pythia8CUEP8M1SettingsBlock, + crossSection = cms.untracked.double(71.39e+09), + maxEventsToPrint = cms.untracked.int32(0), + pythiaPylistVerbosity = cms.untracked.int32(1), + filterEfficiency = cms.untracked.double(1.0), + pythiaHepMCVerbosity = cms.untracked.bool(False), + comEnergy = cms.double(13000.0), + PythiaParameters = cms.PSet( processParameters = cms.vstring( +'Main:timesAllowErrors = 10000', + 'ParticleDecays:limitTau0 = on', +'ParticleDecays:tauMax = 10', 'SoftQCD:singleDiffractive = on', - 'SoftQCD:doubleDiffractive = on'), - parameterSets = cms.vstring('pythia8CommonSettings', - 'pythia8CUEP8M1Settings', - 'processParameters', - ) - - ) - ) + 'SoftQCD:doubleDiffractive = on', + 'Tune:pp 2', + 'Tune:ee 3'), + parameterSets = cms.vstring('processParameters') + ) +) ProductionFilterSequence = cms.Sequence(generator) diff --git a/Configuration/Generator/python/SoftQCDelastic_13TeV_pythia8_cff.py b/Configuration/Generator/python/SoftQCDelastic_13TeV_pythia8_cff.py index 818bc149f1bfe..a0faeeb6a9968 100644 --- a/Configuration/Generator/python/SoftQCDelastic_13TeV_pythia8_cff.py +++ b/Configuration/Generator/python/SoftQCDelastic_13TeV_pythia8_cff.py @@ -1,26 +1,23 @@ import FWCore.ParameterSet.Config as cms -from Configuration.Generator.Pythia8CommonSettings_cfi import * -from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * - source = cms.Source("EmptySource") generator = cms.EDFilter("Pythia8GeneratorFilter", - crossSection = cms.untracked.double(71.39e+09), - maxEventsToPrint = cms.untracked.int32(0), - pythiaPylistVerbosity = cms.untracked.int32(1), - filterEfficiency = cms.untracked.double(1.0), - pythiaHepMCVerbosity = cms.untracked.bool(False), - comEnergy = cms.double(13000.0), - PythiaParameters = cms.PSet( - pythia8CommonSettingsBlock, - pythia8CUEP8M1SettingsBlock, + crossSection = cms.untracked.double(71.39e+09), + maxEventsToPrint = cms.untracked.int32(0), + pythiaPylistVerbosity = cms.untracked.int32(1), + filterEfficiency = cms.untracked.double(1.0), + pythiaHepMCVerbosity = cms.untracked.bool(False), + comEnergy = cms.double(13000.0), + PythiaParameters = cms.PSet( processParameters = cms.vstring( - 'SoftQCD:elastic = on'), - parameterSets = cms.vstring('pythia8CommonSettings', - 'pythia8CUEP8M1Settings', - 'processParameters', - ) - ) - ) +'Main:timesAllowErrors = 10000', + 'ParticleDecays:limitTau0 = on', +'ParticleDecays:tauMax = 10', + 'SoftQCD:elastic = on', + 'Tune:pp 2', + 'Tune:ee 3'), + parameterSets = cms.vstring('processParameters') + ) +) ProductionFilterSequence = cms.Sequence(generator) diff --git a/Configuration/Generator/python/SoftQCDinelastic_13TeV_pythia8_cff.py b/Configuration/Generator/python/SoftQCDinelastic_13TeV_pythia8_cff.py index 8addd46e8862e..ed7cacae19af9 100644 --- a/Configuration/Generator/python/SoftQCDinelastic_13TeV_pythia8_cff.py +++ b/Configuration/Generator/python/SoftQCDinelastic_13TeV_pythia8_cff.py @@ -1,27 +1,24 @@ import FWCore.ParameterSet.Config as cms -from Configuration.Generator.Pythia8CommonSettings_cfi import * -from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * - source = cms.Source("EmptySource") generator = cms.EDFilter("Pythia8GeneratorFilter", - crossSection = cms.untracked.double(71.39e+09), - maxEventsToPrint = cms.untracked.int32(0), - pythiaPylistVerbosity = cms.untracked.int32(1), - filterEfficiency = cms.untracked.double(1.0), - pythiaHepMCVerbosity = cms.untracked.bool(False), - comEnergy = cms.double(13000.0), + crossSection = cms.untracked.double(71.39e+09), + maxEventsToPrint = cms.untracked.int32(0), + pythiaPylistVerbosity = cms.untracked.int32(1), + filterEfficiency = cms.untracked.double(1.0), + pythiaHepMCVerbosity = cms.untracked.bool(False), + comEnergy = cms.double(13000.0), PythiaParameters = cms.PSet( - pythia8CommonSettingsBlock, - pythia8CUEP8M1SettingsBlock, processParameters = cms.vstring( - 'SoftQCD:inelastic = on'), - parameterSets = cms.vstring('pythia8CommonSettings', - 'pythia8CUEP8M1Settings', - 'processParameters', - ) - ) - ) +'Main:timesAllowErrors = 10000', + 'ParticleDecays:limitTau0 = on', +'ParticleDecays:tauMax = 10', + 'SoftQCD:inelastic = on', + 'Tune:pp 2', + 'Tune:ee 3'), + parameterSets = cms.vstring('processParameters') + ) +) ProductionFilterSequence = cms.Sequence(generator) diff --git a/Configuration/Generator/python/SoftQCDnonDiffractive_13TeV_pythia8_cff.py b/Configuration/Generator/python/SoftQCDnonDiffractive_13TeV_pythia8_cff.py index 809e3e6e4b0a4..b591c34a3fdf9 100644 --- a/Configuration/Generator/python/SoftQCDnonDiffractive_13TeV_pythia8_cff.py +++ b/Configuration/Generator/python/SoftQCDnonDiffractive_13TeV_pythia8_cff.py @@ -1,27 +1,24 @@ import FWCore.ParameterSet.Config as cms -from Configuration.Generator.Pythia8CommonSettings_cfi import * -from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * - source = cms.Source("EmptySource") generator = cms.EDFilter("Pythia8GeneratorFilter", - crossSection = cms.untracked.double(71.39e+09), - maxEventsToPrint = cms.untracked.int32(0), - pythiaPylistVerbosity = cms.untracked.int32(1), - filterEfficiency = cms.untracked.double(1.0), - pythiaHepMCVerbosity = cms.untracked.bool(False), - comEnergy = cms.double(13000.0), - PythiaParameters = cms.PSet( - pythia8CommonSettingsBlock, - pythia8CUEP8M1SettingsBlock, + crossSection = cms.untracked.double(71.39e+09), + maxEventsToPrint = cms.untracked.int32(0), + pythiaPylistVerbosity = cms.untracked.int32(1), + filterEfficiency = cms.untracked.double(1.0), + pythiaHepMCVerbosity = cms.untracked.bool(False), + comEnergy = cms.double(13000.0), + PythiaParameters = cms.PSet( processParameters = cms.vstring( - 'SoftQCD:nonDiffractive = on'), - parameterSets = cms.vstring('pythia8CommonSettings', - 'pythia8CUEP8M1Settings', - 'processParameters', - ) - ) - ) +'Main:timesAllowErrors = 10000', + 'ParticleDecays:limitTau0 = on', +'ParticleDecays:tauMax = 10', + 'SoftQCD:nonDiffractive = on', + 'Tune:pp 2', + 'Tune:ee 3'), + parameterSets = cms.vstring('processParameters') + ) +) ProductionFilterSequence = cms.Sequence(generator) diff --git a/Configuration/Generator/python/WToLNu_13TeV_pythia8_cff.py b/Configuration/Generator/python/WToLNu_13TeV_pythia8_cff.py index 84eb22009726f..052e0a59cc80a 100644 --- a/Configuration/Generator/python/WToLNu_13TeV_pythia8_cff.py +++ b/Configuration/Generator/python/WToLNu_13TeV_pythia8_cff.py @@ -1,8 +1,5 @@ import FWCore.ParameterSet.Config as cms -from Configuration.Generator.Pythia8CommonSettings_cfi import * -from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * - source = cms.Source("EmptySource") generator = cms.EDFilter("Pythia8GeneratorFilter", @@ -13,22 +10,21 @@ pythiaHepMCVerbosity = cms.untracked.bool(False), pythiaPylistVerbosity = cms.untracked.int32(1), PythiaParameters = cms.PSet( - pythia8CommonSettingsBlock, - pythia8CUEP8M1SettingsBlock, - processParameters = cms.vstring( - 'WeakSingleBoson:ffbar2W = on', - '24:onMode = off', - '24:onIfAny = 11 12', - '24:onIfAny = 13 14', - '24:onIfAny = 15 16', - '24:mMin = 50.', - ), - parameterSets = cms.vstring('pythia8CommonSettings', - 'pythia8CUEP8M1Settings', - 'processParameters', - ) - - ) + processParameters = cms.vstring( + 'Main:timesAllowErrors = 10000', + 'ParticleDecays:limitTau0 = on', + 'ParticleDecays:tauMax = 10', + 'Tune:ee 3', + 'Tune:pp 5', + + 'WeakSingleBoson:ffbar2W = on', + '24:onMode = off', + '24:onIfAny = 11,12,13,14,15,16', + '24:mMin = 50.', + + ), + parameterSets = cms.vstring('processParameters') + ) ) ProductionFilterSequence = cms.Sequence(generator) diff --git a/Configuration/PyReleaseValidation/python/relval_standard.py b/Configuration/PyReleaseValidation/python/relval_standard.py index 9a5d5c3c47c8b..da62a65702997 100644 --- a/Configuration/PyReleaseValidation/python/relval_standard.py +++ b/Configuration/PyReleaseValidation/python/relval_standard.py @@ -226,9 +226,6 @@ ### HI test ### workflows[140] = ['',['HydjetQ_MinBias_2760GeV','DIGIHI','RECOHI','HARVESTHI']] -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[141] = ['',['HydjetQ_B0_2760GeV','DIGIHI','RECOHI','HARVESTHI']] #workflows[142] = ['',['HydjetQ_B8_2760GeV','DIGIHI','RECOHI','HARVESTHI']] #workflows[143] = ['',['HydjetQ_B3_2760GeV','DIGIHI','RECOHI','HARVESTHI']] diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index d5e8ba1e8508c..59fd33964ccf9 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -365,7 +365,6 @@ def identitySim(wf): steps['QCD_Pt_3000_3500_13INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_Pt_3000_3500_13/%s/GEN-SIM'%(baseDataSetRelease[4],),location='STD')} steps['QCD_Pt_600_800_13INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_Pt_600_800_13/%s/GEN-SIM'%(baseDataSetRelease[4],),location='STD')} steps['QCD_Pt_80_120_13INPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_Pt_80_120_13/%s/GEN-SIM'%(baseDataSetRelease[4],),location='STD')} -steps['QCD_Pt_80_120_13_HIINPUT']={'INPUT':InputInfo(dataSet='/RelValQCD_Pt_80_120_13_HI/%s/GEN-SIM'%(baseDataSetRelease[4],),location='STD')} steps['TTbar_13INPUT']={'INPUT':InputInfo(dataSet='/RelValTTbar_13/%s/GEN-SIM'%(baseDataSetRelease[4],),location='STD')} steps['TTbarLepton_13INPUT']={'INPUT':InputInfo(dataSet='/RelValTTbarLepton_13/%s/GEN-SIM'%(baseDataSetRelease[4],),location='STD')} steps['ZEE_13INPUT']={'INPUT':InputInfo(dataSet='/RelValZEE_13/%s/GEN-SIM'%(baseDataSetRelease[4],),location='STD')} @@ -392,12 +391,10 @@ def identitySim(wf): steps['WM_13INPUT']={'INPUT':InputInfo(dataSet='/RelValWM_13/%s/GEN-SIM'%(baseDataSetRelease[4],),location='STD')} steps['WpM_13INPUT']={'INPUT':InputInfo(dataSet='/RelValWpM_13/%s/GEN-SIM'%(baseDataSetRelease[4],),location='STD')} steps['ZMM_13INPUT']={'INPUT':InputInfo(dataSet='/RelValZMM_13/%s/GEN-SIM'%(baseDataSetRelease[4],),location='STD')} -steps['ZMM_13_HIINPUT']={'INPUT':InputInfo(dataSet='/RelValZMM_13_HI/%s/GEN-SIM'%(baseDataSetRelease[4],),location='STD')} steps['ZpMM_13INPUT']={'INPUT':InputInfo(dataSet='/RelValZpMM_13/%s/GEN-SIM'%(baseDataSetRelease[4],),location='STD')} steps['ZTT_13INPUT']={'INPUT':InputInfo(dataSet='/RelValZTT_13/%s/GEN-SIM'%(baseDataSetRelease[4],),location='STD')} steps['H130GGgluonfusion_13INPUT']={'INPUT':InputInfo(dataSet='/RelValH130GGgluonfusion_13/%s/GEN-SIM'%(baseDataSetRelease[4],),location='STD')} steps['PhotonJets_Pt_10_13INPUT']={'INPUT':InputInfo(dataSet='/RelValPhotonJets_Pt_10_13/%s/GEN-SIM'%(baseDataSetRelease[4],),location='STD')} -steps['PhotonJets_Pt_10_13_HIINPUT']={'INPUT':InputInfo(dataSet='/RelValPhotonJets_Pt_10_13_HI/%s/GEN-SIM'%(baseDataSetRelease[4],),location='STD')} steps['QQH1352T_Tauola_13INPUT']={'INPUT':InputInfo(dataSet='/RelValQQH1352T_Tauola_13/%s/GEN-SIM'%(baseDataSetRelease[4],),location='STD')} steps['ZmumuJets_Pt_20_300_13INPUT']={'INPUT':InputInfo(dataSet='/RelValZmumuJets_Pt_20_300_13/%s/GEN-SIM'%(baseDataSetRelease[4],),location='STD')} steps['ADDMonoJet_d3MD3_13INPUT']={'INPUT':InputInfo(dataSet='/RelValADDMonoJet_d3MD3_13/%s/GEN-SIM'%(baseDataSetRelease[4],),location='STD')} @@ -536,7 +533,232 @@ def genS(fragment,howMuch): steps['QCD_Pt_170_230']=genS('QCD_Pt_170_230_8TeV_cfi',Kby(25,100)) - +## upgrade dedicated wf +## extendedPhase1 ## do we need these (unused)? ==> +step1UpepiDefaults = {'-s' : 'GEN,SIM', + '-n' : 10, + '--conditions' : 'DESIGN61_V10::All', #should be updated with autocond + '--beamspot' : 'Gauss', + '--datatier' : 'GEN-SIM', + '--eventcontent': 'FEVTDEBUG', + '--geometry' : 'ExtendedPhaseIPixel', #check geo + '--customise' : 'SLHCUpgradeSimulations/Configuration/phase1TkCustoms.customise' + } +def genepi(fragment,howMuch): + global step1UpepiDefaults + return merge([{'cfg':fragment},howMuch,step1UpepiDefaults]) + +steps['FourMuPt1_200_UPGPhase1']=genepi('FourMuPt_1_200_cfi',Kby(10,100)) +steps['SingleElectronPt10_UPGPhase1']=genepi('SingleElectronPt10_cfi',Kby(9,3000)) +steps['SingleElectronPt35_UPGPhase1']=genepi('SingleElectronPt35_cfi',Kby(9,500)) +steps['SingleElectronPt1000_UPGPhase1']=genepi('SingleElectronPt1000_cfi',Kby(9,50)) +steps['SingleGammaPt10_UPGPhase1']=genepi('SingleGammaPt10_cfi',Kby(9,3000)) +steps['SingleGammaPt35_UPGPhase1']=genepi('SingleGammaPt35_cfi',Kby(9,500)) +steps['SingleMuPt1_UPGPhase1']=genepi('SingleMuPt1_cfi',Kby(25,1000)) +steps['SingleMuPt10_UPGPhase1']=genepi('SingleMuPt10_cfi',Kby(25,500)) +steps['SingleMuPt100_UPGPhase1']=genepi('SingleMuPt100_cfi',Kby(9,500)) +steps['SingleMuPt1000_UPGPhase1']=genepi('SingleMuPt1000_cfi',Kby(9,500)) + +steps['TTbarLepton_UPGPhase1_8']=genepi('TTbarLepton_Tauola_8TeV_cfi',Kby(9,100)) +steps['Wjet_Pt_80_120_UPGPhase1_8']=genepi('Wjet_Pt_80_120_8TeV_cfi',Kby(9,100)) +steps['Wjet_Pt_3000_3500_UPGPhase1_8']=genepi('Wjet_Pt_3000_3500_8TeV_cfi',Kby(9,50)) +steps['LM1_sfts_UPGPhase1_8']=genepi('LM1_sfts_8TeV_cfi',Kby(9,100)) + +steps['QCD_Pt_3000_3500_UPGPhase1_8']=genepi('QCD_Pt_3000_3500_8TeV_cfi',Kby(9,25)) +steps['QCD_Pt_600_800_UPGPhase1_8']=genepi('QCD_Pt_600_800_8TeV_cfi',Kby(9,50)) +steps['QCD_Pt_80_120_UPGPhase1_8']=genepi('QCD_Pt_80_120_8TeV_cfi',Kby(9,100)) + +steps['Higgs200ChargedTaus_UPGPhase1_8']=genepi('H200ChargedTaus_Tauola_8TeV_cfi',Kby(9,100)) +steps['JpsiMM_UPGPhase1_8']=genepi('JpsiMM_8TeV_cfi',Kby(66,1000)) +steps['TTbar_UPGPhase1_8']=genepi('TTbar_Tauola_8TeV_cfi',Kby(9,100)) +steps['WE_UPGPhase1_8']=genepi('WE_8TeV_cfi',Kby(9,100)) +steps['ZEE_UPGPhase1_8']=genepi('ZEE_8TeV_cfi',Kby(9,100)) +steps['ZTT_UPGPhase1_8']=genepi('ZTT_Tauola_All_hadronic_8TeV_cfi',Kby(9,150)) +steps['H130GGgluonfusion_UPGPhase1_8']=genepi('H130GGgluonfusion_8TeV_cfi',Kby(9,100)) +steps['PhotonJets_Pt_10_UPGPhase1_8']=genepi('PhotonJet_Pt_10_8TeV_cfi',Kby(9,150)) +steps['QQH1352T_Tauola_UPGPhase1_8']=genepi('QQH1352T_Tauola_8TeV_cfi',Kby(9,100)) + +steps['MinBias_TuneZ2star_UPGPhase1_8']=genepi('MinBias_TuneZ2star_8TeV_pythia6_cff',Kby(9,300)) +steps['WM_UPGPhase1_8']=genepi('WM_8TeV_cfi',Kby(9,200)) +steps['ZMM_UPGPhase1_8']=genepi('ZMM_8TeV_cfi',Kby(18,300)) + +steps['ADDMonoJet_d3MD3_UPGPhase1_8']=genepi('ADDMonoJet_8TeV_d3MD3_cfi',Kby(9,100)) +steps['ZpMM_UPGPhase1_8']=genepi('ZpMM_8TeV_cfi',Kby(9,200)) +steps['WpM_UPGPhase1_8']=genepi('WpM_8TeV_cfi',Kby(9,200)) +## <== do we need these (unused)? + + + + +#14TeV ## do we need these (unused)? ==> +#steps['TTbarLepton_UPGPhase1_14']=genepi('TTbarLepton_Tauola_14TeV_cfi',Kby(9,100)) +steps['Wjet_Pt_80_120_UPGPhase1_14']=genepi('Wjet_Pt_80_120_14TeV_cfi',Kby(9,100)) +steps['Wjet_Pt_3000_3500_UPGPhase1_14']=genepi('Wjet_Pt_3000_3500_14TeV_cfi',Kby(9,50)) +steps['LM1_sfts_UPGPhase1_14']=genepi('LM1_sfts_14TeV_cfi',Kby(9,100)) + +steps['QCD_Pt_3000_3500_UPGPhase1_14']=genepi('QCD_Pt_3000_3500_14TeV_cfi',Kby(9,25)) +#steps['QCD_Pt_600_800_UPGPhase1_14']=genepi('QCD_Pt_600_800_14TeV_cfi',Kby(9,50)) +steps['QCD_Pt_80_120_UPGPhase1_14']=genepi('QCD_Pt_80_120_14TeV_cfi',Kby(9,100)) + +steps['Higgs200ChargedTaus_UPGPhase1_14']=genepi('H200ChargedTaus_Tauola_14TeV_cfi',Kby(9,100)) +steps['JpsiMM_UPGPhase1_14']=genepi('JpsiMM_14TeV_cfi',Kby(66,1000)) +steps['TTbar_UPGPhase1_14']=genepi('TTbar_Tauola_14TeV_cfi',Kby(9,100)) +steps['WE_UPGPhase1_14']=genepi('WE_14TeV_cfi',Kby(9,100)) +steps['ZEE_UPGPhase1_14']=genepi('ZEE_14TeV_cfi',Kby(9,100)) +steps['ZTT_UPGPhase1_14']=genepi('ZTT_Tauola_All_hadronic_14TeV_cfi',Kby(9,150)) +steps['H130GGgluonfusion_UPGPhase1_14']=genepi('H130GGgluonfusion_14TeV_cfi',Kby(9,100)) +steps['PhotonJets_Pt_10_UPGPhase1_14']=genepi('PhotonJet_Pt_10_14TeV_cfi',Kby(9,150)) +steps['QQH1352T_Tauola_UPGPhase1_14']=genepi('QQH1352T_Tauola_14TeV_cfi',Kby(9,100)) + +steps['MinBias_TuneZ2star_UPGPhase1_14']=genepi('MinBias_TuneZ2star_14TeV_pythia6_cff',Kby(9,300)) +steps['WM_UPGPhase1_14']=genepi('WM_14TeV_cfi',Kby(9,200)) +steps['ZMM_UPGPhase1_14']=genepi('ZMM_14TeV_cfi',Kby(18,300)) + + +## 2015 +steps['FourMuPt1_200_UPG2015']=gen2015('FourMuPt_1_200_cfi',Kby(10,100)) +steps['SingleElectronPt10_UPG2015']=gen2015('SingleElectronPt10_cfi',Kby(9,3000)) +steps['SingleElectronPt35_UPG2015']=gen2015('SingleElectronPt35_cfi',Kby(9,500)) +steps['SingleElectronPt1000_UPG2015']=gen2015('SingleElectronPt1000_cfi',Kby(9,50)) +steps['SingleGammaPt10_UPG2015']=gen2015('SingleGammaPt10_cfi',Kby(9,3000)) +steps['SingleGammaPt35_UPG2015']=gen2015('SingleGammaPt35_cfi',Kby(9,500)) +steps['SingleMuPt1_UPG2015']=gen2015('SingleMuPt1_cfi',Kby(25,1000)) +steps['SingleMuPt10_UPG2015']=gen2015('SingleMuPt10_cfi',Kby(25,500)) +steps['SingleMuPt100_UPG2015']=gen2015('SingleMuPt100_cfi',Kby(9,500)) +steps['SingleMuPt1000_UPG2015']=gen2015('SingleMuPt1000_cfi',Kby(9,500)) + +steps['TTbarLepton_UPG2015_8']=gen2015('TTbarLepton_Tauola_8TeV_cfi',Kby(9,100)) +steps['Wjet_Pt_80_120_UPG2015_8']=gen2015('Wjet_Pt_80_120_8TeV_cfi',Kby(9,100)) +steps['Wjet_Pt_3000_3500_UPG2015_8']=gen2015('Wjet_Pt_3000_3500_8TeV_cfi',Kby(9,50)) +steps['LM1_sfts_UPG2015_8']=gen2015('LM1_sfts_8TeV_cfi',Kby(9,100)) + +steps['QCD_Pt_3000_3500_UPG2015_8']=gen2015('QCD_Pt_3000_3500_8TeV_cfi',Kby(9,25)) +steps['QCD_Pt_600_800_UPG2015_8']=gen2015('QCD_Pt_600_800_8TeV_cfi',Kby(9,50)) +steps['QCD_Pt_80_120_UPG2015_8']=gen2015('QCD_Pt_80_120_8TeV_cfi',Kby(9,100)) + +steps['Higgs200ChargedTaus_UPG2015_8']=gen2015('H200ChargedTaus_Tauola_8TeV_cfi',Kby(9,100)) +steps['JpsiMM_UPG2015_8']=gen2015('JpsiMM_8TeV_cfi',Kby(66,1000)) +steps['TTbar_UPG2015_8']=gen2015('TTbar_Tauola_8TeV_cfi',Kby(9,100)) +steps['WE_UPG2015_8']=gen2015('WE_8TeV_cfi',Kby(9,100)) +steps['ZEE_UPG2015_8']=gen2015('ZEE_8TeV_cfi',Kby(9,100)) +steps['ZTT_UPG2015_8']=gen2015('ZTT_Tauola_All_hadronic_8TeV_cfi',Kby(9,150)) +steps['H130GGgluonfusion_UPG2015_8']=gen2015('H130GGgluonfusion_8TeV_cfi',Kby(9,100)) +steps['PhotonJets_Pt_10_UPG2015_8']=gen2015('PhotonJet_Pt_10_8TeV_cfi',Kby(9,150)) +steps['QQH1352T_Tauola_UPG2015_8']=gen2015('QQH1352T_Tauola_8TeV_cfi',Kby(9,100)) + +steps['MinBias_TuneZ2star_UPG2015_8']=gen2015('MinBias_TuneZ2star_8TeV_pythia6_cff',Kby(9,300)) +steps['WM_UPG2015_8']=gen2015('WM_8TeV_cfi',Kby(9,200)) +steps['ZMM_UPG2015_8']=gen2015('ZMM_8TeV_cfi',Kby(18,300)) + +steps['ADDMonoJet_d3MD3_UPG2015_8']=gen2015('ADDMonoJet_8TeV_d3MD3_cfi',Kby(9,100)) +steps['ZpMM_UPG2015_8']=gen2015('ZpMM_8TeV_cfi',Kby(9,200)) +steps['WpM_UPG2015_8']=gen2015('WpM_8TeV_cfi',Kby(9,200)) + + + +#14TeV +#steps['TTbarLepton_UPG2015_14']=gen2015('TTbarLepton_Tauola_14TeV_cfi',Kby(9,100)) +steps['Wjet_Pt_80_120_UPG2015_14']=gen2015('Wjet_Pt_80_120_14TeV_cfi',Kby(9,100)) +steps['Wjet_Pt_3000_3500_UPG2015_14']=gen2015('Wjet_Pt_3000_3500_14TeV_cfi',Kby(9,50)) +steps['LM1_sfts_UPG2015_14']=gen2015('LM1_sfts_14TeV_cfi',Kby(9,100)) + +steps['QCD_Pt_3000_3500_UPG2015_14']=gen2015('QCD_Pt_3000_3500_14TeV_cfi',Kby(9,25)) +#steps['QCD_Pt_600_800_UPG2015_14']=gen2015('QCD_Pt_600_800_14TeV_cfi',Kby(9,50)) +steps['QCD_Pt_80_120_UPG2015_14']=gen2015('QCD_Pt_80_120_14TeV_cfi',Kby(9,100)) + +steps['Higgs200ChargedTaus_UPG2015_14']=gen2015('H200ChargedTaus_Tauola_14TeV_cfi',Kby(9,100)) +steps['JpsiMM_UPG2015_14']=gen2015('JpsiMM_14TeV_cfi',Kby(66,1000)) +steps['TTbar_UPG2015_14']=gen2015('TTbar_Tauola_14TeV_cfi',Kby(9,100)) +steps['WE_UPG2015_14']=gen2015('WE_14TeV_cfi',Kby(9,100)) +steps['ZEE_UPG2015_14']=gen2015('ZEE_14TeV_cfi',Kby(9,100)) +steps['ZTT_UPG2015_14']=gen2015('ZTT_Tauola_All_hadronic_14TeV_cfi',Kby(9,150)) +steps['H130GGgluonfusion_UPG2015_14']=gen2015('H130GGgluonfusion_14TeV_cfi',Kby(9,100)) +steps['PhotonJets_Pt_10_UPG2015_14']=gen2015('PhotonJet_Pt_10_14TeV_cfi',Kby(9,150)) +steps['QQH1352T_Tauola_UPG2015_14']=gen2015('QQH1352T_Tauola_14TeV_cfi',Kby(9,100)) + +steps['MinBias_TuneZ2star_UPG2015_14']=gen2015('MinBias_TuneZ2star_14TeV_pythia6_cff',Kby(9,300)) +steps['WM_UPG2015_14']=gen2015('WM_14TeV_cfi',Kby(9,200)) +steps['ZMM_UPG2015_14']=gen2015('ZMM_14TeV_cfi',Kby(18,300)) + + +## do we need these (unused)? ==> +step1Up2017Defaults = {'-s' : 'GEN,SIM', + '-n' : 10, + '--conditions' : 'auto:run2_mc', + '--beamspot' : 'Gauss', + '--datatier' : 'GEN-SIM', + '--eventcontent': 'FEVTDEBUG', + '--geometry' : 'Extended2017', #check geo + '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1,SLHCUpgradeSimulations/Configuration/phase1TkCustoms.customise' + } +def gen2017(fragment,howMuch): + global step1Up2017Defaults + return merge([{'cfg':fragment},howMuch,step1Up2017Defaults]) + +steps['FourMuPt1_200_UPG2017']=gen2017('FourMuPt_1_200_cfi',Kby(10,100)) +steps['SingleElectronPt10_UPG2017']=gen2017('SingleElectronPt10_cfi',Kby(9,3000)) +steps['SingleElectronPt35_UPG2017']=gen2017('SingleElectronPt35_cfi',Kby(9,500)) +steps['SingleElectronPt1000_UPG2017']=gen2017('SingleElectronPt1000_cfi',Kby(9,50)) +steps['SingleGammaPt10_UPG2017']=gen2017('SingleGammaPt10_cfi',Kby(9,3000)) +steps['SingleGammaPt35_UPG2017']=gen2017('SingleGammaPt35_cfi',Kby(9,500)) +steps['SingleMuPt1_UPG2017']=gen2017('SingleMuPt1_cfi',Kby(25,1000)) +steps['SingleMuPt10_UPG2017']=gen2017('SingleMuPt10_cfi',Kby(25,500)) +steps['SingleMuPt100_UPG2017']=gen2017('SingleMuPt100_cfi',Kby(9,500)) +steps['SingleMuPt1000_UPG2017']=gen2017('SingleMuPt1000_cfi',Kby(9,500)) + +steps['TTbarLepton_UPG2017_8']=gen2017('TTbarLepton_Tauola_8TeV_cfi',Kby(9,100)) +steps['Wjet_Pt_80_120_UPG2017_8']=gen2017('Wjet_Pt_80_120_8TeV_cfi',Kby(9,100)) +steps['Wjet_Pt_3000_3500_UPG2017_8']=gen2017('Wjet_Pt_3000_3500_8TeV_cfi',Kby(9,50)) +steps['LM1_sfts_UPG2017_8']=gen2017('LM1_sfts_8TeV_cfi',Kby(9,100)) + +steps['QCD_Pt_3000_3500_UPG2017_8']=gen2017('QCD_Pt_3000_3500_8TeV_cfi',Kby(9,25)) +steps['QCD_Pt_600_800_UPG2017_8']=gen2017('QCD_Pt_600_800_8TeV_cfi',Kby(9,50)) +steps['QCD_Pt_80_120_UPG2017_8']=gen2017('QCD_Pt_80_120_8TeV_cfi',Kby(9,100)) + +steps['Higgs200ChargedTaus_UPG2017_8']=gen2017('H200ChargedTaus_Tauola_8TeV_cfi',Kby(9,100)) +steps['JpsiMM_UPG2017_8']=gen2017('JpsiMM_8TeV_cfi',Kby(66,1000)) +steps['TTbar_UPG2017_8']=gen2017('TTbar_Tauola_8TeV_cfi',Kby(9,100)) +steps['WE_UPG2017_8']=gen2017('WE_8TeV_cfi',Kby(9,100)) +steps['ZEE_UPG2017_8']=gen2017('ZEE_8TeV_cfi',Kby(9,100)) +steps['ZTT_UPG2017_8']=gen2017('ZTT_Tauola_All_hadronic_8TeV_cfi',Kby(9,150)) +steps['H130GGgluonfusion_UPG2017_8']=gen2017('H130GGgluonfusion_8TeV_cfi',Kby(9,100)) +steps['PhotonJets_Pt_10_UPG2017_8']=gen2017('PhotonJet_Pt_10_8TeV_cfi',Kby(9,150)) +steps['QQH1352T_Tauola_UPG2017_8']=gen2017('QQH1352T_Tauola_8TeV_cfi',Kby(9,100)) + +steps['MinBias_TuneZ2star_UPG2017_8']=gen2017('MinBias_TuneZ2star_8TeV_pythia6_cff',Kby(9,300)) +steps['WM_UPG2017_8']=gen2017('WM_8TeV_cfi',Kby(9,200)) +steps['ZMM_UPG2017_8']=gen2017('ZMM_8TeV_cfi',Kby(18,300)) + +steps['ADDMonoJet_d3MD3_UPG2017_8']=gen2017('ADDMonoJet_8TeV_d3MD3_cfi',Kby(9,100)) +steps['ZpMM_UPG2017_8']=gen2017('ZpMM_8TeV_cfi',Kby(9,200)) +steps['WpM_UPG2017_8']=gen2017('WpM_8TeV_cfi',Kby(9,200)) + + + +#14TeV +#steps['TTbarLepton_UPG2017_14']=gen2017('TTbarLepton_Tauola_14TeV_cfi',Kby(9,100)) +steps['Wjet_Pt_80_120_UPG2017_14']=gen2017('Wjet_Pt_80_120_14TeV_cfi',Kby(9,100)) +steps['Wjet_Pt_3000_3500_UPG2017_14']=gen2017('Wjet_Pt_3000_3500_14TeV_cfi',Kby(9,50)) +steps['LM1_sfts_UPG2017_14']=gen2017('LM1_sfts_14TeV_cfi',Kby(9,100)) + +steps['QCD_Pt_3000_3500_UPG2017_14']=gen2017('QCD_Pt_3000_3500_14TeV_cfi',Kby(9,25)) +#steps['QCD_Pt_600_800_UPG2017_14']=gen2017('QCD_Pt_600_800_14TeV_cfi',Kby(9,50)) +steps['QCD_Pt_80_120_UPG2017_14']=gen2017('QCD_Pt_80_120_14TeV_cfi',Kby(9,100)) + +steps['Higgs200ChargedTaus_UPG2017_14']=gen2017('H200ChargedTaus_Tauola_14TeV_cfi',Kby(9,100)) +steps['JpsiMM_UPG2017_14']=gen2017('JpsiMM_14TeV_cfi',Kby(66,1000)) +steps['TTbar_UPG2017_14']=gen2017('TTbar_Tauola_14TeV_cfi',Kby(9,100)) +steps['WE_UPG2017_14']=gen2017('WE_14TeV_cfi',Kby(9,100)) +steps['ZEE_UPG2017_14']=gen2017('ZEE_14TeV_cfi',Kby(9,100)) +steps['ZTT_UPG2017_14']=gen2017('ZTT_Tauola_All_hadronic_14TeV_cfi',Kby(9,150)) +steps['H130GGgluonfusion_UPG2017_14']=gen2017('H130GGgluonfusion_14TeV_cfi',Kby(9,100)) +steps['PhotonJets_Pt_10_UPG2017_14']=gen2017('PhotonJet_Pt_10_14TeV_cfi',Kby(9,150)) +steps['QQH1352T_Tauola_UPG2017_14']=gen2017('QQH1352T_Tauola_14TeV_cfi',Kby(9,100)) + +steps['MinBias_TuneZ2star_UPG2017_14']=gen2017('MinBias_TuneZ2star_14TeV_pythia6_cff',Kby(9,300)) +steps['WM_UPG2017_14']=gen2017('WM_14TeV_cfi',Kby(9,200)) +steps['ZMM_UPG2017_14']=gen2017('ZMM_14TeV_cfi',Kby(18,300)) +## <== do we need these (unused)? ## pPb tests step1PPbDefaults={'--beamspot':'Realistic8TeVCollisionPPbBoost'} @@ -548,8 +770,8 @@ def genS(fragment,howMuch): U2000by1={'--relval': '2000,1'} U80by1={'--relval': '80,1'} -hiAlca = {'--conditions':'auto:run2_mc_HIon'} -hiDefaults=merge([hiAlca,{'--scenario':'HeavyIons'}]) +hiDefaults={'--conditions':'auto:run2_mc_HIon', + '--scenario':'HeavyIons'} steps['HydjetQ_MinBias_2760GeV']=merge([{'-n':1},hiDefaults,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)} @@ -563,9 +785,7 @@ def genS(fragment,howMuch): #steps['HydjetQ_B5_2760GeVINPUT']={'INPUT':InputInfo(dataSet='/RelValHydjetQ_B5_2760GeV/%s/GEN-SIM'%(baseDataSetRelease[],),location='STD')} #steps['HydjetQ_B8_2760GeV']=merge([{'-n':1},hiDefaults,genS('Hydjet_Quenched_B8_2760GeV_cfi',U80by1)]) #steps['HydjetQ_B8_2760GeVINPUT']={'INPUT':InputInfo(dataSet='/RelValHydjetQ_B8_2760GeV/%s/GEN-SIM'%(baseDataSetRelease[7],),location='CAF')} -steps['QCD_Pt_80_120_13_HI']=merge([hiDefaults,steps['QCD_Pt_80_120_13']]) -steps['PhotonJets_Pt_10_13_HI']=merge([hiDefaults,steps['PhotonJets_Pt_10_13']]) -steps['ZMM_13_HI']=merge([hiDefaults,steps['ZMM_13']]) + def changeRefRelease(steps,listOfPairs): @@ -696,31 +916,31 @@ def genvalid(fragment,d,suffix='all',fi='',dataSet=''): steps['QCD_Pt-30_8TeV_herwigpp']=genvalid('QCD_Pt_30_8TeV_herwigpp_cff',step1GenDefaults) # Generator Hadronization (Hadronization of LHE) -steps['WJetsLNu_13TeV_madgraph-pythia8']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_cff',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN') -steps['ZJetsLL_13TeV_madgraph-pythia8']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_cff',step1GenDefaults,dataSet='/DYJetsToLL_M-50_13TeV-madgraph_v2/Fall13wmLHE-START62_V1-v1/GEN') +steps['WJetsLNu_13TeV_madgraph-pythia8']=genvalid('Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_cff',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN') +steps['ZJetsLL_13TeV_madgraph-pythia8']=genvalid('Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_cff',step1GenDefaults,dataSet='/DYJetsToLL_M-50_13TeV-madgraph_v2/Fall13wmLHE-START62_V1-v1/GEN') steps['GGToH_13TeV_pythia8']=genvalid('GGToHtautau_13TeV_pythia8_cff',step1GenDefaults) -steps['WJetsLNutaupinu_13TeV_madgraph-pythia8']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_taupinu_cff',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN') -steps['ZJetsLLtaupinu_13TeV_madgraph-pythia8']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_taupinu_cff',step1GenDefaults,dataSet='/DYJetsToLL_M-50_13TeV-madgraph_v2/Fall13wmLHE-START62_V1-v1/GEN') +steps['WJetsLNutaupinu_13TeV_madgraph-pythia8']=genvalid('Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_taupinu_cff',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN') +steps['ZJetsLLtaupinu_13TeV_madgraph-pythia8']=genvalid('Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_taupinu_cff',step1GenDefaults,dataSet='/DYJetsToLL_M-50_13TeV-madgraph_v2/Fall13wmLHE-START62_V1-v1/GEN') steps['GGToHtaupinu_13TeV_pythia8']=genvalid('GGToHtautau_13TeV_pythia8_taupinu_cff',step1GenDefaults) -steps['WJetsLNutaurhonu_13TeV_madgraph-pythia8']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_taurhonu_cff.py',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN') -steps['ZJetsLLtaurhonu_13TeV_madgraph-pythia8']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_taurhonu_cff.py',step1GenDefaults,dataSet='/DYJetsToLL_M-50_13TeV-madgraph_v2/Fall13wmLHE-START62_V1-v1/GEN') +steps['WJetsLNutaurhonu_13TeV_madgraph-pythia8']=genvalid('Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_taurhonu_cff.py',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN') +steps['ZJetsLLtaurhonu_13TeV_madgraph-pythia8']=genvalid('Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_taurhonu_cff.py',step1GenDefaults,dataSet='/DYJetsToLL_M-50_13TeV-madgraph_v2/Fall13wmLHE-START62_V1-v1/GEN') steps['GGToHtaurhonu_13TeV_pythia8']=genvalid('GGToHtautau_13TeV_pythia8_taurhonu_cff',step1GenDefaults) # Generator External Decays -steps['TT_13TeV_pythia8-evtgen']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_EvtGen_cff',step1GenDefaults,dataSet='/TTJets_MSDecaysCKM_central_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN') +steps['TT_13TeV_pythia8-evtgen']=genvalid('Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_EvtGen_cff',step1GenDefaults,dataSet='/TTJets_MSDecaysCKM_central_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN') -steps['DYToLL_M-50_13TeV_pythia8-tauola']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_Tauola_cff',step1GenDefaults,dataSet='/DYJetsToLL_M-50_13TeV-madgraph_v2/Fall13wmLHE-START62_V1-v1/GEN') -steps['WToLNu_13TeV_pythia8-tauola']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_Tauola_cff',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN') +steps['DYToLL_M-50_13TeV_pythia8-tauola']=genvalid('Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_Tauola_cff',step1GenDefaults,dataSet='/DYJetsToLL_M-50_13TeV-madgraph_v2/Fall13wmLHE-START62_V1-v1/GEN') +steps['WToLNu_13TeV_pythia8-tauola']=genvalid('Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_Tauola_cff',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN') steps['GGToH_13TeV_pythia8-tauola']=genvalid('GGToHtautau_13TeV_pythia8_Tauola_cff',step1GenDefaults) -steps['WToLNutaupinu_13TeV_pythia8-tauola']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_Tauola_taupinu_cff',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN') -steps['DYToLLtaupinu_M-50_13TeV_pythia8-tauola']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_Tauola_taupinu_cff',step1GenDefaults,dataSet='/DYJetsToLL_M-50_13TeV-madgraph_v2/Fall13wmLHE-START62_V1-v1/GEN') +steps['WToLNutaupinu_13TeV_pythia8-tauola']=genvalid('Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_Tauola_taupinu_cff',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN') +steps['DYToLLtaupinu_M-50_13TeV_pythia8-tauola']=genvalid('Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_Tauola_taupinu_cff',step1GenDefaults,dataSet='/DYJetsToLL_M-50_13TeV-madgraph_v2/Fall13wmLHE-START62_V1-v1/GEN') steps['GGToHtaupinu_13TeV_pythia8-tauola']=genvalid('GGToHtautau_13TeV_pythia8_Tauola_taupinu_cff',step1GenDefaults) -steps['WToLNutaurhonu_13TeV_pythia8-tauola']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_Tauola_taurhonu_cff',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN') -steps['DYToLLtaurhonu_M-50_13TeV_pythia8-tauola']=genvalid('Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_Tauola_taurhonu_cff',step1GenDefaults,dataSet='/DYJetsToLL_M-50_13TeV-madgraph_v2/Fall13wmLHE-START62_V1-v1/GEN') +steps['WToLNutaurhonu_13TeV_pythia8-tauola']=genvalid('Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_Tauola_taurhonu_cff',step1GenDefaults,dataSet='/WJetsToLNu_13TeV-madgraph/Fall13wmLHE-START62_V1-v1/GEN') +steps['DYToLLtaurhonu_M-50_13TeV_pythia8-tauola']=genvalid('Hadronizer_MgmMatchTune4C_13TeV_madgraph_pythia8_Tauola_taurhonu_cff',step1GenDefaults,dataSet='/DYJetsToLL_M-50_13TeV-madgraph_v2/Fall13wmLHE-START62_V1-v1/GEN') steps['GGToHtaurhonu_13TeV_pythia8-tauola']=genvalid('GGToHtautau_13TeV_pythia8_Tauola_taurhonu_cff',step1GenDefaults) # Heavy Ion @@ -792,6 +1012,28 @@ def genvalid(fragment,d,suffix='all',fi='',dataSet=''): steps['DIGIHI']=merge([{'--conditions':'auto:run2_mc_HIon', '-s':'DIGI:pdigi_valid,L1,DIGI2RAW,HLT:HIon,RAW2DIGI,L1Reco', '--inputCommands':'"keep *","drop *_simEcalPreshowerDigis_*_*"', '-n':10}, hiDefaults, step2Upg2015Defaults]) +#for pix phase1 +step2Upgpixphase1Defaults = {'-s':'DIGI:pdigi_valid,L1,DIGI2RAW', + '--conditions':'DESIGN61_V10::All', #to be updtaed with autocond + '--datatier':'GEN-SIM-DIGI-RAW', + '-n':'10', + '--eventcontent':'FEVTDEBUGHLT', + '--customise': 'SLHCUpgradeSimulations/Configuration/phase1TkCustoms.customise', + '--geometry' : 'ExtendedPhaseIPixel' #check geo + } +steps['DIGIUP']=merge([step2Upgpixphase1Defaults]) + +#for 2017 +step2Upg2017Defaults = {'-s':'DIGI:pdigi_valid,L1,DIGI2RAW', + '--conditions':'auto:run2_mc', + '--datatier':'GEN-SIM-DIGI-RAW', + '-n':'10', + '--eventcontent':'FEVTDEBUGHLT', + '--customise': 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1,SLHCUpgradeSimulations/Configuration/phase1TkCustoms.customise', + '--geometry' : 'Extended2017' #check geo + } +steps['DIGIUP17']=merge([step2Upg2017Defaults]) + # PRE-MIXING : https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideSimulation#Pre_Mixing_Instructions premixUp2015Defaults = { @@ -1007,6 +1249,30 @@ def genvalid(fragment,d,suffix='all',fi='',dataSet=''): steps['RECOFS']=merge([{'--fast':'', '-s':'RECO,EI,HLT:@fake,VALIDATION'}, steps['RECO']]) +#for phase1 +step3Upgpixphase1Defaults = {'-s':'RAW2DIGI,L1Reco,RECO,EI,VALIDATION,DQM', + '--conditions':'DESIGN61_V10::All', #to be updtaed with autocond + '--datatier':'GEN-SIM-RECO,DQMIO', + '-n':'10', + '--eventcontent':'FEVTDEBUGHLT,DQM', + '--customise' : 'SLHCUpgradeSimulations/Configuration/phase1TkCustoms.customise', + '--geometry' : 'ExtendedPhaseIPixel' #check geo + } + + +steps['RECOUP']=merge([step3Upgpixphase1Defaults]) + +#for 2017 +step3Up2017Defaults = {'-s':'RAW2DIGI,L1Reco,RECO,EI,VALIDATION,DQM', + '--conditions':'auto:run2_mc', + '--datatier':'GEN-SIM-RECO,DQMIO', + '-n':'10', + '--eventcontent':'FEVTDEBUGHLT,DQM', + '--customise' : 'SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1,SLHCUpgradeSimulations/Configuration/phase1TkCustoms.customise', + '--geometry' : 'Extended2017' #check geo + } + +steps['RECOUP17']=merge([step3Up2017Defaults]) #add this line when testing from an input file that is not strictly GEN-SIM #addForAll(step3,{'--hltProcess':'DIGI'}) @@ -1129,6 +1395,14 @@ def genvalid(fragment,d,suffix='all',fi='',dataSet=''): '--filetype':'DQM', '--scenario':'HeavyIons'} +#for phase1 +steps['HARVESTUP']={'-s':'HARVESTING:validationHarvesting+dqmHarvesting', + '--conditions':'DESIGN61_V10::All', #to be updtaed with autocond + '--mc':'', + '--customise' : 'SLHCUpgradeSimulations/Configuration/phase1TkCustoms.customise', + '--geometry' : 'ExtendedPhaseIPixel', #check geo + '--filetype':'DQM' + } steps['HARVESTUP15']={'-s':'HARVESTING:validationHarvesting+dqmHarvesting', # todo: remove UP from label '--conditions':'auto:run2_mc', @@ -1144,7 +1418,13 @@ def genvalid(fragment,d,suffix='all',fi='',dataSet=''): '--filetype':'DQM', '--scenario':'pp'} - +steps['HARVESTUP17']={'-s':'HARVESTING:validationHarvesting+dqmHarvesting', + '--conditions':'auto:run2_mc', + '--mc':'', + '--customise' : 'SLHCUpgradeSimulations/Configuration/phase1TkCustoms.customise', + '--filetype':'DQM', + '--geometry' : 'Extended2017' #check geo + } steps['ALCASPLIT']={'-s':'ALCAOUTPUT:@allForPrompt', '--conditions':'auto:run1_data', '--scenario':'pp', diff --git a/Configuration/PyReleaseValidation/python/relval_upgrade.py b/Configuration/PyReleaseValidation/python/relval_upgrade.py index 9a89c9dc8559d..54d394fb055e0 100644 --- a/Configuration/PyReleaseValidation/python/relval_upgrade.py +++ b/Configuration/PyReleaseValidation/python/relval_upgrade.py @@ -6,10 +6,225 @@ workflows = {} # each workflow defines a name and a list of steps to be done. -# if no explicit name/label given for the workflow (first arg), the name of step1 will be used +# if no explicit name/label given for the workflow (first arg), +# the name of step1 will be used -#Example ExtendedPhase1 part gun -#workflows[3100] = ['', ['FourMuPt1_200_UPGPhase1','DIGIUP','RECOUP','HARVESTUP']] +#ExtendedPhase1 +#part gun +workflows[3100] = ['', ['FourMuPt1_200_UPGPhase1','DIGIUP','RECOUP','HARVESTUP']] +workflows[3101] = ['', ['SingleElectronPt10_UPGPhase1','DIGIUP','RECOUP','HARVESTUP']] +workflows[3102] = ['', ['SingleElectronPt1000_UPGPhase1','DIGIUP','RECOUP','HARVESTUP']] +workflows[3103] = ['', ['SingleElectronPt35_UPGPhase1','DIGIUP','RECOUP','HARVESTUP']] +workflows[3104] = ['', ['SingleGammaPt10_UPGPhase1','DIGIUP','RECOUP','HARVESTUP']] +workflows[3105] = ['', ['SingleGammaPt35_UPGPhase1','DIGIUP','RECOUP','HARVESTUP']] +workflows[3106] = ['', ['SingleMuPt1_UPGPhase1','DIGIUP','RECOUP','HARVESTUP']] +workflows[3107] = ['', ['SingleMuPt10_UPGPhase1','DIGIUP','RECOUP','HARVESTUP']] +workflows[3108] = ['', ['SingleMuPt100_UPGPhase1','DIGIUP','RECOUP','HARVESTUP']] +workflows[3109] = ['', ['SingleMuPt1000_UPGPhase1','DIGIUP','RECOUP','HARVESTUP']] + +#std wf @8TeV +workflows[3110] = ['', ['TTbarLepton_UPGPhase1_8','DIGIUP','RECOUP','HARVESTUP']] +workflows[3111] = ['', ['Wjet_Pt_80_120_UPGPhase1_8','DIGIUP','RECOUP','HARVESTUP']] +workflows[3112] = ['', ['Wjet_Pt_3000_3500_UPGPhase1_8','DIGIUP','RECOUP','HARVESTUP']] +workflows[3113] = ['', ['LM1_sfts_UPGPhase1_8','DIGIUP','RECOUP','HARVESTUP']] + +workflows[3114] = ['', ['QCD_Pt_3000_3500_UPGPhase1_8','DIGIUP','RECOUP','HARVESTUP']] +workflows[3115] = ['', ['QCD_Pt_600_800_UPGPhase1_8','DIGIUP','RECOUP','HARVESTUP']] +workflows[3116] = ['', ['QCD_Pt_80_120_UPGPhase1_8','DIGIUP','RECOUP','HARVESTUP']] + +workflows[3117] = ['', ['Higgs200ChargedTaus_UPGPhase1_8','DIGIUP','RECOUP','HARVESTUP']] +workflows[3118] = ['', ['JpsiMM_UPGPhase1_8','DIGIUP','RECOUP','HARVESTUP']] +workflows[3119] = ['', ['TTbar_UPGPhase1_8','DIGIUP','RECOUP','HARVESTUP']] +workflows[3120] = ['', ['WE_UPGPhase1_8','DIGIUP','RECOUP','HARVESTUP']] +workflows[3121] = ['', ['ZEE_UPGPhase1_8','DIGIUP','RECOUP','HARVESTUP']] +workflows[3122] = ['', ['ZTT_UPGPhase1_8','DIGIUP','RECOUP','HARVESTUP']] +workflows[3123] = ['', ['H130GGgluonfusion_UPGPhase1_8','DIGIUP','RECOUP','HARVESTUP']] +workflows[3124] = ['', ['PhotonJets_Pt_10_UPGPhase1_8','DIGIUP','RECOUP','HARVESTUP']] +workflows[3125] = ['', ['QQH1352T_Tauola_UPGPhase1_8','DIGIUP','RECOUP','HARVESTUP']] + +workflows[3126] = ['', ['MinBias_TuneZ2star_UPGPhase1_8','DIGIUP','RECOUP','HARVESTUP']] +workflows[3127] = ['', ['WM_UPGPhase1_8','DIGIUP','RECOUP','HARVESTUP']] +workflows[3128] = ['', ['ZMM_UPGPhase1_8','DIGIUP','RECOUP','HARVESTUP']] + +workflows[3129] = ['', ['ADDMonoJet_d3MD3_UPGPhase1_8','DIGIUP','RECOUP','HARVESTUP']] +workflows[3130] = ['', ['ZpMM_UPGPhase1_8','DIGIUP','RECOUP','HARVESTUP']] +workflows[3131] = ['', ['WpM_UPGPhase1_8','DIGIUP','RECOUP','HARVESTUP']] + + +#std wf @14TeV +#workflows[3132] = ['', ['TTbarLepton_UPGPhase1_14','DIGIUP','RECOUP','HARVESTUP']] #no gen fragment +workflows[3133] = ['', ['Wjet_Pt_80_120_UPGPhase1_14','DIGIUP','RECOUP','HARVESTUP']] +workflows[3134] = ['', ['Wjet_Pt_3000_3500_UPGPhase1_14','DIGIUP','RECOUP','HARVESTUP']] +workflows[3135] = ['', ['LM1_sfts_UPGPhase1_14','DIGIUP','RECOUP','HARVESTUP']] + + +workflows[3136] = ['', ['QCD_Pt_3000_3500_UPGPhase1_14','DIGIUP','RECOUP','HARVESTUP']] +#workflows[3137] = ['', ['QCD_Pt_600_800_UPGPhase1_14','DIGIUP','RECOUP','HARVESTUP']] #no gen fragment +workflows[3138] = ['', ['QCD_Pt_80_120_UPGPhase1_14','DIGIUP','RECOUP','HARVESTUP']] + + +workflows[3139] = ['', ['Higgs200ChargedTaus_UPGPhase1_14','DIGIUP','RECOUP','HARVESTUP']] +workflows[3140] = ['', ['JpsiMM_UPGPhase1_14','DIGIUP','RECOUP','HARVESTUP']] +workflows[3141] = ['', ['TTbar_UPGPhase1_14','DIGIUP','RECOUP','HARVESTUP']] +workflows[3142] = ['', ['WE_UPGPhase1_14','DIGIUP','RECOUP','HARVESTUP']] +workflows[3143] = ['', ['ZEE_UPGPhase1_14','DIGIUP','RECOUP','HARVESTUP']] +workflows[3144] = ['', ['ZTT_UPGPhase1_14','DIGIUP','RECOUP','HARVESTUP']] +workflows[3145] = ['', ['H130GGgluonfusion_UPGPhase1_14','DIGIUP','RECOUP','HARVESTUP']] +workflows[3146] = ['', ['PhotonJets_Pt_10_UPGPhase1_14','DIGIUP','RECOUP','HARVESTUP']] +workflows[3147] = ['', ['QQH1352T_Tauola_UPGPhase1_14','DIGIUP','RECOUP','HARVESTUP']] + +workflows[3148] = ['', ['MinBias_TuneZ2star_UPGPhase1_14','DIGIUP','RECOUP','HARVESTUP']] +workflows[3149] = ['', ['WM_UPGPhase1_14','DIGIUP','RECOUP','HARVESTUP']] +workflows[3150] = ['', ['ZMM_UPGPhase1_14','DIGIUP','RECOUP','HARVESTUP']] + +#workflows[3151] = ['', ['ADDMonoJet_d3MD3_UPGPhase1_14','DIGIUP','RECOUP','HARVESTUP']]#no gen fragment +#workflows[3152] = ['', ['ZpMM_UPGPhase1_14','DIGIUP','RECOUP','HARVESTUP']]#no gen fragment +#workflows[3153] = ['', ['WpM_UPGPhase1_14','DIGIUP','RECOUP','HARVESTUP']]#no gen fragment + + +#2015 +#part gun +workflows[3200] = ['', ['FourMuPt1_200_UPG2015','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3201] = ['', ['SingleElectronPt10_UPG2015','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3202] = ['', ['SingleElectronPt1000_UPG2015','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3203] = ['', ['SingleElectronPt35_UPG2015','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3204] = ['', ['SingleGammaPt10_UPG2015','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3205] = ['', ['SingleGammaPt35_UPG2015','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3206] = ['', ['SingleMuPt1_UPG2015','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3207] = ['', ['SingleMuPt10_UPG2015','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3208] = ['', ['SingleMuPt100_UPG2015','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3209] = ['', ['SingleMuPt1000_UPG2015','DIGIUP15','RECOUP15','HARVESTUP15']] + +#std wf @8TeV +workflows[3210] = ['', ['TTbarLepton_UPG2015_8','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3211] = ['', ['Wjet_Pt_80_120_UPG2015_8','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3212] = ['', ['Wjet_Pt_3000_3500_UPG2015_8','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3213] = ['', ['LM1_sfts_UPG2015_8','DIGIUP15','RECOUP15','HARVESTUP15']] + +workflows[3214] = ['', ['QCD_Pt_3000_3500_UPG2015_8','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3215] = ['', ['QCD_Pt_600_800_UPG2015_8','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3216] = ['', ['QCD_Pt_80_120_UPG2015_8','DIGIUP15','RECOUP15','HARVESTUP15']] + +workflows[3217] = ['', ['Higgs200ChargedTaus_UPG2015_8','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3218] = ['', ['JpsiMM_UPG2015_8','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3219] = ['', ['TTbar_UPG2015_8','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3220] = ['', ['WE_UPG2015_8','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3221] = ['', ['ZEE_UPG2015_8','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3222] = ['', ['ZTT_UPG2015_8','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3223] = ['', ['H130GGgluonfusion_UPG2015_8','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3224] = ['', ['PhotonJets_Pt_10_UPG2015_8','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3225] = ['', ['QQH1352T_Tauola_UPG2015_8','DIGIUP15','RECOUP15','HARVESTUP15']] + +workflows[3226] = ['', ['MinBias_TuneZ2star_UPG2015_8','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3227] = ['', ['WM_UPG2015_8','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3228] = ['', ['ZMM_UPG2015_8','DIGIUP15','RECOUP15','HARVESTUP15']] + +workflows[3229] = ['', ['ADDMonoJet_d3MD3_UPG2015_8','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3230] = ['', ['ZpMM_UPG2015_8','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3231] = ['', ['WpM_UPG2015_8','DIGIUP15','RECOUP15','HARVESTUP15']] + + +#std wf @14TeV +#workflows[3232] = ['', ['TTbarLepton_UPG2015_14','DIGIUP15','RECOUP15','HARVESTUP15']] #no gen fragment +workflows[3233] = ['', ['Wjet_Pt_80_120_UPG2015_14','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3234] = ['', ['Wjet_Pt_3000_3500_UPG2015_14','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3235] = ['', ['LM1_sfts_UPG2015_14','DIGIUP15','RECOUP15','HARVESTUP15']] + + +workflows[3236] = ['', ['QCD_Pt_3000_3500_UPG2015_14','DIGIUP15','RECOUP15','HARVESTUP15']] +#workflows[3237] = ['', ['QCD_Pt_600_800_UPG2015_14','DIGIUP15','RECOUP15','HARVESTUP15']] #no gen fragment +workflows[3238] = ['', ['QCD_Pt_80_120_UPG2015_14','DIGIUP15','RECOUP15','HARVESTUP15']] + + +workflows[3239] = ['', ['Higgs200ChargedTaus_UPG2015_14','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3240] = ['', ['JpsiMM_UPG2015_14','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3241] = ['', ['TTbar_UPG2015_14','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3242] = ['', ['WE_UPG2015_14','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3243] = ['', ['ZEE_UPG2015_14','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3244] = ['', ['ZTT_UPG2015_14','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3245] = ['', ['H130GGgluonfusion_UPG2015_14','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3246] = ['', ['PhotonJets_Pt_10_UPG2015_14','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3247] = ['', ['QQH1352T_Tauola_UPG2015_14','DIGIUP15','RECOUP15','HARVESTUP15']] + +workflows[3248] = ['', ['MinBias_TuneZ2star_UPG2015_14','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3249] = ['', ['WM_UPG2015_14','DIGIUP15','RECOUP15','HARVESTUP15']] +workflows[3250] = ['', ['ZMM_UPG2015_14','DIGIUP15','RECOUP15','HARVESTUP15']] + +#workflows[3251] = ['', ['ADDMonoJet_d3MD3_UPG2015_14','DIGIUP15','RECOUP15','HARVESTUP15']]#no gen fragment +#workflows[3252] = ['', ['ZpMM_UPG2015_14','DIGIUP15','RECOUP15','HARVESTUP15']]#no gen fragment +#workflows[3253] = ['', ['WpM_UPG2015_14','DIGIUP15','RECOUP15','HARVESTUP15']]#no gen fragment + + +#2017 +#part gun +workflows[3300] = ['', ['FourMuPt1_200_UPG2017','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3301] = ['', ['SingleElectronPt10_UPG2017','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3302] = ['', ['SingleElectronPt1000_UPG2017','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3303] = ['', ['SingleElectronPt35_UPG2017','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3304] = ['', ['SingleGammaPt10_UPG2017','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3305] = ['', ['SingleGammaPt35_UPG2017','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3306] = ['', ['SingleMuPt1_UPG2017','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3307] = ['', ['SingleMuPt10_UPG2017','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3308] = ['', ['SingleMuPt100_UPG2017','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3309] = ['', ['SingleMuPt1000_UPG2017','DIGIUP17','RECOUP17','HARVESTUP17']] + +#std wf @8TeV +workflows[3310] = ['', ['TTbarLepton_UPG2017_8','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3311] = ['', ['Wjet_Pt_80_120_UPG2017_8','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3312] = ['', ['Wjet_Pt_3000_3500_UPG2017_8','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3313] = ['', ['LM1_sfts_UPG2017_8','DIGIUP17','RECOUP17','HARVESTUP17']] + +workflows[3314] = ['', ['QCD_Pt_3000_3500_UPG2017_8','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3315] = ['', ['QCD_Pt_600_800_UPG2017_8','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3316] = ['', ['QCD_Pt_80_120_UPG2017_8','DIGIUP17','RECOUP17','HARVESTUP17']] + +workflows[3317] = ['', ['Higgs200ChargedTaus_UPG2017_8','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3318] = ['', ['JpsiMM_UPG2017_8','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3319] = ['', ['TTbar_UPG2017_8','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3320] = ['', ['WE_UPG2017_8','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3321] = ['', ['ZEE_UPG2017_8','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3322] = ['', ['ZTT_UPG2017_8','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3323] = ['', ['H130GGgluonfusion_UPG2017_8','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3324] = ['', ['PhotonJets_Pt_10_UPG2017_8','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3325] = ['', ['QQH1352T_Tauola_UPG2017_8','DIGIUP17','RECOUP17','HARVESTUP17']] + +workflows[3326] = ['', ['MinBias_TuneZ2star_UPG2017_8','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3327] = ['', ['WM_UPG2017_8','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3328] = ['', ['ZMM_UPG2017_8','DIGIUP17','RECOUP17','HARVESTUP17']] + +workflows[3329] = ['', ['ADDMonoJet_d3MD3_UPG2017_8','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3330] = ['', ['ZpMM_UPG2017_8','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3331] = ['', ['WpM_UPG2017_8','DIGIUP17','RECOUP17','HARVESTUP17']] + + +#std wf @14TeV +#workflows[3332] = ['', ['TTbarLepton_UPG2017_14','DIGIUP17','RECOUP17','HARVESTUP17']] #no gen fragment +workflows[3333] = ['', ['Wjet_Pt_80_120_UPG2017_14','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3334] = ['', ['Wjet_Pt_3000_3500_UPG2017_14','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3335] = ['', ['LM1_sfts_UPG2017_14','DIGIUP17','RECOUP17','HARVESTUP17']] + + +workflows[3336] = ['', ['QCD_Pt_3000_3500_UPG2017_14','DIGIUP17','RECOUP17','HARVESTUP17']] +#workflows[3337] = ['', ['QCD_Pt_600_800_UPG2017_14','DIGIUP17','RECOUP17','HARVESTUP17']] #no gen fragment +workflows[3338] = ['', ['QCD_Pt_80_120_UPG2017_14','DIGIUP17','RECOUP17','HARVESTUP17']] + + +workflows[3339] = ['', ['Higgs200ChargedTaus_UPG2017_14','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3340] = ['', ['JpsiMM_UPG2017_14','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3341] = ['', ['TTbar_UPG2017_14','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3342] = ['', ['WE_UPG2017_14','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3343] = ['', ['ZEE_UPG2017_14','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3344] = ['', ['ZTT_UPG2017_14','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3345] = ['', ['H130GGgluonfusion_UPG2017_14','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3346] = ['', ['PhotonJets_Pt_10_UPG2017_14','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3347] = ['', ['QQH1352T_Tauola_UPG2017_14','DIGIUP17','RECOUP17','HARVESTUP17']] + +workflows[3348] = ['', ['MinBias_TuneZ2star_UPG2017_14','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3349] = ['', ['WM_UPG2017_14','DIGIUP17','RECOUP17','HARVESTUP17']] +workflows[3350] = ['', ['ZMM_UPG2017_14','DIGIUP17','RECOUP17','HARVESTUP17']] + +#workflows[3351] = ['', ['ADDMonoJet_d3MD3_UPG2017_14','DIGIUP17','RECOUP17','HARVESTUP17']]#no gen fragment +#workflows[3352] = ['', ['ZpMM_UPG2017_14','DIGIUP17','RECOUP17','HARVESTUP17']]#no gen fragment +#workflows[3353] = ['', ['WpM_UPG2017_14','DIGIUP17','RECOUP17','HARVESTUP17']]#no gen fragment -# place holder of the upgrade workflow to validate the upgrade software during the 73X migration and beyond diff --git a/Configuration/StandardSequences/python/ReconstructionHeavyIons_cff.py b/Configuration/StandardSequences/python/ReconstructionHeavyIons_cff.py index 865281b2b5c1d..d86bc44055ba3 100644 --- a/Configuration/StandardSequences/python/ReconstructionHeavyIons_cff.py +++ b/Configuration/StandardSequences/python/ReconstructionHeavyIons_cff.py @@ -54,5 +54,12 @@ reconstructionHeavyIons_HcalNZS = cms.Sequence(localReco_HcalNZS*globalRecoPbPb) -reconstructionHeavyIons_withRegitMu = cms.Sequence(reconstructionHeavyIons*regionalMuonRecoPbPb) +reconstructionHeavyIons_withPF = cms.Sequence(reconstructionHeavyIons) +reconstructionHeavyIons_HcalNZS_withPF = cms.Sequence(reconstructionHeavyIons_HcalNZS) + +reconstructionHeavyIons_withPF *= hiElectronSequence*HiParticleFlowReco +reconstructionHeavyIons_HcalNZS_withPF *= hiElectronSequence*HiParticleFlowReco + + +reconstructionHeavyIons_withRegitMu = cms.Sequence(reconstructionHeavyIons*reMuonRecoPbPb) #-------------------------------------------------------------------------- diff --git a/DQM/BeamMonitor/python/AlcaBeamMonitorHeavyIons_cff.py b/DQM/BeamMonitor/python/AlcaBeamMonitorHeavyIons_cff.py index bb5a9f8ee19ff..36447fb729b49 100644 --- a/DQM/BeamMonitor/python/AlcaBeamMonitorHeavyIons_cff.py +++ b/DQM/BeamMonitor/python/AlcaBeamMonitorHeavyIons_cff.py @@ -3,8 +3,8 @@ from DQM.BeamMonitor.AlcaBeamMonitor_cfi import * AlcaBeamMonitor.PrimaryVertexLabel = 'hiSelectedVertex' -AlcaBeamMonitor.TrackLabel = 'hiGeneralTracks' -AlcaBeamMonitor.BeamFitter.TrackCollection = 'hiGeneralTracks' +AlcaBeamMonitor.TrackLabel = 'hiSelectedTracks' +AlcaBeamMonitor.BeamFitter.TrackCollection = 'hiSelectedTracks' AlcaBeamMonitor.BeamFitter.TrackQuality = ['highPurity'] AlcaBeamMonitor.PVFitter.VertexCollection = 'hiSelectedVertex' diff --git a/DQM/BeamMonitor/python/AlcaBeamMonitor_cfi.py b/DQM/BeamMonitor/python/AlcaBeamMonitor_cfi.py index 0d37e0611c9c6..17dc5d94877ad 100644 --- a/DQM/BeamMonitor/python/AlcaBeamMonitor_cfi.py +++ b/DQM/BeamMonitor/python/AlcaBeamMonitor_cfi.py @@ -28,7 +28,7 @@ MinimumTotalLayers = cms.untracked.int32(6), MinimumPixelLayers = cms.untracked.int32(0), MaximumNormChi2 = cms.untracked.double(10.0), - TrackAlgorithm = cms.untracked.vstring(), ## ctf,rs,cosmics,initialStep,lowPtTripletStep...; for all algos, leave it blank + TrackAlgorithm = cms.untracked.vstring(), ## ctf,rs,cosmics,iter0,iter1...; for all algos, leave it blank TrackQuality = cms.untracked.vstring(), ## loose, tight, highPurity...; for all qualities, leave it blank InputBeamWidth = cms.untracked.double(0.0060), ## beam width used for Trk fitter, used only when result from PV is not available FractionOfFittedTrks = cms.untracked.double(0.9), diff --git a/DQM/BeamMonitor/python/BeamMonitorBx_cff.py b/DQM/BeamMonitor/python/BeamMonitorBx_cff.py index c017944ab38b9..641cad62eac8e 100644 --- a/DQM/BeamMonitor/python/BeamMonitorBx_cff.py +++ b/DQM/BeamMonitor/python/BeamMonitorBx_cff.py @@ -31,7 +31,7 @@ MinimumTotalLayers = cms.untracked.int32(6), MinimumPixelLayers = cms.untracked.int32(0), MaximumNormChi2 = cms.untracked.double(10.0), - TrackAlgorithm = cms.untracked.vstring(), ## ctf,rs,cosmics,initialStep,lowPtTripletStep...; for all algos, leave it blank + TrackAlgorithm = cms.untracked.vstring(), ## ctf,rs,cosmics,iter0,iter1...; for all algos, leave it blank TrackQuality = cms.untracked.vstring(), ## loose, tight, highPurity...; for all qualities, leave it blank InputBeamWidth = cms.untracked.double(0.0060), ## beam width used for Trk fitter, used only when result from PV is not available FractionOfFittedTrks = cms.untracked.double(0.9), diff --git a/DQM/BeamMonitor/python/BeamMonitor_Cosmics_cff.py b/DQM/BeamMonitor/python/BeamMonitor_Cosmics_cff.py index d9bd25018e127..3b5c762ca2fd2 100644 --- a/DQM/BeamMonitor/python/BeamMonitor_Cosmics_cff.py +++ b/DQM/BeamMonitor/python/BeamMonitor_Cosmics_cff.py @@ -24,7 +24,7 @@ MinimumTotalLayers = cms.untracked.int32(0), MinimumPixelLayers = cms.untracked.int32(0), MaximumNormChi2 = cms.untracked.double(100.0), - TrackAlgorithm = cms.untracked.vstring(), ## ctf,rs,cosmics,initialStep,lowPtTripletStep...; for all algos, leave it blank + TrackAlgorithm = cms.untracked.vstring(), ## ctf,rs,cosmics,iter0,iter1...; for all algos, leave it blank TrackQuality = cms.untracked.vstring(), ## loose, tight, highPurity...; for all qualities, leave it blank InputBeamWidth = cms.untracked.double(-1.0), ## if -1 use the value calculated by the analyzer FractionOfFittedTrks = cms.untracked.double(0.9), diff --git a/DQM/BeamMonitor/python/BeamMonitor_MC_cff.py b/DQM/BeamMonitor/python/BeamMonitor_MC_cff.py index ede4054ece60f..fb121d7bc82b7 100644 --- a/DQM/BeamMonitor/python/BeamMonitor_MC_cff.py +++ b/DQM/BeamMonitor/python/BeamMonitor_MC_cff.py @@ -26,7 +26,7 @@ MinimumTotalLayers = cms.untracked.int32(11), MinimumPixelLayers = cms.untracked.int32(3), MaximumNormChi2 = cms.untracked.double(2.0), - TrackAlgorithm = cms.untracked.vstring('initialStep'), ## ctf,rs,cosmics,initialStep,lowPtTripletStep...; for all algos, leave it blank + TrackAlgorithm = cms.untracked.vstring('iter0'), ## ctf,rs,cosmics,iter0,iter1...; for all algos, leave it blank TrackQuality = cms.untracked.vstring(), ## loose, tight, highPurity...; for all qualities, leave it blank InputBeamWidth = cms.untracked.double(-1.0), ## if -1 use the value calculated by the analyzer FractionOfFittedTrks = cms.untracked.double(0.9), diff --git a/DQM/BeamMonitor/python/BeamMonitor_PixelLess_cff.py b/DQM/BeamMonitor/python/BeamMonitor_PixelLess_cff.py index b433ec30d633c..da02507a6622c 100644 --- a/DQM/BeamMonitor/python/BeamMonitor_PixelLess_cff.py +++ b/DQM/BeamMonitor/python/BeamMonitor_PixelLess_cff.py @@ -24,7 +24,7 @@ MinimumTotalLayers = cms.untracked.int32(6), MinimumPixelLayers = cms.untracked.int32(0), MaximumNormChi2 = cms.untracked.double(5.0), - TrackAlgorithm = cms.untracked.vstring(), ## ctf,rs,cosmics,initialStep,lowPtTripletStep...; for all algos, leave it blank + TrackAlgorithm = cms.untracked.vstring(), ## ctf,rs,cosmics,iter0,iter1...; for all algos, leave it blank TrackQuality = cms.untracked.vstring(), ## loose, tight, highPurity...; for all qualities, leave it blank InputBeamWidth = cms.untracked.double(-1.0), ## if -1 use the value calculated by the analyzer FractionOfFittedTrks = cms.untracked.double(0.9), diff --git a/DQM/BeamMonitor/python/BeamMonitor_Pixel_cff.py b/DQM/BeamMonitor/python/BeamMonitor_Pixel_cff.py index db497519c47bb..41d27474ae491 100644 --- a/DQM/BeamMonitor/python/BeamMonitor_Pixel_cff.py +++ b/DQM/BeamMonitor/python/BeamMonitor_Pixel_cff.py @@ -31,7 +31,7 @@ MinimumTotalLayers = cms.untracked.int32(3), MinimumPixelLayers = cms.untracked.int32(3), MaximumNormChi2 = cms.untracked.double(30.0), - TrackAlgorithm = cms.untracked.vstring(), ## ctf,rs,cosmics,initialStep,lowPtTripletStep...; for all algos, leave it blank + TrackAlgorithm = cms.untracked.vstring(), ## ctf,rs,cosmics,iter0,iter1...; for all algos, leave it blank TrackQuality = cms.untracked.vstring(), ## loose, tight, highPurity...; for all qualities, leave it blank InputBeamWidth = cms.untracked.double(0.0060), ## beam width used for Trk fitter, used only when result from PV is not available FractionOfFittedTrks = cms.untracked.double(0.9), diff --git a/DQM/BeamMonitor/python/BeamMonitor_cff.py b/DQM/BeamMonitor/python/BeamMonitor_cff.py index 03fcdf5a0e180..e19923c59ecce 100644 --- a/DQM/BeamMonitor/python/BeamMonitor_cff.py +++ b/DQM/BeamMonitor/python/BeamMonitor_cff.py @@ -31,7 +31,7 @@ MinimumTotalLayers = cms.untracked.int32(6), MinimumPixelLayers = cms.untracked.int32(0), MaximumNormChi2 = cms.untracked.double(10.0), - TrackAlgorithm = cms.untracked.vstring(), ## ctf,rs,cosmics,initialStep,lowPtTripletStep...; for all algos, leave it blank + TrackAlgorithm = cms.untracked.vstring(), ## ctf,rs,cosmics,iter0,iter1...; for all algos, leave it blank TrackQuality = cms.untracked.vstring(), ## loose, tight, highPurity...; for all qualities, leave it blank InputBeamWidth = cms.untracked.double(0.0060), ## beam width used for Trk fitter, used only when result from PV is not available FractionOfFittedTrks = cms.untracked.double(0.9), diff --git a/DQM/BeamMonitor/test/HeavyIonTest_cfg.py b/DQM/BeamMonitor/test/HeavyIonTest_cfg.py index eeebbea9c247c..61d9c274ff5d9 100644 --- a/DQM/BeamMonitor/test/HeavyIonTest_cfg.py +++ b/DQM/BeamMonitor/test/HeavyIonTest_cfg.py @@ -127,7 +127,8 @@ process.firstStep) # Needed, as the event content is different! -process.dqmBeamMonitor.BeamFitter.TrackCollection = cms.untracked.InputTag('hiGeneralTracks') +process.dqmBeamMonitor.BeamFitter.TrackCollection = \ + cms.untracked.InputTag('hiSelectedTracks') process.pp = cms.Path( process.dqmTKStatus* diff --git a/DQM/CSCMonitorModule/plugins/CSCDQM_EventProcessor_processCSC.cc b/DQM/CSCMonitorModule/plugins/CSCDQM_EventProcessor_processCSC.cc index 5fd4f6da769b9..195cf535b1320 100644 --- a/DQM/CSCMonitorModule/plugins/CSCDQM_EventProcessor_processCSC.cc +++ b/DQM/CSCMonitorModule/plugins/CSCDQM_EventProcessor_processCSC.cc @@ -1262,13 +1262,8 @@ namespace cscdqm { // CSCCFEBTimeSlice * timeSlice[N_CFEBs][16]; // CSCCFEBDataWord * timeSample[N_CFEBs][16][6][16]; int Pedestal[N_CFEBs][6][16]; - #ifdef __clang__ - std::vector, 6>, 16>> CellPeak(N_CFEBs); - std::fill(CellPeak.begin(), CellPeak.end(), std::array, 6>, 16>{}); - #else std::pair CellPeak[N_CFEBs][6][16]; memset(CellPeak, 0, sizeof(CellPeak)); - #endif // float PedestalError[N_CFEBs][6][16]; // CSCCFEBSCAControllerWord scaControllerWord[5][16][6]; bool CheckCFEB = true; diff --git a/DQM/DataScouting/test/HLTvsRECOstudies/hlt_data.py b/DQM/DataScouting/test/HLTvsRECOstudies/hlt_data.py index 8069bd47c279d..b7cb21d77f5ab 100644 --- a/DQM/DataScouting/test/HLTvsRECOstudies/hlt_data.py +++ b/DQM/DataScouting/test/HLTvsRECOstudies/hlt_data.py @@ -7346,7 +7346,7 @@ NavigationSchool = cms.string( "" ), TrajectoryInEvent = cms.bool( True ), TTRHBuilder = cms.string( "hltESPTTRHBWithTrackAngle" ), - AlgorithmName = cms.string( "initialStep" ), + AlgorithmName = cms.string( "iter0" ), Propagator = cms.string( "hltESPRungeKuttaTrackerPropagator" ) ) process.hltPFlowTrackSelectionHighPurity = cms.EDProducer( "AnalyticalTrackSelector", @@ -7530,7 +7530,7 @@ NavigationSchool = cms.string( "" ), TrajectoryInEvent = cms.bool( True ), TTRHBuilder = cms.string( "hltESPTTRHBWithTrackAngle" ), - AlgorithmName = cms.string( "lowPtTripletStep" ), + AlgorithmName = cms.string( "iter1" ), Propagator = cms.string( "hltESPRungeKuttaTrackerPropagator" ) ) process.hltIter1PFlowTrackSelectionHighPurityLoose = cms.EDProducer( "AnalyticalTrackSelector", @@ -7772,7 +7772,7 @@ NavigationSchool = cms.string( "" ), TrajectoryInEvent = cms.bool( True ), TTRHBuilder = cms.string( "hltESPTTRHBWithTrackAngle" ), - AlgorithmName = cms.string( "pixelPairStep" ), + AlgorithmName = cms.string( "iter2" ), Propagator = cms.string( "hltESPRungeKuttaTrackerPropagator" ) ) process.hltIter2PFlowTrackSelectionHighPurity = cms.EDProducer( "AnalyticalTrackSelector", @@ -7971,7 +7971,7 @@ NavigationSchool = cms.string( "" ), TrajectoryInEvent = cms.bool( True ), TTRHBuilder = cms.string( "hltESPTTRHBWithTrackAngle" ), - AlgorithmName = cms.string( "detachedTripletStep" ), + AlgorithmName = cms.string( "iter3" ), Propagator = cms.string( "hltESPRungeKuttaTrackerPropagator" ) ) process.hltIter3PFlowTrackSelectionHighPurityLoose = cms.EDProducer( "AnalyticalTrackSelector", @@ -8213,7 +8213,7 @@ NavigationSchool = cms.string( "" ), TrajectoryInEvent = cms.bool( True ), TTRHBuilder = cms.string( "hltESPTTRHBWithTrackAngle" ), - AlgorithmName = cms.string( "mixedTripletStep" ), + AlgorithmName = cms.string( "iter4" ), Propagator = cms.string( "hltESPRungeKuttaTrackerPropagator" ) ) process.hltIter4PFlowTrackSelectionHighPurity = cms.EDProducer( "AnalyticalTrackSelector", @@ -16882,7 +16882,7 @@ NavigationSchool = cms.string( "" ), TrajectoryInEvent = cms.bool( True ), TTRHBuilder = cms.string( "hltESPTTRHBWithTrackAngle" ), - AlgorithmName = cms.string( "initialStep" ), + AlgorithmName = cms.string( "iter0" ), Propagator = cms.string( "hltESPRungeKuttaTrackerPropagator" ) ) process.hltTau3MuTrackSelectionHighPurity = cms.EDProducer( "AnalyticalTrackSelector", @@ -17008,7 +17008,7 @@ NavigationSchool = cms.string( "" ), TrajectoryInEvent = cms.bool( True ), TTRHBuilder = cms.string( "hltESPTTRHBWithTrackAngle" ), - AlgorithmName = cms.string( "lowPtTripletStep" ), + AlgorithmName = cms.string( "iter1" ), Propagator = cms.string( "hltESPRungeKuttaTrackerPropagator" ) ) process.hltIter1Tau3MuTrackSelectionHighPurityLoose = cms.EDProducer( "AnalyticalTrackSelector", @@ -17192,7 +17192,7 @@ NavigationSchool = cms.string( "" ), TrajectoryInEvent = cms.bool( True ), TTRHBuilder = cms.string( "hltESPTTRHBWithTrackAngle" ), - AlgorithmName = cms.string( "pixelPairStep" ), + AlgorithmName = cms.string( "iter2" ), Propagator = cms.string( "hltESPRungeKuttaTrackerPropagator" ) ) process.hltIter2Tau3MuTrackSelectionHighPurity = cms.EDProducer( "AnalyticalTrackSelector", @@ -17333,7 +17333,7 @@ NavigationSchool = cms.string( "" ), TrajectoryInEvent = cms.bool( True ), TTRHBuilder = cms.string( "hltESPTTRHBWithTrackAngle" ), - AlgorithmName = cms.string( "detachedTripletStep" ), + AlgorithmName = cms.string( "iter3" ), Propagator = cms.string( "hltESPRungeKuttaTrackerPropagator" ) ) process.hltIter3Tau3MuTrackSelectionHighPurityLoose = cms.EDProducer( "AnalyticalTrackSelector", @@ -17517,7 +17517,7 @@ NavigationSchool = cms.string( "" ), TrajectoryInEvent = cms.bool( True ), TTRHBuilder = cms.string( "hltESPTTRHBWithTrackAngle" ), - AlgorithmName = cms.string( "mixedTripletStep" ), + AlgorithmName = cms.string( "iter4" ), Propagator = cms.string( "hltESPRungeKuttaTrackerPropagator" ) ) process.hltIter4Tau3MuTrackSelectionHighPurity = cms.EDProducer( "AnalyticalTrackSelector", diff --git a/DQM/EcalCommon/interface/DQWorker.h b/DQM/EcalCommon/interface/DQWorker.h index 0edd1315ed085..e7a62ce6b6c69 100644 --- a/DQM/EcalCommon/interface/DQWorker.h +++ b/DQM/EcalCommon/interface/DQWorker.h @@ -73,7 +73,6 @@ namespace ecaldqm{ std::string name_; MESetCollection MEs_; - bool booked_; Timestamp timestamp_; int verbosity_; diff --git a/DQM/EcalCommon/interface/EcalDQMonitor.h b/DQM/EcalCommon/interface/EcalDQMonitor.h index f217d2b74354b..12ae3226e2049 100644 --- a/DQM/EcalCommon/interface/EcalDQMonitor.h +++ b/DQM/EcalCommon/interface/EcalDQMonitor.h @@ -28,6 +28,8 @@ namespace ecaldqm protected: void ecaldqmGetSetupObjects(edm::EventSetup const&); + void ecaldqmBookHistograms(DQMStore::IBooker&); + void ecaldqmReleaseHistograms(); void ecaldqmBeginRun(edm::Run const&, edm::EventSetup const&); void ecaldqmEndRun(edm::Run const&, edm::EventSetup const&); void ecaldqmBeginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&); diff --git a/DQM/EcalCommon/python/CommonParams_cfi.py b/DQM/EcalCommon/python/CommonParams_cfi.py index 69fc185cc605c..9c03e9368b7de 100644 --- a/DQM/EcalCommon/python/CommonParams_cfi.py +++ b/DQM/EcalCommon/python/CommonParams_cfi.py @@ -8,5 +8,4 @@ ecaldqmLaserWavelengths = cms.untracked.vint32(1, 2, 3) ecaldqmLedWavelengths = cms.untracked.vint32(1, 2) ecaldqmMGPAGains = cms.untracked.vint32(12) -ecaldqmMGPAGainsPN = cms.untracked.vint32(16) - +ecaldqmMGPAGainsPN = cms.untracked.vint32(16) diff --git a/DQM/EcalCommon/src/DQWorker.cc b/DQM/EcalCommon/src/DQWorker.cc index 18960e9d3ca4d..536c0ffb45144 100644 --- a/DQM/EcalCommon/src/DQWorker.cc +++ b/DQM/EcalCommon/src/DQWorker.cc @@ -14,7 +14,6 @@ namespace ecaldqm DQWorker::DQWorker() : name_(""), MEs_(), - booked_(false), timestamp_(), verbosity_(0), onlineMode_(false), @@ -78,16 +77,16 @@ namespace ecaldqm { for(MESetCollection::iterator mItr(MEs_.begin()); mItr != MEs_.end(); ++mItr) mItr->second->clear(); - booked_ = false; } void DQWorker::bookMEs(DQMStore::IBooker& _booker) { - if(booked_) return; - for(MESetCollection::iterator mItr(MEs_.begin()); mItr != MEs_.end(); ++mItr) - mItr->second->book(_booker); - booked_ = true; + for(MESetCollection::iterator mItr(MEs_.begin()); mItr != MEs_.end(); ++mItr){ + MESet* me(mItr->second); + if(me->isActive()) continue; + me->book(_booker); + } } void diff --git a/DQM/EcalCommon/src/EcalDQMonitor.cc b/DQM/EcalCommon/src/EcalDQMonitor.cc index ff921db6e4c0a..08efca278363e 100644 --- a/DQM/EcalCommon/src/EcalDQMonitor.cc +++ b/DQM/EcalCommon/src/EcalDQMonitor.cc @@ -96,6 +96,23 @@ namespace ecaldqm } } + void + EcalDQMonitor::ecaldqmBookHistograms(DQMStore::IBooker& _ibooker) + { + executeOnWorkers_([&_ibooker](ecaldqm::DQWorker* worker){ + worker->releaseMEs(); + worker->bookMEs(_ibooker); + }, "bookMEs", "Booking MEs"); + } + + void + EcalDQMonitor::ecaldqmReleaseHistograms() + { + executeOnWorkers_([](DQWorker* worker){ + worker->releaseMEs(); + }, "releaseMEs", "releasing histograms"); + } + void EcalDQMonitor::ecaldqmBeginRun(edm::Run const& _run, edm::EventSetup const& _es) { diff --git a/DQM/EcalMonitorClient/interface/DQWorkerClient.h b/DQM/EcalMonitorClient/interface/DQWorkerClient.h index 5c3bd388a24c2..b243373663172 100644 --- a/DQM/EcalMonitorClient/interface/DQWorkerClient.h +++ b/DQM/EcalMonitorClient/interface/DQWorkerClient.h @@ -32,7 +32,6 @@ namespace ecaldqm void releaseSource(); bool retrieveSource(DQMStore::IGetter&, ProcessType); - bool runsOn(ProcessType _type) const { return _type == kJob || hasLumiPlots_; } void resetMEs(); virtual void producePlots(ProcessType) = 0; @@ -64,8 +63,6 @@ namespace ecaldqm MESetCollection sources_; std::set qualitySummaries_; - bool hasLumiPlots_; - StatusManager const* statusManager_; }; } diff --git a/DQM/EcalMonitorClient/interface/EcalDQMonitorClient.h b/DQM/EcalMonitorClient/interface/EcalDQMonitorClient.h index 9a02b346152ce..e9ddba82934bf 100644 --- a/DQM/EcalMonitorClient/interface/EcalDQMonitorClient.h +++ b/DQM/EcalMonitorClient/interface/EcalDQMonitorClient.h @@ -24,6 +24,7 @@ class EcalDQMonitorClient : public DQMEDHarvester, public ecaldqm::EcalDQMonitor unsigned eventCycleLength_; unsigned iEvt_; + bool booked_; ecaldqm::StatusManager statusManager_; }; diff --git a/DQM/EcalMonitorClient/plugins/EcalDQMonitorClient.cc b/DQM/EcalMonitorClient/plugins/EcalDQMonitorClient.cc index 0d6ac9ccff3ee..77696f73e5121 100644 --- a/DQM/EcalMonitorClient/plugins/EcalDQMonitorClient.cc +++ b/DQM/EcalMonitorClient/plugins/EcalDQMonitorClient.cc @@ -28,6 +28,7 @@ EcalDQMonitorClient::EcalDQMonitorClient(edm::ParameterSet const& _ps) : DQMEDHarvester(), ecaldqm::EcalDQMonitor(_ps), iEvt_(0), + booked_(false), statusManager_() { executeOnWorkers_([this](ecaldqm::DQWorker* worker){ @@ -93,11 +94,10 @@ EcalDQMonitorClient::endRun(edm::Run const& _run, edm::EventSetup const& _es) void EcalDQMonitorClient::dqmEndLuminosityBlock(DQMStore::IBooker& _ibooker, DQMStore::IGetter& _igetter, edm::LuminosityBlock const& _lumi, edm::EventSetup const& _es) { - executeOnWorkers_([&_ibooker](ecaldqm::DQWorker* worker){ - ecaldqm::DQWorkerClient* client(static_cast(worker)); - if(!client->onlineMode() && !client->runsOn(ecaldqm::DQWorkerClient::kLumi)) return; - client->bookMEs(_ibooker); - }, "bookMEs", "Booking MEs"); + if(!booked_){ + ecaldqmBookHistograms(_ibooker); + booked_ = true; + } ecaldqmEndLuminosityBlock(_lumi, _es); @@ -107,15 +107,14 @@ EcalDQMonitorClient::dqmEndLuminosityBlock(DQMStore::IBooker& _ibooker, DQMStore void EcalDQMonitorClient::dqmEndJob(DQMStore::IBooker& _ibooker, DQMStore::IGetter& _igetter) { - executeOnWorkers_([&_ibooker](ecaldqm::DQWorker* worker){ - worker->bookMEs(_ibooker); // worker returns if already booked - }, "bookMEs", "Booking MEs"); + if(!booked_){ + ecaldqmBookHistograms(_ibooker); + booked_ = true; + } runWorkers(_igetter, ecaldqm::DQWorkerClient::kJob); - - executeOnWorkers_([](ecaldqm::DQWorker* worker){ - worker->releaseMEs(); - }, "releaseMEs", "releasing histograms"); + + ecaldqmReleaseHistograms(); } void @@ -125,7 +124,6 @@ EcalDQMonitorClient::runWorkers(DQMStore::IGetter& _igetter, ecaldqm::DQWorkerCl executeOnWorkers_([&_igetter, &_type](ecaldqm::DQWorker* worker){ ecaldqm::DQWorkerClient* client(static_cast(worker)); - if(!client->onlineMode() && !client->runsOn(_type)) return; client->releaseSource(); client->resetMEs(); if(!client->retrieveSource(_igetter, _type)) return; diff --git a/DQM/EcalMonitorClient/src/DQWorkerClient.cc b/DQM/EcalMonitorClient/src/DQWorkerClient.cc index d79730069e856..d674818bec9a4 100644 --- a/DQM/EcalMonitorClient/src/DQWorkerClient.cc +++ b/DQM/EcalMonitorClient/src/DQWorkerClient.cc @@ -19,15 +19,8 @@ namespace ecaldqm DQWorker(), sources_(), qualitySummaries_(), - hasLumiPlots_(false), statusManager_(0) { - for(MESetCollection::iterator mItr(MEs_.begin()); mItr != MEs_.end(); ++mItr){ - if(mItr->second->getLumiFlag()){ - hasLumiPlots_ = true; - break; - } - } } /*static*/ @@ -105,17 +98,21 @@ namespace ecaldqm bool DQWorkerClient::retrieveSource(DQMStore::IGetter& _igetter, ProcessType _type) { + int ready(-1); + std::string failedPath; for(MESetCollection::iterator sItr(sources_.begin()); sItr != sources_.end(); ++sItr){ - if(!onlineMode_ && _type == kLumi && !sItr->second->getLumiFlag()) continue; + if(_type == kLumi && !sItr->second->getLumiFlag()) continue; if(verbosity_ > 1) edm::LogInfo("EcalDQM") << name_ << ": Retrieving source " << sItr->first; if(!sItr->second->retrieve(_igetter, &failedPath)){ + ready = 0; if(verbosity_ > 1) edm::LogWarning("EcalDQM") << name_ << ": Could not find source " << sItr->first << "@" << failedPath; - return false; + break; } + ready = 1; } - return true; + return ready == 1; } void diff --git a/DQM/EcalMonitorClient/src/SummaryClient.cc b/DQM/EcalMonitorClient/src/SummaryClient.cc index f8efeec5fe60e..996ba8566ced0 100644 --- a/DQM/EcalMonitorClient/src/SummaryClient.cc +++ b/DQM/EcalMonitorClient/src/SummaryClient.cc @@ -38,6 +38,10 @@ namespace ecaldqm MESet& meReportSummaryContents(MEs_.at("ReportSummaryContents")); MESet& meReportSummary(MEs_.at("ReportSummary")); + MESet const& sIntegrityByLumi(sources_.at("IntegrityByLumi")); + MESet const& sDesyncByLumi(sources_.at("DesyncByLumi")); + MESet const& sFEByLumi(sources_.at("FEByLumi")); + // TODO GIVE IMPLEMENTATIONT TO PER-LUMI REPORT for(unsigned iDCC(0); iDCC < nDCC; ++iDCC){ @@ -48,10 +52,6 @@ namespace ecaldqm if(_pType == kLumi) return; - MESet const& sIntegrityByLumi(sources_.at("IntegrityByLumi")); - MESet const& sDesyncByLumi(sources_.at("DesyncByLumi")); - MESet const& sFEByLumi(sources_.at("FEByLumi")); - double integrityByLumi[nDCC]; double rawDataByLumi[nDCC]; for(unsigned iDCC(0); iDCC < nDCC; ++iDCC){ diff --git a/DQM/EcalMonitorTasks/interface/EcalDQMonitorTask.h b/DQM/EcalMonitorTasks/interface/EcalDQMonitorTask.h index 8b8f8afbe8d79..4b0be7ec8b82a 100644 --- a/DQM/EcalMonitorTasks/interface/EcalDQMonitorTask.h +++ b/DQM/EcalMonitorTasks/interface/EcalDQMonitorTask.h @@ -46,6 +46,8 @@ class EcalDQMonitorTask : public DQMEDAnalyzer, public ecaldqm::EcalDQMonitor { int processedEvents_; /* TASK TIME PROFILING */ + bool evaluateTime_; + std::map taskTimes_; time_t lastResetTime_; float resetInterval_; }; diff --git a/DQM/EcalMonitorTasks/interface/LaserTask.h b/DQM/EcalMonitorTasks/interface/LaserTask.h index 87dba6f2814cb..3d156a1b7673b 100644 --- a/DQM/EcalMonitorTasks/interface/LaserTask.h +++ b/DQM/EcalMonitorTasks/interface/LaserTask.h @@ -43,7 +43,6 @@ namespace ecaldqm { int emptyLS_; int emptyLSLimit_; - int maxPedestal_; }; inline bool LaserTask::analyze(void const* _p, Collections _collection){ diff --git a/DQM/EcalMonitorTasks/plugins/EcalDQMonitorTask.cc b/DQM/EcalMonitorTasks/plugins/EcalDQMonitorTask.cc index 9efa8f4e6336f..27dc5f0c05731 100644 --- a/DQM/EcalMonitorTasks/plugins/EcalDQMonitorTask.cc +++ b/DQM/EcalMonitorTasks/plugins/EcalDQMonitorTask.cc @@ -30,6 +30,8 @@ EcalDQMonitorTask::EcalDQMonitorTask(edm::ParameterSet const& _ps) : schedule_(), allowMissingCollections_(_ps.getUntrackedParameter("allowMissingCollections")), processedEvents_(0), + evaluateTime_(_ps.getUntrackedParameter("evaluateTime")), + taskTimes_(), lastResetTime_(0), resetInterval_(_ps.getUntrackedParameter("resetInterval")) { @@ -49,6 +51,8 @@ EcalDQMonitorTask::EcalDQMonitorTask(edm::ParameterSet const& _ps) : } task->setTokens(collector); + + taskTimes_[task] = 0.; }, "initialization"); edm::ParameterSet const& collectionTags(_ps.getUntrackedParameterSet("collectionTags")); @@ -93,6 +97,7 @@ EcalDQMonitorTask::fillDescriptions(edm::ConfigurationDescriptions& _descs) desc.addUntracked("collectionTags", collectionTags); desc.addUntracked("allowMissingCollections", true); + desc.addUntracked("evaluateTime", false); desc.addUntracked("resetInterval", 0.); _descs.addDefault(desc); @@ -102,10 +107,7 @@ void EcalDQMonitorTask::bookHistograms(DQMStore::IBooker& _ibooker, edm::Run const&, edm::EventSetup const& _es) { ecaldqmGetSetupObjects(_es); - - executeOnWorkers_([&_ibooker](ecaldqm::DQWorker* worker){ - worker->bookMEs(_ibooker); - }, "bookMEs", "Booking MEs"); + ecaldqmBookHistograms(_ibooker); } void @@ -128,9 +130,19 @@ EcalDQMonitorTask::endRun(edm::Run const& _run, edm::EventSetup const& _es) ecaldqmEndRun(_run, _es); - executeOnWorkers_([](ecaldqm::DQWorker* worker){ - worker->releaseMEs(); - }, "releaseMEs", "releasing histograms"); + ecaldqmReleaseHistograms(); + + if(evaluateTime_){ + std::stringstream ss; + + ss << "************** " << moduleName_ << " **************" << std::endl; + ss << " Mean time consumption of the modules" << std::endl; + ss << "____________________________________" << std::endl; + executeOnWorkers_([&ss, this](ecaldqm::DQWorker* worker){ + ss << std::setw(20) << std::setfill(' ') << worker->getName() << "| " << (this->taskTimes_[worker] / this->processedEvents_) << std::endl; + }, "print time"); + edm::LogInfo("EcalDQM") << ss.str(); + } } void diff --git a/DQM/EcalMonitorTasks/plugins/EcalDQMonitorTask2.cc b/DQM/EcalMonitorTasks/plugins/EcalDQMonitorTask2.cc index 5b64cd05e7e02..a93c1eb597ce3 100644 --- a/DQM/EcalMonitorTasks/plugins/EcalDQMonitorTask2.cc +++ b/DQM/EcalMonitorTasks/plugins/EcalDQMonitorTask2.cc @@ -16,6 +16,8 @@ #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h" #include "DataFormats/CaloRecHit/interface/CaloCluster.h" +#include "TStopwatch.h" + template void EcalDQMonitorTask::runOnCollection(edm::Event const& _evt, ecaldqm::Collections _col, std::set const& _enabledTasks) @@ -30,12 +32,18 @@ EcalDQMonitorTask::runOnCollection(edm::Event const& _evt, ecaldqm::Collections CollectionClass const* collection(hndl.product()); - executeOnWorkers_([collection, _col, &_enabledTasks, this](ecaldqm::DQWorker* worker){ - if(_enabledTasks.find(worker) != _enabledTasks.end()) + TStopwatch sw; + sw.Reset(); + + executeOnWorkers_([collection, _col, &_enabledTasks, &sw, this](ecaldqm::DQWorker* worker){ + if(_enabledTasks.find(worker) != _enabledTasks.end()){ + if(this->evaluateTime_) sw.Start(); static_cast(worker)->analyze(collection, _col); + if(this->evaluateTime_) this->taskTimes_[worker] += sw.RealTime(); + } }, "analyze"); - if(verbosity_ > 1) edm::LogInfo("EcalDQM") << moduleName_ << "::runOn" << ecaldqm::collectionName[_col] << " returning"; + edm::LogInfo("EcalDQM") << moduleName_ << "::runOn" << ecaldqm::collectionName[_col] << " returning"; } void diff --git a/DQM/EcalMonitorTasks/python/EcalMonitorTask_cfi.py b/DQM/EcalMonitorTasks/python/EcalMonitorTask_cfi.py index 2ac61ff152e0a..3118766f30f2e 100644 --- a/DQM/EcalMonitorTasks/python/EcalMonitorTask_cfi.py +++ b/DQM/EcalMonitorTasks/python/EcalMonitorTask_cfi.py @@ -45,6 +45,7 @@ collectionTags = ecalDQMCollectionTags, allowMissingCollections = cms.untracked.bool(True), verbosity = cms.untracked.int32(0), + evaluateTime = cms.untracked.bool(False), resetInterval = cms.untracked.double(2.) ) diff --git a/DQM/EcalMonitorTasks/python/LaserTask_cfi.py b/DQM/EcalMonitorTasks/python/LaserTask_cfi.py index e847890a1fe20..f71e936b68183 100644 --- a/DQM/EcalMonitorTasks/python/LaserTask_cfi.py +++ b/DQM/EcalMonitorTasks/python/LaserTask_cfi.py @@ -7,7 +7,6 @@ ecalLaserTask = cms.untracked.PSet( params = cms.untracked.PSet( emptyLSLimit = cms.untracked.int32(emptyLSLimit), - maxPedestal = cms.untracked.int32(250), laserWavelengths = ecaldqmLaserWavelengths ), MEs = cms.untracked.PSet( diff --git a/DQM/EcalMonitorTasks/src/DQWorkerTask.cc b/DQM/EcalMonitorTasks/src/DQWorkerTask.cc index 614dbb4a85b35..02a05b86d35f4 100644 --- a/DQM/EcalMonitorTasks/src/DQWorkerTask.cc +++ b/DQM/EcalMonitorTasks/src/DQWorkerTask.cc @@ -30,7 +30,7 @@ namespace ecaldqm // TEMPORARY MEASURE - softReset does not accept variable bin size as of September 2012 // isVariableBinning is true for 1. MESetEcal or MESetNonObject with any custom binning or 2. MESetTrend // In principle it is sufficient to protect the MESetTrends from being reset - if(mItr->second->getBinType() != ecaldqm::binning::kTrend && + if(/*mItr->second->getBinType() != BinService::kTrend &&*/ !mItr->second->isVariableBinning() && mItr->second->getKind() != MonitorElement::DQM_KIND_REAL) resettable_.insert(mItr->first); diff --git a/DQM/EcalMonitorTasks/src/LaserTask.cc b/DQM/EcalMonitorTasks/src/LaserTask.cc index 8df79998a570a..ecc2e38682a16 100644 --- a/DQM/EcalMonitorTasks/src/LaserTask.cc +++ b/DQM/EcalMonitorTasks/src/LaserTask.cc @@ -11,8 +11,7 @@ namespace ecaldqm wlToME_(), pnAmp_(), emptyLS_(0), - emptyLSLimit_(0), - maxPedestal_(0) + emptyLSLimit_(0) { std::fill_n(enable_, nDCC, false); std::fill_n(wavelength_, nDCC, 0); @@ -36,8 +35,6 @@ namespace ecaldqm repl["wl"] = std::to_string(wl); wlToME_[wl] = amplitude.getIndex(repl); } - - maxPedestal_ = _params.getUntrackedParameter("maxPedestal"); } void @@ -117,12 +114,10 @@ namespace ecaldqm bool inData[nDCC]; int nReadouts[nDCC]; int maxpos[nDCC][EcalDataFrame::MAXSAMPLES]; - bool largeAmplitude[nDCC]; for(unsigned iDCC(0); iDCC < nDCC; ++iDCC){ inData[iDCC] = false; nReadouts[iDCC] = 0; for(int i(0); i < EcalDataFrame::MAXSAMPLES; i++) maxpos[iDCC][i] = 0; - largeAmplitude[iDCC] = false; } for(typename DigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){ @@ -151,7 +146,6 @@ namespace ecaldqm iMax = i; } if(adc < min) min = adc; - if(adc > maxPedestal_) largeAmplitude[iDCC] = true; } if(iMax >= 0 && max - min > 3) // normal RMS of pedestal is ~2.5 maxpos[iDCC][iMax] += 1; @@ -174,18 +168,12 @@ namespace ecaldqm int threshold(nReadouts[iDCC] / 3); if(laserOnExpected) enable_[iDCC] = false; - if(largeAmplitude[iDCC]){ - enable = true; - enable_[iDCC] = true; - } - else{ - for(int i(0); i < EcalDataFrame::MAXSAMPLES; i++){ - if(maxpos[iDCC][i] > threshold){ - enable = true; - enable_[iDCC] = true; - break; - } - } + for(int i(0); i < EcalDataFrame::MAXSAMPLES; i++){ + if(maxpos[iDCC][i] > threshold){ + enable = true; + enable_[iDCC] = true; + break; + } } if(iME != wlToME_[wavelength_[iDCC]]){ diff --git a/DQM/HLTEvF/plugins/TriggerRatesMonitor.cc b/DQM/HLTEvF/plugins/TriggerRatesMonitor.cc deleted file mode 100644 index f86d5d662a012..0000000000000 --- a/DQM/HLTEvF/plugins/TriggerRatesMonitor.cc +++ /dev/null @@ -1,441 +0,0 @@ -// Note to self: the implementation uses TH1F's to store the L1 and HLT rates. -// Assuming a maximum rate of 100 kHz times a period of 23.31 s, one needs to store counts up to ~2.3e6. -// A "float" has 24 bits of precision, so it can store up to 2**24 ~ 16.7e6 without loss of precision. - - -// C++ headers -#include -#include - -// boost headers -#include -#include - -// Root headers -#include - -// CMSSW headers -#include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/LuminosityBlock.h" -#include "FWCore/Framework/interface/Run.h" -#include "FWCore/Framework/interface/ESHandle.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" -#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" -#include "FWCore/ParameterSet/interface/Registry.h" -#include "FWCore/ServiceRegistry/interface/Service.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "DataFormats/Provenance/interface/ProcessHistory.h" -#include "DataFormats/Common/interface/Handle.h" -#include "DataFormats/Common/interface/TriggerResults.h" -#include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutRecord.h" -#include "CondFormats/DataRecord/interface/L1GtTriggerMenuRcd.h" -#include "CondFormats/DataRecord/interface/L1GtTriggerMaskAlgoTrigRcd.h" -#include "CondFormats/DataRecord/interface/L1GtTriggerMaskTechTrigRcd.h" -#include "CondFormats/L1TObjects/interface/L1GtTriggerMenu.h" -#include "CondFormats/L1TObjects/interface/L1GtTriggerMask.h" -#include "HLTrigger/HLTcore/interface/HLTConfigProvider.h" -#include "DQMServices/Core/interface/DQMStore.h" -#include "DQMServices/Core/interface/DQMEDAnalyzer.h" -#include "DQMServices/Core/interface/MonitorElement.h" - -// length of a lumisections, corresponding to 2**18 LHC orbits, or 23.31 seconds -static const double SECS_PER_LUMI = 23.31040958083832; - -// helper functions -template -static -const T * get(const edm::Event & event, const edm::EDGetTokenT & token) { - edm::Handle handle; - event.getByToken(token, handle); - if (not handle.isValid()) - throw * handle.whyFailed(); - return handle.product(); -} - -template -static -const T * get(const edm::EventSetup & setup) { - edm::ESHandle handle; - setup.get().get(handle); - return handle.product(); -} - - -class TriggerRatesMonitor : public DQMEDAnalyzer { -public: - explicit TriggerRatesMonitor(edm::ParameterSet const &); - ~TriggerRatesMonitor(); - - static void fillDescriptions(edm::ConfigurationDescriptions & descriptions); - -private: - virtual void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override; - virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; - virtual void analyze(edm::Event const &, edm::EventSetup const &) override; - - // module configuration - edm::EDGetTokenT m_l1t_results; - edm::EDGetTokenT m_hlt_results; - std::string m_dqm_path; - uint32_t m_lumisections_range; - - // L1T and HLT configuration - struct HLTIndices { - unsigned int index_l1_seed; - unsigned int index_prescale; - - HLTIndices() : - index_l1_seed( (unsigned int) -1), - index_prescale( (unsigned int) -1) - { } - }; - - L1GtTriggerMenu const * m_l1tMenu; - L1GtTriggerMask const * m_l1tAlgoMask; - L1GtTriggerMask const * m_l1tTechMask; - HLTConfigProvider m_hltConfig; - std::vector m_hltIndices; - - std::vector> m_datasets; - std::vector> m_streams; - - - struct HLTRatesPlots { - TH1F * wasrun; - TH1F * pass_l1_seed; - TH1F * pass_prescale; - TH1F * accept; - TH1F * reject; - TH1F * error; - }; - - // overall event count and event types - TH1F * m_events_processed; - TH1F * m_events_physics; - TH1F * m_events_calibration; - TH1F * m_events_random; - - // L1T triggers - std::vector m_l1t_algo_counts; - std::vector m_l1t_tech_counts; - - // HLT triggers - std::vector m_hlt_counts; - - // datasets - std::vector m_dataset_counts; - - // streams - std::vector m_stream_counts; - -}; - - - -void TriggerRatesMonitor::fillDescriptions(edm::ConfigurationDescriptions & descriptions) -{ - edm::ParameterSetDescription desc; - desc.addUntracked( "l1tResults", edm::InputTag("gtDigis")); - desc.addUntracked( "hltResults", edm::InputTag("TriggerResults")); - desc.addUntracked( "dqmPath", "HLT/TriggerRates" ); - desc.addUntracked( "lumisectionRange", 2500 ); // ~16 hours - descriptions.add("triggerRatesMonitor", desc); -} - - -TriggerRatesMonitor::TriggerRatesMonitor(edm::ParameterSet const & config) : - // module configuration - m_l1t_results( consumes( config.getUntrackedParameter( "l1tResults" ) ) ), - m_hlt_results( consumes( config.getUntrackedParameter( "hltResults" ) ) ), - m_dqm_path( config.getUntrackedParameter( "dqmPath" ) ), - m_lumisections_range( config.getUntrackedParameter( "lumisectionRange" ) ), - // L1T and HLT configuration - m_l1tMenu( nullptr ), - m_l1tAlgoMask( nullptr ), - m_l1tTechMask( nullptr), - m_hltConfig(), - m_hltIndices(), - m_datasets(), - m_streams(), - // overall event count and event types - m_events_processed( nullptr ), - m_events_physics( nullptr ), - m_events_calibration( nullptr ), - m_events_random( nullptr ), - // L1T triggers - m_l1t_algo_counts(), - m_l1t_tech_counts(), - // HLT triggers - m_hlt_counts(), - // datasets - m_dataset_counts(), - // streams - m_stream_counts() -{ -} - -TriggerRatesMonitor::~TriggerRatesMonitor() -{ -} - -void TriggerRatesMonitor::dqmBeginRun(edm::Run const & run, edm::EventSetup const & setup) -{ - m_events_processed = nullptr; - m_events_physics = nullptr; - m_events_calibration = nullptr; - m_events_random = nullptr; - - // cache the L1 trigger menu - m_l1tMenu = get(setup); - // FIXME - do we really need this ? - //(const_cast(m_l1tMenu))->buildGtConditionMap(); - m_l1tAlgoMask = get(setup); - m_l1tTechMask = get(setup); - if (m_l1tMenu and m_l1tAlgoMask and m_l1tTechMask) { - m_l1t_algo_counts.clear(); - m_l1t_algo_counts.resize( m_l1tAlgoMask->gtTriggerMask().size(), nullptr ); - m_l1t_tech_counts.clear(); - m_l1t_tech_counts.resize( m_l1tTechMask->gtTriggerMask().size(), nullptr ); - } else { - // L1GtUtils not initialised, skip the the L1T monitoring - edm::LogError("TriggerRatesMonitor") << "failed to read the L1 menu or masks from the EventSetup, the L1 trigger rates will not be monitored"; - } - - // initialise the HLTConfigProvider - bool changed = true; - edm::EDConsumerBase::Labels labels; - labelsForToken(m_hlt_results, labels); - if (m_hltConfig.init(run, setup, labels.process, changed)) { - m_hlt_counts.clear(); - m_hlt_counts.resize( m_hltConfig.size(), HLTRatesPlots() ); - m_hltIndices.resize( m_hltConfig.size(), HLTIndices() ); - - unsigned int datasets = m_hltConfig.datasetNames().size(); - m_datasets.clear(); - m_datasets.resize( datasets, {} ); - for (unsigned int i = 0; i < datasets; ++i) { - auto const & paths = m_hltConfig.datasetContent(i); - m_datasets[i].reserve(paths.size()); - for (auto const & path: paths) - m_datasets[i].push_back(m_hltConfig.triggerIndex(path)); - } - m_dataset_counts.clear(); - m_dataset_counts.resize( datasets, nullptr ); - - unsigned int streams = m_hltConfig.streamNames().size(); - m_streams.clear(); - m_streams.resize( streams, {} ); - for (unsigned int i = 0; i < streams; ++i) { - for (auto const & dataset : m_hltConfig.streamContent(i)) { - for (auto const & path : m_hltConfig.datasetContent(dataset)) - m_streams[i].push_back(m_hltConfig.triggerIndex(path)); - } - std::sort(m_streams[i].begin(), m_streams[i].end()); - auto unique_end = std::unique(m_streams[i].begin(), m_streams[i].end()); - m_streams[i].resize(unique_end - m_streams[i].begin()); - m_streams[i].shrink_to_fit(); - } - m_stream_counts.clear(); - m_stream_counts.resize( streams, nullptr ); - } else { - // HLTConfigProvider not initialised, skip the the HLT monitoring - edm::LogError("TriggerRatesMonitor") << "failed to initialise HLTConfigProvider, the HLT trigger and datasets rates will not be monitored"; - } -} - -void TriggerRatesMonitor::bookHistograms(DQMStore::IBooker & booker, edm::Run const & run, edm::EventSetup const & setup) -{ - // book the overall event count and event types histograms - booker.setCurrentFolder( m_dqm_path ); - m_events_processed = booker.book1D("processed", "Processed events", m_lumisections_range + 1, -0.5, m_lumisections_range + 0.5)->getTH1F(); - m_events_physics = booker.book1D("physics", "Physics evenst", m_lumisections_range + 1, -0.5, m_lumisections_range + 0.5)->getTH1F(); - m_events_calibration = booker.book1D("calibration", "Calibration events", m_lumisections_range + 1, -0.5, m_lumisections_range + 0.5)->getTH1F(); - m_events_random = booker.book1D("random", "Random events", m_lumisections_range + 1, -0.5, m_lumisections_range + 0.5)->getTH1F(); - - if (m_l1tMenu and m_l1tAlgoMask) { - // book the rate histograms for the L1 Algorithm triggers - booker.setCurrentFolder( m_dqm_path + "/L1 Algo" ); - - // book the histograms for L1 algo triggers that are included in the L1 menu - for (auto const & keyval: m_l1tMenu->gtAlgorithmAliasMap()) { - int bit = keyval.second.algoBitNumber(); - // check if the trigger is unmasked in *any* partition - bool masked = ((m_l1tAlgoMask->gtTriggerMask().at(bit) & 0xff) == 0xff); - std::string const & name = (boost::format("%s (bit %d)") % keyval.first.substr(0, keyval.first.find_first_of(".")) % bit).str(); - std::string const & title = (boost::format("%s (bit %d)%s") % keyval.first % bit % (masked ? " (masked)" : "")).str(); - m_l1t_algo_counts.at(bit) = booker.book1D(name, title, m_lumisections_range + 1, -0.5, m_lumisections_range + 0.5)->getTH1F(); - } - // book the histograms for L1 algo triggers that are not included in the L1 menu - for (unsigned int bit = 0; bit < m_l1tAlgoMask->gtTriggerMask().size(); ++bit) if (not m_l1t_algo_counts.at(bit)) { - // check if the trigger is unmasked in *any* partition - bool masked = ((m_l1tAlgoMask->gtTriggerMask().at(bit) & 0xff) == 0xff); - std::string const & name = (boost::format("L1 Algo (bit %d)") % bit).str(); - std::string const & title = (boost::format("L1 Algo (bit %d)%s") % bit % (masked ? " (masked)" : "")).str(); - m_l1t_algo_counts.at(bit) = booker.book1D(name, title, m_lumisections_range + 1, -0.5, m_lumisections_range + 0.5)->getTH1F(); - } - } - - if (m_l1tMenu and m_l1tTechMask) { - // book the rate histograms for the L1 Technical triggers - booker.setCurrentFolder( m_dqm_path + "/L1 Tech" ); - - // book the histograms for L1 algo triggers that are included in the L1 menu - for (auto const & keyval: m_l1tMenu->gtTechnicalTriggerMap()) { - int bit = keyval.second.algoBitNumber(); - // check if the trigger is unmasked in *any* partition - bool masked = ((m_l1tTechMask->gtTriggerMask().at(bit) & 0xff) == 0xff); - std::string const & name = (boost::format("%s (bit %d)") % keyval.first.substr(0, keyval.first.find_first_of(".")) % bit).str(); - std::string const & title = (boost::format("%s (bit %d)%s") % keyval.first % bit % (masked ? " (masked)" : "")).str(); - m_l1t_algo_counts.at(bit) = booker.book1D(name, title, m_lumisections_range + 1, -0.5, m_lumisections_range + 0.5)->getTH1F(); - } - // book the histograms for L1 algo triggers that are not included in the L1 menu - for (unsigned int bit = 0; bit < m_l1tTechMask->gtTriggerMask().size(); ++bit) if (not m_l1t_algo_counts.at(bit)) { - // check if the trigger is unmasked in *any* partition - bool masked = ((m_l1tTechMask->gtTriggerMask().at(bit) & 0xff) == 0xff); - std::string const & name = (boost::format("L1 Tech (bit %d)") % bit).str(); - std::string const & title = (boost::format("L1 Tech (bit %d)%s") % bit % (masked ? " (masked)" : "")).str(); - m_l1t_algo_counts.at(bit) = booker.book1D(name, title, m_lumisections_range + 1, -0.5, m_lumisections_range + 0.5)->getTH1F(); - } - - } - - if (m_hltConfig.inited()) { - // book the HLT triggers rate histograms - booker.setCurrentFolder( m_dqm_path + "/HLT" ); - for (unsigned int i = 0; i < m_hltConfig.size(); ++i) { - std::string const & name = m_hltConfig.triggerName(i); - m_hlt_counts[i].wasrun = booker.book1D(name + " counts", name + " counts", m_lumisections_range + 1, -0.5, m_lumisections_range + 0.5)->getTH1F(); - m_hlt_counts[i].pass_l1_seed = booker.book1D(name + " pass L1 seed", name + " pass L1 seed", m_lumisections_range + 1, -0.5, m_lumisections_range + 0.5)->getTH1F(); - m_hlt_counts[i].pass_prescale = booker.book1D(name + " pass prescaler", name + " pass prescaler", m_lumisections_range + 1, -0.5, m_lumisections_range + 0.5)->getTH1F(); - m_hlt_counts[i].accept = booker.book1D(name + " accept", name + " accept", m_lumisections_range + 1, -0.5, m_lumisections_range + 0.5)->getTH1F(); - m_hlt_counts[i].reject = booker.book1D(name + " reject", name + " reject", m_lumisections_range + 1, -0.5, m_lumisections_range + 0.5)->getTH1F(); - m_hlt_counts[i].error = booker.book1D(name + " error", name + " error", m_lumisections_range + 1, -0.5, m_lumisections_range + 0.5)->getTH1F(); - // look for the index of the (last) L1 seed and prescale module in each path - m_hltIndices[i].index_l1_seed = m_hltConfig.size(i); - m_hltIndices[i].index_prescale = m_hltConfig.size(i); - for (unsigned int j = 0; j < m_hltConfig.size(i); ++j) { - std::string const & label = m_hltConfig.moduleLabel(i, j); - std::string const & type = m_hltConfig.moduleType(label); - if (type == "HLTLevel1GTSeed" or type == "HLTLevel1Activity" or type == "HLTLevel1Pattern") { - // there might be more L1 seed filters in sequence - // keep looking and store the index of the last one - m_hltIndices[i].index_l1_seed = j; - } else if (type == "HLTPrescaler") { - // there should be only one prescaler in a path, and it should follow all L1 seed filters - m_hltIndices[i].index_prescale = j; - break; - } - - } - } - - // book the HLT datasets rate histograms - booker.setCurrentFolder( m_dqm_path + "/Datasets" ); - auto const & datasets = m_hltConfig.datasetNames(); - for (unsigned int i = 0; i < datasets.size(); ++i) - m_dataset_counts[i] = booker.book1D(datasets[i], datasets[i], m_lumisections_range + 1, -0.5, m_lumisections_range + 0.5)->getTH1F(); - - // book the HLT streams rate histograms - booker.setCurrentFolder( m_dqm_path + "/Streams" ); - auto const & streams = m_hltConfig.streamNames(); - for (unsigned int i = 0; i < streams.size(); ++i) - m_stream_counts[i] = booker.book1D(streams[i], streams[i], m_lumisections_range + 1, -0.5, m_lumisections_range + 0.5)->getTH1F(); - } -} - - -void TriggerRatesMonitor::analyze(edm::Event const & event, edm::EventSetup const & setup) -{ - unsigned int lumisection = event.luminosityBlock(); - - // book the overall event count and event types rates - m_events_processed->Fill(lumisection); - switch (event.experimentType()) { - case edm::EventAuxiliary::PhysicsTrigger : - m_events_physics->Fill(lumisection); - break; - case edm::EventAuxiliary::CalibrationTrigger : - m_events_calibration->Fill(lumisection); - break; - case edm::EventAuxiliary::RandomTrigger : - m_events_random->Fill(lumisection); - break; - case edm::EventAuxiliary::Undefined : - case edm::EventAuxiliary::Reserved : - case edm::EventAuxiliary::TracedEvent : - case edm::EventAuxiliary::TestTrigger : - case edm::EventAuxiliary::ErrorTrigger : - // ignore these event types - break; - } - - // monitor the L1 triggers rates - if (m_l1tMenu and m_l1tAlgoMask and m_l1tTechMask) { - L1GlobalTriggerReadoutRecord const & l1tResults = * get(event, m_l1t_results); - - const std::vector & algoword = l1tResults.decisionWord(); - if (algoword.size() == m_l1t_algo_counts.size()) { - for (unsigned int i = 0; i < m_l1t_algo_counts.size(); ++i) - if (algoword[i]) - m_l1t_algo_counts[i]->Fill(lumisection); - } else { - edm::LogWarning("TriggerRatesMonitor") << "This should never happen: the size of the L1 Algo Trigger mask does not match the number of L1 Algo Triggers"; - } - - const std::vector & techword = l1tResults.technicalTriggerWord(); - if (techword.size() == m_l1t_tech_counts.size()) { - for (unsigned int i = 0; i < m_l1t_tech_counts.size(); ++i) - if (techword[i]) - m_l1t_tech_counts[i]->Fill(lumisection); - } else { - edm::LogWarning("TriggerRatesMonitor") << "This should never happen: the size of the L1 Tech Trigger mask does not match the number of L1 Tech Triggers"; - } - } - - // monitor the HLT triggers and datsets rates - if (m_hltConfig.inited()) { - edm::TriggerResults const & hltResults = * get(event, m_hlt_results); - if (hltResults.size() == m_hlt_counts.size()) { - for (unsigned int i = 0; i < m_hlt_counts.size(); ++i) { - edm::HLTPathStatus const & path = hltResults.at(i); - if (path.wasrun()) - m_hlt_counts[i].wasrun->Fill(lumisection); - if (path.index() > m_hltIndices[i].index_l1_seed) - m_hlt_counts[i].pass_l1_seed->Fill(lumisection); - if (path.index() > m_hltIndices[i].index_prescale) - m_hlt_counts[i].pass_prescale->Fill(lumisection); - if (path.accept()) - m_hlt_counts[i].accept->Fill(lumisection); - else if (path.error()) - m_hlt_counts[i].error ->Fill(lumisection); - else - m_hlt_counts[i].reject->Fill(lumisection); - } - } else { - edm::LogWarning("TriggerRatesMonitor") << "This should never happen: the number of HLT paths has changed since the beginning of the run"; - } - - for (unsigned int i = 0; i < m_datasets.size(); ++i) - for (unsigned int j: m_datasets[i]) - if (hltResults.at(j).accept()) { - m_dataset_counts[i]->Fill(lumisection); - // ensure each dataset is incremented only once per event - break; - } - - for (unsigned int i = 0; i < m_streams.size(); ++i) - for (unsigned int j: m_streams[i]) - if (hltResults.at(j).accept()) { - m_stream_counts[i]->Fill(lumisection); - // ensure each stream is incremented only once per event - break; - } - } -} - - -//define this as a plug-in -#include "FWCore/Framework/interface/MakerMacros.h" -DEFINE_FWK_MODULE(TriggerRatesMonitor); diff --git a/DQM/Integration/python/test/FrontierCondition_GT_autoExpress_cfi.py b/DQM/Integration/python/test/FrontierCondition_GT_autoExpress_cfi.py deleted file mode 100644 index a9cf4835e6832..0000000000000 --- a/DQM/Integration/python/test/FrontierCondition_GT_autoExpress_cfi.py +++ /dev/null @@ -1,231 +0,0 @@ -import FWCore.ParameterSet.Config as cms -from Configuration.StandardSequences.FrontierConditions_GlobalTag_cff import * -GlobalTag.connect = "frontier://(proxyurl=http://frontier.cms:3128)(serverurl=http://frontier.cms:8000/FrontierOnProd)(serverurl=http://frontier.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)(failovertoserver=no)/CMS_COND_31X_GLOBALTAG" -GlobalTag.pfnPrefix = cms.untracked.string("frontier://(proxyurl=http://frontier.cms:3128)(serverurl=http://frontier.cms:8000/FrontierOnProd)(serverurl=http://frontier.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)(failovertoserver=no)/") -GlobalTag.globaltag = "GR_E_V38::All" -es_prefer_GlobalTag = cms.ESPrefer('PoolDBESSource','GlobalTag') - -# ===== auto -> Automatically get the GT string from current Tier0 configuration via a Tier0Das call. -# This needs a valid proxy to access the cern.ch network from the .cms one. -# -auto=True -tier0DasUrl = 'https://cmsweb.cern.ch/t0wmadatasvc/prod/' - -import os -import json -import sys, urllib2 -import time -import ast - -class Tier0DasInterface: - """ - Class handling common Tier0-DAS queries and connected utilities - """ - def __init__(self, url = 'https://cmsweb.cern.ch/t0wmadatasvc/prod/', proxy = None ): - """ - Need base url for Tier0-DAS as input - """ - self._t0DasBaseUrl = url - self._debug = False - self._retry = 0 - self._maxretry = 5 - self._proxy = proxy - - - def getData(self, src, tout=5): - """ - Get the JSON file for a give query specified via the Tier0-DAS url. - Timeout can be set via paramter. - """ - # actually get the json file from the given url of the T0-Das service - # and returns the data - - try: - if self._proxy: - print "setting proxy" - opener = urllib2.build_opener(urllib2.HTTPHandler(), - urllib2.HTTPSHandler(), - urllib2.ProxyHandler({'http':self._proxy, 'https':self._proxy})) - urllib2.install_opener(opener) - req = urllib2.Request(src) - req.add_header("User-Agent", - "DQMIntegration/1.0 python/%d.%d.%d" % sys.version_info[:3]) - req.add_header("Accept","application/json") - jsonCall = urllib2.urlopen(req, timeout = tout) - url = jsonCall.geturl() - except urllib2.HTTPError, error: - #print error.url - errStr = "Cannot retrieve Tier-0 DAS data from URL \"" + error.url + "\"" - if self._proxy: - errStr += " using proxy \"" + self._proxy + "\"" - print errStr - print error - raise urllib2.HTTPError("FIXME: handle exceptions") - except urllib2.URLError, error: - if self._retry < self._maxretry: - print 'Try # ' + str(self._retry) + " connection to Tier-0 DAS timed-out" - self._retry += 1 - newtout = tout*self._retry - time.sleep(3*self._retry) - return self.getData(src,newtout) - else: - errStr = "Cannot retrieve Tier-0 DAS data from URL \"" + src + "\"" - if self._proxy: - errStr += " using proxy \"" + self._proxy + "\"" - self._retry = 0 - print errStr - print error - raise urllib2.URLError('TimeOut reading ' + src) - - except: - raise - else: - if self._debug: - print url - jsonInfo = jsonCall.info() - if self._debug: - print jsonInfo - jsonText = jsonCall.read() - data = json.loads(jsonText) - if self._debug: - print "data:", data - return data - - def getResultList(self, json): - """ - Extractt the result list out of the JSON file - """ - resultList = [] - #FIXME try - resultList = json['result'] - - #print self.getValues(json, 'result') - return resultList - - def getValues(self, json, key, selection=''): - """ - Extract the value corrisponding to a given key from a JSON file. It is also possible to apply further selections. - """ - # lookup for a key in a json file applying possible selections - data = [] - check = 0 - if selection != '': - check = 1 - (k, v) = selection - - for o in json: - #print o - try: - if check == 1: - if (o[k] == v): - data.append(o[key]) - else: - data.append(o[key]) - except KeyError as error: - print "[Tier0DasInterface::getValues] key: " + key + " not found in json file" - print error - raise - except: - print "[Tier0DasInterface::getValues] unknown error" - raise - #pass - #print data - return data - - def lastPromptRun(self): - """ - Query to get the last run released for prompt - """ - url = self._t0DasBaseUrl + "reco_config" - try: - json = self.getData(url) - results = self.getResultList(json) - workflowlist = ast.literal_eval(results[0]) - maxRun = -1 - for workflow in workflowlist: - run = workflow['run'] - if int(run) > maxRun: - maxRun = run - return maxRun - except: - print "[Tier0DasInterface::lastPromptRun] error" - raise - return 0 - - def firstConditionSafeRun(self): - """ - Query to ge the run for which the Tier0 system considers safe the update to the conditions - """ - url = self._t0DasBaseUrl + "firstconditionsaferun" - try: - json = self.getData(url) - results = self.getResultList(json) - return results[0] - except Exception as details: - print "[Tier0DasInterface::firstConditionSafeRun] error", details - raise - return 0 - - def promptGlobalTag(self, dataset): - """ - Query the GT currently used by prompt = GT used by the last run released for prompt. - """ - url = self._t0DasBaseUrl + "reco_config" - #print "url =", url - try: - json = self.getData(url) - results = self.getResultList(json) - workflowlist = ast.literal_eval(results[0]) - gt = "UNKNOWN" - for workflow in workflowlist: - if workflow['primary_dataset'] == dataset: - gt = workflow['global_tag'] - # FIXME: do we realluy need to raise? - if gt == "UNKNOWN": - raise KeyError - return gt - except: - print "[Tier0DasInterface::promptGlobalTag] error" - raise - return None - - def expressGlobalTag(self): - """ - Query the GT currently used by express = GT used by the last run released for express. - """ - url = self._t0DasBaseUrl + "express_config" - #print "url =", url - try: - gt = "UNKNOWN" - json = self.getData(url) - results = self.getResultList(json) - config = ast.literal_eval(results[0])[0] - gt = config['global_tag'] - # FIXME: do we realluy need to raise? - if gt == "UNKNOWN": - raise KeyError - return gt - except: - print "[Tier0DasInterface::expressGlobalTag] error" - raise - return None - - -if auto: - expressGT = "UNKNOWN" - - proxyurl = None - if 'http_proxy' in os.environ: - proxyurl = os.environ['http_proxy'] - test = Tier0DasInterface(url=tier0DasUrl,proxy = proxyurl) - - - try: - expressGT = test.expressGlobalTag() - print "Tier0 DAS express GT: ", expressGT - except Exception as error: - print 'Error' - print error - - GlobalTag.globaltag = expressGT - diff --git a/DQM/Integration/python/test/environment_cfi.py b/DQM/Integration/python/test/environment_cfi.py index 0d7b4a61e79ef..79dde0c7437f6 100644 --- a/DQM/Integration/python/test/environment_cfi.py +++ b/DQM/Integration/python/test/environment_cfi.py @@ -12,7 +12,9 @@ filter = cms.untracked.string('') ) -DQMMonitoringService = cms.Service("DQMMonitoringService") +DQMMonitoringService = cms.Service("DQMMonitoringService", + jsonPath = cms.untracked.string("/tmp/dqm_monitoring/"), +) from DQMServices.Components.DQMEnvironment_cfi import * diff --git a/DQM/Integration/python/test/inputsource_cfi.py b/DQM/Integration/python/test/inputsource_cfi.py index 1ece7b3b02c72..ab4522b7a519d 100644 --- a/DQM/Integration/python/test/inputsource_cfi.py +++ b/DQM/Integration/python/test/inputsource_cfi.py @@ -55,7 +55,7 @@ runNumber = cms.untracked.uint32(options.runNumber), runInputDir = cms.untracked.string(options.runInputDir), SelectEvents = cms.untracked.vstring('*'), - streamLabel = cms.untracked.string('streamDQM'), + streamLabel = cms.untracked.string('_streamDQM_mrg-c2f13-35-01'), minEventsPerLumi = cms.untracked.int32(1), delayMillis = cms.untracked.uint32(500), nextLumiTimeoutMillis = cms.untracked.int32(30000), diff --git a/DQM/Integration/python/test/visualization-live_cfg.py b/DQM/Integration/python/test/visualization-live_cfg.py index eb681d77b3e0e..db595169aa362 100644 --- a/DQM/Integration/python/test/visualization-live_cfg.py +++ b/DQM/Integration/python/test/visualization-live_cfg.py @@ -1,4 +1,3 @@ -import FWCore.ParameterSet.Config as cms from Configuration.DataProcessing.GetScenario import getScenario """ @@ -42,7 +41,7 @@ process.source = source -process.load("DQM.Integration.test.FrontierCondition_GT_autoExpress_cfi") +process.load("DQM.Integration.test.FrontierCondition_GT_cfi") process.options = cms.untracked.PSet( Rethrow = cms.untracked.vstring('ProductNotFound'), diff --git a/DQM/Physics/src/CentralityDQM.cc b/DQM/Physics/src/CentralityDQM.cc index d5ab88a915eba..895af58b38bc4 100644 --- a/DQM/Physics/src/CentralityDQM.cc +++ b/DQM/Physics/src/CentralityDQM.cc @@ -15,7 +15,8 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" // Centrality -#include "RecoHI/HiCentralityAlgos/interface/CentralityProvider.h" +#include "DataFormats/HeavyIonEvent/interface/Centrality.h" +#include "DataFormats/HeavyIonEvent/interface/CentralityProvider.h" #include "FWCore/Framework/interface/EDAnalyzer.h" #include "DataFormats/VertexReco/interface/Vertex.h" diff --git a/DQM/Physics/src/CentralityDQM.h b/DQM/Physics/src/CentralityDQM.h index b96f5e8fa9aba..21b96ec027af4 100644 --- a/DQM/Physics/src/CentralityDQM.h +++ b/DQM/Physics/src/CentralityDQM.h @@ -7,7 +7,8 @@ #include "FWCore/Utilities/interface/InputTag.h" #include "DataFormats/Common/interface/Handle.h" -#include "RecoHI/HiCentralityAlgos/interface/CentralityProvider.h" +#include "DataFormats/HeavyIonEvent/interface/Centrality.h" +#include "DataFormats/HeavyIonEvent/interface/CentralityProvider.h" #include "DataFormats/VertexReco/interface/Vertex.h" #include "DQMServices/Core/interface/DQMStore.h" diff --git a/DQM/RPCMonitorClient/interface/RPCChamberQuality.h b/DQM/RPCMonitorClient/interface/RPCChamberQuality.h index f4e8a80be757b..bc94c92bd00bd 100644 --- a/DQM/RPCMonitorClient/interface/RPCChamberQuality.h +++ b/DQM/RPCMonitorClient/interface/RPCChamberQuality.h @@ -1,30 +1,32 @@ #ifndef RPCChamberQuality_H #define RPCChamberQuality_H +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include +#include #include "FWCore/ServiceRegistry/interface/Service.h" #include "DQMServices/Core/interface/MonitorElement.h" #include "DQMServices/Core/interface/DQMStore.h" -#include "DQMServices/Core/interface/DQMEDHarvester.h" #include -class RPCChamberQuality:public DQMEDHarvester{ - public: - +class RPCChamberQuality:public edm::EDAnalyzer { +public: + RPCChamberQuality(const edm::ParameterSet& ps); virtual ~RPCChamberQuality(); - - - protected: - void beginJob(); - void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const&); //performed in the endLumi - void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; //performed in the endJob - private: - void fillMonitorElements( DQMStore::IGetter &); + void beginJob(); + void beginRun(const edm::Run& r, const edm::EventSetup& c); + void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ; + void analyze(const edm::Event& iEvent, const edm::EventSetup& c); + void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c); + void endRun(const edm::Run& r, const edm::EventSetup& c); + + private: - void myBooker(DQMStore::IBooker &); + void fillMonitorElements(); MonitorElement * RpcEvents; enum chamberQualityState { GoodState= 1 , OffState =2, NoisyStripState= 3, NoisyRollState= 4 , PartiallyDeadState=5 , DeadState=6,BadShapeState=7 }; @@ -34,7 +36,7 @@ class RPCChamberQuality:public DQMEDHarvester{ bool enableDQMClients_; bool offlineDQM_; - void performeClientOperation(std::string , int , MonitorElement *, DQMStore::IGetter& ); + void performeClientOperation(std::string , int , MonitorElement *); std::string prefixDir_, summaryDir_; static const std::string xLabels_[7]; @@ -43,7 +45,8 @@ class RPCChamberQuality:public DQMEDHarvester{ int prescaleFactor_; int numberOfDisks_; - bool init_; + bool init_; + DQMStore* dbe_; int minEvents; int numLumBlock_; diff --git a/DQM/RPCMonitorClient/interface/RPCClient.h b/DQM/RPCMonitorClient/interface/RPCClient.h index a6297d4d5bd00..16597078e4d97 100644 --- a/DQM/RPCMonitorClient/interface/RPCClient.h +++ b/DQM/RPCMonitorClient/interface/RPCClient.h @@ -1,24 +1,31 @@ + /*! \file RPCClient.h \author A. Cimmino */ + + #ifndef RPCClient_H #define RPCClient_H + + #include "DQMServices/Core/interface/MonitorElement.h" #include "DQMServices/Core/interface/DQMStore.h" #include + #include -//#include +#include #include "FWCore/ParameterSet/interface/ParameterSet.h" -//#include +#include //#include "FWCore/ServiceRegistry/interface/Service.h" -//#include +#include #include #include + class RPCClient { public: @@ -26,13 +33,30 @@ class RPCClient { //RPCClient(const edm::ParameterSet& ps) {} virtual ~RPCClient(void) {} - virtual void clientOperation()=0; + virtual void beginLuminosityBlock(edm::LuminosityBlock const& , edm::EventSetup const& )=0 ; + + virtual void clientOperation(edm::EventSetup const& c)=0; - virtual void getMonitorElements(std::vector &, std::vector &, std::string &)= 0; + virtual void getMonitorElements(std::vector &, std::vector &)= 0; + + virtual void endLuminosityBlock(edm::LuminosityBlock const& , edm::EventSetup const& )=0; + + virtual void analyze(const edm::Event & , const edm::EventSetup& ) = 0; + + virtual void beginJob(DQMStore * , std::string ) = 0; + + virtual void endJob(void) = 0; + + virtual void beginRun(const edm::Run& , const edm::EventSetup& ) = 0; - virtual void beginJob(std::string &) = 0; + virtual void endRun(const edm::Run& , const edm::EventSetup& ) = 0; + + + // private: + //parameters used to configure quality tests + + - virtual void myBooker(DQMStore::IBooker & ) =0 ; }; #endif diff --git a/DQM/RPCMonitorClient/interface/RPCClusterSizeTest.h b/DQM/RPCMonitorClient/interface/RPCClusterSizeTest.h index cbbde68bf6a2e..25dab1e898446 100644 --- a/DQM/RPCMonitorClient/interface/RPCClusterSizeTest.h +++ b/DQM/RPCMonitorClient/interface/RPCClusterSizeTest.h @@ -4,6 +4,11 @@ #include "DQM/RPCMonitorClient/interface/RPCClient.h" #include "DQMServices/Core/interface/DQMStore.h" +#include +#include +#include +#include + class RPCClusterSizeTest:public RPCClient{ public: @@ -13,11 +18,30 @@ class RPCClusterSizeTest:public RPCClient{ /// Destructor virtual ~RPCClusterSizeTest(); - void clientOperation(); - void getMonitorElements(std::vector &, std::vector &, std::string &); - void beginJob(std::string & ); - void myBooker(DQMStore::IBooker & ); + /// BeginJob + void beginJob(DQMStore *, std::string); + + //Begin Run + void endRun(const edm::Run& r, const edm::EventSetup& c ); + + + /// Begin Lumi block + void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ; + + /// Analyze + void analyze(const edm::Event& iEvent, const edm::EventSetup& c); + + /// End Lumi Block + void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c); + + void endJob(void); + + void beginRun(const edm::Run& r, const edm::EventSetup& c); + + void clientOperation(edm::EventSetup const& c); + + void getMonitorElements(std::vector & , std::vector &); private: @@ -26,6 +50,7 @@ class RPCClusterSizeTest:public RPCClient{ int numberOfRings_; int prescaleFactor_; bool testMode_; + DQMStore* dbe_; bool useRollInfo_; std::vector myClusterMe_; std::vector myDetIds_; diff --git a/DQM/RPCMonitorClient/interface/RPCDCSSummary.h b/DQM/RPCMonitorClient/interface/RPCDCSSummary.h index b8f550e5d2fd2..611560aa29858 100644 --- a/DQM/RPCMonitorClient/interface/RPCDCSSummary.h +++ b/DQM/RPCMonitorClient/interface/RPCDCSSummary.h @@ -1,13 +1,15 @@ #ifndef RPCMonitorClient_RPCDCSSummary_H #define RPCMonitorClient_RPCDCSSummary_H -#include "DQMServices/Core/interface/MonitorElement.h" -#include "DQMServices/Core/interface/DQMStore.h" -#include "DQMServices/Core/interface/DQMEDHarvester.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/EDAnalyzer.h" + #include +class DQMStore; +class MonitorElement; -class RPCDCSSummary : DQMEDHarvester { +class RPCDCSSummary : public edm::EDAnalyzer { public: /// Constructor RPCDCSSummary(const edm::ParameterSet& pset); @@ -18,20 +20,16 @@ class RPCDCSSummary : DQMEDHarvester { // Operations protected: - void beginJob(); - void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const&); //performed in the endLumi - void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; //performed in the endJob - private: - void myBooker(DQMStore::IBooker &); - void checkDCSbit(edm::EventSetup const&); + virtual void beginJob(); + void beginRun(const edm::Run& , const edm::EventSetup& ); + virtual void beginLuminosityBlock(const edm::LuminosityBlock& lumi, const edm::EventSetup& setup); + virtual void analyze(const edm::Event& event, const edm::EventSetup& setup); + virtual void endLuminosityBlock(const edm::LuminosityBlock& lumi, const edm::EventSetup& setup); + virtual void endJob() ; - bool init_; - double defaultValue_; - - bool offlineDQM_; - + DQMStore *theDbe; MonitorElement* DCSMap_; MonitorElement* totalDCSFraction; MonitorElement* dcsWheelFractions[5]; diff --git a/DQM/RPCMonitorClient/interface/RPCDaqInfo.h b/DQM/RPCMonitorClient/interface/RPCDaqInfo.h index fb2d5371336c0..42c6b8176d664 100644 --- a/DQM/RPCMonitorClient/interface/RPCDaqInfo.h +++ b/DQM/RPCMonitorClient/interface/RPCDaqInfo.h @@ -2,31 +2,41 @@ # define DQM_RPCMonitorClient_DQMDaqInfo_H // system include files +#include #include #include +// FWCore +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/LuminosityBlock.h" +#include "FWCore/Framework/interface/EDAnalyzer.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Framework/interface/ESHandle.h" +#include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/ServiceRegistry/interface/Service.h" -#include "DQMServices/Core/interface/MonitorElement.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +//DQM #include "DQMServices/Core/interface/DQMStore.h" -#include "DQMServices/Core/interface/DQMEDHarvester.h" +#include "DQMServices/Core/interface/MonitorElement.h" -class RPCDaqInfo : public DQMEDHarvester{ - +class RPCDaqInfo : public edm::EDAnalyzer { public: explicit RPCDaqInfo(const edm::ParameterSet&); ~RPCDaqInfo(); - -protected: - void beginJob(); - void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const&); //performed in the endLumi - void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; //performed in the endJob + private: - void myBooker(DQMStore::IBooker &); - - bool init_; - + virtual void beginJob() ; + virtual void beginLuminosityBlock(const edm::LuminosityBlock& , const edm::EventSetup&); + virtual void analyze(const edm::Event&, const edm::EventSetup&); + virtual void endLuminosityBlock(const edm::LuminosityBlock& , const edm::EventSetup&); + virtual void endJob() ; + + DQMStore *dbe_; + MonitorElement* DaqFraction_; MonitorElement * DaqMap_; MonitorElement* daqWheelFractions[5]; diff --git a/DQM/RPCMonitorClient/interface/RPCDataCertification.h b/DQM/RPCMonitorClient/interface/RPCDataCertification.h index 841bb4cf8be41..6d60288e74f6d 100644 --- a/DQM/RPCMonitorClient/interface/RPCDataCertification.h +++ b/DQM/RPCMonitorClient/interface/RPCDataCertification.h @@ -1,40 +1,42 @@ #ifndef RPCMonitorClient_RPCDataCertification_H #define RPCMonitorClient_RPCDataCertification_H -#include "FWCore/ServiceRegistry/interface/Service.h" -#include "DQMServices/Core/interface/MonitorElement.h" -#include "DQMServices/Core/interface/DQMStore.h" -#include "DQMServices/Core/interface/DQMEDHarvester.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/EDAnalyzer.h" +#include -class RPCDataCertification : public DQMEDHarvester{ -public: +class DQMStore; +class MonitorElement; +class RPCDataCertification : public edm::EDAnalyzer { +public: /// Constructor RPCDataCertification(const edm::ParameterSet& pset); /// Destructor virtual ~RPCDataCertification(); -protected: - void beginJob(); - void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const&); //performed in the endLumi - void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; //performed in the endJob - + // Operations +protected: + private: - void myBooker(DQMStore::IBooker &); - void checkFED(edm::EventSetup const& ); - - MonitorElement* CertMap_; - MonitorElement* totalCertFraction; + virtual void beginJob(); + virtual void beginRun(const edm::Run& r, const edm::EventSetup& setup); + virtual void beginLuminosityBlock(const edm::LuminosityBlock& lumi, const edm::EventSetup& setup); + virtual void analyze(const edm::Event& event, const edm::EventSetup& setup); + virtual void endLuminosityBlock(const edm::LuminosityBlock& lumi, const edm::EventSetup& setup); + virtual void endJob() ; + + DQMStore *theDbe; + MonitorElement* CertMap_; + MonitorElement* totalCertFraction; MonitorElement* certWheelFractions[5]; MonitorElement* certDiskFractions[10]; std::pair FEDRange_; int numberOfDisks_; int NumberOfFeds_; - bool init_, offlineDQM_ ; - double defaultValue_; }; diff --git a/DQM/RPCMonitorClient/interface/RPCDcsInfoClient.h b/DQM/RPCMonitorClient/interface/RPCDcsInfoClient.h index 1c58d618969e2..502950ce675d0 100644 --- a/DQM/RPCMonitorClient/interface/RPCDcsInfoClient.h +++ b/DQM/RPCMonitorClient/interface/RPCDcsInfoClient.h @@ -1,29 +1,35 @@ #ifndef RPCDCSINFOCLIENT_H #define RPCDCSINFOCLIENT_H -#include "DQMServices/Core/interface/MonitorElement.h" -#include "DQMServices/Core/interface/DQMStore.h" -#include "DQMServices/Core/interface/DQMEDHarvester.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include +#include +#include +#include +#include +#include -class RPCDcsInfoClient : public DQMEDHarvester { +#include +#include +class RPCDcsInfoClient : public edm::EDAnalyzer { public: RPCDcsInfoClient( const edm::ParameterSet& ps); ~RPCDcsInfoClient(); protected: - void beginJob(); - void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const&); //performed in the endLumi - void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; //performed in the endJob - + void beginRun(const edm::Run& r, const edm::EventSetup& c); + void analyze(const edm::Event& e, const edm::EventSetup& c); + void endLuminosityBlock(const edm::LuminosityBlock& l, const edm::EventSetup& c); + void endRun(const edm::Run& r, const edm::EventSetup& c); private: std::string dcsinfofolder_; - std::vector DCS; + DQMStore * dbe_; + + std::vector DCS; }; #endif diff --git a/DQM/RPCMonitorClient/interface/RPCDeadChannelTest.h b/DQM/RPCMonitorClient/interface/RPCDeadChannelTest.h index 112697f15d612..0d31696e811d6 100644 --- a/DQM/RPCMonitorClient/interface/RPCDeadChannelTest.h +++ b/DQM/RPCMonitorClient/interface/RPCDeadChannelTest.h @@ -18,10 +18,34 @@ class RPCDeadChannelTest:public RPCClient{ /// Destructor virtual ~RPCDeadChannelTest(); - void clientOperation(); - void getMonitorElements(std::vector &, std::vector &, std::string &); - void beginJob(std::string & ); - void myBooker(DQMStore::IBooker &); + /// BeginJob + void beginJob(DQMStore *, std::string); + + //Begin Run + void endRun(const edm::Run& , const edm::EventSetup& ); + + + /// Begin Lumi block + void beginLuminosityBlock(edm::LuminosityBlock const& , edm::EventSetup const& ) ; + + /// Analyze + void analyze(const edm::Event& , const edm::EventSetup& ); + + /// End Lumi Block + void endLuminosityBlock(edm::LuminosityBlock const& , edm::EventSetup const& ); + + //End Run + void beginRun(const edm::Run& , const edm::EventSetup& ); + + /// Endjob + void endJob(); + + void clientOperation(edm::EventSetup const& c); + void getMonitorElements(std::vector &, std::vector &); + + protected: + + // void CalculateDeadChannelPercentage(RPCDetId & , MonitorElement * , edm::EventSetup const& ); private: int prescaleFactor_; @@ -29,6 +53,8 @@ class RPCDeadChannelTest:public RPCClient{ std::vector myOccupancyMe_; std::vector myDetIds_; bool useRollInfo_; + DQMStore* dbe_; + int numberOfDisks_; int numberOfRings_; diff --git a/DQM/RPCMonitorClient/interface/RPCDqmClient.h b/DQM/RPCMonitorClient/interface/RPCDqmClient.h index e37002f0c0f69..2ae69cfe6d110 100644 --- a/DQM/RPCMonitorClient/interface/RPCDqmClient.h +++ b/DQM/RPCMonitorClient/interface/RPCDqmClient.h @@ -1,18 +1,19 @@ #ifndef RPCDqmClient_H #define RPCDqmClient_H -#include "DQMServices/Core/interface/MonitorElement.h" -#include "DQMServices/Core/interface/DQMStore.h" -#include "DQMServices/Core/interface/DQMEDHarvester.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" #include "DQM/RPCMonitorClient/interface/RPCClient.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include +#include + +#include "DQMServices/Core/interface/MonitorElement.h" #include #include -class RPCDqmClient:public DQMEDHarvester { +class RPCDqmClient:public edm::EDAnalyzer{ - public: +public: /// Constructor RPCDqmClient(const edm::ParameterSet& ps); @@ -20,18 +21,33 @@ class RPCDqmClient:public DQMEDHarvester { /// Destructor virtual ~ RPCDqmClient(); - protected: + /// BeginJob + void beginJob( ); - void beginJob(); - void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const&); //performed in the endLumi - void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; //performed in the endJob + //Begin Run + void beginRun(const edm::Run& , const edm::EventSetup&); + + /// Begin Lumi block + void beginLuminosityBlock(edm::LuminosityBlock const& , edm::EventSetup const& ) ; - void makeClientMap(const edm::ParameterSet& parameters_); - void getMonitorElements(DQMStore::IGetter &, const edm::EventSetup& ); + /// Analyze + void analyze(const edm::Event& , const edm::EventSetup& ); + /// End Lumi Block + void endLuminosityBlock(edm::LuminosityBlock const& , edm::EventSetup const& ); + + //End Run + void endRun(const edm::Run& , const edm::EventSetup& ); + + /// Endjob + void endJob(); + + protected: + void makeClientMap(void); + void getMonitorElements(const edm::Run&, const edm::EventSetup& ); private: - bool offlineDQM_; + bool offlineDQM_; int prescaleGlobalFactor_, minimumEvents_, numLumBlock_; bool useRollInfo_,enableDQMClients_ , init_; @@ -41,10 +57,16 @@ class RPCDqmClient:public DQMEDHarvester { int lumiCounter_; MonitorElement * RPCEvents_; + // std::string subsystemFolder_, recHitTypeFolder_, summaryFolder_; std::vector clientNames_,clientHisto_; std::vector clientModules_; std::vector clientTag_; - + //std::map clientMap_; + edm::ParameterSet parameters_; + + DQMStore* dbe_; + + }; #endif diff --git a/DQM/RPCMonitorClient/interface/RPCEfficiencyPerRingLayer.h b/DQM/RPCMonitorClient/interface/RPCEfficiencyPerRingLayer.h index 3e9f2a20f547d..1fbae1d9fd5f1 100644 --- a/DQM/RPCMonitorClient/interface/RPCEfficiencyPerRingLayer.h +++ b/DQM/RPCMonitorClient/interface/RPCEfficiencyPerRingLayer.h @@ -1,13 +1,32 @@ #ifndef RPCEfficiencyPerRingLayer_H #define RPCEfficiencyPerRingLayer_H + +/** \class RPCEfficiencyPerRingLayer + * * + * RPCEfficiencyPerRingLayer + * + * \author Cesare Calabria + * + */ + +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include +#include +#include #include "FWCore/ServiceRegistry/interface/Service.h" #include "DQMServices/Core/interface/MonitorElement.h" -#include "DQMServices/Core/interface/DQMStore.h" -#include "DQMServices/Core/interface/DQMEDHarvester.h" + + +#include #include -class RPCEfficiencyPerRingLayer:public DQMEDHarvester{ +#include "DQMServices/Core/interface/DQMStore.h" +//class DQMStore; +//class RPCDetId; + + +class RPCEfficiencyPerRingLayer:public edm::EDAnalyzer { public: /// Constructor @@ -16,21 +35,31 @@ class RPCEfficiencyPerRingLayer:public DQMEDHarvester{ /// Destructor virtual ~RPCEfficiencyPerRingLayer(); - - protected: + /// BeginJob void beginJob(); - void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const&); //performed in the endLumi - void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; //performed in the endJob - + //Begin Run + void beginRun(const edm::Run& r, const edm::EventSetup& c); - private: + //End Run + void endRun(const edm::Run& r, const edm::EventSetup& c); + + /// Analyze + void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup); MonitorElement * EfficiencyPerRing; - MonitorElement * EfficiencyPerLayer; + MonitorElement * EfficiencyPerLayer; + + private: + int numberOfDisks_; int innermostRings_ ; + bool SaveFile; + + std::string NameFile; + + DQMStore* dbe_; std::string globalFolder_; diff --git a/DQM/RPCMonitorClient/interface/RPCEfficiencySecond.h b/DQM/RPCMonitorClient/interface/RPCEfficiencySecond.h index bc914e2a3f39e..834a4b12508b7 100644 --- a/DQM/RPCMonitorClient/interface/RPCEfficiencySecond.h +++ b/DQM/RPCMonitorClient/interface/RPCEfficiencySecond.h @@ -2,33 +2,30 @@ * \Original author Camilo Carrillo (Uniandes) */ -#include - +#include +#include +#include +#include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/ServiceRegistry/interface/Service.h" -#include "DQMServices/Core/interface/MonitorElement.h" + #include "DQMServices/Core/interface/DQMStore.h" -#include "DQMServices/Core/interface/DQMEDHarvester.h" -#include -#include -#include "FWCore/Framework/interface/ESHandle.h" +#include "DQMServices/Core/interface/MonitorElement.h" + +#include #include #include #include -class RPCEfficiencySecond :public DQMEDHarvester{ +class RPCDetId; + + +class RPCEfficiencySecond : public edm::EDAnalyzer { public: explicit RPCEfficiencySecond(const edm::ParameterSet&); ~RPCEfficiencySecond(); int rollY(std::string shortname,const std::vector& rollNames); - protected: - void beginJob(); - void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const&); //performed in the endLumi - void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; //performed in the endJob - - private: - void myBooker(DQMStore::IBooker &); //Histograms to use MonitorElement * histoRPC; MonitorElement * histoDT; @@ -62,7 +59,8 @@ class RPCEfficiencySecond :public DQMEDHarvester{ //Summary Histograms. MonitorElement * WheelSummary[5]; MonitorElement * DiskSummary[10]; - + + //Azimultal Plots MonitorElement * sectorEffW[5]; MonitorElement * OcsectorEffW[5]; @@ -80,17 +78,25 @@ class RPCEfficiencySecond :public DQMEDHarvester{ MonitorElement * ExpLayerW[5]; MonitorElement * ObsLayerW[5]; - edm::ESHandle rpcGeo_; - - - std::map bookDetUnitSeg(DQMStore::IBooker & ,RPCDetId & ,int nstrips,std::string ); - std::map > meCollection; + + - bool init_; + private: + virtual void beginRun(const edm::Run&, const edm::EventSetup& iSetup) ; + virtual void analyze(const edm::Event&, const edm::EventSetup&); + virtual void endJob() ; + virtual void endRun(const edm::Run& , const edm::EventSetup& ); + + std::map bookDetUnitSeg(RPCDetId & detId,int nstrips,std::string folder); + std::map > meCollection; + bool debug; + bool SaveFile; + std::string NameFile; std::string folderPath; - int numberOfDisks_; + int numberOfDisks_; int innermostRings_ ; - + DQMStore * dbe; + }; diff --git a/DQM/RPCMonitorClient/interface/RPCEfficiencyShiftHisto.h b/DQM/RPCMonitorClient/interface/RPCEfficiencyShiftHisto.h index c92abece3c157..c75ad1a4a981e 100644 --- a/DQM/RPCMonitorClient/interface/RPCEfficiencyShiftHisto.h +++ b/DQM/RPCMonitorClient/interface/RPCEfficiencyShiftHisto.h @@ -1,14 +1,24 @@ #ifndef RPCEfficiencyShiftHisto_H #define RPCEfficiencyShiftHisto_H -// * * -// * RPCEfficiencyShiftHisto -// * * +/** \class RPCEfficiencyShiftHisto + * * + * RPCEfficiencyShiftHisto + * + * \author Cesare Calabria + * + */ + +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include +#include +#include #include "FWCore/ServiceRegistry/interface/Service.h" #include "DQMServices/Core/interface/MonitorElement.h" -#include "DQMServices/Core/interface/DQMStore.h" -#include "DQMServices/Core/interface/DQMEDHarvester.h" + + +#include #include @@ -16,7 +26,7 @@ class DQMStore; class RPCDetId; -class RPCEfficiencyShiftHisto:public DQMEDHarvester{ +class RPCEfficiencyShiftHisto:public edm::EDAnalyzer { public: /// Constructor @@ -25,23 +35,33 @@ class RPCEfficiencyShiftHisto:public DQMEDHarvester{ /// Destructor virtual ~RPCEfficiencyShiftHisto(); - protected: + /// BeginJob void beginJob(); - void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const&); //performed in the endLumi - void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; //performed in the endJob + //Begin Run + void beginRun(const edm::Run& r, const edm::EventSetup& c); - private: + //End Run + void endRun(const edm::Run& r, const edm::EventSetup& c); + /// Analyze + void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup); MonitorElement * EffBarrelRoll; MonitorElement * EffEndcapPlusRoll; MonitorElement * EffEndcapMinusRoll; MonitorElement * RollPercentage; + private: + + bool SaveFile; + + std::string NameFile; int numberOfDisks_; int effCut_; + DQMStore* dbe_; + std::string globalFolder_; }; diff --git a/DQM/RPCMonitorClient/interface/RPCEventSummary.h b/DQM/RPCMonitorClient/interface/RPCEventSummary.h index 7413e50555c76..adafc0e23d064 100644 --- a/DQM/RPCMonitorClient/interface/RPCEventSummary.h +++ b/DQM/RPCMonitorClient/interface/RPCEventSummary.h @@ -1,17 +1,17 @@ #ifndef RPCEventSummary_H #define RPCEventSummary_H - +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include +#include +#include #include "FWCore/ServiceRegistry/interface/Service.h" #include "DQMServices/Core/interface/MonitorElement.h" #include "DQMServices/Core/interface/DQMStore.h" -#include "DQMServices/Core/interface/DQMEDHarvester.h" - #include -class RPCEventSummary:public DQMEDHarvester{ - +class RPCEventSummary:public edm::EDAnalyzer { public: /// Constructor @@ -20,23 +20,36 @@ class RPCEventSummary:public DQMEDHarvester{ /// Destructor virtual ~RPCEventSummary(); - - protected: + /// BeginJob void beginJob(); - void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const&); //performed in the endLumi - void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; //performed in the endJob + //Begin Run + void beginRun(const edm::Run& r, const edm::EventSetup& c); + + //End Run + void endRun(const edm::Run& r, const edm::EventSetup& c); + + /// Begin Lumi block + void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ; + + /// Analyze + void analyze(const edm::Event& iEvent, const edm::EventSetup& c); + + /// End Lumi Block + void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c); + private: - void clientOperation( DQMStore::IGetter & igetter); + void clientOperation(); std::string eventInfoPath_, prefixDir_; // bool tier0_; bool enableReportSummary_; int prescaleFactor_, minimumEvents_; - + MonitorElement * RPCEvents ; bool init_; - bool offlineDQM_; + DQMStore* dbe_; + bool offlineDQM_; int lumiCounter_; std::string globalFolder_, prefixFolder_; diff --git a/DQM/RPCMonitorClient/interface/RPCMon_SS_Dbx_Global.h b/DQM/RPCMonitorClient/interface/RPCMon_SS_Dbx_Global.h new file mode 100644 index 0000000000000..21b3a72616be3 --- /dev/null +++ b/DQM/RPCMonitorClient/interface/RPCMon_SS_Dbx_Global.h @@ -0,0 +1,38 @@ +#ifndef RPCMon_SS_Dbx_Global_H +#define RPCMon_SS_Dbx_Global_H + +#include + +#include +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include +#include +#include +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Utilities/interface/InputTag.h" + +#include "DataFormats/RPCDigi/interface/RPCDigiCollection.h" + +#include "DQMServices/Core/interface/DQMStore.h" + +class RPCMon_SS_Dbx_Global : public edm::EDAnalyzer { + + public: + explicit RPCMon_SS_Dbx_Global(const edm::ParameterSet&); + ~RPCMon_SS_Dbx_Global(); + + private: + virtual void beginJob(); + virtual void beginRun(const edm::Run& , const edm::EventSetup& ); + virtual void analyze(const edm::Event&, const edm::EventSetup&); + virtual void endJob(); + + std::string globalFolder_, digiLabel_; + bool saveRootFile_; + std::string rootFileName_; + DQMStore* dbe_; + int numberOfRings_; + edm::EDGetTokenT rpcDigiCollectionTag_; +}; + +#endif diff --git a/DQM/RPCMonitorClient/interface/RPCMultiplicityTest.h b/DQM/RPCMonitorClient/interface/RPCMultiplicityTest.h index 207112ef5ed0a..06950d545ac76 100644 --- a/DQM/RPCMonitorClient/interface/RPCMultiplicityTest.h +++ b/DQM/RPCMonitorClient/interface/RPCMultiplicityTest.h @@ -4,6 +4,10 @@ #include "DQM/RPCMonitorClient/interface/RPCClient.h" #include "DQMServices/Core/interface/DQMStore.h" +#include +#include +#include + class RPCMultiplicityTest:public RPCClient{ public: @@ -15,10 +19,30 @@ class RPCMultiplicityTest:public RPCClient{ /// Destructor virtual ~RPCMultiplicityTest(); - void clientOperation(); - void getMonitorElements(std::vector &, std::vector &, std::string &); - void beginJob(std::string & ); - void myBooker(DQMStore::IBooker & ); + /// BeginJob + void beginJob(DQMStore * , std::string); + + //Begin Run + void endRun(const edm::Run& , const edm::EventSetup& ); + + + /// Begin Lumi block + void beginLuminosityBlock(edm::LuminosityBlock const& , edm::EventSetup const& ) ; + + /// Analyze + void analyze(const edm::Event& , const edm::EventSetup& ); + + /// End Lumi Block + void endLuminosityBlock(edm::LuminosityBlock const& , edm::EventSetup const& ); + + //End Run + void beginRun(const edm::Run& , const edm::EventSetup& ); + + /// Endjob + void endJob(); + + void clientOperation(edm::EventSetup const& c); + void getMonitorElements(std::vector& , std::vector&); protected: void fillGlobalME(RPCDetId & detId, MonitorElement * myMe); @@ -37,6 +61,8 @@ class RPCMultiplicityTest:public RPCClient{ MonitorElement * MULTDisk[10]; MonitorElement * MULTDDisk[10]; + DQMStore* dbe_; + // std:: map > > barrelMap_, endcapMap_; }; #endif diff --git a/DQM/RPCMonitorClient/interface/RPCNoisyStripTest.h b/DQM/RPCMonitorClient/interface/RPCNoisyStripTest.h index 9d098de21e674..297a7f22339da 100644 --- a/DQM/RPCMonitorClient/interface/RPCNoisyStripTest.h +++ b/DQM/RPCMonitorClient/interface/RPCNoisyStripTest.h @@ -13,15 +13,18 @@ class RPCNoisyStripTest:public RPCClient{ RPCNoisyStripTest(const edm::ParameterSet& ps); virtual ~RPCNoisyStripTest(); - void clientOperation(); - void getMonitorElements(std::vector &, std::vector &, std::string &); - void beginJob(std::string & ); - void myBooker(DQMStore::IBooker & ); - - + void beginJob(DQMStore *, std::string); + void endRun(const edm::Run& , const edm::EventSetup& ); + void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ; + void analyze(const edm::Event& iEvent, const edm::EventSetup& c); + void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c); + void beginRun(const edm::Run& , const edm::EventSetup& ); + void endJob(); + void clientOperation(edm::EventSetup const& c); + void getMonitorElements(std::vector & , std::vector &); protected: - void fillGlobalME(RPCDetId & , MonitorElement * ); + void fillGlobalME(RPCDetId & , MonitorElement * ,edm::EventSetup const& ); private: @@ -30,6 +33,7 @@ class RPCNoisyStripTest:public RPCClient{ int numberOfRings_; int prescaleFactor_; bool testMode_; + DQMStore* dbe_; std::vector myOccupancyMe_; std::vector myDetIds_; diff --git a/DQM/RPCMonitorClient/interface/RPCOccupancyTest.h b/DQM/RPCMonitorClient/interface/RPCOccupancyTest.h index 2b4a655ba9c5b..8899fd0be341d 100644 --- a/DQM/RPCMonitorClient/interface/RPCOccupancyTest.h +++ b/DQM/RPCMonitorClient/interface/RPCOccupancyTest.h @@ -18,12 +18,15 @@ class RPCOccupancyTest:public RPCClient { RPCOccupancyTest(const edm::ParameterSet& ps); virtual ~RPCOccupancyTest(); - void clientOperation(); - void getMonitorElements(std::vector &, std::vector &, std::string &); - void beginJob(std::string & ); - void myBooker(DQMStore::IBooker & ); - - + void beginJob(DQMStore *, std::string); + void endRun(const edm::Run& , const edm::EventSetup& ); + void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ; + void analyze(const edm::Event& iEvent, const edm::EventSetup& c); + void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c); + void beginRun(const edm::Run& , const edm::EventSetup& ); + void endJob(); + void clientOperation(edm::EventSetup const& c); + void getMonitorElements(std::vector & , std::vector& ); protected: // void OccupancyDist(); void fillGlobalME(RPCDetId & , MonitorElement *); @@ -37,6 +40,7 @@ class RPCOccupancyTest:public RPCClient { std::vector myDetIds_; int prescaleFactor_; + DQMStore* dbe_; int numberOfDisks_, numberOfRings_; float rpcevents_; diff --git a/DQM/RPCMonitorClient/interface/RPCQualityTests.h b/DQM/RPCMonitorClient/interface/RPCQualityTests.h new file mode 100644 index 0000000000000..46ef41357cb70 --- /dev/null +++ b/DQM/RPCMonitorClient/interface/RPCQualityTests.h @@ -0,0 +1,69 @@ +// system include files +#include +#include +#include + +// Framework +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/EDAnalyzer.h" +#include "FWCore/Framework/interface/LuminosityBlock.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "DQM/RPCMonitorClient/interface/RPCClient.h" +#include "DQMServices/Core/interface/DQMStore.h" + + +// +// class decleration +// + +class RPCQualityTests : public edm::EDAnalyzer { + public: + explicit RPCQualityTests(const edm::ParameterSet&); + ~RPCQualityTests(); + + + private: + virtual void beginJob() ; + virtual void analyze(const edm::Event&, const edm::EventSetup&); + virtual void endJob(); + virtual void beginRun(const edm::Run& r, const edm::EventSetup& c); + virtual void endRun(const edm::Run& r, const edm::EventSetup& c); + + void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ; + void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c); + + std::map makeQTestMap(); + + + int nevents_; + + DQMStore * dbe_ ; + + std::string hostName_; + int hostPort_; + std::string clientName_; + + + bool getQualityTestsFromFile_; + + + edm::ParameterSet parameters_; + bool enableMonitorDaemon_; + bool enableQTests_; + bool enableInputFile_; + + std::vector qtests_; + std::vector qtestList_; + std::string inputFile_; + std::string eventInfoPath_; + int eSummary_; + int prescaleFactor_; + + // std::vector enabledQTests_; + // std::map qTest_; + + // ----------member data --------------------------- +}; diff --git a/DQM/RPCMonitorClient/interface/RPCRecHitProbabilityClient.h b/DQM/RPCMonitorClient/interface/RPCRecHitProbabilityClient.h index c29b87e214a46..e07de96d6c075 100644 --- a/DQM/RPCMonitorClient/interface/RPCRecHitProbabilityClient.h +++ b/DQM/RPCMonitorClient/interface/RPCRecHitProbabilityClient.h @@ -3,33 +3,46 @@ #include "DQMServices/Core/interface/DQMStore.h" #include "FWCore/Framework/interface/Frameworkfwd.h" -#include "DQMServices/Core/interface/DQMEDHarvester.h" +#include #include -class RPCRecHitProbabilityClient:public DQMEDHarvester{ +class RPCRecHitProbabilityClient:public edm::EDAnalyzer{ public: /// Constructor - RPCRecHitProbabilityClient(const edm::ParameterSet& ps); + RPCRecHitProbabilityClient(const edm::ParameterSet& ps); /// Destructor virtual ~ RPCRecHitProbabilityClient(); - - -protected: - void beginJob(); - void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const&); //performed in the endLumi - void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; //performed in the endJob - + /// BeginJob + void beginJob( ); + + //Begin Run + void beginRun(const edm::Run& , const edm::EventSetup&); + + /// Begin Lumi block + void beginLuminosityBlock(edm::LuminosityBlock const& , edm::EventSetup const& ) ; + /// Analyze + void analyze(const edm::Event& , const edm::EventSetup& ); + + /// End Lumi Block + void endLuminosityBlock(edm::LuminosityBlock const& , edm::EventSetup const& ); + + //End Run + void endRun(const edm::Run& , const edm::EventSetup& ); + + /// Endjob + void endJob(); private: std::string globalFolder_; + DQMStore* dbe_; }; diff --git a/DQM/RPCMonitorClient/interface/ReadMeFromFile.h b/DQM/RPCMonitorClient/interface/ReadMeFromFile.h new file mode 100644 index 0000000000000..47d635283d083 --- /dev/null +++ b/DQM/RPCMonitorClient/interface/ReadMeFromFile.h @@ -0,0 +1,59 @@ +#ifndef ReadMeFromFile_H +#define ReadMeFromFile_H + +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include +#include +#include +#include +#include +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include +#include "FWCore/ServiceRegistry/interface/Service.h" + +#include "DQMServices/Core/interface/DQMStore.h" + +#include +#include + + +class ReadMeFromFile:public edm::EDAnalyzer{ + +public: + + /// Constructor + ReadMeFromFile(const edm::ParameterSet& ps); + + /// Destructor + virtual ~ReadMeFromFile(); + + /// BeginJob + void beginJob( ); + + //Begin Run + void beginRun(const edm::Run& , const edm::EventSetup& ); + + + /// Begin Lumi block + void beginLuminosityBlock(edm::LuminosityBlock const& , edm::EventSetup const& ) ; + + /// Analyze + void analyze(const edm::Event& , const edm::EventSetup& ); + + /// End Lumi Block + void endLuminosityBlock(edm::LuminosityBlock const& , edm::EventSetup const& ); + + //End Run + void endRun(const edm::Run& , const edm::EventSetup& ); + + /// Endjob + void endJob(); + +private: + + std::string myFile_; + + DQMStore* dbe_; +}; + +#endif diff --git a/DQM/RPCMonitorClient/interface/SaveDQMFile.h b/DQM/RPCMonitorClient/interface/SaveDQMFile.h new file mode 100644 index 0000000000000..0c398309341df --- /dev/null +++ b/DQM/RPCMonitorClient/interface/SaveDQMFile.h @@ -0,0 +1,59 @@ +#ifndef SaveDQMFile_H +#define SaveDQMFile_H + +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include +#include +#include +#include +#include +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include +#include "FWCore/ServiceRegistry/interface/Service.h" + +#include "DQMServices/Core/interface/DQMStore.h" + +#include +#include + + +class SaveDQMFile:public edm::EDAnalyzer{ + +public: + + /// Constructor + SaveDQMFile(const edm::ParameterSet& ps); + + /// Destructor + virtual ~SaveDQMFile(); + + /// BeginJob + void beginJob( ); + + //Begin Run + void beginRun(const edm::Run& , const edm::EventSetup& ); + + + /// Begin Lumi block + void beginLuminosityBlock(edm::LuminosityBlock const& , edm::EventSetup const& ) ; + + /// Analyze + void analyze(const edm::Event& , const edm::EventSetup& ); + + /// End Lumi Block + void endLuminosityBlock(edm::LuminosityBlock const& , edm::EventSetup const& ); + + //End Run + void endRun(const edm::Run& , const edm::EventSetup& ); + + /// Endjob + void endJob(); + +private: + + std::string myFile_; + + DQMStore* dbe_; +}; + +#endif diff --git a/DQM/RPCMonitorClient/interface/clientTools.h b/DQM/RPCMonitorClient/interface/clientTools.h new file mode 100644 index 0000000000000..6eb6bc049869b --- /dev/null +++ b/DQM/RPCMonitorClient/interface/clientTools.h @@ -0,0 +1,85 @@ +#ifndef rpcdqmclient_clientTools_H +#define rpcdqmclient_clientTools_H + +#include "DQM/RPCMonitorDigi/interface/RPCBookFolderStructure.h" + +#include "DataFormats/MuonDetId/interface/RPCDetId.h" + +#include "DQMServices/Core/interface/DQMStore.h" +#include "DQMServices/Core/interface/MonitorElement.h" + +#include "Geometry/RPCGeometry/interface/RPCGeomServ.h" +#include "Geometry/RPCGeometry/interface/RPCGeometry.h" +#include "Geometry/Records/interface/MuonGeometryRecord.h" + +#include +#include + + +namespace rpcdqmclient{ + class clientTools{ + public: + + std::vector constructMEVector(const edm::EventSetup& iSetup, const std::string & prefixDir, const std::string & MEName, DQMStore* dbe ){ + cout<<"Starting ConstructMEVector"<getMEs(iSetup, prefixDir, MEName, dbe); + + return myMeVect_; + } + + std::vector getAssociatedRPCdetId(){ + std::vector myVector; + myVector.clear(); + + if (myMeVect_.size() !=0 && myMeVect_.size()==myDetIds_.size() ) myVector= myDetIds_; + + return myVector; + } + + + protected: + + void getMEs(const edm::EventSetup& iSetup, const std::string & prefixDir, const std::string & MEName , DQMStore* dbe){ + + + + edm::ESHandle rpcGeo; + iSetup.get().get(rpcGeo); + + //loop on all geometry and get all histos + for (TrackingGeometry::DetContainer::const_iterator it=rpcGeo->dets().begin();itdets().end();it++){ + if( dynamic_cast< RPCChamber* >( *it ) != 0 ){ + + RPCChamber* ch = dynamic_cast< RPCChamber* >( *it ); + std::vector< const RPCRoll*> roles = (ch->rolls()); + //Loop on rolls in given chamber + for(std::vector::const_iterator r = roles.begin();r != roles.end(); ++r){ + RPCDetId detId = (*r)->id(); + + //Get Occupancy ME for roll + RPCGeomServ RPCname(detId); + RPCBookFolderStructure * folderStr = new RPCBookFolderStructure(); + MonitorElement * myMe = dbe->get(prefixDir+"/"+ folderStr->folderStructure(detId)+"/"+MEName+ "_"+RPCname.name()); + if (!myMe)continue; + + myMeVect_.push_back(myMe); + myDetIds_.push_back(detId); + myRollNames_.push_back(RPCname.name()); + + } + } + }//end loop on all geometry and get all histos + } + + + + private: + std::vector myMeVect_; + std::vector myDetIds_; + std::vector myRollNames_; + + + }; +} + +#endif diff --git a/DQM/RPCMonitorClient/python/RPCEfficiencyPerRingLayer_cfi.py b/DQM/RPCMonitorClient/python/RPCEfficiencyPerRingLayer_cfi.py index f8c524657c008..2dec433c0f56d 100644 --- a/DQM/RPCMonitorClient/python/RPCEfficiencyPerRingLayer_cfi.py +++ b/DQM/RPCMonitorClient/python/RPCEfficiencyPerRingLayer_cfi.py @@ -2,6 +2,8 @@ rpcEfficiencyPerRingLayer = cms.EDAnalyzer("RPCEfficiencyPerRingLayer", GlobalFolder = cms.untracked.string('RPC/RPCEfficiency/'), + SaveFile = cms.untracked.bool(False), + NameFile = cms.untracked.string('RPCEfficiency.root'), NumberOfEndcapDisks = cms.untracked.int32(4), NumberOfInnermostEndcapRings = cms.untracked.int32(2) ) diff --git a/DQM/RPCMonitorClient/python/RPCEfficiencyShiftHisto_cfi.py b/DQM/RPCMonitorClient/python/RPCEfficiencyShiftHisto_cfi.py index 7c7b351bcb2c1..18102bb7cc6e5 100644 --- a/DQM/RPCMonitorClient/python/RPCEfficiencyShiftHisto_cfi.py +++ b/DQM/RPCMonitorClient/python/RPCEfficiencyShiftHisto_cfi.py @@ -3,5 +3,7 @@ rpcEfficiencyShiftHisto = cms.EDAnalyzer("RPCEfficiencyShiftHisto", EffCut = cms.untracked.int32(90), GlobalFolder = cms.untracked.string('RPC/RPCEfficiency/'), + SaveFile = cms.untracked.bool(False), + NameFile = cms.untracked.string('/afs/cern.ch/user/c/calabria/scratch0/RPCEfficiency.root'), NumberOfEndcapDisks = cms.untracked.int32(4) ) diff --git a/DQM/RPCMonitorClient/python/RPCMon_SS_Dbx_Global_cfi.py b/DQM/RPCMonitorClient/python/RPCMon_SS_Dbx_Global_cfi.py new file mode 100644 index 0000000000000..413cb1cc8e020 --- /dev/null +++ b/DQM/RPCMonitorClient/python/RPCMon_SS_Dbx_Global_cfi.py @@ -0,0 +1,8 @@ +import FWCore.ParameterSet.Config as cms + +rpcAfterPulse = cms.EDAnalyzer("RPCMon_SS_Dbx_Global", + GlobalHistogramsFolder = cms.untracked.string('RPC/RecHits/SummaryHistograms'), + RootFileName = cms.untracked.string('out.root'), + SaveRootFile = cms.untracked.bool(False), + rpcDigiCollectionTag = cms.InputTag('rpcunpacker') +) diff --git a/DQM/RPCMonitorClient/src/RPCChamberQuality.cc b/DQM/RPCMonitorClient/src/RPCChamberQuality.cc index 4f295f60c151f..343c2705d670e 100644 --- a/DQM/RPCMonitorClient/src/RPCChamberQuality.cc +++ b/DQM/RPCMonitorClient/src/RPCChamberQuality.cc @@ -11,7 +11,7 @@ const std::string RPCChamberQuality::xLabels_[7] = {"Good", "OFF", "Nois.St","No const std::string RPCChamberQuality::regions_[3] = {"EndcapNegative","Barrel","EndcapPositive"}; RPCChamberQuality::RPCChamberQuality(const edm::ParameterSet& ps ){ - edm::LogVerbatim ("rpcchamberquality") << "[RPCChamberQuality]: Constructor"; + edm::LogVerbatim ("rpceventsummary") << "[RPCChamberQuality]: Constructor"; prescaleFactor_ = ps.getUntrackedParameter("PrescaleFactor", 5); @@ -28,128 +28,121 @@ RPCChamberQuality::RPCChamberQuality(const edm::ParameterSet& ps ){ numberOfDisks_ = ps.getUntrackedParameter("NumberOfEndcapDisks", 4); useRollInfo_ = ps.getUntrackedParameter ("UseRollInfo",false); offlineDQM_ = ps.getUntrackedParameter ("OfflineDQM",true); - - init_ = false; - lumiCounter_ = 0; } RPCChamberQuality::~RPCChamberQuality(){ - edm::LogVerbatim ("rpcchamberquality") << "[RPCChamberQuality]: Destructor "; + edm::LogVerbatim ("rpceventsummary") << "[RPCChamberQuality]: Destructor "; + if(! enableDQMClients_ ) return; + dbe_=0; } void RPCChamberQuality::beginJob(){ - edm::LogVerbatim ("rpcchamberquality") << "[RPCChamberQuality]: Begin job "; -} - - - -void RPCChamberQuality::dqmEndLuminosityBlock(DQMStore::IBooker & ibooker, DQMStore::IGetter & igetter, edm::LuminosityBlock const & iLumi, edm::EventSetup const& iSetup){ - - edm::LogVerbatim ("rpcchamberquality") <<"[RPCChamberQuality]: End Lumi Block"; - - if( enableDQMClients_ && !offlineDQM_ ) { - - edm::LogVerbatim ("rpcchamberquality") <<"[RPCChamberQuality]: Performing DQM client operation"; - - if (lumiCounter_==0){ //book histograms during at firt LB end - this->myBooker(ibooker); - lumiCounter_ = prescaleFactor_; - } - - if (lumiCounter_%prescaleFactor_ == 0){//Fill histograms every N=prescaleFactor_ LBs - this->fillMonitorElements(igetter); - } - } - lumiCounter_++; + edm::LogVerbatim ("rpceventsummary") << "[RPCChamberQuality]: Begin job "; + if(! enableDQMClients_ ) return; + dbe_ = edm::Service().operator->(); } - - -void RPCChamberQuality::dqmEndJob(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter){ - - edm::LogVerbatim ("rpcchamberquality") <<"[RPCChamberQuality]: End Job"; +void RPCChamberQuality::beginRun(const edm::Run& r, const edm::EventSetup& c){ + edm::LogVerbatim ("rpceventsummary") << "[RPCChamberQuality]: Begin run"; + if(! enableDQMClients_ ) return; - if( enableDQMClients_ ) { - edm::LogVerbatim ("rpcchamberquality") <<"[RPCChamberQuality]: Performing DQM client operation"; - if( offlineDQM_ && !init_ ) {this->myBooker(ibooker);} - if(init_){this->fillMonitorElements(igetter);} - } -} - - - -void RPCChamberQuality::myBooker(DQMStore::IBooker & ibooker ){ - - init_ = true; - - ibooker.setCurrentFolder(summaryDir_); + init_ = false; + lumiCounter_ = prescaleFactor_ ; MonitorElement* me; + dbe_->setCurrentFolder(summaryDir_); + std::stringstream histoName; rpcdqm::utils rpcUtils; for (int r = 0 ; r < 3; r++){ - histoName.str(""); - histoName<<"RPCChamberQuality_"<setBinLabel(x, xLabels_[x-1]);} + histoName.str(""); + histoName<<"RPCChamberQuality_"<get(summaryDir_+"/"+ histoName.str()); + if (0!=me) dbe_->removeElement(me->getName()); + me = dbe_->book1D(histoName.str().c_str(), histoName.str().c_str(), 7, 0.5, 7.5); + + for (int x = 1; x <8 ; x++) me->setBinLabel(x, xLabels_[x-1]); } histoName.str(""); histoName<<"RPC_System_Quality_Overview"; - me = ibooker.book2D(histoName.str().c_str(), histoName.str().c_str(), 7, 0.5, 7.5, 3, 0.5, 3.5); + me = dbe_->get(summaryDir_+"/"+ histoName.str()); + if (0!=me) dbe_->removeElement(me->getName()); + me = dbe_->book2D(histoName.str().c_str(), histoName.str().c_str(), 7, 0.5, 7.5, 3, 0.5, 3.5); me->setBinLabel(1, "E+", 2); me->setBinLabel(2, "B", 2); me->setBinLabel(3, "E-", 2); - for (int x = 1; x <8 ; x++) {me->setBinLabel(x, xLabels_[x-1]);} - + for (int x = 1; x <8 ; x++) me->setBinLabel(x, xLabels_[x-1]); + for(int w=-2; w<3;w++){//Loop on wheels histoName.str(""); histoName<<"RPCChamberQuality_Roll_vs_Sector_Wheel"<get(summaryDir_+"/"+ histoName.str()); + if (0!=me) dbe_->removeElement(me->getName()); + me = dbe_->book2D(histoName.str().c_str(), histoName.str().c_str(), 12, 0.5, 12.5, 21, 0.5, 21.5); rpcUtils.labelXAxisSector( me); rpcUtils.labelYAxisRoll(me, 0, w, useRollInfo_ ); histoName.str(""); histoName<<"RPCChamberQuality_Distribution_Wheel"<get(summaryDir_+"/"+ histoName.str()); + if (0!=me ) dbe_->removeElement(me->getName()); + me = dbe_->book1D(histoName.str().c_str(), histoName.str().c_str(), 7, 0.5, 7.5); - for (int x = 1; x <8; x++) {me->setBinLabel(x, xLabels_[x-1]);} + for (int x = 1; x <8; x++) me->setBinLabel(x, xLabels_[x-1]); }//end loop on wheels for(int d= -numberOfDisks_; d<= numberOfDisks_ ; d++) { // Loop on disk if(d==0) continue; histoName.str(""); histoName<<"RPCChamberQuality_Ring_vs_Segment_Disk"<get(summaryDir_+"/"+ histoName.str()); + if (0!=me) { + dbe_->removeElement(me->getName()); + } + me = dbe_->book2D(histoName.str().c_str(), histoName.str().c_str(), 36, 0.5, 36.5, 6, 0.5, 6.5); rpcUtils.labelXAxisSegment(me); rpcUtils.labelYAxisRing(me, 2, useRollInfo_ ); - + histoName.str(""); histoName<<"RPCChamberQuality_Distribution_Disk"<get(summaryDir_+"/"+ histoName.str()); + if (0!=me ) dbe_->removeElement(me->getName()); + me = dbe_->book1D(histoName.str().c_str(), histoName.str().c_str(), 7, 0.5, 7.5); - for (int x = 1; x <8 ; x++) {me->setBinLabel(x, xLabels_[x-1]);} + for (int x = 1; x <8 ; x++) me->setBinLabel(x, xLabels_[x-1]); } } +void RPCChamberQuality::beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context){} + +void RPCChamberQuality::analyze(const edm::Event& iEvent, const edm::EventSetup& c) {} + +void RPCChamberQuality::endRun(const edm::Run& r, const edm::EventSetup& c) { + edm::LogVerbatim ("rpceventsummary") <<"[RPCChamberQuality]: End Job, performing DQM client operation"; + if(! enableDQMClients_ ) return; + this->fillMonitorElements(); +} -void RPCChamberQuality::fillMonitorElements(DQMStore::IGetter& igetter) { +void RPCChamberQuality::fillMonitorElements() { std::stringstream meName; meName.str(""); meName<get(meName.str()); if(RpcEvents) rpcEvents= (int)RpcEvents->getBinContent(1); @@ -162,7 +155,7 @@ void RPCChamberQuality::fillMonitorElements(DQMStore::IGetter& igetter) { for(int r = 0 ; r < 3 ; r++) { meName.str(""); meName< get(meName.str()); if( summary[r] != 0 ) summary[r]->Reset(); } @@ -172,7 +165,7 @@ void RPCChamberQuality::fillMonitorElements(DQMStore::IGetter& igetter) { meName.str(""); meName<<"Roll_vs_Sector_Wheel"<performeClientOperation(meName.str(), 0 , summary[1],igetter); + this->performeClientOperation(meName.str(), 0 , summary[1]); } // loop by Wheels @@ -183,14 +176,14 @@ void RPCChamberQuality::fillMonitorElements(DQMStore::IGetter& igetter) { meName.str(""); meName<<"Ring_vs_Segment_Disk"<performeClientOperation(meName.str(), -1 , summary[0],igetter); - else this->performeClientOperation(meName.str(), 1 , summary[2],igetter); + if(i<0) this->performeClientOperation(meName.str(), -1 , summary[0]); + else this->performeClientOperation(meName.str(), 1 , summary[2]); }//loop on Disks MonitorElement * RpcOverview = NULL; meName.str(""); meName< get(meName.str()); RpcOverview->Reset(); if(RpcOverview) {//Fill Overview ME @@ -206,12 +199,28 @@ void RPCChamberQuality::fillMonitorElements(DQMStore::IGetter& igetter) { } } - +void RPCChamberQuality::endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& iSetup) { + + if(!enableDQMClients_ ) return; + if(offlineDQM_) return; + if(!init_ ) { + this->fillMonitorElements(); + return; + } + + lumiCounter_++; + + if (lumiCounter_%prescaleFactor_ != 0) return; + + this->fillMonitorElements(); + + +} -void RPCChamberQuality::performeClientOperation(std::string MESufix, int region, MonitorElement * quality, DQMStore::IGetter& igetter){ +void RPCChamberQuality::performeClientOperation(std::string MESufix, int region, MonitorElement * quality){ MonitorElement * RCQ=NULL; @@ -228,44 +237,44 @@ void RPCChamberQuality::performeClientOperation(std::string MESufix, int region, meName.str(""); meName< get(meName.str()); // if (RCQ) RCQ->Reset(); int pos = MESufix.find_last_of("_"); meName.str(""); meName< get(meName.str()); if (RCQD) RCQD->Reset(); //get HV Histo meName.str(""); meName< get(meName.str()); //get LV Histo meName.str(""); meName< get(meName.str()); //Dead meName.str(""); meName << summaryDir_<<"/DeadChannelFraction_"<get(meName.str()); //ClusterSize meName.str(""); meName< get(meName.str()); //NoisyStrips meName.str(""); meName< get(meName.str()); //Multiplicity meName.str(""); meName< get(meName.str()); //Asymetry meName.str(""); meName< get(meName.str()); int xBinMax, yBinMax; diff --git a/DQM/RPCMonitorClient/src/RPCClusterSizeTest.cc b/DQM/RPCMonitorClient/src/RPCClusterSizeTest.cc index 1eac2ae610998..95dcbb99d249e 100644 --- a/DQM/RPCMonitorClient/src/RPCClusterSizeTest.cc +++ b/DQM/RPCMonitorClient/src/RPCClusterSizeTest.cc @@ -20,32 +20,53 @@ RPCClusterSizeTest::RPCClusterSizeTest(const edm::ParameterSet& ps ){ resetMEArrays(); } -RPCClusterSizeTest::~RPCClusterSizeTest(){ } +RPCClusterSizeTest::~RPCClusterSizeTest(){ dbe_=0;} -void RPCClusterSizeTest::beginJob(std::string & workingFolder){ +void RPCClusterSizeTest::beginJob(DQMStore * dbe, std::string workingFolder){ edm::LogVerbatim ("rpceventsummary") << "[RPCClusterSizeTest]: Begin job "; globalFolder_ = workingFolder; + dbe_ = dbe; } +void RPCClusterSizeTest::endRun(const edm::Run& r, const edm::EventSetup& c){ + edm::LogVerbatim ("rpceventsummary") << "[RPCClusterSizeTest]: End run"; +} -void RPCClusterSizeTest::getMonitorElements(std::vector & meVector, std::vector & detIdVector, std::string & clientHistoName){ +void RPCClusterSizeTest::getMonitorElements(std::vector & meVector, std::vector & detIdVector){ //Get ME for each roll for (unsigned int i = 0 ; igetName(); + bool flag= false; + + DQMNet::TagList tagList; + tagList = meVector[i]->getTags(); + DQMNet::TagList::iterator tagItr = tagList.begin(); - if(meName.find(clientHistoName) != std::string::npos){ + while (tagItr != tagList.end() && !flag ) { + if((*tagItr) == rpcdqm::CLUSTERSIZE) + flag= true; + + tagItr++; + } + + if(flag){ myClusterMe_.push_back(meVector[i]); myDetIds_.push_back(detIdVector[i]); } } + } +void RPCClusterSizeTest::beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context){} + +void RPCClusterSizeTest::analyze(const edm::Event& iEvent, const edm::EventSetup& c) {} + +void RPCClusterSizeTest::endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& iSetup) {} -void RPCClusterSizeTest::clientOperation() { +void RPCClusterSizeTest::clientOperation(edm::EventSetup const& iSetup) { edm::LogVerbatim ("rpceventsummary") <<"[RPCClusterSizeTest]:Client Operation"; @@ -136,6 +157,7 @@ void RPCClusterSizeTest::clientOperation() { }//End loop on chambers } +void RPCClusterSizeTest::endJob(void) {} void RPCClusterSizeTest::resetMEArrays(void) { memset((void*) CLSWheel, 0, sizeof(MonitorElement*)*kWheels); @@ -150,11 +172,12 @@ void RPCClusterSizeTest::resetMEArrays(void) { } -void RPCClusterSizeTest::myBooker(DQMStore::IBooker & ibooker) { +void RPCClusterSizeTest::beginRun(const edm::Run& r, const edm::EventSetup& c) { resetMEArrays(); - ibooker.setCurrentFolder(globalFolder_); + MonitorElement* me; + dbe_->setCurrentFolder(globalFolder_); std::stringstream histoName; @@ -164,14 +187,26 @@ void RPCClusterSizeTest::myBooker(DQMStore::IBooker & ibooker) { for (int w = -2; w <= 2; w++) { histoName.str(""); histoName<<"ClusterSizeIn1Bin_Roll_vs_Sector_Wheel"<get(globalFolder_ + histoName.str()) ; + if ( 0!=me ) { + dbe_->removeElement(me->getName()); + } + + CLSWheel[w+2] = dbe_->book2D(histoName.str().c_str(), histoName.str().c_str(), 12, 0.5, 12.5, 21, 0.5, 21.5); rpcUtils.labelXAxisSector( CLSWheel[w+2]); rpcUtils.labelYAxisRoll( CLSWheel[w+2], 0, w ,useRollInfo_); histoName.str(""); histoName<<"ClusterSizeMean_Roll_vs_Sector_Wheel"<get(globalFolder_ + histoName.str()) ; + if ( 0!=me) { + dbe_->removeElement(me->getName()); + } + + MEANWheel[w+2] = dbe_->book2D(histoName.str().c_str(), histoName.str().c_str(), 12, 0.5, 12.5, 21, 0.5, 21.5); rpcUtils.labelXAxisSector( MEANWheel[w+2]); rpcUtils.labelYAxisRoll(MEANWheel[w+2], 0, w,useRollInfo_ ); @@ -179,12 +214,22 @@ void RPCClusterSizeTest::myBooker(DQMStore::IBooker & ibooker) { if(testMode_){ histoName.str(""); histoName<<"ClusterSizeIn1Bin_Distribution_Wheel"<get(globalFolder_ + histoName.str()) ; + if ( 0!=me ) { + dbe_->removeElement(me->getName()); + } + CLSDWheel[w+2] = dbe_->book1D(histoName.str().c_str(), histoName.str().c_str(), 20, 0.0, 1.0); histoName.str(""); histoName<<"ClusterSizeMean_Distribution_Wheel"<get(globalFolder_ + histoName.str()) ; + if ( 0!=me){ + dbe_->removeElement(me->getName()); + } + MEANDWheel[w+2] = dbe_->book1D(histoName.str().c_str(), histoName.str().c_str(), 100, 0.5, 10.5); } }//end loop on wheels @@ -198,24 +243,46 @@ void RPCClusterSizeTest::myBooker(DQMStore::IBooker & ibooker) { histoName.str(""); histoName<<"ClusterSizeIn1Bin_Ring_vs_Segment_Disk"<get(globalFolder_ + histoName.str()) ; + if ( 0!=me){ + dbe_->removeElement(me->getName()); + } + + CLSDisk[d+offset] = dbe_->book2D(histoName.str().c_str(), histoName.str().c_str(),36, 0.5, 36.5, 3*numberOfRings_, 0.5,3*numberOfRings_+ 0.5); rpcUtils.labelXAxisSegment(CLSDisk[d+offset]); rpcUtils.labelYAxisRing(CLSDisk[d+offset], numberOfRings_,useRollInfo_ ); if(testMode_){ histoName.str(""); histoName<<"ClusterSizeIn1Bin_Distribution_Disk"<get(globalFolder_ + histoName.str()) ; + if ( 0!=me){ + dbe_->removeElement(me->getName()); + } + CLSDDisk[d+offset] = dbe_->book1D(histoName.str().c_str(), histoName.str().c_str(), 20, 0.0, 1.0); histoName.str(""); histoName<<"ClusterSizeMean_Distribution_Disk"<get(globalFolder_ + histoName.str()) ; + if ( 0!=me){ + dbe_->removeElement(me->getName()); + } + MEANDDisk[d+offset] = dbe_->book1D(histoName.str().c_str(), histoName.str().c_str(), 100, 0.5, 10.5); } histoName.str(""); histoName<<"ClusterSizeMean_Ring_vs_Segment_Disk"<get(globalFolder_ + histoName.str()) ; + if ( 0!=me){ + dbe_->removeElement(me->getName()); + } + + MEANDisk[d+offset] = dbe_->book2D(histoName.str().c_str(), histoName.str().c_str(), 36, 0.5, 36.5, 3*numberOfRings_, 0.5,3*numberOfRings_+ 0.5); rpcUtils.labelXAxisSegment(MEANDisk[d+offset]); rpcUtils.labelYAxisRing(MEANDisk[d+offset], numberOfRings_ ,useRollInfo_); } diff --git a/DQM/RPCMonitorClient/src/RPCDBPopConAnalyzer.cc b/DQM/RPCMonitorClient/src/RPCDBPopConAnalyzer.cc new file mode 100644 index 0000000000000..6c8f02789f736 --- /dev/null +++ b/DQM/RPCMonitorClient/src/RPCDBPopConAnalyzer.cc @@ -0,0 +1,215 @@ +#include "CondCore/PopCon/interface/PopConAnalyzer.h" +#include "DQM/RPCMonitorClient/interface/RPCDBHandler.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include +#include +#include +#include +#include +#include "CondFormats/RPCObjects/interface/RPCDQMObject.h" +#include "CondCore/DBOutputService/interface/PoolDBOutputService.h" +#include "DQM/RPCMonitorDigi/interface/utils.h" +#include "DQM/RPCMonitorDigi/interface/RPCBookFolderStructure.h" +#include +#include +#include +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ServiceRegistry/interface/Service.h" +#include "DQMServices/Core/interface/DQMStore.h" +#include "DQMServices/Core/interface/MonitorElement.h" +#include "FWCore/Framework/interface/ESHandle.h" + +//typedef popcon::PopConAnalyzer RPCDBPopConAnalyzer; + +class RPCDBPopConAnalyzer: public popcon::PopConAnalyzer +{ +public: + typedef RPCDBHandler SourceHandler; + + RPCDBPopConAnalyzer(const edm::ParameterSet& pset): + popcon::PopConAnalyzer(pset), + m_populator(pset), + m_source(pset.getParameter("Source")) { + subsystemFolder_= pset.getUntrackedParameter("RPCFolder", "RPC"); + recHitTypeFolder_= pset.getUntrackedParameter("RecHitTypeFolder", "Noise"); + summaryFolder_= pset.getUntrackedParameter("SummaryFolder", "SummaryHistograms"); + efficiencyFolder_= pset.getUntrackedParameter("EfficiencyFolder", "RPCEfficiency"); + } + +private: + virtual void endJob() override + { + m_source.initObject(rpcDQMObject); + write(); + dbe =0; + } + + virtual void beginRun(const edm::Run& run, const edm::EventSetup& iSetup) override{ + dbe = edm::Service().operator->(); + dbe->setCurrentFolder("RPCPVT"); + }//beginRun + + + virtual void analyze(const edm::Event& ev, const edm::EventSetup& iSetup) override{ //} + + //virtual void endRun(const edm::Run& r, const edm::EventSetup& iSetup){ + + rpcDQMObject = new RPCDQMObject(); + RPCDQMObject::DQMObjectItem rpcDqmItem; + + edm::ESHandle rpcGeo; + iSetup.get().get(rpcGeo); + //Loop on RPC geometry to access ME for each roll + + RPCBookFolderStructure * folderStr = new RPCBookFolderStructure(); + rpcdqm::utils rpcUtils; + + for (TrackingGeometry::DetContainer::const_iterator it=rpcGeo->dets().begin();itdets().end();it++){ + if(dynamic_cast< const RPCChamber* >( *it ) != 0 ){ + const RPCChamber* ch = dynamic_cast< const RPCChamber* >( *it ); + std::vector< const RPCRoll*> roles = (ch->rolls()); + for(std::vector::const_iterator r = roles.begin();r != roles.end(); ++r){ + + //Get RPC DetId + RPCDetId rpcId = (*r)->id(); + + //Check if rpcId is Valid. If not continue; + + //Get roll name + RPCGeomServ rpcsrv(rpcId); + std::string nameRoll = rpcsrv.name(); + + //Get ME + std::stringstream mepath; + mepath.str(""); + // mepath<<"RPCPVT"; + MonitorElement * MEnumcls = dbe->get(subsystemFolder_ + "/" + recHitTypeFolder_ + "/" + folderStr->folderStructure(rpcId) + "/" + "NumberOfClusters_" + nameRoll); + MonitorElement * MEcls = dbe->get(subsystemFolder_ + "/" + recHitTypeFolder_ + "/" + folderStr->folderStructure(rpcId) + "/" + "ClusterSize_" + nameRoll); + MonitorElement * MEocc= dbe->get(subsystemFolder_ + "/" + recHitTypeFolder_ + "/" + folderStr->folderStructure(rpcId) + "/" + "Occupancy_" + nameRoll); + MonitorElement * MEbx = dbe->get(subsystemFolder_ + "/" + recHitTypeFolder_ + "/" + folderStr->folderStructure(rpcId) + "/" + "BXN_" + nameRoll); + + MonitorElement * MEstatus = NULL; + MonitorElement * MEeff = NULL; + rpcDqmItem.status = -999; + rpcDqmItem.efficiency= -999; + + if( rpcId.region() == 0){ //BARREL + + int nr = rpcUtils.detId2RollNr(rpcId); + int sector = (int)rpcId.sector(); + + //Status + mepath.str(""); + mepath<get(mepath.str()); + if(MEstatus != 0 ){ + rpcDqmItem.status = MEstatus->getBinContent(sector, nr); + }else{ + edm::LogWarning("rpcdbclient")<< "[RPCDBClient] Did not find Status for Barrel "<< nameRoll; + } + + //Efficiency + mepath.str(""); + if( rpcId.ring() > 0){ + mepath<get(mepath.str()); + if(MEeff != 0 ){ + rpcDqmItem.efficiency = MEeff->getBinContent(sector, nr); + }else{ + edm::LogWarning("rpcdbclient")<< "[RPCDBClient] Did not find Efficiency for Barrel "<< nameRoll; + } + + + }else{ + int segment = rpcsrv.segment() ; + int endcapbin = (rpcId.ring()-1)*3-rpcId.roll()+1; + int disk = (rpcId.region() * rpcId.layer()); + + //Status + mepath.str(""); + mepath<get(mepath.str()); + if(MEstatus != 0 ){ + rpcDqmItem.status = MEstatus->getBinContent(segment,endcapbin); + }else{ + edm::LogWarning("rpcdbclient")<< "[RPCDBClient] Did not find Status for Endcap "<< nameRoll; + } + + + //Efficiency + mepath.str(""); + mepath<get(mepath.str()); + if(MEeff != 0 ){ + rpcDqmItem.efficiency = MEeff->getBinContent(segment,endcapbin); + }else{ + edm::LogWarning("rpcdbclient")<< "[RPCDBClient] Did not find Efficiency for Endcap "<< nameRoll; + } + + + } + + rpcDqmItem.dpid = (int)rpcId; + rpcDqmItem.clusterSize = -999; + rpcDqmItem.numdigi = -999; + rpcDqmItem.numcluster =-999; + rpcDqmItem.bx = -999; + rpcDqmItem.bxrms = -999; + //rpcDqmItem.status = -999; + + if (MEnumcls != 0) { + rpcDqmItem.numcluster = (float)MEnumcls->getMean(); + }else{ + edm::LogWarning("rpcdbclient")<< "[RPCDBClient] Did not find Number of Clusters for Roll "<< nameRoll; + } + + if (MEcls != 0) { + rpcDqmItem.clusterSize = (float)MEcls->getMean(); + }else{ + edm::LogWarning("rpcdbclient")<< "[RPCDBClient] Did not find ClusterSize for Roll "<< nameRoll; + } + + if (MEbx != 0) { + rpcDqmItem.bx = (float)MEbx->getMean(); + rpcDqmItem.bxrms = (float)MEbx->getRMS(); + }else{ + edm::LogWarning("rpcdbclient")<< "[RPCDBClient] Did not find BX for Roll "<< nameRoll; + } + + if (MEocc != 0) { + rpcDqmItem.numdigi = (float)MEocc->getEntries(); + }else{ + edm::LogWarning("rpcdbclient")<< "[RPCDBClient] Did not find Occupancy for Roll "<< nameRoll; + } + + + + (rpcDQMObject->v_cls).push_back(rpcDqmItem); + }//End loop Rolls + } + }//End loop RPC Geometry + + } + + void write() { m_populator.write(m_source); } + +private: + popcon::PopCon m_populator; + SourceHandler m_source; + + std::string subsystemFolder_; + std::string summaryFolder_; + std::string recHitTypeFolder_; + std::string efficiencyFolder_; + DQMStore * dbe; + RPCDQMObject * rpcDQMObject; + +}; + +DEFINE_FWK_MODULE(RPCDBPopConAnalyzer); + diff --git a/DQM/RPCMonitorClient/src/RPCDCSSummary.cc b/DQM/RPCMonitorClient/src/RPCDCSSummary.cc index 4f89f884e18a8..2de1f975bb1bd 100644 --- a/DQM/RPCMonitorClient/src/RPCDCSSummary.cc +++ b/DQM/RPCMonitorClient/src/RPCDCSSummary.cc @@ -5,9 +5,8 @@ #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" -//#include "DQMServices/Core/interface/DQMStore.h" -//#include "DQMServices/Core/interface/MonitorElement.h" - +#include "DQMServices/Core/interface/DQMStore.h" +#include "DQMServices/Core/interface/MonitorElement.h" //CondFormats #include "CondFormats/RunInfo/interface/RunInfo.h" #include "CondFormats/DataRecord/interface/RunSummaryRcd.h" @@ -20,68 +19,46 @@ RPCDCSSummary::RPCDCSSummary(const edm::ParameterSet& ps) { FEDRange_.first = ps.getUntrackedParameter("MinimumRPCFEDId", 790); FEDRange_.second = ps.getUntrackedParameter("MaximumRPCFEDId", 792); - offlineDQM_ = ps.getUntrackedParameter ("OfflineDQM",true); - NumberOfFeds_ =FEDRange_.second - FEDRange_.first +1; - init_=false; - defaultValue_ = 1.; } RPCDCSSummary::~RPCDCSSummary() {} void RPCDCSSummary::beginJob() {} -void RPCDCSSummary::dqmEndLuminosityBlock(DQMStore::IBooker & ibooker, DQMStore::IGetter & igetter, edm::LuminosityBlock const & lumiB, edm::EventSetup const& setup){ - - if(!init_){ - this->checkDCSbit(setup); - if(!offlineDQM_ ){this->myBooker(ibooker);} - } -} - - -void RPCDCSSummary::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::IGetter & igetter) { - - if( offlineDQM_){this->myBooker(ibooker);} -} - - - -void RPCDCSSummary::checkDCSbit( edm::EventSetup const& setup ){ - +void RPCDCSSummary::beginRun(const edm::Run& r, const edm::EventSetup& setup){ edm::eventsetup::EventSetupRecordKey recordKey(edm::eventsetup::EventSetupRecordKey::TypeTag::findType("RunInfoRcd")); - defaultValue_ = 1.; - - if(0 != setup.find( recordKey ) ) { - defaultValue_ = -1.; - //get fed summary information - edm::ESHandle sumFED; - setup.get().get(sumFED); - std::vector FedsInIds= sumFED->m_fed_in; - unsigned int f = 0; - bool flag = false; - while(!flag && f < FedsInIds.size()) { - int fedID=FedsInIds[f]; - //make sure fed id is in allowed range - if(fedID>=FEDRange_.first && fedID<=FEDRange_.second) { - defaultValue_ = 1.; - flag = true; - } - f++; - } - } - init_ = true; -} - -void RPCDCSSummary::myBooker(DQMStore::IBooker & ibooker ){ + int defaultValue = 1; - ibooker.setCurrentFolder("RPC/EventInfo"); + if(0 != setup.find( recordKey ) ) { + defaultValue = -1; + //get fed summary information + edm::ESHandle sumFED; + setup.get().get(sumFED); + std::vector FedsInIds= sumFED->m_fed_in; + unsigned int f = 0; + bool flag = false; + while(!flag && f < FedsInIds.size()) { + int fedID=FedsInIds[f]; + //make sure fed id is in allowed range + if(fedID>=FEDRange_.first && fedID<=FEDRange_.second) { + defaultValue = 1; + flag = true; + } + f++; + } + } + + // get the DQMStore + theDbe = edm::Service().operator->(); + + theDbe->setCurrentFolder("RPC/EventInfo"); // global fraction - totalDCSFraction = ibooker.bookFloat("DCSSummary"); - totalDCSFraction->Fill(defaultValue_); + totalDCSFraction = theDbe->bookFloat("DCSSummary"); + totalDCSFraction->Fill(defaultValue); - DCSMap_ = ibooker.book2D( "DCSSummaryMap","RPC DCS Summary Map",15, -7.5, 7.5, 12, 0.5 ,12.5); + DCSMap_ = theDbe->book2D( "DCSSummaryMap","RPC DCS Summary Map",15, -7.5, 7.5, 12, 0.5 ,12.5); //customize the 2d histo std::stringstream BinLabel; @@ -112,7 +89,7 @@ void RPCDCSSummary::myBooker(DQMStore::IBooker & ibooker ){ if(i==5 || i==11 || (j>6 && (i<6 || i>10))) DCSMap_->setBinContent(i,j,-1);//bins that not correspond to subdetector parts else - DCSMap_->setBinContent(i,j,defaultValue_); + DCSMap_->setBinContent(i,j,defaultValue); } } @@ -125,7 +102,7 @@ void RPCDCSSummary::myBooker(DQMStore::IBooker & ibooker ){ } // book the ME - ibooker.setCurrentFolder("RPC/EventInfo/DCSContents"); + theDbe->setCurrentFolder("RPC/EventInfo/DCSContents"); int limit = numberOfDisks_; if(numberOfDisks_ < 2) limit = 2; @@ -135,8 +112,8 @@ void RPCDCSSummary::myBooker(DQMStore::IBooker & ibooker ){ if (i>-3 && i<3){//wheels std::stringstream streams; streams << "RPC_Wheel" << i; - dcsWheelFractions[i+2] = ibooker.bookFloat(streams.str()); - dcsWheelFractions[i+2]->Fill(defaultValue_); + dcsWheelFractions[i+2] = theDbe->bookFloat(streams.str()); + dcsWheelFractions[i+2]->Fill(defaultValue); } if (i == 0 || i > numberOfDisks_ || i< (-1 * numberOfDisks_))continue; @@ -145,12 +122,30 @@ void RPCDCSSummary::myBooker(DQMStore::IBooker & ibooker ){ if (i>0) offset --; //used to skip case equale to zero std::stringstream streams; streams << "RPC_Disk" << i; - dcsDiskFractions[i+2] = ibooker.bookFloat(streams.str()); - dcsDiskFractions[i+2]->Fill(defaultValue_); + dcsDiskFractions[i+2] = theDbe->bookFloat(streams.str()); + dcsDiskFractions[i+2]->Fill(defaultValue); } } +void RPCDCSSummary::beginLuminosityBlock(const edm::LuminosityBlock& lumi, const edm::EventSetup& setup) { +} + + + + +void RPCDCSSummary::endLuminosityBlock(const edm::LuminosityBlock& lumi, const edm::EventSetup& setup){} + + + +void RPCDCSSummary::endJob() {} + + + +void RPCDCSSummary::analyze(const edm::Event& event, const edm::EventSetup& setup){} + + + diff --git a/DQM/RPCMonitorClient/src/RPCDaqInfo.cc b/DQM/RPCMonitorClient/src/RPCDaqInfo.cc index d256e05e5a497..3c1a7f381ba24 100644 --- a/DQM/RPCMonitorClient/src/RPCDaqInfo.cc +++ b/DQM/RPCMonitorClient/src/RPCDaqInfo.cc @@ -3,10 +3,6 @@ #include "CondFormats/RunInfo/interface/RunInfo.h" #include "CondFormats/RunInfo/interface/RunSummary.h" #include "CondFormats/DataRecord/interface/RunSummaryRcd.h" -#include "FWCore/Framework/interface/ESHandle.h" -#include "FWCore/Framework/interface/EventSetup.h" - - RPCDaqInfo::RPCDaqInfo(const edm::ParameterSet& ps) { @@ -16,20 +12,17 @@ RPCDaqInfo::RPCDaqInfo(const edm::ParameterSet& ps) { NumberOfFeds_ =FEDRange_.second - FEDRange_.first +1; numberOfDisks_ = ps.getUntrackedParameter("NumberOfEndcapDisks", 4); - - init_=false; } RPCDaqInfo::~RPCDaqInfo(){} -void RPCDaqInfo::beginJob(){} -void RPCDaqInfo::dqmEndLuminosityBlock(DQMStore::IBooker & ibooker, DQMStore::IGetter & igetter, edm::LuminosityBlock const & LB, edm::EventSetup const& iSetup){ + +void RPCDaqInfo::beginLuminosityBlock(const edm::LuminosityBlock& lumiBlock, const edm::EventSetup& iSetup){ edm::eventsetup::EventSetupRecordKey recordKey(edm::eventsetup::EventSetupRecordKey::TypeTag::findType("RunInfoRcd")); - - if(!init_){this->myBooker(ibooker);} + if(0 != iSetup.find( recordKey ) ) { - + //get fed summary information edm::ESHandle sumFED; iSetup.get().get(sumFED); @@ -56,14 +49,17 @@ void RPCDaqInfo::dqmEndLuminosityBlock(DQMStore::IBooker & ibooker, DQMStore::IG } -void RPCDaqInfo::dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &){} +void RPCDaqInfo::endLuminosityBlock(const edm::LuminosityBlock& lumiBlock, const edm::EventSetup& iSetup){} -void RPCDaqInfo::myBooker(DQMStore::IBooker & ibooker){ +void RPCDaqInfo::beginJob(){ - //fraction of alive FEDs - ibooker.setCurrentFolder("RPC/EventInfo/DAQContents"); + dbe_ = 0; + dbe_ = edm::Service().operator->(); + //fraction of alive FEDs + dbe_->setCurrentFolder("RPC/EventInfo/DAQContents"); + int limit = numberOfDisks_; if(numberOfDisks_ < 2) limit = 2; @@ -71,7 +67,7 @@ void RPCDaqInfo::myBooker(DQMStore::IBooker & ibooker){ if (i>-3 && i<3){//wheels std::stringstream streams; streams << "RPC_Wheel" << i; - daqWheelFractions[i+2] = ibooker.bookFloat(streams.str()); + daqWheelFractions[i+2] = dbe_->bookFloat(streams.str()); daqWheelFractions[i+2]->Fill(-1); } @@ -82,17 +78,17 @@ void RPCDaqInfo::myBooker(DQMStore::IBooker & ibooker){ std::stringstream streams; streams << "RPC_Disk" << i; - daqDiskFractions[i+2] = ibooker.bookFloat(streams.str()); + daqDiskFractions[i+2] = dbe_->bookFloat(streams.str()); daqDiskFractions[i+2]->Fill(-1); } //daq summary for RPCs - ibooker.setCurrentFolder("RPC/EventInfo"); + dbe_->setCurrentFolder("RPC/EventInfo"); - DaqFraction_ = ibooker.bookFloat("DAQSummary"); + DaqFraction_ = dbe_->bookFloat("DAQSummary"); - DaqMap_ = ibooker.book2D( "DAQSummaryMap","RPC DAQ Summary Map",15, -7.5, 7.5, 12, 0.5 ,12.5); + DaqMap_ = dbe_->book2D( "DAQSummaryMap","RPC DAQ Summary Map",15, -7.5, 7.5, 12, 0.5 ,12.5); //customize the 2d histo std::stringstream BinLabel; @@ -115,11 +111,12 @@ void RPCDaqInfo::myBooker(DQMStore::IBooker & ibooker){ DaqMap_->setBinLabel(i,BinLabel.str(),1); } +} - init_=true; -} +void RPCDaqInfo::endJob() {} +void RPCDaqInfo::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup){} diff --git a/DQM/RPCMonitorClient/src/RPCDataCertification.cc b/DQM/RPCMonitorClient/src/RPCDataCertification.cc index d315f8a15c887..f6bce2bc112a3 100644 --- a/DQM/RPCMonitorClient/src/RPCDataCertification.cc +++ b/DQM/RPCMonitorClient/src/RPCDataCertification.cc @@ -15,152 +15,131 @@ RPCDataCertification::RPCDataCertification(const edm::ParameterSet& ps) { numberOfDisks_ = ps.getUntrackedParameter("NumberOfEndcapDisks", 4); + FEDRange_.first = ps.getUntrackedParameter("MinimumRPCFEDId", 790); FEDRange_.second = ps.getUntrackedParameter("MaximumRPCFEDId", 792); + NumberOfFeds_ =FEDRange_.second - FEDRange_.first +1; - offlineDQM_ = ps.getUntrackedParameter ("OfflineDQM",true); - - init_= false; - defaultValue_=1.; } RPCDataCertification::~RPCDataCertification() {} + void RPCDataCertification::beginJob(){} -void RPCDataCertification::dqmEndLuminosityBlock(DQMStore::IBooker & ibooker, DQMStore::IGetter & igetter, - edm::LuminosityBlock const & LB, edm::EventSetup const& setup){ + + void RPCDataCertification::beginRun(const edm::Run& r, const edm::EventSetup& setup){ + edm::eventsetup::EventSetupRecordKey recordKey(edm::eventsetup::EventSetupRecordKey::TypeTag::findType("RunInfoRcd")); + + int defaultValue = 1; + + if(0 != setup.find( recordKey ) ) { + defaultValue = -1; + //get fed summary information + edm::ESHandle sumFED; + setup.get().get(sumFED); + std::vector FedsInIds= sumFED->m_fed_in; + unsigned int f = 0; + bool flag = false; + while(!flag && f < FedsInIds.size()) { + int fedID=FedsInIds[f]; + //make sure fed id is in allowed range + if(fedID>=FEDRange_.first && fedID<=FEDRange_.second) { + defaultValue = 1; + flag = true; + } + f++; + } + } + + + // get the DQMStore + theDbe = edm::Service().operator->(); - if(!init_){ + theDbe->setCurrentFolder("RPC/EventInfo"); + // global fraction + totalCertFraction = theDbe->bookFloat("CertificationSummary"); + totalCertFraction->Fill(defaultValue); - this->checkFED(setup); - - if(!offlineDQM_){ this->myBooker(ibooker); } + CertMap_ = theDbe->book2D( "CertificationSummaryMap","RPC Certification Summary Map",15, -7.5, 7.5, 12, 0.5 ,12.5); + + //customize the 2d histo + std::stringstream BinLabel; + for (int i= 1 ; i<13; i++){ + BinLabel.str(""); + BinLabel<<"Sec"<setBinLabel(i,BinLabel.str(),2); + } + + for(int i = -2 ; i <=2; i++){ + BinLabel.str(""); + BinLabel<<"Wheel"<setBinLabel(i+8,BinLabel.str(),1); } -} -void RPCDataCertification::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::IGetter & igetter){ - - if(offlineDQM_){ this->myBooker(ibooker); } - -} + for(int i = 1; i<=numberOfDisks_; i++){ + BinLabel.str(""); + BinLabel<<"Disk"<setBinLabel((i+11),BinLabel.str(),1); + BinLabel.str(""); + BinLabel<<"Disk"<<-i; + CertMap_->setBinLabel((-i+5),BinLabel.str(),1); + } + //fill the histo with "1" --- just for the moment + for(int i=1; i<=15; i++){ + for (int j=1; j<=12; j++ ){ + if(i==5 || i==11 || (j>6 && (i<6 || i>10))) + CertMap_->setBinContent(i,j,-1);//bins that not correspond to subdetector parts + else + CertMap_->setBinContent(i,j,defaultValue); + } + } + + + if(numberOfDisks_ < 4){ + for (int j=1; j<=12; j++ ){ + CertMap_->setBinContent(1,j,-1);//bins that not correspond to subdetector parts + CertMap_->setBinContent(15,j,-1); + } + } + // book the ME + theDbe->setCurrentFolder("RPC/EventInfo/CertificationContents"); -void RPCDataCertification::checkFED(edm::EventSetup const& setup){ - edm::eventsetup::EventSetupRecordKey recordKey(edm::eventsetup::EventSetupRecordKey::TypeTag::findType("RunInfoRcd")); - - double defaultValue = 1.; - - if(0 != setup.find( recordKey ) ) { - defaultValue = -1; - //get fed summary information - edm::ESHandle sumFED; - setup.get().get(sumFED); - std::vector FedsInIds= sumFED->m_fed_in; - unsigned int f = 0; - bool flag = false; - while(!flag && f < FedsInIds.size()) { - int fedID=FedsInIds[f]; - //make sure fed id is in allowed range - if(fedID>=FEDRange_.first && fedID<=FEDRange_.second) { - defaultValue = 1; - flag = true; - } - f++; - } - } + int limit = numberOfDisks_; + if(numberOfDisks_ < 2) limit = 2; - defaultValue_ = defaultValue; - - init_= true; - -} - -void RPCDataCertification::myBooker(DQMStore::IBooker & ibooker){ - - ibooker.setCurrentFolder("RPC/EventInfo"); - // global fraction - totalCertFraction = ibooker.bookFloat("CertificationSummary"); - totalCertFraction->Fill(defaultValue_); - - CertMap_ = ibooker.book2D( "CertificationSummaryMap","RPC Certification Summary Map",15, -7.5, 7.5, 12, 0.5 ,12.5); - - //customize the 2d histo - std::stringstream BinLabel; - for (int i= 1 ; i<13; i++){ - BinLabel.str(""); - BinLabel<<"Sec"<setBinLabel(i,BinLabel.str(),2); - } - - for(int i = -2 ; i <=2; i++){ - BinLabel.str(""); - BinLabel<<"Wheel"<setBinLabel(i+8,BinLabel.str(),1); - } - - - for(int i = 1; i<=numberOfDisks_; i++){ - BinLabel.str(""); - BinLabel<<"Disk"<setBinLabel((i+11),BinLabel.str(),1); - BinLabel.str(""); - BinLabel<<"Disk"<<-i; - CertMap_->setBinLabel((-i+5),BinLabel.str(),1); - } - //fill the histo with "1" --- just for the moment - for(int i=1; i<=15; i++){ - for (int j=1; j<=12; j++ ){ - if(i==5 || i==11 || (j>6 && (i<6 || i>10))) - CertMap_->setBinContent(i,j,-1);//bins that not correspond to subdetector parts - else - CertMap_->setBinContent(i,j,defaultValue_); - } - } - - - if(numberOfDisks_ < 4){ - for (int j=1; j<=12; j++ ){ - CertMap_->setBinContent(1,j,-1);//bins that not correspond to subdetector parts - CertMap_->setBinContent(15,j,-1); - } - } - // book the ME - ibooker.setCurrentFolder("RPC/EventInfo/CertificationContents"); - - int limit = numberOfDisks_; - if(numberOfDisks_ < 2) limit = 2; + for (int i = -1 * limit; i<= limit;i++ ){//loop on wheels and disks + if (i>-3 && i<3){//wheels + std::stringstream streams; + streams << "RPC_Wheel" << i; + certWheelFractions[i+2] = theDbe->bookFloat(streams.str()); + certWheelFractions[i+2]->Fill(defaultValue); + } + if (i == 0 || i > numberOfDisks_ || i< (-1 * numberOfDisks_))continue; - for (int i = -1 * limit; i<= limit;i++ ){//loop on wheels and disks - if (i>-3 && i<3){//wheels - std::stringstream streams; - streams << "RPC_Wheel" << i; - certWheelFractions[i+2] = ibooker.bookFloat(streams.str()); - certWheelFractions[i+2]->Fill(defaultValue_); - } - - if (i == 0 || i > numberOfDisks_ || i< (-1 * numberOfDisks_))continue; - - int offset = numberOfDisks_; - if (i>0) offset --; //used to skip case equale to zero - std::stringstream streams; - streams << "RPC_Disk" << i; - certDiskFractions[i+2] = ibooker.bookFloat(streams.str()); - certDiskFractions[i+2]->Fill(defaultValue_); - } + int offset = numberOfDisks_; + if (i>0) offset --; //used to skip case equale to zero + std::stringstream streams; + streams << "RPC_Disk" << i; + certDiskFractions[i+2] = theDbe->bookFloat(streams.str()); + certDiskFractions[i+2]->Fill(defaultValue); + } } +void RPCDataCertification::beginLuminosityBlock(const edm::LuminosityBlock& lumi, const edm::EventSetup& setup) {} +void RPCDataCertification::endLuminosityBlock(const edm::LuminosityBlock& lumi, const edm::EventSetup& setup){} +void RPCDataCertification::endJob() {} - - +void RPCDataCertification::analyze(const edm::Event& event, const edm::EventSetup& setup){} diff --git a/DQM/RPCMonitorClient/src/RPCDcsInfoClient.cc b/DQM/RPCMonitorClient/src/RPCDcsInfoClient.cc index e19d9e4f64a05..9e3da896aed35 100644 --- a/DQM/RPCMonitorClient/src/RPCDcsInfoClient.cc +++ b/DQM/RPCMonitorClient/src/RPCDcsInfoClient.cc @@ -3,26 +3,30 @@ RPCDcsInfoClient::RPCDcsInfoClient( const edm::ParameterSet& ps ) { - dcsinfofolder_ = ps.getUntrackedParameter("dcsInfoFolder", "RPC/DCSInfo") ; - - DCS.clear(); - DCS.resize(10); // start with 10 LS, resize later + dbe_ = edm::Service().operator->(); + dcsinfofolder_ = ps.getUntrackedParameter("dcsInfoFolder", "RPC/DCSInfo") ; } RPCDcsInfoClient::~RPCDcsInfoClient() {} -void RPCDcsInfoClient::beginJob() {} +void RPCDcsInfoClient::beginRun(const edm::Run& r, const edm::EventSetup& c) { + DCS.clear(); + DCS.resize(10); // start with 10 LS, resize later +} + +void RPCDcsInfoClient::analyze(const edm::Event& e, const edm::EventSetup& c){} + +void RPCDcsInfoClient::endLuminosityBlock(const edm::LuminosityBlock& l, const edm::EventSetup& c){ + if (!dbe_) return; -void RPCDcsInfoClient:: dqmEndLuminosityBlock(DQMStore::IBooker & ibooker, DQMStore::IGetter & igetter, edm::LuminosityBlock const & l, edm::EventSetup const& c){ - unsigned int nlumi = l.id().luminosityBlock() ; if (nlumi+1 > DCS.size()) DCS.resize(nlumi+1); - MonitorElement* DCSbyLS_ = igetter.get(dcsinfofolder_ + "/DCSbyLS" ); + MonitorElement* DCSbyLS_ = dbe_->get(dcsinfofolder_ + "/DCSbyLS" ); if ( !DCSbyLS_ ) return; @@ -41,18 +45,20 @@ void RPCDcsInfoClient:: dqmEndLuminosityBlock(DQMStore::IBooker & ibooker, DQMSt return; } - -void RPCDcsInfoClient::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::IGetter & igetter){ +void RPCDcsInfoClient::endRun(const edm::Run& r, const edm::EventSetup& c) { // book - ibooker.cd(); - ibooker.setCurrentFolder(dcsinfofolder_ ); + dbe_->cd(); + dbe_->setCurrentFolder(dcsinfofolder_ ); unsigned int nlsmax = DCS.size(); if (nlsmax > 900 ) nlsmax = 900; std::string meName = dcsinfofolder_ + "/rpcHVStatus"; - MonitorElement* rpcHVStatus = ibooker.book2D("rpcHVStatus","RPC HV Status", nlsmax, 1., nlsmax+1, 1, 0.5, 1.5); + MonitorElement* rpcHVStatus = dbe_->get(meName); + if (rpcHVStatus) dbe_->removeElement(rpcHVStatus->getName()); + + rpcHVStatus = dbe_->book2D("rpcHVStatus","RPC HV Status", nlsmax, 1., nlsmax+1, 1, 0.5, 1.5); rpcHVStatus->setAxisTitle("Luminosity Section", 1); rpcHVStatus->setBinLabel(1,"",2); @@ -64,7 +70,9 @@ void RPCDcsInfoClient::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::IGetter } meName = dcsinfofolder_ + "/rpcHV"; - MonitorElement* rpcHV = ibooker.bookInt("rpcHV"); + MonitorElement* rpcHV = dbe_->get(meName); + if (rpcHV) dbe_->removeElement(rpcHVStatus->getName()); + rpcHV = dbe_->bookInt("rpcHV"); rpcHV ->Fill(lsCounter); diff --git a/DQM/RPCMonitorClient/src/RPCDeadChannelTest.cc b/DQM/RPCMonitorClient/src/RPCDeadChannelTest.cc index cb1956da8693d..1bf77c58333ac 100644 --- a/DQM/RPCMonitorClient/src/RPCDeadChannelTest.cc +++ b/DQM/RPCMonitorClient/src/RPCDeadChannelTest.cc @@ -1,8 +1,11 @@ /* * \author Anna Cimmino*/ #include "DQM/RPCMonitorDigi/interface/utils.h" #include + // Framework #include "FWCore/MessageLogger/interface/MessageLogger.h" +//#include + // Geometry #include "Geometry/RPCGeometry/interface/RPCGeomServ.h" #include "Geometry/RPCGeometry/interface/RPCGeometry.h" @@ -21,35 +24,60 @@ RPCDeadChannelTest::RPCDeadChannelTest(const edm::ParameterSet& ps ){ numberOfRings_ = ps.getUntrackedParameter("NumberOfEndcapRings", 2); } -RPCDeadChannelTest::~RPCDeadChannelTest(){} +RPCDeadChannelTest::~RPCDeadChannelTest(){dbe_ = 0;} -void RPCDeadChannelTest::beginJob(std::string & workingFolder ){ +void RPCDeadChannelTest::beginJob(DQMStore * dbe, std::string workingFolder ){ edm::LogVerbatim ("rpcdeadchanneltest") << "[RPCDeadChannelTest]: Begin Job"; globalFolder_ = workingFolder; - + dbe_=dbe; } +void RPCDeadChannelTest::endRun(const edm::Run& r, const edm::EventSetup& iSetup){ -void RPCDeadChannelTest::getMonitorElements(std::vector & meVector, std::vector & detIdVector, std::string & clientHistoName){ + edm::LogVerbatim ("rpcdeadchanneltest") << "[RPCDeadChannelTest]: End run"; - for (unsigned int i = 0 ; igetName(); +} - if(meName.find(clientHistoName) != std::string::npos){ + +void RPCDeadChannelTest::getMonitorElements(std::vector & meVector, std::vector & detIdVector){ + + //Get Occupancy ME for each roll + + for (unsigned int i = 0 ; igetTags(); + DQMNet::TagList::iterator tagItr = tagList.begin(); + + while (tagItr != tagList.end() && !flag ) { + if((*tagItr) == rpcdqm::OCCUPANCY) + flag= true; + + tagItr++; + } + + if(flag){ myOccupancyMe_.push_back(meVector[i]); myDetIds_.push_back(detIdVector[i]); - } - } + } + } } +void RPCDeadChannelTest::beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) {} + +void RPCDeadChannelTest::analyze(const edm::Event& iEvent, const edm::EventSetup& c){} -void RPCDeadChannelTest::clientOperation(){ +void RPCDeadChannelTest::endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& iSetup){} + +void RPCDeadChannelTest::clientOperation( edm::EventSetup const& iSetup){ edm::LogVerbatim ("rpcdeadchanneltest") <<"[RPCDeadChannelTest]:Client Operation"; MonitorElement * DEAD = NULL; + //Loop on chambers for (unsigned int i = 0 ; isetCurrentFolder( globalFolder_); std::stringstream histoName; @@ -123,33 +152,44 @@ void RPCDeadChannelTest::myBooker(DQMStore::IBooker & ibooker){ if (i>-3 && i<3){//wheels histoName.str(""); histoName<<"DeadChannelFraction_Roll_vs_Sector_Wheel"<get(globalFolder_ +"/"+ histoName.str()); + if (0!=me ) { + dbe_->removeElement(me->getName()); + } + DEADWheel[i+2] = dbe_->book2D(histoName.str().c_str(), histoName.str().c_str(), 12, 0.5, 12.5, 21, 0.5, 21.5); - for (int x = 1; x<=12; x++){ - for(int y=1; y<=21; y++){ + for (int x = 1; x<=12; x++) + for(int y=1; y<=21; y++) DEADWheel[i+2]->setBinContent(x,y,-1); - } - } - + rpcUtils.labelXAxisSector( DEADWheel[i+2]); rpcUtils.labelYAxisRoll( DEADWheel[i+2], 0, i, useRollInfo_); }//end wheels - if (i == 0 || i > numberOfDisks_ || i< (-1 * numberOfDisks_)){continue;} + if (i == 0 || i > numberOfDisks_ || i< (-1 * numberOfDisks_))continue; int offset = numberOfDisks_; - if (i>0) {offset --;} //used to skip case equale to zero + if (i>0) offset --; //used to skip case equale to zero histoName.str(""); histoName<<"DeadChannelFraction_Ring_vs_Segment_Disk"<get(globalFolder_ +"/"+ histoName.str()); + if (0!=me ) { + dbe_->removeElement(me->getName()); + } + + DEADDisk[i+offset] = dbe_->book2D(histoName.str().c_str(), histoName.str().c_str(),36, 0.5, 36.5, 3*numberOfRings_, 0.5,3*numberOfRings_+ 0.5); rpcUtils.labelXAxisSegment(DEADDisk[i+offset]); rpcUtils.labelYAxisRing(DEADDisk[i+offset], numberOfRings_ ,useRollInfo_); - + + }//end loop on wheels and disks } +void RPCDeadChannelTest::endJob(){} diff --git a/DQM/RPCMonitorClient/src/RPCDqmClient.cc b/DQM/RPCMonitorClient/src/RPCDqmClient.cc index 98cc8f9976e5f..9e7841167004c 100644 --- a/DQM/RPCMonitorClient/src/RPCDqmClient.cc +++ b/DQM/RPCMonitorClient/src/RPCDqmClient.cc @@ -17,18 +17,17 @@ //Framework #include "FWCore/ServiceRegistry/interface/Service.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" -#include -RPCDqmClient::RPCDqmClient(const edm::ParameterSet& parameters_){ +RPCDqmClient::RPCDqmClient(const edm::ParameterSet& iConfig){ edm::LogVerbatim ("rpcdqmclient") << "[RPCDqmClient]: Constructor"; - // parameters_ = iConfig; + parameters_ = iConfig; offlineDQM_ = parameters_.getUntrackedParameter ("OfflineDQM",true); useRollInfo_= parameters_.getUntrackedParameter("UseRollInfo", false); //check enabling - enableDQMClients_ = parameters_.getUntrackedParameter ("EnableRPCDqmClient",true); + enableDQMClients_ =parameters_.getUntrackedParameter ("EnableRPCDqmClient",true); minimumEvents_= parameters_.getUntrackedParameter("MinimumRPCEvents", 10000); std::string subsystemFolder = parameters_.getUntrackedParameter("RPCFolder", "RPC"); @@ -41,6 +40,7 @@ RPCDqmClient::RPCDqmClient(const edm::ParameterSet& parameters_){ //get prescale factor prescaleGlobalFactor_ = parameters_.getUntrackedParameter("DiagnosticGlobalPrescale", 5); + //make default client list clientList_.push_back("RPCMultiplicityTest"); @@ -50,87 +50,64 @@ RPCDqmClient::RPCDqmClient(const edm::ParameterSet& parameters_){ //get all the possible RPC DQM clients - this->makeClientMap(parameters_); - - lumiCounter_ = prescaleGlobalFactor_; - init_ = false; - + this->makeClientMap(); } -RPCDqmClient::~RPCDqmClient(){} +RPCDqmClient::~RPCDqmClient(){dbe_ = 0;} void RPCDqmClient::beginJob(){ - if (!enableDQMClients_) {return;} ; edm::LogVerbatim ("rpcdqmclient") << "[RPCDqmClient]: Begin Job"; + if (!enableDQMClients_) return; ; - //Do whatever the begin jobs of all client modules do - for(std::vector::iterator it = clientModules_.begin(); it!=clientModules_.end(); it++ ){ - (*it)->beginJob( globalFolder_ ); - } -} - - - -void RPCDqmClient::dqmEndLuminosityBlock(DQMStore::IBooker & ibooker, DQMStore::IGetter & igetter, edm::LuminosityBlock const & lumiSeg, edm::EventSetup const& c){ - - if (!enableDQMClients_ ) {return;} - edm::LogVerbatim ("rpcdqmclient") << "[RPCDqmClient]: End DQM LB"; + dbe_ = edm::Service().operator->(); + dbe_->setVerbose(0); + + //Do whatever the begin jobs of all client modules do + for(std::vector::iterator it = clientModules_.begin(); it!=clientModules_.end(); it++ ) + (*it)->beginJob(dbe_, globalFolder_); - if(!init_) { //At the end of the first LumiBlock... - // ...get chamber based histograms - this->getMonitorElements(igetter, c); +} - //...book summary histograms - for (std::vector::iterator it = clientModules_.begin(); it!=clientModules_.end(); it++ ){ - (*it)->myBooker( ibooker); - } - lumiCounter_ = prescaleGlobalFactor_ - 1; - init_= true; - } +void RPCDqmClient::beginRun(const edm::Run& r, const edm::EventSetup& c){ - lumiCounter_++; - - if (offlineDQM_) {return;} // If in offlineDQM mode, do nothing. Client operation will be done only at endJob - - //Check if there's enough statistics - float rpcevents = minimumEvents_; - if(RPCEvents_) {rpcevents = RPCEvents_->getBinContent(1);} - if( rpcevents < minimumEvents_) {return;} - //Do not perform client oparations every lumi block - if (lumiCounter_%prescaleGlobalFactor_ != 0) {return;} + if (!enableDQMClients_) return; - edm::LogVerbatim ("rpcdqmclient") <<"[RPCDqmClient]: Client operations"; - for (std::vector::iterator it = clientModules_.begin(); it!=clientModules_.end(); it++ ){ - (*it)->clientOperation(); + + for ( std::vector::iterator it = clientModules_.begin(); it!=clientModules_.end(); it++ ){ + (*it)->beginRun(r,c); } + if(!offlineDQM_) this->getMonitorElements(r, c); + + lumiCounter_ = prescaleGlobalFactor_; + init_ = false; } -void RPCDqmClient::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::IGetter & igetter){ +void RPCDqmClient::endRun(const edm::Run& r, const edm::EventSetup& c){ + edm::LogVerbatim ("rpcdqmclient") << "[RPCDqmClient]: End Run"; - if (!enableDQMClients_ || !init_) {return;} + if (!enableDQMClients_) return; - edm::LogVerbatim ("rpcdqmclient") << "[RPCDqmClient]: End DQM Job"; - - float rpcevents = minimumEvents_; - if(RPCEvents_) {rpcevents = RPCEvents_ ->getBinContent(1);} - if(rpcevents < minimumEvents_) {return;} + if(offlineDQM_) this->getMonitorElements(r, c); - edm::LogVerbatim ("rpcdqmclient") <<"[RPCDqmClient]: Client operations"; + float rpcevents = minimumEvents_; + if(RPCEvents_) rpcevents = RPCEvents_ ->getBinContent(1); + + if(rpcevents < minimumEvents_) return; + for (std::vector::iterator it = clientModules_.begin(); it!=clientModules_.end(); it++ ){ - (*it)->clientOperation(); + (*it)->clientOperation(c); + (*it)->endRun(r,c); } - } - -void RPCDqmClient::getMonitorElements(DQMStore::IGetter & igetter, const edm::EventSetup& c){ +void RPCDqmClient::getMonitorElements(const edm::Run& r, const edm::EventSetup& c){ std::vector myMeVect; std::vector myDetIds; @@ -142,6 +119,7 @@ void RPCDqmClient::getMonitorElements(DQMStore::IGetter & igetter, const edm::E RPCBookFolderStructure * folderStr = new RPCBookFolderStructure(); MonitorElement * myMe = NULL; std::string rollName= ""; + // std::set disk_set, ring_set; //loop on all geometry and get all histos for (TrackingGeometry::DetContainer::const_iterator it=rpcGeo->dets().begin();itdets().end();it++){ @@ -168,57 +146,119 @@ void RPCDqmClient::getMonitorElements(DQMStore::IGetter & igetter, const edm::E for( unsigned int cl = 0; clfolderStructure(detId)+"/"+clientHisto_[cl]+ "_"+rollName); + myMe = dbe_->get(prefixDir_ +"/"+ folderStr->folderStructure(detId)+"/"+clientHisto_[cl]+ "_"+rollName); if (!myMe)continue; - // dbe_->tag(myMe, clientTag_[cl]); + + dbe_->tag(myMe, clientTag_[cl]); myMeVect.push_back(myMe); myDetIds.push_back(detId); }//end loop on clients + }//end loop on roll in given chamber } }//end loop on all geometry and get all histos - RPCEvents_ = igetter.get(prefixDir_ +"/RPCEvents"); - unsigned int cl = 0; + RPCEvents_ = dbe_->get(prefixDir_ +"/RPCEvents"); + for (std::vector::iterator it = clientModules_.begin(); it!=clientModules_.end(); it++ ){ - (*it)->getMonitorElements(myMeVect, myDetIds, clientHisto_[cl]); - cl++; + (*it)->getMonitorElements(myMeVect, myDetIds); } delete folderStr; + +} + + + +void RPCDqmClient::beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) { + if (!enableDQMClients_) return; + + for ( std::vector::iterator it = clientModules_.begin(); it!=clientModules_.end(); it++ ) + (*it)->beginLuminosityBlock(lumiSeg,context); +} + +void RPCDqmClient::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup){ + + if (!enableDQMClients_) return; + + for ( std::vector::iterator it = clientModules_.begin(); it!=clientModules_.end(); it++ ) + (*it)->analyze( iEvent,iSetup); } + + +void RPCDqmClient::endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c){ + if (!enableDQMClients_ ) return; + + if(offlineDQM_) return; + + edm::LogVerbatim ("rpcdqmclient") <<"[RPCDqmClient]: End of LS "; + + for (std::vector::iterator it = clientModules_.begin(); it!=clientModules_.end(); it++ ) + (*it)->endLuminosityBlock( lumiSeg, c); + + float rpcevents = minimumEvents_; + if(RPCEvents_) rpcevents = RPCEvents_ ->getBinContent(1); + + if( rpcevents < minimumEvents_) return; + if( !init_ ){ + for (std::vector::iterator it = clientModules_.begin(); it!=clientModules_.end(); it++ ){ + (*it)->clientOperation(c); + } + init_ = true; + return; + } + + lumiCounter_++; + + if (lumiCounter_%prescaleGlobalFactor_ != 0) return; + + + for (std::vector::iterator it = clientModules_.begin(); it!=clientModules_.end(); it++ ){ + (*it)->clientOperation(c); + } + +} + + + +void RPCDqmClient::endJob() { + if (!enableDQMClients_) return; + + for ( std::vector::iterator it= clientModules_.begin(); it!=clientModules_.end(); it++ ) + (*it)->endJob(); +} -void RPCDqmClient::makeClientMap(const edm::ParameterSet& parameters_) { +void RPCDqmClient::makeClientMap() { for(unsigned int i = 0; i RPCEfficiencySecond::bookDetUnitSeg(DQMStore::IBooker & ibooker, RPCDetId & detId,int nstrips, std::string folderPath) { +std::map RPCEfficiencySecond::bookDetUnitSeg(RPCDetId & detId,int nstrips, std::string folderPath) { std::map meMap; @@ -19,7 +19,7 @@ std::map RPCEfficiencySecond::bookDetUnitSeg(DQMSt delete folderStr; - ibooker.setCurrentFolder(folder); + dbe->setCurrentFolder(folder); RPCGeomServ RPCname(detId); std::string nameRoll = RPCname.name(); @@ -38,21 +38,21 @@ std::map RPCEfficiencySecond::bookDetUnitSeg(DQMSt //std::cout<<"Booking "<book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5); //std::cout<<"Booking "<book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5); sprintf(meId,"Profile_%s",detUnitLabel); sprintf(meTitle,"Profile_for_%s",layerLabel); - meMap[meId] = ibooker.book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5); + meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5); //std::cout<<"Booking "<book1D(meId, meTitle, 11,-5.5, 5.5); }else{ //std::cout<<"Booking for the EndCap"< RPCEfficiencySecond::bookDetUnitSeg(DQMSt //std::cout<<"Booking "<book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5); //std::cout<<"Booking "<book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5); //std::cout<<"Booking "<book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5); // //std::cout<<"Booking "<book1D(meId, meTitle, 11,-5.5, 5.5); } return meMap; } diff --git a/DQM/RPCMonitorClient/src/RPCEfficiencyPerRingLayer.cc b/DQM/RPCMonitorClient/src/RPCEfficiencyPerRingLayer.cc index cdc6002b7b798..8238ca96258ca 100644 --- a/DQM/RPCMonitorClient/src/RPCEfficiencyPerRingLayer.cc +++ b/DQM/RPCMonitorClient/src/RPCEfficiencyPerRingLayer.cc @@ -13,6 +13,9 @@ RPCEfficiencyPerRingLayer::RPCEfficiencyPerRingLayer(const edm::ParameterSet& ps) { globalFolder_ = ps.getUntrackedParameter("GlobalFolder", "RPC/RPCEfficiency/"); + SaveFile = ps.getUntrackedParameter("SaveFile", false); + NameFile = ps.getUntrackedParameter("NameFile","RPCEfficiency.root"); + numberOfDisks_ = ps.getUntrackedParameter("NumberOfEndcapDisks", 4); innermostRings_ = ps.getUntrackedParameter("NumberOfInnermostEndcapRings", 2); @@ -21,18 +24,25 @@ RPCEfficiencyPerRingLayer::RPCEfficiencyPerRingLayer(const edm::ParameterSet& ps RPCEfficiencyPerRingLayer::~RPCEfficiencyPerRingLayer(){ } -void RPCEfficiencyPerRingLayer::beginJob(){} +void RPCEfficiencyPerRingLayer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup){} + +void RPCEfficiencyPerRingLayer::beginJob(){ -void RPCEfficiencyPerRingLayer::dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const&){} + dbe_ = edm::Service().operator->(); +} -void RPCEfficiencyPerRingLayer::dqmEndJob(DQMStore::IBooker & ibooker , DQMStore::IGetter & igetter){ +void RPCEfficiencyPerRingLayer::beginRun(const edm::Run& r, const edm::EventSetup& c){ + if(dbe_ == 0) return; - ibooker.setCurrentFolder(globalFolder_); - EfficiencyPerRing = ibooker.book1D("EfficiencyPerRing","Efficiency per Ring",12,0.5,12.5); - EfficiencyPerLayer = ibooker.book1D("EfficiencyPerLayer","Efficiency per Layer",6,0.5,6.5); + dbe_->setCurrentFolder(globalFolder_); + EfficiencyPerRing = dbe_->book1D("EfficiencyPerRing","Efficiency per Ring",12,0.5,12.5); + EfficiencyPerLayer = dbe_->book1D("EfficiencyPerLayer","Efficiency per Layer",6,0.5,6.5); +} + +void RPCEfficiencyPerRingLayer::endRun(const edm::Run& r, const edm::EventSetup& c){ std::stringstream meName1; MonitorElement * myMe1; @@ -76,8 +86,8 @@ void RPCEfficiencyPerRingLayer::dqmEndJob(DQMStore::IBooker & ibooker , DQMStore k++;} myMe1 = NULL; myMe1 = NULL; - myMe1 = igetter.get(meName1.str()); - myMe2 = igetter.get(meName2.str()); + myMe1 = dbe_->get(meName1.str()); + myMe2 = dbe_->get(meName2.str()); if(myMe1 && myMe2){ TH1 * histo1 = myMe1->getTH1(); @@ -126,8 +136,8 @@ void RPCEfficiencyPerRingLayer::dqmEndJob(DQMStore::IBooker & ibooker , DQMStore meName1<get(meName1.str()); + myMe2 = dbe_->get(meName2.str()); if(myMe1 && myMe2){ Exp += myMe1->getBinContent(i); Obs += myMe2->getBinContent(i); @@ -143,7 +153,9 @@ void RPCEfficiencyPerRingLayer::dqmEndJob(DQMStore::IBooker & ibooker , DQMStore binName<<"Layer "<setBinLabel(i, binName.str()); - } + } + + if(SaveFile) dbe_->save(NameFile); } diff --git a/DQM/RPCMonitorClient/src/RPCEfficiencySecond.cc b/DQM/RPCMonitorClient/src/RPCEfficiencySecond.cc index b7975044b1243..87937c0eb2550 100644 --- a/DQM/RPCMonitorClient/src/RPCEfficiencySecond.cc +++ b/DQM/RPCMonitorClient/src/RPCEfficiencySecond.cc @@ -10,165 +10,189 @@ Original Author:Camilo Carrillo #include "FWCore/Framework/interface/EDAnalyzer.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" +#include +#include #include #include #include RPCEfficiencySecond::RPCEfficiencySecond(const edm::ParameterSet& iConfig){ - + SaveFile = iConfig.getUntrackedParameter("SaveFile", false); + NameFile = iConfig.getUntrackedParameter("NameFile","RPCEfficiency.root"); folderPath = iConfig.getUntrackedParameter("folderPath","RPC/RPCEfficiency/"); + debug = iConfig.getUntrackedParameter("debug",false); numberOfDisks_ = iConfig.getUntrackedParameter("NumberOfEndcapDisks", 4); innermostRings_ = iConfig.getUntrackedParameter("NumberOfInnermostEndcapRings", 2); - init_ = false; - } RPCEfficiencySecond::~RPCEfficiencySecond(){} -void RPCEfficiencySecond::beginJob(){} - -void RPCEfficiencySecond::dqmEndLuminosityBlock(DQMStore::IBooker & ibooker, DQMStore::IGetter & igetter, edm::LuminosityBlock const & lb, edm::EventSetup const& iSetup){ - - if(!init_){ - - LogDebug("rpcefficiencysecond")<<"Getting the RPC Geometry"; +void RPCEfficiencySecond::beginRun(const edm::Run&, const edm::EventSetup& iSetup){ - iSetup.get().get(rpcGeo_); - init_= true; - - } -} - - -void RPCEfficiencySecond::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::IGetter & igetter) { - - + dbe = edm::Service().operator->(); rpcdqm::utils rpcUtils; - //Barrel + //Barrel std::stringstream folderName; - std::stringstream MeName; std::stringstream MeTitle; - for (int w =-2; w<=2; w++){ + std::stringstream MeName; std::stringstream MeTitle; + for (int w =-2; w<=2; w++){ + folderName.str(""); folderName<setCurrentFolder(folderName.str()); + MeName.str(""); MeName<<"EffDistroWheel_"<book1D(MeName.str(),MeTitle.str(),20,0.5,100.5); + MeName.str(""); MeName<<"GlobEfficiencyWheel_"<book1D(MeName.str(),MeTitle.str(),206,0.5,206.5); + + dbe->setCurrentFolder(folderPath); MeName.str(""); - MeName<<"Efficiency_Roll_vs_Sector_Wheel_"<book2D(MeName.str(),MeName.str(),12, 0.5,12.5, 21, 0.5, 21.5); rpcUtils.labelXAxisSector( WheelSummary[w+2] ); rpcUtils.labelYAxisRoll( WheelSummary[w+2], 0, w, true); - ibooker.setCurrentFolder(folderPath+"Azimutal/"); + + dbe->setCurrentFolder(folderPath+"Azimutal/"); MeName.str(""); MeName<<"AzimutalDistroW"<book1D(MeName.str(),MeTitle.str(),12,0.5,12.5); + MeName.str(""); MeName<<"AzimutalDistroW"<book1D(MeName.str(),MeTitle.str(),12,0.5,12.5); + MeName.str(""); MeName<<"AzimutalDistroW"<book1D(MeName.str(),MeTitle.str(),12,0.5,12.5); + + dbe->setCurrentFolder(folderPath+"BarrelPerLayer/"); MeName.str(""); MeName<<"ExpLayerW"<book1D(MeName.str(),MeTitle.str(),6,0.5,6.5); + MeName.str(""); MeName<<"ObsLayerW"<book1D(MeName.str(),MeTitle.str(),6,0.5,6.5); } + //EndCap int index = 0; for (int d = (-1 *numberOfDisks_); d<=numberOfDisks_; d++){ + if (d==0) {continue;} + folderName.str(""); folderName<setCurrentFolder(folderName.str()); + MeName.str(""); MeName<<"EffDistroDisk_"<book1D(MeName.str(),MeTitle.str(),20,0.5,100.5); + MeName.str(""); MeName<<"GlobEfficiencyDisk_"<book1D(MeName.str(),MeTitle.str(),218,0.5,218.5); + + + dbe->setCurrentFolder(folderPath); MeName.str(""); MeName<<"Efficiency_Roll_vs_Segment_Disk_"<book2D(MeName.str(),MeName.str(),36,0.5,36.5,6,0.5,6.5); + rpcUtils.labelXAxisSegment(DiskSummary[index]); rpcUtils.labelYAxisRing(DiskSummary[index], innermostRings_ , true); - ibooker.setCurrentFolder(folderPath+"Azimutal/"); + + + + dbe->setCurrentFolder(folderPath+"Azimutal/"); MeName.str(""); MeName<<"GregDistroR2D"<book1D(MeName.str(),MeTitle.str(),36,0.5,36.5); + MeName.str(""); MeName<<"GregDistroR3D"<book1D(MeName.str(),MeTitle.str(),36,0.5,36.5); + MeName.str(""); MeName<<"OcGregDistroR2D"<book1D(MeName.str(),MeTitle.str(),36,0.5,36.5); + MeName.str(""); MeName<<"OcGregDistroR3D"<book1D(MeName.str(),MeTitle.str(),36,0.5,36.5); + MeName.str(""); MeName<<"ExGregDistroR2D"<book1D(MeName.str(),MeTitle.str(),36,0.5,36.5); + + MeName.str(""); MeName<<"ExGregDistroR3D"<book1D(MeName.str(),MeTitle.str(),36,0.5,36.5); + index++; } - - +} + +void RPCEfficiencySecond::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup){ } + +void RPCEfficiencySecond::endRun(const edm::Run& r, const edm::EventSetup& iSetup){ LogDebug("rpcefficiencysecond")<<"Getting the RPC Geometry"; + edm::ESHandle rpcGeo; + iSetup.get().get(rpcGeo); + //Setting Labels in Summary Label. std::stringstream binLabel; for (int w = -2; w<=2 ;w++){ for(int x = 1;x<=12;x++){ for(int y = 1;y<=21;y++){ - WheelSummary[w+2]->setBinContent(x,y,-1); + WheelSummary[w+2]->setBinContent(x,y,-1); } } } + + for (int d = 0 ; d<(numberOfDisks_*2); d++){ for(int x = 1;x<=36;x++){ for(int y = 1;y<=6;y++){ @@ -176,36 +200,51 @@ void RPCEfficiencySecond::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::IGet } } } + + binLabel.str(""); int indexWheel[5]; for(int j=0;j<5;j++){ indexWheel[j]=0; } + int indexDisk[10]; for(int j=0;j<10;j++){ indexDisk[j]=0; } - for(TrackingGeometry::DetContainer::const_iterator it=rpcGeo_->dets().begin(); it!=rpcGeo_->dets().end();it++){ + + + for(TrackingGeometry::DetContainer::const_iterator it=rpcGeo->dets().begin(); it!=rpcGeo->dets().end();it++){ + + + if(dynamic_cast< const RPCChamber* >( *it ) != 0 ){ - const RPCChamber* ch = dynamic_cast< const RPCChamber* >( *it ); + const RPCChamber* ch = dynamic_cast< const RPCChamber* >( *it ); std::vector< const RPCRoll*> roles = (ch->rolls()); for(std::vector::const_iterator r = roles.begin();r != roles.end(); ++r){ RPCDetId rpcId = (*r)->id(); RPCGeomServ rpcsrv(rpcId); - // std::string nameRoll = rpcsrv.name(); + // std::string nameRoll = rpcsrv.name(); std::string camera = rpcsrv.name(); + //Breaking down the geometry int region = rpcId.region(); - int wheel = rpcId.ring(); int ring = rpcId.ring(); + int wheel = rpcId.ring(); int ring = rpcId.ring(); int sector = rpcId.sector(); int station = rpcId.station(); - int geolayer = rpcId.layer(); + int geolayer = rpcId.layer(); + + if(region==0){//Barrel - std::stringstream meIdRPC, meIdDT; //, bxDistroId; + + std::stringstream meIdRPC, meIdDT; //, bxDistroId; + meIdRPC<get(meIdRPC.str()); + histoDT = dbe->get(meIdDT.str()); + int NumberWithOutPrediction=0; double p = 0.; double o = 0.; @@ -217,12 +256,18 @@ void RPCEfficiencySecond::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::IGet double sumbuffer = 0.; double averageeff = 0.; int NumberStripsPointed = 0; - if(histoRPC && histoDT){ + + + if(histoRPC && histoDT){ + for(int i=1;i<=int((*r)->nstrips());++i){ + if(histoDT->getBinContent(i)!=0){ LogDebug("rpcefficiencysecond")<<"Inside the If"; + buffef = double(histoRPC->getBinContent(i))/double(histoDT->getBinContent(i)); buffer = sqrt(buffef*(1.-buffef)/double(histoDT->getBinContent(i))); + sumbuffef=sumbuffef+buffef; sumbuffer = sumbuffer + buffer*buffer; NumberStripsPointed++; @@ -231,52 +276,81 @@ void RPCEfficiencySecond::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::IGet } LogDebug("rpcefficiencysecond")<<"Strip="<getTH1F()->Integral(); o=histoRPC->getTH1F()->Integral(); + if(NumberStripsPointed!=0){ averageeff = (sumbuffef/double(NumberStripsPointed))*100.; //averageerr = sqrt(sumbuffer/double(NumberStripsPointed))*100.; } + } //////////////////!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - // int Ring = rpcId.ring(); + + // int Ring = rpcId.ring(); + if(p!=0){ - ef = double(o)/double(p); + ef = double(o)/double(p); er = sqrt(ef*(1.-ef)/double(p)); } + ef=ef*100; er=er*100; - //Filling azimutal Wheel Histograms + + + //Filling azimutal Wheel Histograms + int layer = 0; - if(station==1&&geolayer==1) layer = 1; - else if(station==1&&geolayer==2) layer = 2; - else if(station==2&&geolayer==1) layer = 3; - else if(station==2&&geolayer==2) layer = 4; - else if(station==3) layer = 5; - else if(station==4) layer = 6; - ExsectorEffW[wheel+2]->Fill(sector,p); OcsectorEffW[wheel+2]->Fill(sector,o); - ExpLayerW[wheel+2]->Fill(layer, p); ObsLayerW[wheel+2]->Fill(layer, o); - LogDebug("rpcefficiencysecond")<<"Pigi "<id(); - if(p > 100){//We need at least 100 predictions to fill the summary plot - int xBin,yBin; - xBin= (*r)->id().sector(); - rpcdqm::utils rollNumber; - yBin = rollNumber.detId2RollNr((*r)->id()); - WheelSummary[wheel+2]->setBinContent(xBin,yBin,averageeff); - } - EffDistroW[wheel+2]->Fill(averageeff); - indexWheel[wheel+2]++; - EffGlobW[wheel+2]->setBinContent(indexWheel[wheel+2],ef); - EffGlobW[wheel+2]->setBinError(indexWheel[wheel+2],er); - EffGlobW[wheel+2]->setBinLabel(indexWheel[wheel+2],camera,1); + + if(station==1&&geolayer==1) layer = 1; + else if(station==1&&geolayer==2) layer = 2; + else if(station==2&&geolayer==1) layer = 3; + else if(station==2&&geolayer==2) layer = 4; + else if(station==3) layer = 5; + else if(station==4) layer = 6; + + + ExsectorEffW[wheel+2]->Fill(sector,p); OcsectorEffW[wheel+2]->Fill(sector,o); + ExpLayerW[wheel+2]->Fill(layer, p); ObsLayerW[wheel+2]->Fill(layer, o); + + + + LogDebug("rpcefficiencysecond")<<"Pigi "<id(); + + if(p > 100){//We need at least 100 predictions to fill the summary plot + + int xBin,yBin; + xBin= (*r)->id().sector(); + rpcdqm::utils rollNumber; + yBin = rollNumber.detId2RollNr((*r)->id()); + + + WheelSummary[wheel+2]->setBinContent(xBin,yBin,averageeff); + } + + + EffDistroW[wheel+2]->Fill(averageeff); + indexWheel[wheel+2]++; + EffGlobW[wheel+2]->setBinContent(indexWheel[wheel+2],ef); + EffGlobW[wheel+2]->setBinError(indexWheel[wheel+2],er); + EffGlobW[wheel+2]->setBinLabel(indexWheel[wheel+2],camera,1); + }else{//EndCap + + std::stringstream meIdRPC,meIdCSC; //, bxDistroId; - std::string meIdPRO; + std::string meIdPRO; + + meIdRPC<get(meIdRPC.str()); + histoCSC= dbe->get(meIdCSC.str()); //BXDistribution = dbe->get(bxDistroId.str()); + int NumberWithOutPrediction=0; double p = 0; double o = 0; @@ -288,45 +362,59 @@ void RPCEfficiencySecond::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::IGet double sumbuffer = 0; double averageeff = 0; int NumberStripsPointed = 0; + + if(histoRPC && histoCSC) { LogDebug("rpcefficiencysecond")<nstrips());++i){ if(histoCSC->getBinContent(i)!=0){ LogDebug("rpcefficiencysecond")<<"Inside the If"; - buffef = double(histoRPC->getBinContent(i))/double(histoCSC->getBinContent(i)); - // meMap[meIdPRO]->setBinContent(i,buffef); + buffef = double(histoRPC->getBinContent(i))/double(histoCSC->getBinContent(i)); + // meMap[meIdPRO]->setBinContent(i,buffef); buffer = sqrt(buffef*(1.-buffef)/double(histoCSC->getBinContent(i))); - // meMap[meIdPRO]->setBinError(i,buffer); - sumbuffef=sumbuffef+buffef; + // meMap[meIdPRO]->setBinError(i,buffer); + sumbuffef=sumbuffef+buffef; sumbuffer = sumbuffer + buffer*buffer; NumberStripsPointed++; }else{ NumberWithOutPrediction++; } + LogDebug("rpcefficiencysecond")<<"Strip="<getTH1F()->Integral(); o=histoRPC->getTH1F()->Integral(); + if(NumberStripsPointed!=0){ averageeff = (sumbuffef/double(NumberStripsPointed))*100.; } + } + int Disk = station*region; + if(Disk > numberOfDisks_ || Disk<-numberOfDisks_){continue;} //remove strange disk numbers!! + int dIndex = -1; if(region == -1){ dIndex = Disk+numberOfDisks_; }else if(region == 1){ dIndex = Disk+numberOfDisks_-1; } + if( dIndex<0 || dIndex>= numberOfDisks_*2){continue;} //extra check on disk numering + if(p!=0){ - ef = double(o)/double(p); + ef = double(o)/double(p); er = sqrt(ef*(1.-ef)/double(p)); } + ef=ef*100; er=er*100; - if(ring==2){ + + if(ring==2){ if (ExGregR2D[dIndex] && OcGregR2D[dIndex] ){ ExGregR2D[dIndex]->Fill(rpcsrv.segment(),p); OcGregR2D[dIndex]->Fill(rpcsrv.segment(),o); @@ -335,35 +423,46 @@ void RPCEfficiencySecond::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::IGet ExGregR3D[dIndex]->Fill(rpcsrv.segment(),p); OcGregR3D[dIndex]->Fill(rpcsrv.segment(),o); } + if(p > 100){ //We need at least 100 predictions to fill the summary plot RPCGeomServ RPCServ((*r)->id()); int xBin = RPCServ.segment(); int yBin= (ring-1)*3-(*r)->id().roll()+1; + DiskSummary[dIndex]->setBinContent(xBin, yBin, averageeff); } - if ( EffDistroD[dIndex]){EffDistroD[dIndex]->Fill(averageeff);} - indexDisk[dIndex]++; + + + if ( EffDistroD[dIndex]){EffDistroD[dIndex]->Fill(averageeff);} + indexDisk[dIndex]++; if ( EffGlobD[dIndex]){ - EffGlobD[dIndex]->setBinContent(indexDisk[dIndex],ef); - EffGlobD[dIndex]->setBinError(indexDisk[dIndex],er); - EffGlobD[dIndex]->setBinLabel(indexDisk[dIndex],camera,1); + EffGlobD[dIndex]->setBinContent(indexDisk[dIndex],ef); + EffGlobD[dIndex]->setBinError(indexDisk[dIndex],er); + EffGlobD[dIndex]->setBinLabel(indexDisk[dIndex],camera,1); + } } } } } + double eff,N,err; int k; + for (int d = 0; d<(numberOfDisks_*2); d++){ for(k=1;k<=36;k++){ + err=0; eff=0; N=ExGregR2D[d]->getBinContent(k); if(N!=0.){ eff = OcGregR2D[d]->getBinContent(k)/N; err=sqrt(eff*(1-eff)/N);} GregR2D[d]->setBinContent(k,eff); GregR2D[d]->setBinError(k,err); + err=0; eff=0; N=ExGregR3D[d]->getBinContent(k); if(N!=0.){ eff = OcGregR3D[d]->getBinContent(k)/N; err=sqrt(eff*(1-eff)/N);} GregR3D[d]->setBinContent(k,eff); GregR3D[d]->setBinError(k,err); } } + + for (int w =-2; w<=2; w++){ for(k=1;k<=12;k++){ err=0; eff=0; N=ExsectorEffW[w+2]->getBinContent(k); @@ -371,16 +470,27 @@ void RPCEfficiencySecond::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::IGet sectorEffW[w+2]->setBinContent(k,eff); sectorEffW[w+2]->setBinError(k,err); } } + + //Ranges for Both //Barrel + for (int w=-2; w<=2; w++){ EffGlobW[w+2]->setAxisRange(-4.,100.,2); EffGlobW[w+2]->setAxisTitle("%",2); - } + } + for (int d=0; d<(numberOfDisks_*2); d++){ EffGlobD[d]->setAxisRange(-4.,100.,2); EffGlobD[d]->setAxisTitle("%",2); } - + + + if(SaveFile){ + dbe->save(NameFile); + } + } +void RPCEfficiencySecond::endJob(){} + diff --git a/DQM/RPCMonitorClient/src/RPCEfficiencyShiftHisto.cc b/DQM/RPCMonitorClient/src/RPCEfficiencyShiftHisto.cc index f8fcea0a923aa..34e89ae4fbd15 100644 --- a/DQM/RPCMonitorClient/src/RPCEfficiencyShiftHisto.cc +++ b/DQM/RPCMonitorClient/src/RPCEfficiencyShiftHisto.cc @@ -25,29 +25,38 @@ RPCEfficiencyShiftHisto::RPCEfficiencyShiftHisto(const edm::ParameterSet& ps) { globalFolder_ = ps.getUntrackedParameter("GlobalFolder", "RPC/RPCEfficiency/"); effCut_= ps.getUntrackedParameter("EffCut", 90); + SaveFile = ps.getUntrackedParameter("SaveFile", false); + NameFile = ps.getUntrackedParameter("NameFile","RPCEfficiency.root"); numberOfDisks_ = ps.getUntrackedParameter("NumberOfEndcapDisks", 4); } RPCEfficiencyShiftHisto::~RPCEfficiencyShiftHisto(){ } -void RPCEfficiencyShiftHisto::beginJob(){} +void RPCEfficiencyShiftHisto::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup){} -void RPCEfficiencyShiftHisto::dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const&){} +void RPCEfficiencyShiftHisto::beginJob(){ -void RPCEfficiencyShiftHisto::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::IGetter & igetter) { + dbe_ = edm::Service().operator->(); +} + +void RPCEfficiencyShiftHisto::beginRun(const edm::Run& r, const edm::EventSetup& c){ + + if(dbe_ == 0) return; - ibooker.setCurrentFolder(globalFolder_); - EffBarrelRoll = ibooker.book1D("EffBarrelRoll", "Barrel Efficiency",101,-0.5, 100.5); - EffEndcapPlusRoll = ibooker.book1D("EffEndcapPlusRoll", "Endcap + Efficiency",101,-0.5, 100.5); - EffEndcapMinusRoll = ibooker.book1D("EffEndcapMinusRoll", "Endcap - Efficiency",101,-0.5, 100.5); - RollPercentage = ibooker.book2D("RollPercentage", "RollPercentage",1,0.,1.,3,0.,3.); + dbe_->setCurrentFolder(globalFolder_); + EffBarrelRoll = dbe_->book1D("EffBarrelRoll", "Barrel Efficiency",101,-0.5, 100.5); + EffEndcapPlusRoll = dbe_->book1D("EffEndcapPlusRoll", "Endcap + Efficiency",101,-0.5, 100.5); + EffEndcapMinusRoll = dbe_->book1D("EffEndcapMinusRoll", "Endcap - Efficiency",101,-0.5, 100.5); + RollPercentage = dbe_->book2D("RollPercentage", "RollPercentage",1,0.,1.,3,0.,3.); RollPercentage->setBinLabel(1,"%",1); RollPercentage->setBinLabel(1,"E+",2); RollPercentage->setBinLabel(2,"B",2); RollPercentage->setBinLabel(3,"E-",2); +} +void RPCEfficiencyShiftHisto::endRun(const edm::Run& r, const edm::EventSetup& c){ std::stringstream meName; MonitorElement * myMe; @@ -67,7 +76,7 @@ void RPCEfficiencyShiftHisto::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::I if(w <= 0) meName<get(meName.str()); if(myMe){ for(int s = 1; s <= myMe->getNbinsX(); s++){ @@ -106,7 +115,7 @@ void RPCEfficiencyShiftHisto::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::I meName.str(""); meName<get(meName.str()); if(myMe){ @@ -141,7 +150,8 @@ void RPCEfficiencyShiftHisto::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::I if(RollPercentage) RollPercentage->setBinContent(1,1,percEndcapPlus); } - + if(SaveFile) dbe_->save(NameFile); + } diff --git a/DQM/RPCMonitorClient/src/RPCEventSummary.cc b/DQM/RPCMonitorClient/src/RPCEventSummary.cc index c2c3bd8f8481f..39a1a8bcc9754 100644 --- a/DQM/RPCMonitorClient/src/RPCEventSummary.cc +++ b/DQM/RPCMonitorClient/src/RPCEventSummary.cc @@ -7,10 +7,10 @@ #include "CondFormats/DataRecord/interface/RunSummaryRcd.h" // Framework #include "FWCore/MessageLogger/interface/MessageLogger.h" -//#include "FWCore/Framework/interface/LuminosityBlock.h" -//#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/LuminosityBlock.h" +#include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/EventSetup.h" -#include "FWCore/Framework/interface/ESHandle.h" +//#include "FWCore/ParameterSet/interface/ParameterSet.h" RPCEventSummary::RPCEventSummary(const edm::ParameterSet& ps ){ @@ -44,148 +44,174 @@ RPCEventSummary::RPCEventSummary(const edm::ParameterSet& ps ){ RPCEventSummary::~RPCEventSummary(){ edm::LogVerbatim ("rpceventsummary") << "[RPCEventSummary]: Destructor "; + dbe_=0; } void RPCEventSummary::beginJob(){ edm::LogVerbatim ("rpceventsummary") << "[RPCEventSummary]: Begin job "; - init_ = false; + dbe_ = edm::Service().operator->(); } -void RPCEventSummary::dqmEndLuminosityBlock(DQMStore::IBooker & ibooker, DQMStore::IGetter & igetter, edm::LuminosityBlock const & lb, edm::EventSetup const& setup){ - - edm::LogVerbatim ("rpceventsummary") << "[RPCEventSummary]: Begin run"; - +void RPCEventSummary::beginRun(const edm::Run& r, const edm::EventSetup& setup){ + edm::LogVerbatim ("rpceventsummary") << "[RPCEventSummary]: Begin run"; - if(!init_){ - lumiCounter_ = prescaleFactor_ ; - - edm::eventsetup::EventSetupRecordKey recordKey(edm::eventsetup::EventSetupRecordKey::TypeTag::findType("RunInfoRcd")); - - int defaultValue = 1; - - if(0 != setup.find( recordKey ) ) { - defaultValue = -1; - //get fed summary information - edm::ESHandle sumFED; - setup.get().get(sumFED); - std::vector FedsInIds= sumFED->m_fed_in; - unsigned int f = 0; - bool flag = false; - while(!flag && f < FedsInIds.size()) { - int fedID=FedsInIds[f]; - //make sure fed id is in allowed range - if(fedID>=FEDRange_.first && fedID<=FEDRange_.second) { - defaultValue = 1; - flag = true; - } - f++; - } - } - - - MonitorElement* me; - ibooker.setCurrentFolder(eventInfoPath_); - - //a global summary float [0,1] providing a global summary of the status - //and showing the goodness of the data taken by the the sub-system - std::string histoName="reportSummary"; - me=0; - me = ibooker.bookFloat(histoName); - me->Fill(defaultValue); - - //TH2F ME providing a mapof values[0-1] to show if problems are localized or distributed - me=0; - me = ibooker.book2D("reportSummaryMap", "RPC Report Summary Map", 15, -7.5, 7.5, 12, 0.5 ,12.5); - - //customize the 2d histo - std::stringstream BinLabel; - for (int i= 1 ; i<=15; i++){ - BinLabel.str(""); - if(i<13){ - BinLabel<<"Sec"<setBinLabel(i,BinLabel.str(),2); - } - + init_ = false; + lumiCounter_ = prescaleFactor_ ; + + edm::eventsetup::EventSetupRecordKey recordKey(edm::eventsetup::EventSetupRecordKey::TypeTag::findType("RunInfoRcd")); + + int defaultValue = 1; + + if(0 != setup.find( recordKey ) ) { + defaultValue = -1; + //get fed summary information + edm::ESHandle sumFED; + setup.get().get(sumFED); + std::vector FedsInIds= sumFED->m_fed_in; + unsigned int f = 0; + bool flag = false; + while(!flag && f < FedsInIds.size()) { + int fedID=FedsInIds[f]; + //make sure fed id is in allowed range + if(fedID>=FEDRange_.first && fedID<=FEDRange_.second) { + defaultValue = 1; + flag = true; + } + f++; + } + } + + + MonitorElement* me; + dbe_->setCurrentFolder(eventInfoPath_); + + //a global summary float [0,1] providing a global summary of the status + //and showing the goodness of the data taken by the the sub-system + std::string histoName="reportSummary"; + me =0; + me = dbe_->get(eventInfoPath_ +"/"+ histoName); + if ( 0!=me) { + dbe_->removeElement(me->getName()); + } + + me = dbe_->bookFloat(histoName); + me->Fill(defaultValue); + + //TH2F ME providing a mapof values[0-1] to show if problems are localized or distributed + me =0; + me = dbe_->get(eventInfoPath_ +"/reportSummaryMap"); + if ( 0!=me) { + dbe_->removeElement(me->getName()); + } + + me = dbe_->book2D("reportSummaryMap", "RPC Report Summary Map", 15, -7.5, 7.5, 12, 0.5 ,12.5); + + //customize the 2d histo + std::stringstream BinLabel; + for (int i= 1 ; i<=15; i++){ + BinLabel.str(""); + if(i<13){ + BinLabel<<"Sec"<setBinLabel(i,BinLabel.str(),2); + } + + BinLabel.str(""); + if(i<5) + BinLabel<<"Disk"<11) + BinLabel<<"Disk"<11) - BinLabel<<"Disk"<setBinLabel(i,BinLabel.str(),1); - } - - //fill the histo with "1" --- just for the moment - for(int i=1; i<=15; i++){ - for (int j=1; j<=12; j++ ){ - if(i==5 || i==11 || (j>6 && (i<6 || i>10))) - me->setBinContent(i,j,-1);//bins that not correspond to subdetector parts - else - me->setBinContent(i,j,defaultValue); - } - } - - if(numberDisk_ < 4) - for (int j=1; j<=12; j++ ){ + else + BinLabel<<"Wheel"<setBinLabel(i,BinLabel.str(),1); + } + + //fill the histo with "1" --- just for the moment + for(int i=1; i<=15; i++){ + for (int j=1; j<=12; j++ ){ + if(i==5 || i==11 || (j>6 && (i<6 || i>10))) + me->setBinContent(i,j,-1);//bins that not correspond to subdetector parts + else + me->setBinContent(i,j,defaultValue); + } + } + + if(numberDisk_ < 4) + for (int j=1; j<=12; j++ ){ me->setBinContent(1,j,-1);//bins that not correspond to subdetector parts me->setBinContent(15,j,-1); - } - - //the reportSummaryContents folder containins a collection of ME floats [0-1] (order of 5-10) - // which describe the behavior of the respective subsystem sub-components. - ibooker.setCurrentFolder(eventInfoPath_+ "/reportSummaryContents"); - - std::stringstream segName; - std::vector segmentNames; - for(int i=-2; i<=2; i++){ - segName.str(""); - segName<<"RPC_Wheel"<setCurrentFolder(eventInfoPath_+ "/reportSummaryContents"); + + std::stringstream segName; + std::vector segmentNames; + for(int i=-4; i<=4; i++){ + if(i>-3 && i<3) { segName.str(""); - segName<<"RPC_Disk"<Fill(defaultValue); + if(i==0) continue; + segName.str(""); + segName<<"RPC_Disk"<get(eventInfoPath_ + "/reportSummaryContents/" +segmentNames[i]); + if ( 0!=me) { + dbe_->removeElement(me->getName()); } - - lumiCounter_ = prescaleFactor_; - init_ = true; + me = dbe_->bookFloat(segmentNames[i]); + me->Fill(defaultValue); + } + + //excluded endcap parts + if(numberDisk_ < 4){ + me=dbe_->get(eventInfoPath_ + "/reportSummaryContents/RPC_Disk4"); + if(me) me->Fill(-1); + me=dbe_->get(eventInfoPath_ + "/reportSummaryContents/RPC_Disk-4"); + if(me) me->Fill(-1); } +} +void RPCEventSummary::beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context){} - if(!offlineDQM_ && lumiCounter_%prescaleFactor_ == 0 ){ - this->clientOperation(igetter); +void RPCEventSummary::analyze(const edm::Event& iEvent, const edm::EventSetup& c) {} + +void RPCEventSummary::endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& iSetup) { + edm::LogVerbatim ("rpceventsummary") <<"[RPCEventSummary]: End of LS transition, performing DQM client operation"; + + if(offlineDQM_) return; + + if(!init_){ + this->clientOperation(); + return; } lumiCounter_++; + if(lumiCounter_%prescaleFactor_ != 0) return; -} - + this->clientOperation(); +} -void RPCEventSummary::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::IGetter & igetter){ +void RPCEventSummary::endRun(const edm::Run& r, const edm::EventSetup& c){ - this->clientOperation(igetter); + this->clientOperation(); } -void RPCEventSummary::clientOperation( DQMStore::IGetter & igetter){ +void RPCEventSummary::clientOperation(){ float rpcevents = minimumEvents_; - MonitorElement * RPCEvents ; - RPCEvents = igetter.get( prefixFolder_ +"/RPCEvents"); + RPCEvents = dbe_->get( prefixFolder_ +"/RPCEvents"); if(RPCEvents) { rpcevents = RPCEvents ->getBinContent(1); @@ -193,12 +219,13 @@ void RPCEventSummary::clientOperation( DQMStore::IGetter & igetter){ if(rpcevents < minimumEvents_) return; + init_ = true; std::stringstream meName; MonitorElement * myMe; meName.str(""); meName<get(meName.str()); MonitorElement * globalMe; @@ -209,7 +236,7 @@ void RPCEventSummary::clientOperation( DQMStore::IGetter & igetter){ meName.str(""); meName<get(meName.str()); if(myMe){ float wheelFactor = 0; @@ -241,7 +268,7 @@ void RPCEventSummary::clientOperation( DQMStore::IGetter & igetter){ meName.str(""); meName<get(meName.str()); if(globalMe) globalMe->Fill(wheelFactor); barrelFactor += wheelFactor; @@ -261,7 +288,7 @@ void RPCEventSummary::clientOperation( DQMStore::IGetter & igetter){ meName.str(""); meName<get(meName.str()); if(myMe){ float diskFactor = 0; @@ -298,7 +325,7 @@ void RPCEventSummary::clientOperation( DQMStore::IGetter & igetter){ meName.str(""); meName<get(meName.str()); if(globalMe) globalMe->Fill(diskFactor); endcapFactor += diskFactor; @@ -314,7 +341,7 @@ void RPCEventSummary::clientOperation( DQMStore::IGetter & igetter){ float rpcFactor = barrelFactor; if(doEndcapCertification_){ rpcFactor = ( barrelFactor + endcapFactor)/2; } - globalMe = igetter.get(eventInfoPath_ +"/reportSummary"); + globalMe = dbe_->get(eventInfoPath_ +"/reportSummary"); if(globalMe) globalMe->Fill(rpcFactor); diff --git a/DQM/RPCMonitorClient/src/RPCMon_SS_Dbx_Global.cc b/DQM/RPCMonitorClient/src/RPCMon_SS_Dbx_Global.cc new file mode 100644 index 0000000000000..a11a07972e31a --- /dev/null +++ b/DQM/RPCMonitorClient/src/RPCMon_SS_Dbx_Global.cc @@ -0,0 +1,144 @@ +#include +#include +#include +#include "DQM/RPCMonitorDigi/interface/utils.h" +// Framework +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/ServiceRegistry/interface/Service.h" +//DQM Services +#include "DQMServices/Core/interface/MonitorElement.h" +//DataFormats +#include + +//Geometry +#include "Geometry/RPCGeometry/interface/RPCGeomServ.h" +#include "Geometry/RPCGeometry/interface/RPCGeometry.h" +#include "Geometry/Records/interface/MuonGeometryRecord.h" + + +RPCMon_SS_Dbx_Global::RPCMon_SS_Dbx_Global(const edm::ParameterSet& iConfig ) { + + rpcDigiCollectionTag_ = consumes(iConfig.getParameter("rpcDigiCollectionTag")) ; + + edm::LogVerbatim ("rpcmonitorerror") << "[RPCMon_SS_Dbx_Global]: Constructor"; + + + globalFolder_ = iConfig.getUntrackedParameter("GlobalHistogramsFolder","RPC/RecHits/SummaryHistograms"); + + saveRootFile_ = iConfig.getUntrackedParameter("SaveRootFile", false); + rootFileName_ = iConfig.getUntrackedParameter("RootFileName","out.root"); + digiLabel_ = iConfig.getUntrackedParameter("DigiLabel","muonRPCDigis"); + numberOfRings_ = iConfig.getUntrackedParameter("NumberOfEndcapRings", 2); + +} + +RPCMon_SS_Dbx_Global::~RPCMon_SS_Dbx_Global(){ + edm::LogVerbatim ("rpcmonitorerror") << "[RPCMon_SS_Dbx_Global]: Destructor "; + dbe_=0; +} + +void RPCMon_SS_Dbx_Global::beginJob(){ + + edm::LogVerbatim ("rpcmonitorerror") << "[RPCMon_SS_Dbx_Global]: Begin job "; + +} + +void RPCMon_SS_Dbx_Global::endJob(){} + +void RPCMon_SS_Dbx_Global::beginRun(const edm::Run& r, const edm::EventSetup& c){ + edm::LogVerbatim ("rpcmonitorerror") << "[RPCMon_SS_Dbx_Global]: Begin run"; + + dbe_ = edm::Service().operator->(); + dbe_->setCurrentFolder(globalFolder_); + + MonitorElement* me; + me =0; + me = dbe_->get(globalFolder_ + "/AfterPulseBxDiff"); + if ( 0!=me) + dbe_->removeElement(me->getName()); + me = dbe_->book1D("AfterPulseBxDiff","After Pulse Bx Difference",13,-6.5,6.5); +} + +void RPCMon_SS_Dbx_Global::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { + + edm::Handle rpcDigis; + iEvent.getByToken(rpcDigiCollectionTag_, rpcDigis); + + edm::ESHandle pDD; + iSetup.get().get( pDD ); + rpcdqm::utils rpcUtils; + + RPCDigiCollection::DigiRangeIterator detUnitIt; + + dbe_->setCurrentFolder(globalFolder_); + + // Loop over DetUnit's + for (detUnitIt=rpcDigis->begin();detUnitIt!=rpcDigis->end();++detUnitIt){ + const RPCDetId& id = (*detUnitIt).first; + const RPCRoll* roll = dynamic_cast( pDD->roll(id)); + const RPCDigiCollection::Range& range = (*detUnitIt).second; + // std::cout <<" detector "<< id.region()<< std::endl; + std::ostringstream tag; + std::ostringstream name; + MonitorElement* me; + + //get roll name + RPCGeomServ RPCname(id); + std::string nameRoll = RPCname.name(); + //get roll number + RPCGeomServ RPCnumber(id); + int nr = RPCnumber.chambernr(); + //get segment (valid only if endcap) + RPCGeomServ RPCsegment(id); + int seg = RPCsegment.segment(); + + // Loop over the digis of this DetUnit + for (RPCDigiCollection::const_iterator digiIt = range.first;digiIt!=range.second;++digiIt) { + if (digiIt->strip() < 1 || digiIt->strip() > roll->nstrips() ) + edm::LogVerbatim ("rpcmonitorerror") <<" XXXX Problem with detector "<< id << ", strip # " << digiIt->strip(); + else { //Loop on digi2 + for (RPCDigiCollection::const_iterator digiIt2 = digiIt; digiIt2!=range.second; ++digiIt2) { + int dstrip = digiIt->strip() - digiIt2->strip(); + int dbx = digiIt->bx() - digiIt2->bx(); + if ( dstrip == 0 && abs(dbx) != 0 ) { + // std::cout <<" detector 3333 "<< id.region()<<" " << id.ring()<get(globalFolder_ + "/AfterPulseBxDiff"); + if(!me) continue; + me->Fill(dbx); + + if (id.region()!=0){//Endcap + name.str(""); + tag.str(""); + tag << "AfterPulse_Ring_vs_Segment_Disk_" << id.region()*id.station(); + name << "Endcap, After Pulse, Diff bx, Disk # " << id.region()*id.station(); + me = dbe_->get(globalFolder_ + "/"+tag.str()); + if (!me){ + me = dbe_->book2D (tag.str(),name.str(),36,0.5,36.5, 3*numberOfRings_, 0.0, 3*numberOfRings_); + + rpcUtils.labelXAxisSegment(me); + rpcUtils.labelYAxisRing(me, numberOfRings_, true); + + } + int yBin; + (numberOfRings_ == 3 ? yBin= id.ring()*3-id.roll()+1 : yBin= (id.ring()-1)*3-id.roll()+1); + me->Fill(seg, yBin); + } else { // Barrel ( region == 0 ). + + name.str(""); + tag.str(""); + tag << "AfterPulse_Roll_vs_Sector_Wheel_" << std::setw(2) << std::setfill('+') << id.ring(); + name << "Barrel, After Pulse, Diff. bx, Wheel # " << std::setw(2) << std::setfill('+') << id.ring(); + me = dbe_->get(globalFolder_ + "/"+tag.str()); + if (!me){ + me = dbe_->book2D (tag.str(),name.str(),12,0.5,12.5,21,0.5,21.5); + rpcUtils.labelXAxisSector( me); + rpcUtils.labelYAxisRoll(me, 0, id.ring(), true); + } + me->Fill(id.sector(),nr); + }//Barrel + } + } + } + } + } +} diff --git a/DQM/RPCMonitorClient/src/RPCMultiplicityTest.cc b/DQM/RPCMonitorClient/src/RPCMultiplicityTest.cc index 70178a1ade40f..d47263e9b804a 100644 --- a/DQM/RPCMonitorClient/src/RPCMultiplicityTest.cc +++ b/DQM/RPCMonitorClient/src/RPCMultiplicityTest.cc @@ -14,41 +14,95 @@ #include RPCMultiplicityTest::RPCMultiplicityTest(const edm::ParameterSet& ps ){ - edm::LogVerbatim ("multiplicity") << "[RPCMultiplicityTest]: Constructor"; useRollInfo_ = ps.getUntrackedParameter("UseRollInfo", false); prescaleFactor_ = ps.getUntrackedParameter("DiagnosticPrescale", 1); numberOfDisks_ = ps.getUntrackedParameter("NumberOfEndcapDisks", 4); numberOfRings_ = ps.getUntrackedParameter("NumberOfEndcapRings", 2); testMode_ = ps.getUntrackedParameter("testMode", false); - } -RPCMultiplicityTest::~RPCMultiplicityTest(){} - +RPCMultiplicityTest::~RPCMultiplicityTest(){ + dbe_ = 0; +} -void RPCMultiplicityTest::beginJob(std::string & workingFolder ){ +void RPCMultiplicityTest::beginJob(DQMStore * dbe, std::string workingFolder ){ edm::LogVerbatim ("multiplicity") << "[RPCMultiplicityTest]: Begin job"; + globalFolder_ = workingFolder; + dbe_=dbe; +} + +void RPCMultiplicityTest::endRun(const edm::Run& r, const edm::EventSetup& iSetup){ + + edm::LogVerbatim ("multiplicity") << "[RPCMultiplicityTest]: End run"; + +} + +void RPCMultiplicityTest::getMonitorElements(std::vector & meVector, std::vector & detIdVector){ + + //Get NumberOfDigi ME for each roll + for (unsigned int i = 0 ; igetTags(); + DQMNet::TagList::iterator tagItr = tagList.begin(); + + while (tagItr != tagList.end() && !flag ) { + if((*tagItr) == rpcdqm::MULTIPLICITY) + flag= true; + + tagItr++; + } + + if(flag){ + myNumDigiMe_.push_back(meVector[i]); + myDetIds_.push_back(detIdVector[i]); + } + } } -void RPCMultiplicityTest::myBooker(DQMStore::IBooker & ibooker){ +void RPCMultiplicityTest::beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) {} +void RPCMultiplicityTest::analyze(const edm::Event& iEvent, const edm::EventSetup& c){} - ibooker.setCurrentFolder(globalFolder_); +void RPCMultiplicityTest::endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& iSetup) {} + +void RPCMultiplicityTest::clientOperation(edm::EventSetup const& iSetup) { + + edm::LogVerbatim ("multiplicity") <<"[RPCMultiplicityTest]: Client Operation"; - std::stringstream histoName; + //Loop on MEs + for (unsigned int i = 0 ; ifillGlobalME(myDetIds_[i],myNumDigiMe_[i]); + }//End loop on MEs +} + +void RPCMultiplicityTest::beginRun(const edm::Run& r, const edm::EventSetup& c){ + + MonitorElement* me=NULL; + dbe_->setCurrentFolder(globalFolder_); + + std::stringstream histoName; + rpcdqm::utils rpcUtils; for (int i = -2; i<=2;i++ ){//loop on wheels and disks histoName.str(""); histoName<<"NumberOfDigi_Mean_Roll_vs_Sector_Wheel"<get(globalFolder_ +"/"+ histoName.str()); + if ( 0!=me) { + dbe_->removeElement(me->getName()); + } - MULTWheel[i+2] = ibooker.book2D(histoName.str().c_str(), histoName.str().c_str(), 12, 0.5, 12.5, 21, 0.5, 21.5); + MULTWheel[i+2] = dbe_->book2D(histoName.str().c_str(), histoName.str().c_str(), 12, 0.5, 12.5, 21, 0.5, 21.5); rpcUtils.labelXAxisSector( MULTWheel[i+2]); rpcUtils.labelYAxisRoll( MULTWheel[i+2], 0, i,useRollInfo_ ); @@ -56,7 +110,13 @@ void RPCMultiplicityTest::myBooker(DQMStore::IBooker & ibooker){ if(testMode_){ histoName.str(""); histoName<<"NumberOfDigi_Mean_Distribution_Wheel"<get(globalFolder_ +"/"+ histoName.str()); + if ( 0!=me) { + dbe_->removeElement(me->getName()); + } + + MULTDWheel[i+2] = dbe_->book1D(histoName.str().c_str(), histoName.str().c_str(), 100, 0.5, 50.5); } }//end wheels @@ -69,51 +129,32 @@ void RPCMultiplicityTest::myBooker(DQMStore::IBooker & ibooker){ histoName.str(""); histoName<<"NumberOfDigi_Mean_Ring_vs_Segment_Disk"<get(globalFolder_ +"/"+ histoName.str()); + if ( 0!=me) { + dbe_->removeElement(me->getName()); + } + MULTDisk[d+offset] = dbe_->book2D(histoName.str().c_str(), histoName.str().c_str(),36, 0.5, 36.5, 3*numberOfRings_, 0.5,3*numberOfRings_+ 0.5); rpcUtils.labelXAxisSegment(MULTDisk[d+offset]); rpcUtils.labelYAxisRing(MULTDisk[d+offset], numberOfRings_,useRollInfo_ ); if(testMode_){ histoName.str(""); histoName<<"NumberOfDigi_Mean_Distribution_Disk"<get(globalFolder_ +"/"+ histoName.str()); + if ( 0!=me) { + dbe_->removeElement(me->getName()); + } + + MULTDDisk[d+offset] = dbe_->book1D(histoName.str().c_str(), histoName.str().c_str(), 100, 0.5, 50.5); } }//end loop on wheels and disks -} - - - - - -void RPCMultiplicityTest::getMonitorElements(std::vector & meVector, std::vector & detIdVector, std::string & clientHistoName){ - - //Get NumberOfDigi ME for each roll - for (unsigned int i = 0 ; igetName(); - if(meName.find(clientHistoName) != std::string::npos){ - myNumDigiMe_.push_back(meVector[i]); - myDetIds_.push_back(detIdVector[i]); - } - } } - - -void RPCMultiplicityTest::clientOperation() { - - edm::LogVerbatim ("multiplicity") <<"[RPCMultiplicityTest]: Client Operation"; - - //Loop on MEs - for (unsigned int i = 0 ; ifillGlobalME(myDetIds_[i],myNumDigiMe_[i]); - }//End loop on MEs -} - - - + void RPCMultiplicityTest::endJob(){} void RPCMultiplicityTest::fillGlobalME(RPCDetId & detId, MonitorElement * myMe){ @@ -122,20 +163,22 @@ void RPCMultiplicityTest::fillGlobalME(RPCDetId & detId, MonitorElement * myMe) if (detId.region()==0) { MULT = MULTWheel[detId.ring()+2]; - if(testMode_) { MULTD = MULTDWheel[detId.ring()+2];} + if(testMode_) MULTD = MULTDWheel[detId.ring()+2]; }else{ if(-detId.station() + numberOfDisks_ >= 0 ){ if(detId.region()<0){ MULT = MULTDisk[-detId.station() + numberOfDisks_]; - if(testMode_) { MULTD = MULTDDisk[-detId.station()+ numberOfDisks_];} + if(testMode_) MULTD = MULTDDisk[-detId.station()+ numberOfDisks_]; }else{ MULT = MULTDisk[detId.station()+ numberOfDisks_ -1]; - if(testMode_) { MULTD = MULTDDisk[detId.station()+ numberOfDisks_-1];} + if(testMode_) MULTD = MULTDDisk[detId.station()+ numberOfDisks_-1]; } } } + + int xBin,yBin; if(detId.region()==0){//Barrel xBin= detId.sector(); @@ -150,7 +193,9 @@ void RPCMultiplicityTest::fillGlobalME(RPCDetId & detId, MonitorElement * myMe) float mean = myMe->getMean(); - if(MULT) {MULT->setBinContent(xBin,yBin, mean );} - if(testMode_ && MULTD) {MULTD->Fill(mean);} + if(MULT) MULT->setBinContent(xBin,yBin, mean ); + if(testMode_ && MULTD) MULTD->Fill(mean); + + } diff --git a/DQM/RPCMonitorClient/src/RPCNoisyStripTest.cc b/DQM/RPCMonitorClient/src/RPCNoisyStripTest.cc index bd20f2aba51e6..43308e1309a25 100644 --- a/DQM/RPCMonitorClient/src/RPCNoisyStripTest.cc +++ b/DQM/RPCMonitorClient/src/RPCNoisyStripTest.cc @@ -23,29 +23,42 @@ RPCNoisyStripTest::RPCNoisyStripTest(const edm::ParameterSet& ps ){ } -RPCNoisyStripTest::~RPCNoisyStripTest(){} +RPCNoisyStripTest::~RPCNoisyStripTest(){dbe_=0;} -void RPCNoisyStripTest::beginJob(std::string & workingFolder){ +void RPCNoisyStripTest::beginJob(DQMStore * dbe, std::string workingFolder){ edm::LogVerbatim ("rpcnoisetest") << "[RPCNoisyStripTest]: Begin job "; - globalFolder_ = workingFolder; + dbe_ = dbe; + + globalFolder_ = workingFolder; +} + +void RPCNoisyStripTest::endRun(const edm::Run& r, const edm::EventSetup& iSetup){ + edm::LogVerbatim ("rpcnoisetest") << "[RPCNoisyStripTest]: End run"; } -void RPCNoisyStripTest::clientOperation() { +void RPCNoisyStripTest::beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context){} + +void RPCNoisyStripTest::analyze(const edm::Event& iEvent, const edm::EventSetup& c) {} + +void RPCNoisyStripTest::endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& iSetup) {} + +void RPCNoisyStripTest::clientOperation(edm::EventSetup const& iSetup) { edm::LogVerbatim ("rpcnoisetest") <<"[RPCNoisyStripTest]: Client Operation"; //Loop on MEs for (unsigned int i = 0 ; ifillGlobalME(myDetIds_[i],myOccupancyMe_[i]); + this->fillGlobalME(myDetIds_[i],myOccupancyMe_[i], iSetup); }//End loop on MEs } -void RPCNoisyStripTest::myBooker(DQMStore::IBooker & ibooker){ +void RPCNoisyStripTest::beginRun(const edm::Run& r, const edm::EventSetup& c){ - ibooker.setCurrentFolder( globalFolder_); + MonitorElement* me; + dbe_->setCurrentFolder( globalFolder_); std::stringstream histoName; @@ -56,17 +69,33 @@ void RPCNoisyStripTest::myBooker(DQMStore::IBooker & ibooker){ if(testMode_){ histoName.str(""); histoName<<"RPCNoisyStrips_Distribution_Wheel"<get( globalFolder_ +"/"+ histoName.str()); + if ( 0!=me ) { + dbe_->removeElement(me->getName()); + } + NOISEDWheel[w+2] = dbe_->book1D(histoName.str().c_str(), histoName.str().c_str(), 6, -0.5, 5.5); histoName.str(""); histoName<<"RPCStripsDeviation_Distribution_Wheel"<get( globalFolder_ +"/"+ histoName.str()); + if ( 0!=me ) { + dbe_->removeElement(me->getName()); + } + DEVDWheel[w+2] = dbe_->book1D(histoName.str().c_str(), histoName.str().c_str(), 101, -0.01, 10.01); } histoName.str(""); histoName<<"RPCNoisyStrips_Roll_vs_Sector_Wheel"<get( globalFolder_ +"/"+ histoName.str()); + if ( 0!=me ) { + dbe_->removeElement(me->getName()); + } + + NOISEWheel[w+2] = dbe_->book2D(histoName.str().c_str(), histoName.str().c_str() , 12, 0.5, 12.5, 21, 0.5, 21.5); rpcUtils.labelXAxisSector(NOISEWheel[w+2]); rpcUtils.labelYAxisRoll(NOISEWheel[w+2], 0, w, useRollInfo_); } @@ -83,17 +112,33 @@ void RPCNoisyStripTest::myBooker(DQMStore::IBooker & ibooker){ if (testMode_){ histoName.str(""); histoName<<"RPCNoisyStrips_Distribution_Disk"<get( globalFolder_ +"/"+ histoName.str()); + if ( 0!=me ) { + dbe_->removeElement(me->getName()); + } + NOISEDDisk[d+offset] = dbe_->book1D(histoName.str().c_str(), histoName.str().c_str(), 6, -0.5, 5.5); histoName.str(""); histoName<<"RPCStripsDeviation_Distribution_Disk"<get( globalFolder_ +"/"+ histoName.str()); + if ( 0!=me ) { + dbe_->removeElement(me->getName()); + } + DEVDDisk[d+offset] = dbe_->book1D(histoName.str().c_str(), histoName.str().c_str(), 101, -0.01, 10.01); } histoName.str(""); histoName<<"RPCNoisyStrips_Ring_vs_Segment_Disk"<get( globalFolder_ +"/"+ histoName.str()); + if ( 0!=me ) { + dbe_->removeElement(me->getName()); + } + + NOISEDisk[d+offset] = dbe_->book2D(histoName.str().c_str(), histoName.str().c_str() , 36, 0.5, 36.5, 3*numberOfRings_, 0.5,3*numberOfRings_+ 0.5); rpcUtils.labelXAxisSegment(NOISEDisk[d+offset]); rpcUtils.labelYAxisRing(NOISEDisk[d+offset], numberOfRings_, useRollInfo_); @@ -102,15 +147,25 @@ void RPCNoisyStripTest::myBooker(DQMStore::IBooker & ibooker){ } -void RPCNoisyStripTest::getMonitorElements(std::vector & meVector, std::vector & detIdVector, std::string & clientHistoName){ +void RPCNoisyStripTest::getMonitorElements(std::vector & meVector, std::vector & detIdVector){ //Get NumberOfDigi ME for each roll for (unsigned int i = 0 ; igetName(); - - if(meName.find(clientHistoName) != std::string::npos){ - + + bool flag= false; + + DQMNet::TagList tagList; + tagList = meVector[i]->getTags(); + DQMNet::TagList::iterator tagItr = tagList.begin(); + + while (tagItr != tagList.end() && !flag ) { + if((*tagItr) == rpcdqm::OCCUPANCY) + flag= true; + + tagItr++; + } + + if(flag){ myOccupancyMe_.push_back(meVector[i]); myDetIds_.push_back(detIdVector[i]); } @@ -118,8 +173,13 @@ void RPCNoisyStripTest::getMonitorElements(std::vector & meVe } -void RPCNoisyStripTest::fillGlobalME(RPCDetId & detId, MonitorElement * myMe){ +void RPCNoisyStripTest::endJob(){} +void RPCNoisyStripTest::fillGlobalME(RPCDetId & detId, MonitorElement * myMe,edm::EventSetup const& iSetup){ + + // ESHandle rpcgeo; +// iSetup.get().get(rpcgeo); + std::stringstream meName; MonitorElement * NOISE=NULL; diff --git a/DQM/RPCMonitorClient/src/RPCOccupancyTest.cc b/DQM/RPCMonitorClient/src/RPCOccupancyTest.cc index 851a2d6615701..15472b1fe632c 100644 --- a/DQM/RPCMonitorClient/src/RPCOccupancyTest.cc +++ b/DQM/RPCMonitorClient/src/RPCOccupancyTest.cc @@ -25,69 +25,132 @@ RPCOccupancyTest::RPCOccupancyTest(const edm::ParameterSet& ps ){ } -RPCOccupancyTest::~RPCOccupancyTest(){} +RPCOccupancyTest::~RPCOccupancyTest(){ + dbe_=0; +} -void RPCOccupancyTest::beginJob(std::string & workingFolder){ +void RPCOccupancyTest::beginJob(DQMStore * dbe, std::string workingFolder){ edm::LogVerbatim ("rpceventsummary") << "[RPCOccupancyTest]: Begin job "; globalFolder_ = workingFolder; + dbe_=dbe; } +void RPCOccupancyTest::endRun(const edm::Run& r, const edm::EventSetup& c){ + edm::LogVerbatim ("rpceventsummary") << "[RPCOccupancyTest]: End run"; + } -void RPCOccupancyTest::getMonitorElements(std::vector & meVector, std::vector & detIdVector, std::string & clientHistoName){ - //Get NumberOfDigi ME for each roll - for(unsigned int i = 0 ; i & meVector, std::vector & detIdVector){ + + //Get Occupancy ME for each roll + for (unsigned int i = 0 ; igetName(); - - if(meName.find(clientHistoName) != std::string::npos){ + bool flag= false; + + DQMNet::TagList tagList; + tagList = meVector[i]->getTags(); + DQMNet::TagList::iterator tagItr = tagList.begin(); + + while (tagItr != tagList.end() && !flag ) { + if((*tagItr) == rpcdqm::OCCUPANCY) + flag= true; + tagItr++; + } + + if(flag){ myOccupancyMe_.push_back(meVector[i]); myDetIds_.push_back(detIdVector[i]); } } } -void RPCOccupancyTest::clientOperation() { +void RPCOccupancyTest::beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context){} + +void RPCOccupancyTest::analyze(const edm::Event& iEvent, const edm::EventSetup& c) {} + +void RPCOccupancyTest::endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& iSetup) {} + +void RPCOccupancyTest::clientOperation(edm::EventSetup const& iSetup) { edm::LogVerbatim ("rpceventsummary") <<"[RPCOccupancyTest]: Client Operation"; + MonitorElement * RPCEvents = dbe_->get(prefixDir_ +"/RPCEvents"); + if(RPCEvents == 0 ){rpcevents_ = 0;} + else{ + rpcevents_ = RPCEvents ->getBinContent(1); + } + //Loop on MEs for (unsigned int i = 0 ; ifillGlobalME(myDetIds_[i],myOccupancyMe_[i]); }//End loop on MEs } +void RPCOccupancyTest::endJob(void) {} +void RPCOccupancyTest::beginRun(const edm:: Run& r, const edm::EventSetup& c) { -void RPCOccupancyTest::myBooker(DQMStore::IBooker & ibooker){ + MonitorElement* me; + dbe_->setCurrentFolder( globalFolder_); - ibooker.setCurrentFolder( globalFolder_); - - std::stringstream histoName; - rpcdqm::utils rpcUtils; - - histoName.str(""); - histoName<<"Barrel_OccupancyByStations_Normalized"; + std::stringstream histoName; + rpcdqm::utils rpcUtils; + + histoName.str(""); + histoName<<"Barrel_OccupancyByStations_Normalized"; + me = dbe_->get( globalFolder_+"/"+ histoName.str()); + if ( 0!=me ) { + dbe_->removeElement(me->getName()); + } + Barrel_OccBySt = dbe_->book1D(histoName.str().c_str(), histoName.str().c_str(), 4, 0.5, 4.5); + Barrel_OccBySt -> setBinLabel(1, "St1", 1); + Barrel_OccBySt -> setBinLabel(2, "St2", 1); + Barrel_OccBySt -> setBinLabel(3, "St3", 1); + Barrel_OccBySt -> setBinLabel(4, "St4", 1); - Barrel_OccBySt = ibooker.book1D(histoName.str().c_str(), histoName.str().c_str(), 4, 0.5, 4.5); - Barrel_OccBySt -> setBinLabel(1, "St1", 1); - Barrel_OccBySt -> setBinLabel(2, "St2", 1); - Barrel_OccBySt -> setBinLabel(3, "St3", 1); - Barrel_OccBySt -> setBinLabel(4, "St4", 1); - - - histoName.str(""); - histoName<<"EndCap_OccupancyByRings_Normalized"; - EndCap_OccByRng = ibooker.book1D(histoName.str().c_str(), histoName.str().c_str(), 4, 0.5, 4.5); - EndCap_OccByRng -> setBinLabel(1, "E+/R3", 1); - EndCap_OccByRng -> setBinLabel(2, "E+/R2", 1); - EndCap_OccByRng -> setBinLabel(3, "E-/R2", 1); - EndCap_OccByRng -> setBinLabel(4, "E-/R3", 1); - - for (int w = -2; w<=2; w++ ){//loop on wheels + + histoName.str(""); + histoName<<"EndCap_OccupancyByRings_Normalized"; + me = dbe_->get( globalFolder_+"/"+ histoName.str()); + if ( 0!=me ) { + dbe_->removeElement(me->getName()); + } + EndCap_OccByRng = dbe_->book1D(histoName.str().c_str(), histoName.str().c_str(), 4, 0.5, 4.5); + EndCap_OccByRng -> setBinLabel(1, "E+/R3", 1); + EndCap_OccByRng -> setBinLabel(2, "E+/R2", 1); + EndCap_OccByRng -> setBinLabel(3, "E-/R2", 1); + EndCap_OccByRng -> setBinLabel(4, "E-/R3", 1); + +// histoName.str(""); +// histoName<<"EndCap_OccupancyByDisksAndRings_Normalized"; +// me = dbe_->get( globalFolder_+"/"+ histoName.str()); +// if ( 0!=me ) { +// dbe_->removeElement(me->getName()); +// } +// EndCap_OccByDisk = dbe_->book1D(histoName.str().c_str(), histoName.str().c_str(), 12, 0, 12); +// EndCap_OccByDisk -> setBinLabel(1, "YE-3/R2", 1); +// EndCap_OccByDisk -> setBinLabel(2, "YE-2/R2", 1); +// EndCap_OccByDisk -> setBinLabel(3, "YE-1/R2", 1); +// EndCap_OccByDisk -> setBinLabel(4, "YE+1/R2", 1); +// EndCap_OccByDisk -> setBinLabel(5, "YE+2/R2", 1); +// EndCap_OccByDisk -> setBinLabel(6, "YE+3/R2", 1); + +// EndCap_OccByDisk -> setBinLabel(7, "YE-3/R3", 1); +// EndCap_OccByDisk -> setBinLabel(8, "YE-2/R3", 1); +// EndCap_OccByDisk -> setBinLabel(9, "YE-1/R3", 1); +// EndCap_OccByDisk -> setBinLabel(10, "YE+1/R3", 1); +// EndCap_OccByDisk -> setBinLabel(11, "YE+2/R3", 1); +// EndCap_OccByDisk -> setBinLabel(12, "YE+3/R3", 1); + + for (int w = -2; w<=2; w++ ){//loop on wheels histoName.str(""); histoName<<"AsymmetryLeftRight_Roll_vs_Sector_Wheel"<get( globalFolder_+"/"+ histoName.str()); + if ( 0!=me ) { + dbe_->removeElement(me->getName()); + } - AsyMeWheel[w+2] = ibooker.book2D(histoName.str().c_str(), histoName.str().c_str(), 12, 0.5, 12.5, 21, 0.5, 21.5); + AsyMeWheel[w+2] = dbe_->book2D(histoName.str().c_str(), histoName.str().c_str(), 12, 0.5, 12.5, 21, 0.5, 21.5); rpcUtils.labelXAxisSector(AsyMeWheel[w+2]); rpcUtils.labelYAxisRoll(AsyMeWheel[w+2], 0, w, useRollInfo_); @@ -97,7 +160,13 @@ void RPCOccupancyTest::myBooker(DQMStore::IBooker & ibooker){ histoName.str(""); histoName<<"OccupancyNormByEvents_Wheel"<get( globalFolder_+"/"+ histoName.str()); + if ( 0!=me ) { + dbe_->removeElement(me->getName()); + } + + NormOccupWheel[w+2] = dbe_->book2D(histoName.str().c_str(), histoName.str().c_str(), 12, 0.5, 12.5, 21, 0.5, 21.5); rpcUtils.labelXAxisSector( NormOccupWheel[w+2]); rpcUtils.labelYAxisRoll( NormOccupWheel[w+2], 0, w, useRollInfo_); @@ -105,12 +174,21 @@ void RPCOccupancyTest::myBooker(DQMStore::IBooker & ibooker){ histoName.str(""); histoName<<"AsymmetryLeftRight_Distribution_Wheel"<get( globalFolder_+"/"+ histoName.str()); + if ( 0!=me ) { + dbe_->removeElement(me->getName()); + } + AsyMeDWheel[w+2] = dbe_->book1D(histoName.str().c_str(), histoName.str().c_str(), 20, -0.1, 1.1); histoName.str(""); histoName<<"OccupancyNormByEvents_Distribution_Wheel"<get( globalFolder_+"/"+ histoName.str()); + if ( 0!=me ) { + dbe_->removeElement(me->getName()); + } + NormOccupDWheel[w+2] = dbe_->book1D(histoName.str().c_str(), histoName.str().c_str(), 100, 0.0, 0.205); } }//end Barrel @@ -123,7 +201,13 @@ void RPCOccupancyTest::myBooker(DQMStore::IBooker & ibooker){ histoName.str(""); histoName<<"AsymmetryLeftRight_Ring_vs_Segment_Disk"<get( globalFolder_+"/"+ histoName.str()); + if ( 0!=me ) { + dbe_->removeElement(me->getName()); + } + + AsyMeDisk[d+offset] = dbe_->book2D(histoName.str().c_str(), histoName.str().c_str(), 36, 0.5, 36.5, 3*numberOfRings_, 0.5,3*numberOfRings_+ 0.5); rpcUtils.labelXAxisSegment(AsyMeDisk[d+offset]); rpcUtils.labelYAxisRing(AsyMeDisk[d+offset], numberOfRings_, useRollInfo_); @@ -134,18 +218,36 @@ void RPCOccupancyTest::myBooker(DQMStore::IBooker & ibooker){ histoName.str(""); histoName<<"OccupancyNormByEvents_Disk"<get( globalFolder_+"/"+ histoName.str()); + if ( 0!=me ) { + dbe_->removeElement(me->getName()); + } + + NormOccupDisk[d+offset] = dbe_->book2D(histoName.str().c_str(), histoName.str().c_str(), 36, 0.5, 36.5, 3*numberOfRings_, 0.5,3*numberOfRings_+ 0.5); rpcUtils.labelXAxisSegment(NormOccupDisk[d+offset]); rpcUtils.labelYAxisRing( NormOccupDisk[d+offset],numberOfRings_, useRollInfo_); histoName.str(""); histoName<<"AsymmetryLeftRight_Distribution_Disk"<get( globalFolder_+"/"+ histoName.str()); + if ( 0!=me ) { + dbe_->removeElement(me->getName()); + } + AsyMeDDisk[d+offset] = dbe_->book1D(histoName.str().c_str(), histoName.str().c_str(), 20, -0.1, 1.1); + + histoName.str(""); histoName<<"OccupancyNormByEvents_Distribution_Disk"<get( globalFolder_+"/"+ histoName.str()); + if ( 0!=me ) { + dbe_->removeElement(me->getName()); + } + NormOccupDDisk[d+offset] = dbe_->book1D(histoName.str().c_str(), histoName.str().c_str(), 100, 0.0, 0.205); } }//End loop on Endcap } diff --git a/DQM/RPCMonitorClient/src/RPCRechitProbabilityClient.cc b/DQM/RPCMonitorClient/src/RPCRechitProbabilityClient.cc index 4c5d7e105f28d..1c2e661f755fd 100644 --- a/DQM/RPCMonitorClient/src/RPCRechitProbabilityClient.cc +++ b/DQM/RPCMonitorClient/src/RPCRechitProbabilityClient.cc @@ -23,30 +23,37 @@ RPCRecHitProbabilityClient::RPCRecHitProbabilityClient(const edm::ParameterSet& } -RPCRecHitProbabilityClient::~RPCRecHitProbabilityClient(){} +RPCRecHitProbabilityClient::~RPCRecHitProbabilityClient(){dbe_ = 0;} void RPCRecHitProbabilityClient::beginJob(){ edm::LogVerbatim ("rpcrechitprobabilityclient") << "[RPCRecHitProbabilityClient]: Begin Job"; + dbe_ = edm::Service().operator->(); + dbe_->setVerbose(0); + } -void RPCRecHitProbabilityClient::dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const&){} +void RPCRecHitProbabilityClient::beginRun(const edm::Run& r, const edm::EventSetup& c){} + +void RPCRecHitProbabilityClient::beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) {} +void RPCRecHitProbabilityClient::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup){} +void RPCRecHitProbabilityClient::endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c){} -void RPCRecHitProbabilityClient::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::IGetter & igetter) { +void RPCRecHitProbabilityClient::endRun(const edm::Run& r, const edm::EventSetup& c){ edm::LogVerbatim ("rpcrechitprobabilityclient") << "[RPCRecHitProbabilityClient]: End Run"; - MonitorElement * NumberOfMuonEta = igetter.get( globalFolder_ +"/NumberOfMuonEta"); - MonitorElement * NumberOfMuonPt_B = igetter.get( globalFolder_ + "/NumberOfMuonPt_Barrel"); - MonitorElement * NumberOfMuonPt_EP = igetter.get( globalFolder_ + "/NumberOfMuonPt_EndcapP"); - MonitorElement * NumberOfMuonPt_EM = igetter.get( globalFolder_ + "/NumberOfMuonPt_EndcapM"); - MonitorElement * NumberOfMuonPhi_B = igetter.get( globalFolder_ + "/NumberOfMuonPhi_Barrel"); - MonitorElement * NumberOfMuonPhi_EP = igetter.get( globalFolder_ + "/NumberOfMuonPhi_EndcapP"); - MonitorElement * NumberOfMuonPhi_EM = igetter.get( globalFolder_ + "/NumberOfMuonPhi_EndcapM"); + MonitorElement * NumberOfMuonEta = dbe_->get( globalFolder_ +"/NumberOfMuonEta"); + MonitorElement * NumberOfMuonPt_B = dbe_->get( globalFolder_ + "/NumberOfMuonPt_Barrel"); + MonitorElement * NumberOfMuonPt_EP = dbe_->get( globalFolder_ + "/NumberOfMuonPt_EndcapP"); + MonitorElement * NumberOfMuonPt_EM = dbe_->get( globalFolder_ + "/NumberOfMuonPt_EndcapM"); + MonitorElement * NumberOfMuonPhi_B = dbe_->get( globalFolder_ + "/NumberOfMuonPhi_Barrel"); + MonitorElement * NumberOfMuonPhi_EP = dbe_->get( globalFolder_ + "/NumberOfMuonPhi_EndcapP"); + MonitorElement * NumberOfMuonPhi_EM = dbe_->get( globalFolder_ + "/NumberOfMuonPhi_EndcapM"); if(NumberOfMuonEta == 0 || NumberOfMuonPt_B == 0 || NumberOfMuonPt_EP == 0 || NumberOfMuonPt_EM == 0 || @@ -72,7 +79,7 @@ void RPCRecHitProbabilityClient::dqmEndJob(DQMStore::IBooker & ibooker, DQMStor name.str(""); name<< globalFolder_ <<"/"<get(name.str()); if(recHit){ @@ -85,7 +92,7 @@ void RPCRecHitProbabilityClient::dqmEndJob(DQMStore::IBooker & ibooker, DQMStor name.str(""); name<< globalFolder_ <<"/"<get(name.str()); if(recHit){ recHitTH1F = recHit->getTH1F(); @@ -97,7 +104,7 @@ void RPCRecHitProbabilityClient::dqmEndJob(DQMStore::IBooker & ibooker, DQMStor name.str(""); name<< globalFolder_ <<"/"<get(name.str()); if(recHit){ recHitTH1F = recHit->getTH1F(); @@ -109,7 +116,7 @@ void RPCRecHitProbabilityClient::dqmEndJob(DQMStore::IBooker & ibooker, DQMStor name.str(""); name<< globalFolder_ <<"/"<get(name.str()); if(recHit){ recHitTH1F = recHit->getTH1F(); @@ -121,7 +128,7 @@ void RPCRecHitProbabilityClient::dqmEndJob(DQMStore::IBooker & ibooker, DQMStor name.str(""); name<< globalFolder_ <<"/"<get(name.str()); if(recHit){ recHitTH1F = recHit->getTH1F(); @@ -134,7 +141,7 @@ void RPCRecHitProbabilityClient::dqmEndJob(DQMStore::IBooker & ibooker, DQMStor name.str(""); name<< globalFolder_ <<"/"<get(name.str()); if(recHit){ recHitTH1F = recHit->getTH1F(); @@ -146,7 +153,7 @@ void RPCRecHitProbabilityClient::dqmEndJob(DQMStore::IBooker & ibooker, DQMStor name.str(""); name<< globalFolder_ <<"/"<get(name.str()); if(recHit){ recHitTH1F = recHit->getTH1F(); @@ -159,6 +166,6 @@ void RPCRecHitProbabilityClient::dqmEndJob(DQMStore::IBooker & ibooker, DQMStor } - +void RPCRecHitProbabilityClient::endJob() {} diff --git a/DQM/RPCMonitorClient/src/ReadMeFromFile.cc b/DQM/RPCMonitorClient/src/ReadMeFromFile.cc new file mode 100644 index 0000000000000..c09824f6e7957 --- /dev/null +++ b/DQM/RPCMonitorClient/src/ReadMeFromFile.cc @@ -0,0 +1,79 @@ +/* + * \author Anna Cimmino + */ +#include + +// Framework +#include "FWCore/MessageLogger/interface/MessageLogger.h" + +//DataFormats +#include +#include "DataFormats/RPCDigi/interface/RPCDigi.h" +#include "DataFormats/RPCDigi/interface/RPCDigiCollection.h" + +// Geometry +#include "Geometry/RPCGeometry/interface/RPCGeomServ.h" +#include "Geometry/Records/interface/MuonGeometryRecord.h" + +// DQM +#include "DQMServices/Core/interface/MonitorElement.h" + +#include +#include +//#include + +using namespace edm; +using namespace std; + +ReadMeFromFile::ReadMeFromFile(const ParameterSet& ps ){ + + LogVerbatim ("readFile") << "[ReadMeFromFile]: Constructor"; + + myFile_= ps.getUntrackedParameter("InputFile", "uffa.root"); +} + +ReadMeFromFile::~ReadMeFromFile(){ + dbe_ = 0; +} + +void ReadMeFromFile::beginJob(){} + +void ReadMeFromFile::beginRun(const Run& r, const EventSetup& iSetup){ + LogVerbatim ("readfile") << "[ReadMeFromFile]: Begin run"; + dbe_ = Service().operator->(); + dbe_->setVerbose(0); + dbe_->load(myFile_); +} + +void ReadMeFromFile::beginLuminosityBlock(LuminosityBlock const& lumiSeg, EventSetup const& context) {} + +//called at each event +void ReadMeFromFile::analyze(const edm::Event& iEvent, const edm::EventSetup& c){} + + +void ReadMeFromFile::endLuminosityBlock(LuminosityBlock const& lumiSeg, EventSetup const& iSetup) { + +// // vector prova = dbe_->getMEs(); +// // for(unsigned int i=0; isetCurrentFolder("RPC/RecHits/Barrel/Wheel_0/sector_1/station_2"); +// // std::vector mes = dbe_->getAllContents("RPC/RecHits/Barrel/Wheel_0/sector_1/station_2"); +// MonitorElement * me = dbe_->get("RPC/RecHits/Barrel/Wheel_0/sector_1/station_2/Occupancy_W+0_RB2out_S01_Backward"); +// if(me) cout<<"FOUD "<getName() << std::endl; +// // } +// // } +} + +void ReadMeFromFile::endRun(const Run& r, const EventSetup& c){} + +void ReadMeFromFile::endJob(){} + diff --git a/DQM/RPCMonitorClient/src/SaveDQMFile.cc b/DQM/RPCMonitorClient/src/SaveDQMFile.cc new file mode 100644 index 0000000000000..a2f84abc5bd37 --- /dev/null +++ b/DQM/RPCMonitorClient/src/SaveDQMFile.cc @@ -0,0 +1,61 @@ +/* + * \author Anna Cimmino + */ +#include + +// Framework +#include "FWCore/MessageLogger/interface/MessageLogger.h" + +// //DataFormats +// #include +// #include "DataFormats/RPCDigi/interface/RPCDigi.h" +// #include "DataFormats/RPCDigi/interface/RPCDigiCollection.h" + +// // Geometry +// #include "Geometry/RPCGeometry/interface/RPCGeomServ.h" +// #include "Geometry/Records/interface/MuonGeometryRecord.h" + +// // DQM +// #include "DQMServices/Core/interface/MonitorElement.h" + +// #include +// #include +//#include + +using namespace edm; +using namespace std; + +SaveDQMFile::SaveDQMFile(const ParameterSet& ps ){ + + LogVerbatim ("readFile") << "[SaveDQMFile]: Constructor"; + + myFile_= ps.getUntrackedParameter("OutputFile", "uffa.root"); +} + +SaveDQMFile::~SaveDQMFile(){ + dbe_ = 0; +} + +void SaveDQMFile::beginJob(){} + +void SaveDQMFile::beginRun(const Run& r, const EventSetup& iSetup){ + dbe_ = Service().operator->(); + dbe_->setVerbose(0); + } + +void SaveDQMFile::beginLuminosityBlock(LuminosityBlock const& lumiSeg, EventSetup const& context) {} + +void SaveDQMFile::analyze(const edm::Event& iEvent, const edm::EventSetup& c){} + +void SaveDQMFile::endLuminosityBlock(LuminosityBlock const& lumiSeg, EventSetup const& iSetup) {} + +void SaveDQMFile::endRun(const Run& r, const EventSetup& c){ + + if(dbe_ && myFile_ != "") { + LogVerbatim ("savedqmfile") << "[SaveDQMFile]: Saving File "<save(myFile_) ; + } +} + +void SaveDQMFile::endJob(){} + diff --git a/DQM/RPCMonitorClient/src/SealModule.cc b/DQM/RPCMonitorClient/src/SealModule.cc index a2645cc28a650..8b3b05be086f9 100644 --- a/DQM/RPCMonitorClient/src/SealModule.cc +++ b/DQM/RPCMonitorClient/src/SealModule.cc @@ -1,6 +1,12 @@ #include "FWCore/PluginManager/interface/ModuleDef.h" #include "FWCore/Framework/interface/MakerMacros.h" +#include +DEFINE_FWK_MODULE(RPCEventSummary); + +#include +DEFINE_FWK_MODULE(RPCMon_SS_Dbx_Global); + #include DEFINE_FWK_MODULE(RPCFEDIntegrity); @@ -10,3 +16,41 @@ DEFINE_FWK_MODULE(RPCMonitorRaw); #include DEFINE_FWK_MODULE(RPCMonitorLinkSynchro); +#include +DEFINE_FWK_MODULE(RPCDaqInfo); + +#include +DEFINE_FWK_MODULE(RPCDcsInfoClient); + +#include +DEFINE_FWK_MODULE(RPCDCSSummary); + +#include +DEFINE_FWK_MODULE(RPCDataCertification); + +//Used to read ME from ROOT files +#include +DEFINE_FWK_MODULE(ReadMeFromFile); + +#include +DEFINE_FWK_MODULE(SaveDQMFile); + + +//General Client +#include +DEFINE_FWK_MODULE(RPCDqmClient); + +#include +DEFINE_FWK_MODULE(RPCRecHitProbabilityClient); + +#include +DEFINE_FWK_MODULE(RPCChamberQuality); + +#include +DEFINE_FWK_MODULE(RPCEfficiencySecond); + +#include +DEFINE_FWK_MODULE(RPCEfficiencyShiftHisto); + +#include +DEFINE_FWK_MODULE(RPCEfficiencyPerRingLayer); diff --git a/DQM/RPCMonitorDigi/interface/RPCTTUMonitor.h b/DQM/RPCMonitorDigi/interface/RPCTTUMonitor.h index fa769d0c84e4b..7d183da50e3da 100644 --- a/DQM/RPCMonitorDigi/interface/RPCTTUMonitor.h +++ b/DQM/RPCMonitorDigi/interface/RPCTTUMonitor.h @@ -67,6 +67,7 @@ class RPCTTUMonitor : public DQMEDAnalyzer { MonitorElement * m_bxDistDiffDt[8]; MonitorElement * m_dataVsemulator[8]; + DQMStore * dbe; std::string ttuFolder ; std::string outputFile ; diff --git a/DQM/RPCMonitorDigi/src/RPCMonitorDigi.cc b/DQM/RPCMonitorDigi/src/RPCMonitorDigi.cc index 632380e991dcc..e2fc651107405 100644 --- a/DQM/RPCMonitorDigi/src/RPCMonitorDigi.cc +++ b/DQM/RPCMonitorDigi/src/RPCMonitorDigi.cc @@ -471,9 +471,9 @@ void RPCMonitorDigi::performSourceOperation( std::mapFill(sector, wheelOrDiskNumber, numDigi); }else { os<<"Occupancy_for_Endcap"; - int xbin = wheelOrDiskNumber+ numberOfDisks_; - if (region==-1) {xbin = wheelOrDiskNumber+ numberOfDisks_+1;} - if(meRegion[os.str()]) {meRegion[os.str()]->Fill(xbin,ring,numDigi);} + int xbin = wheelOrDiskNumber+3; + if (region==-1) xbin = wheelOrDiskNumber+4; + if(meRegion[os.str()]) meRegion[os.str()]->Fill(xbin,ring,numDigi); } os.str(""); diff --git a/DQM/SiStripMonitorClient/python/SiStripSourceConfigP5_cff.py b/DQM/SiStripMonitorClient/python/SiStripSourceConfigP5_cff.py index 5ec20fc3a94a1..dd0ee2714b82b 100644 --- a/DQM/SiStripMonitorClient/python/SiStripSourceConfigP5_cff.py +++ b/DQM/SiStripMonitorClient/python/SiStripSourceConfigP5_cff.py @@ -85,7 +85,7 @@ # Clone for Heavy Ion Tracks (for HI Collisions) import DQM.SiStripMonitorTrack.SiStripMonitorTrack_cfi SiStripMonitorTrack_hi = DQM.SiStripMonitorTrack.SiStripMonitorTrack_cfi.SiStripMonitorTrack.clone() -SiStripMonitorTrack_hi.TrackProducer = 'hiGeneralTracks' +SiStripMonitorTrack_hi.TrackProducer = 'hiGlobalPrimTracks' SiStripMonitorTrack_hi.Mod_On = True # TrackerMonitorTrack #### @@ -124,8 +124,8 @@ # Clone for Heavy Ion Tracks (for HI Collisions) #import DQM.TrackerMonitorTrack.MonitorTrackResiduals_cfi #MonitorTrackResiduals_hi = DQM.TrackerMonitorTrack.MonitorTrackResiduals_cfi.MonitorTrackResiduals.clone() -#MonitorTrackResiduals_hi.Tracks = 'hiGeneralTracks' -#MonitorTrackResiduals_hi.trajectoryInput = 'hiGeneralTracks' +#MonitorTrackResiduals_hi.Tracks = 'hiGlobalPrimTracks' +#MonitorTrackResiduals_hi.trajectoryInput = 'hiGlobalPrimTracks' #MonitorTrackResiduals_hi.OutputMEsInRootFile = False #MonitorTrackResiduals_hi.Mod_On = False diff --git a/DQM/SiStripMonitorClient/python/SiStripSourceConfigTier0_HeavyIons_cff.py b/DQM/SiStripMonitorClient/python/SiStripSourceConfigTier0_HeavyIons_cff.py index 2e95ad3dadb49..c4c53e10343ac 100644 --- a/DQM/SiStripMonitorClient/python/SiStripSourceConfigTier0_HeavyIons_cff.py +++ b/DQM/SiStripMonitorClient/python/SiStripSourceConfigTier0_HeavyIons_cff.py @@ -6,19 +6,31 @@ # SiStripMonitorTrack #### import DQM.SiStripMonitorTrack.SiStripMonitorTrack_cfi SiStripMonitorTrack_hi = DQM.SiStripMonitorTrack.SiStripMonitorTrack_cfi.SiStripMonitorTrack.clone() -SiStripMonitorTrack_hi.TrackProducer = "hiGeneralTracks" +SiStripMonitorTrack_hi.TrackProducer = "hiGlobalPrimTracks" SiStripMonitorTrack_hi.Mod_On = False # TrackerMonitorTrack #### import DQM.TrackerMonitorTrack.MonitorTrackResiduals_cfi MonitorTrackResiduals_hi = DQM.TrackerMonitorTrack.MonitorTrackResiduals_cfi.MonitorTrackResiduals.clone() -MonitorTrackResiduals_hi.Tracks = 'hiGeneralTracks' -MonitorTrackResiduals_hi.trajectoryInput = "hiGeneralTracks" +MonitorTrackResiduals_hi.Tracks = 'hiGlobalPrimTracks' +MonitorTrackResiduals_hi.trajectoryInput = "hiGlobalPrimTracks" MonitorTrackResiduals_hi.OutputMEsInRootFile = False MonitorTrackResiduals_hi.Mod_On = False +# TrackingMonitor #### +import DQM.TrackingMonitor.TrackerHeavyIonTrackingMonitor_cfi +TrackMon_hi = DQM.TrackingMonitor.TrackerHeavyIonTrackingMonitor_cfi.TrackerHeavyIonTrackMon.clone() +TrackMon_hi.FolderName = 'Tracking/TrackParameters' +TrackMon_hi.BSFolderName = 'Tracking/TrackParameters/BeamSpotParameters' + +#removed all modules using TkDetMap service +#SiStripDQMTier0_hi = cms.Sequence(APVPhases * consecutiveHEs * +# siStripFEDCheck * +# MonitorTrackResiduals_hi * +# TrackMon_hi) SiStripDQMTier0_hi = cms.Sequence(APVPhases * consecutiveHEs * siStripFEDCheck * siStripFEDMonitor * SiStripMonitorDigi * SiStripMonitorCluster * SiStripMonitorTrack_hi * - MonitorTrackResiduals_hi) + MonitorTrackResiduals_hi * + TrackMon_hi) diff --git a/DQM/SiStripMonitorDigi/interface/SiStripBaselineValidator.h b/DQM/SiStripMonitorDigi/interface/SiStripBaselineValidator.h index 264a2cba354ca..e71908885f7a7 100644 --- a/DQM/SiStripMonitorDigi/interface/SiStripBaselineValidator.h +++ b/DQM/SiStripMonitorDigi/interface/SiStripBaselineValidator.h @@ -23,6 +23,14 @@ #include #include +/*#include "DataFormats/TrackReco/interface/Track.h" +#include "DataFormats/TrackCandidate/interface/TrackCandidateCollection.h" +#include "DataFormats/TrackCandidate/interface/TrackCandidate.h" +#include "DataFormats/TrackReco/interface/Track.h" +#include "DataFormats/TrackReco/interface/TrackFwd.h" +#include "DataFormats/VertexReco/interface/VertexFwd.h" +#include "DataFormats/VertexReco/interface/Vertex.h" +*/ #include @@ -49,6 +57,7 @@ class SiStripBaselineValidator : public DQMEDAnalyzer edm::InputTag srcProcessedRawDigi_; edm::EDGetTokenT > moduleRawDigiToken_; + // edm::InputTag hiSelectedTracks; std::string outputFile_; bool createOutputFile_; diff --git a/DQM/SiStripMonitorDigi/src/SiStripBaselineValidator.cc b/DQM/SiStripMonitorDigi/src/SiStripBaselineValidator.cc index c8bd7c9c8d9d3..a7a2e7fa40ab4 100644 --- a/DQM/SiStripMonitorDigi/src/SiStripBaselineValidator.cc +++ b/DQM/SiStripMonitorDigi/src/SiStripBaselineValidator.cc @@ -19,6 +19,14 @@ #include "DataFormats/Common/interface/DetSet.h" #include "DQMServices/Core/interface/DQMStore.h" +/*#include "DataFormats/TrackReco/interface/Track.h" +#include "DataFormats/TrackCandidate/interface/TrackCandidateCollection.h" +#include "DataFormats/TrackCandidate/interface/TrackCandidate.h" +#include "DataFormats/TrackReco/interface/Track.h" +#include "DataFormats/TrackReco/interface/TrackFwd.h" +#include "DataFormats/VertexReco/interface/VertexFwd.h" +#include "DataFormats/VertexReco/interface/Vertex.h" +*/ //ROOT inclusion #include "TH1F.h" @@ -37,6 +45,7 @@ using namespace std; SiStripBaselineValidator::SiStripBaselineValidator(const edm::ParameterSet& conf){ srcProcessedRawDigi_ = conf.getParameter( "srcProcessedRawDigi" ); + // hiSelectedTracks = conf.getParameter( "hiSelectedTracks" ); createOutputFile_ = conf.getUntrackedParameter("saveFile",false); outputFile_ = conf.getParameter("outputFile"); dbe = &*edm::Service(); diff --git a/DQM/TrackingMonitor/interface/TrackAnalyzer.h b/DQM/TrackingMonitor/interface/TrackAnalyzer.h index cbddb01721eb6..14c0bfcc5046d 100644 --- a/DQM/TrackingMonitor/interface/TrackAnalyzer.h +++ b/DQM/TrackingMonitor/interface/TrackAnalyzer.h @@ -92,9 +92,6 @@ class TrackAnalyzer // ADD by Mia in order to turnON test MEs bool doTestPlots_; - //For HI Plots - bool doHIPlots_; - struct TkParameterMEs { TkParameterMEs() : TrackP(NULL) @@ -257,10 +254,6 @@ class TrackAnalyzer // add by Mia in order to deal w/ LS transitions MonitorElement* Chi2oNDF_lumiFlag; MonitorElement* NumberOfRecHitsPerTrack_lumiFlag; - - //new plots for Heavy Ion DQM - MonitorElement* LongDCASig; - MonitorElement* TransDCASig; struct TkRecHitsPerSubDetMEs { diff --git a/DQM/TrackingMonitor/python/TrackerHeavyIonTrackingMonitor_cfi.py b/DQM/TrackingMonitor/python/TrackerHeavyIonTrackingMonitor_cfi.py index 00291330415c7..1c39faccdcab6 100644 --- a/DQM/TrackingMonitor/python/TrackerHeavyIonTrackingMonitor_cfi.py +++ b/DQM/TrackingMonitor/python/TrackerHeavyIonTrackingMonitor_cfi.py @@ -5,15 +5,10 @@ # Update specific parameters -TrackerHeavyIonTrackMon.TrackProducer = cms.InputTag("hiGeneralTracks") +TrackerHeavyIonTrackMon.TrackProducer = cms.InputTag("hiGlobalPrimTracks") TrackerHeavyIonTrackMon.SeedProducer = cms.InputTag("hiPixelTrackSeeds") TrackerHeavyIonTrackMon.TCProducer = cms.InputTag("hiPrimTrackCandidates") TrackerHeavyIonTrackMon.beamSpot = cms.InputTag("offlineBeamSpot") -TrackerHeavyIonTrackMon.primaryVertex = cms.InputTag('hiSelectedVertex') - - -TrackerHeavyIonTrackMon.doHIPlots = cms.bool(True) - TrackerHeavyIonTrackMon.AlgoName = cms.string('HeavyIonTk') TrackerHeavyIonTrackMon.Quality = cms.string('') diff --git a/DQM/TrackingMonitor/python/TrackingMonitorSeedNumber_Phase1PU140_cff.py b/DQM/TrackingMonitor/python/TrackingMonitorSeedNumber_Phase1PU140_cff.py index 62e98a8a7eab2..803206af3e7f5 100644 --- a/DQM/TrackingMonitor/python/TrackingMonitorSeedNumber_Phase1PU140_cff.py +++ b/DQM/TrackingMonitor/python/TrackingMonitorSeedNumber_Phase1PU140_cff.py @@ -9,7 +9,7 @@ Phase1Pu70TrackMonStep0.TrackProducer = cms.InputTag("generalTracks") Phase1Pu70TrackMonStep0.SeedProducer = cms.InputTag("initialStepSeeds") Phase1Pu70TrackMonStep0.TCProducer = cms.InputTag("initialStepTrackCandidates") -Phase1Pu70TrackMonStep0.AlgoName = cms.string('initialStep') +Phase1Pu70TrackMonStep0.AlgoName = cms.string('iter0') Phase1Pu70TrackMonStep0.TkSeedSizeBin = cms.int32(100) # could be 50 ? Phase1Pu70TrackMonStep0.TkSeedSizeMax = cms.double(5000) Phase1Pu70TrackMonStep0.TkSeedSizeMin = cms.double(0) @@ -21,7 +21,7 @@ Phase1Pu70TrackMonStep1.TrackProducer = cms.InputTag("generalTracks") Phase1Pu70TrackMonStep1.SeedProducer = cms.InputTag("highPtTripletStepSeeds") Phase1Pu70TrackMonStep1.TCProducer = cms.InputTag("highPtTripletStepTrackCandidates") -Phase1Pu70TrackMonStep1.AlgoName = cms.string('lowPtTripletStep') +Phase1Pu70TrackMonStep1.AlgoName = cms.string('iter1') Phase1Pu70TrackMonStep1.TkSeedSizeBin = cms.int32(100) Phase1Pu70TrackMonStep1.TkSeedSizeMax = cms.double(30000) Phase1Pu70TrackMonStep1.TkSeedSizeMin = cms.double(0) @@ -33,7 +33,7 @@ Phase1Pu70TrackMonStep2.TrackProducer = cms.InputTag("generalTracks") Phase1Pu70TrackMonStep2.SeedProducer = cms.InputTag("lowPtQuadStepSeeds") Phase1Pu70TrackMonStep2.TCProducer = cms.InputTag("lowPtQuadStepTrackCandidates") -Phase1Pu70TrackMonStep2.AlgoName = cms.string('pixelPairStep') +Phase1Pu70TrackMonStep2.AlgoName = cms.string('iter2') Phase1Pu70TrackMonStep2.TkSeedSizeBin = cms.int32(100) Phase1Pu70TrackMonStep2.TkSeedSizeMax = cms.double(30000) Phase1Pu70TrackMonStep2.TkSeedSizeMin = cms.double(0) @@ -45,7 +45,7 @@ Phase1Pu70TrackMonStep3.TrackProducer = cms.InputTag("generalTracks") Phase1Pu70TrackMonStep3.SeedProducer = cms.InputTag("lowPtTripletStepSeeds") Phase1Pu70TrackMonStep3.TCProducer = cms.InputTag("lowPtTripletStepTrackCandidates") -Phase1Pu70TrackMonStep3.AlgoName = cms.string('detachedTripletStep') +Phase1Pu70TrackMonStep3.AlgoName = cms.string('iter3') Phase1Pu70TrackMonStep3.TkSeedSizeBin = cms.int32(400) Phase1Pu70TrackMonStep3.TkSeedSizeMax = cms.double(100000) Phase1Pu70TrackMonStep3.TkSeedSizeMin = cms.double(0) @@ -57,7 +57,7 @@ Phase1Pu70TrackMonStep4.TrackProducer = cms.InputTag("generalTracks") Phase1Pu70TrackMonStep4.SeedProducer = cms.InputTag("detachedQuadStepSeeds") Phase1Pu70TrackMonStep4.TCProducer = cms.InputTag("detachedQuadStepTrackCandidates") -Phase1Pu70TrackMonStep4.AlgoName = cms.string('mixedTripletStep') +Phase1Pu70TrackMonStep4.AlgoName = cms.string('iter4') Phase1Pu70TrackMonStep4.TkSeedSizeBin = cms.int32(400) Phase1Pu70TrackMonStep4.TkSeedSizeMax = cms.double(200000) Phase1Pu70TrackMonStep4.TkSeedSizeMin = cms.double(0) @@ -69,7 +69,7 @@ Phase1Pu70TrackMonStep5.TrackProducer = cms.InputTag("generalTracks") Phase1Pu70TrackMonStep5.SeedProducer = cms.InputTag("pixelPairStepSeeds") Phase1Pu70TrackMonStep5.TCProducer = cms.InputTag("pixelPairStepTrackCandidates") -Phase1Pu70TrackMonStep5.AlgoName = cms.string('pixelLessStep') +Phase1Pu70TrackMonStep5.AlgoName = cms.string('iter5') Phase1Pu70TrackMonStep5.TkSeedSizeBin = cms.int32(400) Phase1Pu70TrackMonStep5.TkSeedSizeMax = cms.double(200000) Phase1Pu70TrackMonStep5.TkSeedSizeMin = cms.double(0) diff --git a/DQM/TrackingMonitor/python/TrackingMonitorSeedNumber_Phase1PU70_cff.py b/DQM/TrackingMonitor/python/TrackingMonitorSeedNumber_Phase1PU70_cff.py index 8ad1b1585ca93..74c7360c6d075 100644 --- a/DQM/TrackingMonitor/python/TrackingMonitorSeedNumber_Phase1PU70_cff.py +++ b/DQM/TrackingMonitor/python/TrackingMonitorSeedNumber_Phase1PU70_cff.py @@ -9,7 +9,7 @@ Phase1Pu70TrackMonStep0.TrackProducer = cms.InputTag("generalTracks") Phase1Pu70TrackMonStep0.SeedProducer = cms.InputTag("initialStepSeeds") Phase1Pu70TrackMonStep0.TCProducer = cms.InputTag("initialStepTrackCandidates") -Phase1Pu70TrackMonStep0.AlgoName = cms.string('initialStep') +Phase1Pu70TrackMonStep0.AlgoName = cms.string('iter0') Phase1Pu70TrackMonStep0.TkSeedSizeBin = cms.int32(100) # could be 50 ? Phase1Pu70TrackMonStep0.TkSeedSizeMax = cms.double(5000) Phase1Pu70TrackMonStep0.TkSeedSizeMin = cms.double(0) @@ -21,7 +21,7 @@ Phase1Pu70TrackMonStep1.TrackProducer = cms.InputTag("generalTracks") Phase1Pu70TrackMonStep1.SeedProducer = cms.InputTag("highPtTripletStepSeeds") Phase1Pu70TrackMonStep1.TCProducer = cms.InputTag("highPtTripletStepTrackCandidates") -Phase1Pu70TrackMonStep1.AlgoName = cms.string('lowPtTripletStep') +Phase1Pu70TrackMonStep1.AlgoName = cms.string('iter1') Phase1Pu70TrackMonStep1.TkSeedSizeBin = cms.int32(100) Phase1Pu70TrackMonStep1.TkSeedSizeMax = cms.double(30000) Phase1Pu70TrackMonStep1.TkSeedSizeMin = cms.double(0) @@ -33,7 +33,7 @@ Phase1Pu70TrackMonStep2.TrackProducer = cms.InputTag("generalTracks") Phase1Pu70TrackMonStep2.SeedProducer = cms.InputTag("lowPtQuadStepSeeds") Phase1Pu70TrackMonStep2.TCProducer = cms.InputTag("lowPtQuadStepTrackCandidates") -Phase1Pu70TrackMonStep2.AlgoName = cms.string('pixelPairStep') +Phase1Pu70TrackMonStep2.AlgoName = cms.string('iter2') Phase1Pu70TrackMonStep2.TkSeedSizeBin = cms.int32(100) Phase1Pu70TrackMonStep2.TkSeedSizeMax = cms.double(30000) Phase1Pu70TrackMonStep2.TkSeedSizeMin = cms.double(0) @@ -45,7 +45,7 @@ Phase1Pu70TrackMonStep3.TrackProducer = cms.InputTag("generalTracks") Phase1Pu70TrackMonStep3.SeedProducer = cms.InputTag("lowPtTripletStepSeeds") Phase1Pu70TrackMonStep3.TCProducer = cms.InputTag("lowPtTripletStepTrackCandidates") -Phase1Pu70TrackMonStep3.AlgoName = cms.string('detachedTripletStep') +Phase1Pu70TrackMonStep3.AlgoName = cms.string('iter3') Phase1Pu70TrackMonStep3.TkSeedSizeBin = cms.int32(400) Phase1Pu70TrackMonStep3.TkSeedSizeMax = cms.double(100000) Phase1Pu70TrackMonStep3.TkSeedSizeMin = cms.double(0) @@ -57,7 +57,7 @@ Phase1Pu70TrackMonStep4.TrackProducer = cms.InputTag("generalTracks") Phase1Pu70TrackMonStep4.SeedProducer = cms.InputTag("detachedQuadStepSeeds") Phase1Pu70TrackMonStep4.TCProducer = cms.InputTag("detachedQuadStepTrackCandidates") -Phase1Pu70TrackMonStep4.AlgoName = cms.string('mixedTripletStep') +Phase1Pu70TrackMonStep4.AlgoName = cms.string('iter4') Phase1Pu70TrackMonStep4.TkSeedSizeBin = cms.int32(400) Phase1Pu70TrackMonStep4.TkSeedSizeMax = cms.double(200000) Phase1Pu70TrackMonStep4.TkSeedSizeMin = cms.double(0) @@ -69,7 +69,7 @@ Phase1Pu70TrackMonStep5.TrackProducer = cms.InputTag("generalTracks") Phase1Pu70TrackMonStep5.SeedProducer = cms.InputTag("mixedTripletStepSeeds") Phase1Pu70TrackMonStep5.TCProducer = cms.InputTag("mixedTripletStepTrackCandidates") -Phase1Pu70TrackMonStep5.AlgoName = cms.string('pixelLessStep') +Phase1Pu70TrackMonStep5.AlgoName = cms.string('iter5') Phase1Pu70TrackMonStep5.TkSeedSizeBin = cms.int32(400) Phase1Pu70TrackMonStep5.TkSeedSizeMax = cms.double(200000) Phase1Pu70TrackMonStep5.TkSeedSizeMin = cms.double(0) @@ -81,7 +81,7 @@ Phase1Pu70TrackMonStep6.TrackProducer = cms.InputTag("generalTracks") Phase1Pu70TrackMonStep6.SeedProducer = cms.InputTag("pixelPairStepSeeds") Phase1Pu70TrackMonStep6.TCProducer = cms.InputTag("pixelPairStepTrackCandidates") -Phase1Pu70TrackMonStep6.AlgoName = cms.string('tobTecStep') +Phase1Pu70TrackMonStep6.AlgoName = cms.string('iter6') Phase1Pu70TrackMonStep6.TkSeedSizeBin = cms.int32(400) Phase1Pu70TrackMonStep6.TkSeedSizeMax = cms.double(200000) Phase1Pu70TrackMonStep6.TkSeedSizeMin = cms.double(0) @@ -93,7 +93,7 @@ Phase1Pu70TrackMonStep7.TrackProducer = cms.InputTag("generalTracks") Phase1Pu70TrackMonStep7.SeedProducer = cms.InputTag("tobTecStepSeeds") Phase1Pu70TrackMonStep7.TCProducer = cms.InputTag("tobTecStepTrackCandidates") -Phase1Pu70TrackMonStep7.AlgoName = cms.string('jetCoreRegionalStep') +Phase1Pu70TrackMonStep7.AlgoName = cms.string('iter7') Phase1Pu70TrackMonStep7.TkSeedSizeBin = cms.int32(400) Phase1Pu70TrackMonStep7.TkSeedSizeMax = cms.double(100000) Phase1Pu70TrackMonStep7.TkSeedSizeMin = cms.double(0) @@ -105,7 +105,7 @@ Phase1Pu70TrackMonStep9.TrackProducer = cms.InputTag("generalTracks") Phase1Pu70TrackMonStep9.SeedProducer = cms.InputTag("muonSeededSeedsInOut") Phase1Pu70TrackMonStep9.TCProducer = cms.InputTag("muonSeededTrackCandidatesInOut") -Phase1Pu70TrackMonStep9.AlgoName = cms.string('muonSeededStepInOut') +Phase1Pu70TrackMonStep9.AlgoName = cms.string('iter9') Phase1Pu70TrackMonStep9.TkSeedSizeBin = cms.int32(400) Phase1Pu70TrackMonStep9.TkSeedSizeMax = cms.double(100000) Phase1Pu70TrackMonStep9.TkSeedSizeMin = cms.double(0) @@ -117,7 +117,7 @@ Phase1Pu70TrackMonStep10.TrackProducer = cms.InputTag("generalTracks") Phase1Pu70TrackMonStep10.SeedProducer = cms.InputTag("muonSeededSeedsOutIn") Phase1Pu70TrackMonStep10.TCProducer = cms.InputTag("muonSeededTrackCandidatesOutIn") -Phase1Pu70TrackMonStep10.AlgoName = cms.string('muonSeededStepOutIn') +Phase1Pu70TrackMonStep10.AlgoName = cms.string('iter10') Phase1Pu70TrackMonStep10.TkSeedSizeBin = cms.int32(400) Phase1Pu70TrackMonStep10.TkSeedSizeMax = cms.double(100000) Phase1Pu70TrackMonStep10.TkSeedSizeMin = cms.double(0) diff --git a/DQM/TrackingMonitor/python/TrackingMonitorSeedNumber_PhaseI_cff.py b/DQM/TrackingMonitor/python/TrackingMonitorSeedNumber_PhaseI_cff.py index c1c878031fa07..9df180be2189a 100644 --- a/DQM/TrackingMonitor/python/TrackingMonitorSeedNumber_PhaseI_cff.py +++ b/DQM/TrackingMonitor/python/TrackingMonitorSeedNumber_PhaseI_cff.py @@ -9,7 +9,7 @@ Phase1TrackMonStep0.TrackProducer = cms.InputTag("generalTracks") Phase1TrackMonStep0.SeedProducer = cms.InputTag("initialStepSeeds") Phase1TrackMonStep0.TCProducer = cms.InputTag("initialStepTrackCandidates") -Phase1TrackMonStep0.AlgoName = cms.string('initialStep') +Phase1TrackMonStep0.AlgoName = cms.string('iter0') Phase1TrackMonStep0.TkSeedSizeBin = cms.int32(100) # could be 50 ? Phase1TrackMonStep0.TkSeedSizeMax = cms.double(5000) Phase1TrackMonStep0.TkSeedSizeMin = cms.double(0) @@ -21,7 +21,7 @@ Phase1TrackMonStep1.TrackProducer = cms.InputTag("generalTracks") Phase1TrackMonStep1.SeedProducer = cms.InputTag("highPtTripletStepSeeds") Phase1TrackMonStep1.TCProducer = cms.InputTag("highPtTripletStepTrackCandidates") -Phase1TrackMonStep1.AlgoName = cms.string('lowPtTripletStep') +Phase1TrackMonStep1.AlgoName = cms.string('iter1') Phase1TrackMonStep1.TkSeedSizeBin = cms.int32(100) Phase1TrackMonStep1.TkSeedSizeMax = cms.double(30000) Phase1TrackMonStep1.TkSeedSizeMin = cms.double(0) @@ -33,7 +33,7 @@ Phase1TrackMonStep2.TrackProducer = cms.InputTag("generalTracks") Phase1TrackMonStep2.SeedProducer = cms.InputTag("lowPtTripletStepSeeds") Phase1TrackMonStep2.TCProducer = cms.InputTag("lowPtTripletStepTrackCandidates") -Phase1TrackMonStep2.AlgoName = cms.string('pixelPairStep') +Phase1TrackMonStep2.AlgoName = cms.string('iter2') Phase1TrackMonStep2.TkSeedSizeBin = cms.int32(100) Phase1TrackMonStep2.TkSeedSizeMax = cms.double(30000) Phase1TrackMonStep2.TkSeedSizeMin = cms.double(0) @@ -45,7 +45,7 @@ Phase1TrackMonStep3.TrackProducer = cms.InputTag("generalTracks") Phase1TrackMonStep3.SeedProducer = cms.InputTag("pixelPairStepSeeds") Phase1TrackMonStep3.TCProducer = cms.InputTag("pixelPairStepTrackCandidates") -Phase1TrackMonStep3.AlgoName = cms.string('detachedTripletStep') +Phase1TrackMonStep3.AlgoName = cms.string('iter3') Phase1TrackMonStep3.TkSeedSizeBin = cms.int32(400) Phase1TrackMonStep3.TkSeedSizeMax = cms.double(100000) Phase1TrackMonStep3.TkSeedSizeMin = cms.double(0) @@ -57,7 +57,7 @@ Phase1TrackMonStep4.TrackProducer = cms.InputTag("generalTracks") Phase1TrackMonStep4.SeedProducer = cms.InputTag("mixedTripletStepSeeds") Phase1TrackMonStep4.TCProducer = cms.InputTag("mixedTripletStepTrackCandidates") -Phase1TrackMonStep4.AlgoName = cms.string('mixedTripletStep') +Phase1TrackMonStep4.AlgoName = cms.string('iter4') Phase1TrackMonStep4.TkSeedSizeBin = cms.int32(400) Phase1TrackMonStep4.TkSeedSizeMax = cms.double(200000) Phase1TrackMonStep4.TkSeedSizeMin = cms.double(0) diff --git a/DQM/TrackingMonitor/python/TrackingMonitorSeedNumber_cff.py b/DQM/TrackingMonitor/python/TrackingMonitorSeedNumber_cff.py index 262765e9a5700..f7b3cfaad83ae 100644 --- a/DQM/TrackingMonitor/python/TrackingMonitorSeedNumber_cff.py +++ b/DQM/TrackingMonitor/python/TrackingMonitorSeedNumber_cff.py @@ -9,7 +9,7 @@ TrackMonStep0.TrackProducer = cms.InputTag("generalTracks") TrackMonStep0.SeedProducer = cms.InputTag("initialStepSeeds") TrackMonStep0.TCProducer = cms.InputTag("initialStepTrackCandidates") -TrackMonStep0.AlgoName = cms.string('initialStep') +TrackMonStep0.AlgoName = cms.string('iter0') TrackMonStep0.TkSeedSizeBin = cms.int32(100) # could be 50 ? TrackMonStep0.TkSeedSizeMax = cms.double(5000) TrackMonStep0.TkSeedSizeMin = cms.double(0) @@ -21,7 +21,7 @@ TrackMonStep1.TrackProducer = cms.InputTag("generalTracks") TrackMonStep1.SeedProducer = cms.InputTag("lowPtTripletStepSeeds") TrackMonStep1.TCProducer = cms.InputTag("lowPtTripletStepTrackCandidates") -TrackMonStep1.AlgoName = cms.string('lowPtTripletStep') +TrackMonStep1.AlgoName = cms.string('iter1') TrackMonStep1.TkSeedSizeBin = cms.int32(100) TrackMonStep1.TkSeedSizeMax = cms.double(30000) TrackMonStep1.TkSeedSizeMin = cms.double(0) @@ -33,7 +33,7 @@ TrackMonStep2.TrackProducer = cms.InputTag("generalTracks") TrackMonStep2.SeedProducer = cms.InputTag("pixelPairStepSeeds") TrackMonStep2.TCProducer = cms.InputTag("pixelPairStepTrackCandidates") -TrackMonStep2.AlgoName = cms.string('pixelPairStep') +TrackMonStep2.AlgoName = cms.string('iter2') TrackMonStep2.TkSeedSizeBin = cms.int32(400) TrackMonStep2.TkSeedSizeMax = cms.double(100000) TrackMonStep2.TkSeedSizeMin = cms.double(0) @@ -45,7 +45,7 @@ TrackMonStep3.TrackProducer = cms.InputTag("generalTracks") TrackMonStep3.SeedProducer = cms.InputTag("detachedTripletStepSeeds") TrackMonStep3.TCProducer = cms.InputTag("detachedTripletStepTrackCandidates") -TrackMonStep3.AlgoName = cms.string('detachedTripletStep') +TrackMonStep3.AlgoName = cms.string('iter3') TrackMonStep3.TkSeedSizeBin = cms.int32(100) TrackMonStep3.TkSeedSizeMax = cms.double(30000) TrackMonStep3.TkSeedSizeMin = cms.double(0) @@ -57,7 +57,7 @@ TrackMonStep4.TrackProducer = cms.InputTag("generalTracks") TrackMonStep4.SeedProducer = cms.InputTag("mixedTripletStepSeeds") TrackMonStep4.TCProducer = cms.InputTag("mixedTripletStepTrackCandidates") -TrackMonStep4.AlgoName = cms.string('mixedTripletStep') +TrackMonStep4.AlgoName = cms.string('iter4') TrackMonStep4.TkSeedSizeBin = cms.int32(400) TrackMonStep4.TkSeedSizeMax = cms.double(200000) TrackMonStep4.TkSeedSizeMin = cms.double(0) @@ -69,7 +69,7 @@ TrackMonStep5.TrackProducer = cms.InputTag("generalTracks") TrackMonStep5.SeedProducer = cms.InputTag("pixelLessStepSeeds") TrackMonStep5.TCProducer = cms.InputTag("pixelLessStepTrackCandidates") -TrackMonStep5.AlgoName = cms.string('pixelLessStep') +TrackMonStep5.AlgoName = cms.string('iter5') TrackMonStep5.TkSeedSizeBin = cms.int32(400) TrackMonStep5.TkSeedSizeMax = cms.double(200000) TrackMonStep5.TkSeedSizeMin = cms.double(0) @@ -81,7 +81,7 @@ TrackMonStep6.TrackProducer = cms.InputTag("generalTracks") TrackMonStep6.SeedProducer = cms.InputTag("tobTecStepSeeds") TrackMonStep6.TCProducer = cms.InputTag("tobTecStepTrackCandidates") -TrackMonStep6.AlgoName = cms.string('tobTecStep') +TrackMonStep6.AlgoName = cms.string('iter6') TrackMonStep6.TkSeedSizeBin = cms.int32(400) TrackMonStep6.TkSeedSizeMax = cms.double(100000) TrackMonStep6.TkSeedSizeMin = cms.double(0) @@ -93,7 +93,7 @@ TrackMonStep9.TrackProducer = cms.InputTag("generalTracks") TrackMonStep9.SeedProducer = cms.InputTag("muonSeededSeedsInOut") TrackMonStep9.TCProducer = cms.InputTag("muonSeededTrackCandidatesInOut") -TrackMonStep9.AlgoName = cms.string('muonSeededStepInOut') +TrackMonStep9.AlgoName = cms.string('iter9') TrackMonStep9.TkSeedSizeBin = cms.int32(15) TrackMonStep9.TkSeedSizeMax = cms.double(14.5) TrackMonStep9.TkSeedSizeMin = cms.double(-0.5) @@ -105,7 +105,7 @@ TrackMonStep10.TrackProducer = cms.InputTag("generalTracks") TrackMonStep10.SeedProducer = cms.InputTag("muonSeededSeedsOutIn") TrackMonStep10.TCProducer = cms.InputTag("muonSeededTrackCandidatesOutIn") -TrackMonStep10.AlgoName = cms.string('muonSeededStepOutIn') +TrackMonStep10.AlgoName = cms.string('iter10') TrackMonStep10.TkSeedSizeBin = cms.int32(15) TrackMonStep10.TkSeedSizeMax = cms.double(14.5) TrackMonStep10.TkSeedSizeMin = cms.double(-0.5) diff --git a/DQM/TrackingMonitor/python/TrackingMonitor_cfi.py b/DQM/TrackingMonitor/python/TrackingMonitor_cfi.py index 1f23a6dbe8802..df3dfbdd8474f 100644 --- a/DQM/TrackingMonitor/python/TrackingMonitor_cfi.py +++ b/DQM/TrackingMonitor/python/TrackingMonitor_cfi.py @@ -73,7 +73,7 @@ doPUmonitoring = cms.bool(False), doPlotsVsBXlumi = cms.bool(False), doPlotsVsGoodPVtx = cms.bool(False), - doHIPlots = cms.bool(False), + #which seed plots to do doSeedNumberHisto = cms.bool(False), @@ -369,14 +369,5 @@ # BXlumiBin = cms.int32(400), # BXlumiMin = cms.double(2000), # BXlumiMax = cms.double(6000), - ############################### -################## FOR HI PLOTS##################### -####### -TransDCABins = cms.int32(100), -TransDCAMin = cms.double(-8.0), -TransDCAMax = cms.double(8.0), - -LongDCABins = cms.int32(100), -LongDCAMin = cms.double(-8.0), -LongDCAMax = cms.double(8.0), + ) diff --git a/DQM/TrackingMonitor/src/TrackAnalyzer.cc b/DQM/TrackingMonitor/src/TrackAnalyzer.cc index 37105b95756c4..985b885962286 100644 --- a/DQM/TrackingMonitor/src/TrackAnalyzer.cc +++ b/DQM/TrackingMonitor/src/TrackAnalyzer.cc @@ -37,7 +37,6 @@ TrackAnalyzer::TrackAnalyzer(const edm::ParameterSet& iConfig) , doDCAwrt000Plots_ ( conf_.getParameter("doDCAwrt000Plots") ) , doLumiAnalysis_ ( conf_.getParameter("doLumiAnalysis") ) , doTestPlots_ ( conf_.getParameter("doTestPlots") ) - , doHIPlots_ ( conf_.getParameter("doHIPlots") ) { initHistos(); TopFolder_ = conf_.getParameter("FolderName"); @@ -106,14 +105,6 @@ void TrackAnalyzer::initHistos() Chi2oNDF_lumiFlag = NULL; NumberOfRecHitsPerTrack_lumiFlag = NULL; - //////////////////////////////////////////////////////////// - //special Plots for HI DQM //SHOULD I ADD THE BOOL HERE?? - //////////////////////////////////////////////////////////// - LongDCASig = NULL; - TransDCASig = NULL; - - - } TrackAnalyzer::~TrackAnalyzer() @@ -267,17 +258,6 @@ void TrackAnalyzer::bookHistosForHitProperties(DQMStore::IBooker & ibooker) { double Chi2ProbMax = conf_.getParameter("Chi2ProbMax"); - //HI PLOTS//// - int TransDCABins = conf_.getParameter("TransDCABins"); - double TransDCAMin = conf_.getParameter("TransDCAMin"); - double TransDCAMax = conf_.getParameter("TransDCAMax"); - - int LongDCABins = conf_.getParameter("LongDCABins"); - double LongDCAMin = conf_.getParameter("LongDCAMin"); - double LongDCAMax = conf_.getParameter("LongDCAMax"); - /////////////////////////////////////////////////////////////////// - - ibooker.setCurrentFolder(TopFolder_+"/GeneralProperties"); histname = "Chi2_"; @@ -294,23 +274,6 @@ void TrackAnalyzer::bookHistosForHitProperties(DQMStore::IBooker & ibooker) { Chi2oNDF = ibooker.book1D(histname+CategoryName, histname+CategoryName, Chi2NDFBin, Chi2NDFMin, Chi2NDFMax); Chi2oNDF->setAxisTitle("Track #chi^{2}/ndf",1); Chi2oNDF->setAxisTitle("Number of Tracks" ,2); - - - ////////////// - //HI PLOTS/// - ////////////// - if (doHIPlots_) - { - histname = "LongDCASig_"; - LongDCASig = ibooker.book1D(histname+CategoryName, histname+CategoryName,LongDCABins,LongDCAMin,LongDCAMax); - LongDCASig->setAxisTitle("dz/#sigma_{dz}",1); - - histname = "TransDCASig_"; - TransDCASig = ibooker.book1D(histname+CategoryName,histname+CategoryName,TransDCABins,TransDCAMin,TransDCAMax); - TransDCASig->setAxisTitle("dxy/#sigma_{dxy}",1); - } - - if (doDCAPlots_) { histname = "xPointOfClosestApproach_"; @@ -684,24 +647,6 @@ void TrackAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe if (recoPrimaryVerticesHandle->size() > 0) { reco::Vertex pv = recoPrimaryVerticesHandle->at(0); - - ////////////////// - //HI PLOTS/////// - //////////////// - - if(doHIPlots_) - { - double longDCAsig = 0, transDCAsig = 0; - double zerr2 = track.dzError()*track.dzError()+pv.zError()*pv.zError(); - double xyerr2 = track.d0Error()*track.d0Error()+pv.xError()*pv.yError(); - if(zerr2 > 0) longDCAsig = track.dz(pv.position())/zerr2; - if(xyerr2 > 0) transDCAsig = track.dxy(pv.position())/xyerr2; - LongDCASig->Fill(longDCAsig); - TransDCASig->Fill(transDCAsig); - } - - - DistanceOfClosestApproachToPV -> Fill(track.dxy(pv.position())); DistanceOfClosestApproachToPVVsPhi -> Fill(track.phi(), track.dxy(pv.position())); xPointOfClosestApproachVsZ0wrtPV -> Fill(track.dz(pv.position()),(track.vx()-pv.position().x())); diff --git a/DQM/TrackingMonitorClient/plugins/SealModule.cc b/DQM/TrackingMonitorClient/plugins/SealModule.cc deleted file mode 100644 index d5c312bd90b90..0000000000000 --- a/DQM/TrackingMonitorClient/plugins/SealModule.cc +++ /dev/null @@ -1,6 +0,0 @@ -#include "FWCore/Framework/interface/MakerMacros.h" - -#include "DQM/TrackingMonitorClient/plugins/TrackingDQMClientHeavyIons.h" - - -DEFINE_FWK_MODULE(TrackingDQMClientHeavyIons); diff --git a/DQM/TrackingMonitorClient/plugins/TrackingDQMClientHeavyIons.cc b/DQM/TrackingMonitorClient/plugins/TrackingDQMClientHeavyIons.cc deleted file mode 100644 index dc44df129fc96..0000000000000 --- a/DQM/TrackingMonitorClient/plugins/TrackingDQMClientHeavyIons.cc +++ /dev/null @@ -1,81 +0,0 @@ - -#include "DQM/TrackingMonitorClient/plugins/TrackingDQMClientHeavyIons.h" - -#include "DQMServices/ClientConfig/interface/FitSlicesYTool.h" -#include "DQMServices/Core/interface/MonitorElement.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/ServiceRegistry/interface/Service.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" - -#include -#include -#include -#include -#include -#include -#include - -using namespace std; -using namespace edm; - -typedef MonitorElement ME; - - -TrackingDQMClientHeavyIons::TrackingDQMClientHeavyIons(const edm::ParameterSet& pset){ - - TopFolder_=pset.getParameter("FolderName"); -} - -void TrackingDQMClientHeavyIons::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::IGetter & igetter) { - - typedef vector vstring; - - // Update 2014-04-02 - // Migrated back to the endJob. the DQMFileSaver logic has - // to be reviewed to guarantee that the endJob is properly - // considered. The splitting per run is done centrally when - // running the harvesting in production - - // Update 2009-09-23 - // Migrated all code from endJob to this function - // endJob is not necessarily called in the proper sequence - // and does not necessarily book histograms produced in - // that step. - // It more robust to do the histogram manipulation in - // this endRun function - // needed to access the DQMStore::save method - - ibooker.cd(); - ibooker.setCurrentFolder(TopFolder_); - - histName = "DCAStats_"; - DCAStats = ibooker.book2D(histName,histName,2,0,2,4,0,4); - DCAStats->getTH2F()->GetYaxis()->SetBinLabel(1,"Mean"); - DCAStats->getTH2F()->GetYaxis()->SetBinLabel(2,"RMS, #sigma"); - DCAStats->getTH2F()->GetYaxis()->SetBinLabel(3,"Skewness ,#gamma_{1}"); - DCAStats->getTH2F()->GetYaxis()->SetBinLabel(4,"Kurtosis, #gamma_{2}"); - DCAStats->getTH2F()->GetXaxis()->SetBinLabel(1,"Longitudinal"); - DCAStats->getTH2F()->GetXaxis()->SetBinLabel(2,"Transverse"); - DCAStats->getTH2F()->SetOption("text"); - - - histName="LongDCASig_HeavyIonTk"; - ME* element = igetter.get(TopFolder_+"/"+histName); - //Longitudinal First - DCAStats->getTH2F()->SetBinContent(1,1,element->getTH1F()->GetMean());//mean - DCAStats->getTH2F()->SetBinContent(1,2,element->getTH1F()->GetRMS());//rms - DCAStats->getTH2F()->SetBinContent(1,3,element->getTH1F()->GetSkewness());//skewness - DCAStats->getTH2F()->SetBinContent(1,4,element->getTH1F()->GetKurtosis());//kurtosis - //Transverse - histName="TransDCASig_HeavyIonTk"; - ME* element1 = igetter.get(TopFolder_+"/"+histName); - //Longitudinal First - DCAStats->getTH2F()->SetBinContent(2,1,element1->getTH1F()->GetMean());//mean - DCAStats->getTH2F()->SetBinContent(2,2,element1->getTH1F()->GetRMS());//rms - DCAStats->getTH2F()->SetBinContent(2,3,element1->getTH1F()->GetSkewness());//skewness - DCAStats->getTH2F()->SetBinContent(2,4,element1->getTH1F()->GetKurtosis());//kurtosis - -} - - - diff --git a/DQM/TrackingMonitorClient/plugins/TrackingDQMClientHeavyIons.h b/DQM/TrackingMonitorClient/plugins/TrackingDQMClientHeavyIons.h deleted file mode 100644 index dc854ca67bf01..0000000000000 --- a/DQM/TrackingMonitorClient/plugins/TrackingDQMClientHeavyIons.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef TRACKINGDQMCLIENTHEAVYIONS_H -#define TRACKINGDQMCLIENTHEAVYIONS_H - - -#include "FWCore/Framework/interface/Frameworkfwd.h" -#include "DQMServices/Core/interface/DQMEDHarvester.h" -#include -#include -#include "DQMServices/Core/interface/MonitorElement.h" -#include -#include -#include - -class MonitorElement; - -class TrackingDQMClientHeavyIons : public DQMEDHarvester -{ - public: - TrackingDQMClientHeavyIons(const edm::ParameterSet& pset); - ~TrackingDQMClientHeavyIons() {}; - - void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; - - private: - unsigned int verbose_; - bool isWildcardUsed_; - bool resLimitedFit_; - - std::string histName; - std::string TopFolder_; - MonitorElement* DCAStats; - std::string outputFileName_; - -}; -#endif - diff --git a/DQM/TrackingMonitorClient/python/TrackingDQMClientHeavyIons_cfi.py b/DQM/TrackingMonitorClient/python/TrackingDQMClientHeavyIons_cfi.py deleted file mode 100644 index d0244534dde10..0000000000000 --- a/DQM/TrackingMonitorClient/python/TrackingDQMClientHeavyIons_cfi.py +++ /dev/null @@ -1,5 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -hiTrackingDqmClientHeavyIons = cms.EDAnalyzer("TrackingDQMClientHeavyIons", - FolderName = cms.string('Tracking/TrackParameters/GeneralProperties') - ) diff --git a/DQM/TrackingMonitorSource/python/IterTrackingModules4seedMonitoring_cfi.py b/DQM/TrackingMonitorSource/python/IterTrackingModules4seedMonitoring_cfi.py index 9cb7b43eab8f0..d46091495bd39 100644 --- a/DQM/TrackingMonitorSource/python/IterTrackingModules4seedMonitoring_cfi.py +++ b/DQM/TrackingMonitorSource/python/IterTrackingModules4seedMonitoring_cfi.py @@ -11,93 +11,93 @@ clusterBin = {} clusterMax = {} -seedInputTag ['initialStep'] = cms.InputTag("initialStepSeeds") -trackCandInputTag['initialStep'] = cms.InputTag("initialStepSeeds") -trackSeedSizeBin ['initialStep'] = cms.int32(100) # could be 50 ? -trackSeedSizeMin ['initialStep'] = cms.double(0) -trackSeedSizeMax ['initialStep'] = cms.double(5000) -clusterLabel ['initialStep'] = cms.vstring('Pix') -clusterBin ['initialStep'] = cms.int32(100) -clusterMax ['initialStep'] = cms.double(20000) +seedInputTag ['iter0'] = cms.InputTag("initialStepSeeds") +trackCandInputTag['iter0'] = cms.InputTag("initialStepSeeds") +trackSeedSizeBin ['iter0'] = cms.int32(100) # could be 50 ? +trackSeedSizeMin ['iter0'] = cms.double(0) +trackSeedSizeMax ['iter0'] = cms.double(5000) +clusterLabel ['iter0'] = cms.vstring('Pix') +clusterBin ['iter0'] = cms.int32(100) +clusterMax ['iter0'] = cms.double(20000) -seedInputTag ['lowPtTripletStep'] = cms.InputTag("lowPtTripletStepSeeds") -trackCandInputTag['lowPtTripletStep'] = cms.InputTag("lowPtTripletStepTrackCandidates") -trackSeedSizeBin ['lowPtTripletStep'] = cms.int32(100) -trackSeedSizeMin ['lowPtTripletStep'] = cms.double(0) -trackSeedSizeMax ['lowPtTripletStep'] = cms.double(30000) -clusterLabel ['lowPtTripletStep'] = cms.vstring('Pix') -clusterBin ['lowPtTripletStep'] = cms.int32(100) -clusterMax ['lowPtTripletStep'] = cms.double(20000) +seedInputTag ['iter1'] = cms.InputTag("lowPtTripletStepSeeds") +trackCandInputTag['iter1'] = cms.InputTag("lowPtTripletStepTrackCandidates") +trackSeedSizeBin ['iter1'] = cms.int32(100) +trackSeedSizeMin ['iter1'] = cms.double(0) +trackSeedSizeMax ['iter1'] = cms.double(30000) +clusterLabel ['iter1'] = cms.vstring('Pix') +clusterBin ['iter1'] = cms.int32(100) +clusterMax ['iter1'] = cms.double(20000) -seedInputTag ['pixelPairStep'] = cms.InputTag("pixelPairStepSeeds") -trackCandInputTag['pixelPairStep'] = cms.InputTag("pixelPairStepTrackCandidates") -trackSeedSizeBin ['pixelPairStep'] = cms.int32(400) -trackSeedSizeMin ['pixelPairStep'] = cms.double(0) -trackSeedSizeMax ['pixelPairStep'] = cms.double(100000) -clusterLabel ['pixelPairStep'] = cms.vstring('Pix') -clusterBin ['pixelPairStep'] = cms.int32(100) -clusterMax ['pixelPairStep'] = cms.double(20000) +seedInputTag ['iter2'] = cms.InputTag("pixelPairStepSeeds") +trackCandInputTag['iter2'] = cms.InputTag("pixelPairStepTrackCandidates") +trackSeedSizeBin ['iter2'] = cms.int32(400) +trackSeedSizeMin ['iter2'] = cms.double(0) +trackSeedSizeMax ['iter2'] = cms.double(100000) +clusterLabel ['iter2'] = cms.vstring('Pix') +clusterBin ['iter2'] = cms.int32(100) +clusterMax ['iter2'] = cms.double(20000) -seedInputTag ['detachedTripletStep'] = cms.InputTag("detachedTripletStepSeeds") -trackCandInputTag['detachedTripletStep'] = cms.InputTag("detachedTripletStepTrackCandidates") -trackSeedSizeBin ['detachedTripletStep'] = cms.int32(100) -trackSeedSizeMin ['detachedTripletStep'] = cms.double(0) -trackSeedSizeMax ['detachedTripletStep'] = cms.double(30000) -clusterLabel ['detachedTripletStep'] = cms.vstring('Pix') -clusterBin ['detachedTripletStep'] = cms.int32(100) -clusterMax ['detachedTripletStep'] = cms.double(20000) +seedInputTag ['iter3'] = cms.InputTag("detachedTripletStepSeeds") +trackCandInputTag['iter3'] = cms.InputTag("detachedTripletStepTrackCandidates") +trackSeedSizeBin ['iter3'] = cms.int32(100) +trackSeedSizeMin ['iter3'] = cms.double(0) +trackSeedSizeMax ['iter3'] = cms.double(30000) +clusterLabel ['iter3'] = cms.vstring('Pix') +clusterBin ['iter3'] = cms.int32(100) +clusterMax ['iter3'] = cms.double(20000) -seedInputTag ['mixedTripletStep'] = cms.InputTag("mixedTripletStepSeeds") -trackCandInputTag['mixedTripletStep'] = cms.InputTag("mixedTripletStepTrackCandidates") -trackSeedSizeBin ['mixedTripletStep'] = cms.int32(400) -trackSeedSizeMin ['mixedTripletStep'] = cms.double(0) -trackSeedSizeMax ['mixedTripletStep'] = cms.double(200000) -clusterLabel ['mixedTripletStep'] = cms.vstring('Tot') -clusterBin ['mixedTripletStep'] = cms.int32(500) -clusterMax ['mixedTripletStep'] = cms.double(100000) +seedInputTag ['iter4'] = cms.InputTag("mixedTripletStepSeeds") +trackCandInputTag['iter4'] = cms.InputTag("mixedTripletStepTrackCandidates") +trackSeedSizeBin ['iter4'] = cms.int32(400) +trackSeedSizeMin ['iter4'] = cms.double(0) +trackSeedSizeMax ['iter4'] = cms.double(200000) +clusterLabel ['iter4'] = cms.vstring('Tot') +clusterBin ['iter4'] = cms.int32(500) +clusterMax ['iter4'] = cms.double(100000) -seedInputTag ['pixelLessStep'] = cms.InputTag("pixelLessStepSeeds") -trackCandInputTag['pixelLessStep'] = cms.InputTag("pixelLessStepTrackCandidates") -trackSeedSizeBin ['pixelLessStep'] = cms.int32(400) -trackSeedSizeMin ['pixelLessStep'] = cms.double(0) -trackSeedSizeMax ['pixelLessStep'] = cms.double(200000) -clusterLabel ['pixelLessStep'] = cms.vstring('Strip') -clusterBin ['pixelLessStep'] = cms.int32(500) -clusterMax ['pixelLessStep'] = cms.double(100000) +seedInputTag ['iter5'] = cms.InputTag("pixelLessStepSeeds") +trackCandInputTag['iter5'] = cms.InputTag("pixelLessStepTrackCandidates") +trackSeedSizeBin ['iter5'] = cms.int32(400) +trackSeedSizeMin ['iter5'] = cms.double(0) +trackSeedSizeMax ['iter5'] = cms.double(200000) +clusterLabel ['iter5'] = cms.vstring('Strip') +clusterBin ['iter5'] = cms.int32(500) +clusterMax ['iter5'] = cms.double(100000) -seedInputTag ['tobTecStep'] = cms.InputTag("tobTecStepSeeds") -trackCandInputTag['tobTecStep'] = cms.InputTag("tobTecStepTrackCandidates") -trackSeedSizeBin ['tobTecStep'] = cms.int32(400) -trackSeedSizeMin ['tobTecStep'] = cms.double(0) -trackSeedSizeMax ['tobTecStep'] = cms.double(100000) -clusterLabel ['tobTecStep'] = cms.vstring('Strip') -clusterBin ['tobTecStep'] = cms.int32(500) -clusterMax ['tobTecStep'] = cms.double(100000) +seedInputTag ['iter6'] = cms.InputTag("tobTecStepSeeds") +trackCandInputTag['iter6'] = cms.InputTag("tobTecStepTrackCandidates") +trackSeedSizeBin ['iter6'] = cms.int32(400) +trackSeedSizeMin ['iter6'] = cms.double(0) +trackSeedSizeMax ['iter6'] = cms.double(100000) +clusterLabel ['iter6'] = cms.vstring('Strip') +clusterBin ['iter6'] = cms.int32(500) +clusterMax ['iter6'] = cms.double(100000) -seedInputTag ['muonSeededStepInOut'] = cms.InputTag("muonSeededSeedsInOut") -trackCandInputTag['muonSeededStepInOut'] = cms.InputTag("muonSeededTrackCandidatesInOut") -trackSeedSizeBin ['muonSeededStepInOut'] = cms.int32(15) -trackSeedSizeMin ['muonSeededStepInOut'] = cms.double(-0.5) -trackSeedSizeMax ['muonSeededStepInOut'] = cms.double(14.5) -clusterLabel ['muonSeededStepInOut'] = cms.vstring('Strip') -clusterBin ['muonSeededStepInOut'] = cms.int32(500) -clusterMax ['muonSeededStepInOut'] = cms.double(100000) +seedInputTag ['iter9'] = cms.InputTag("muonSeededSeedsInOut") +trackCandInputTag['iter9'] = cms.InputTag("muonSeededTrackCandidatesInOut") +trackSeedSizeBin ['iter9'] = cms.int32(15) +trackSeedSizeMin ['iter9'] = cms.double(-0.5) +trackSeedSizeMax ['iter9'] = cms.double(14.5) +clusterLabel ['iter9'] = cms.vstring('Strip') +clusterBin ['iter9'] = cms.int32(500) +clusterMax ['iter9'] = cms.double(100000) -seedInputTag ['muonSeededStepOutIn'] = cms.InputTag("muonSeededSeedsOutIn") -trackCandInputTag['muonSeededStepOutIn'] = cms.InputTag("muonSeededTrackCandidatesOutIn") -trackSeedSizeBin ['muonSeededStepOutIn'] = cms.int32(15) -trackSeedSizeMin ['muonSeededStepOutIn'] = cms.double(-0.5) -trackSeedSizeMax ['muonSeededStepOutIn'] = cms.double(14.5) -clusterLabel ['muonSeededStepOutIn'] = cms.vstring('Strip') -clusterBin ['muonSeededStepOutIn'] = cms.int32(500) -clusterMax ['muonSeededStepOutIn'] = cms.double(100000) +seedInputTag ['iter10'] = cms.InputTag("muonSeededSeedsOutIn") +trackCandInputTag['iter10'] = cms.InputTag("muonSeededTrackCandidatesOutIn") +trackSeedSizeBin ['iter10'] = cms.int32(15) +trackSeedSizeMin ['iter10'] = cms.double(-0.5) +trackSeedSizeMax ['iter10'] = cms.double(14.5) +clusterLabel ['iter10'] = cms.vstring('Strip') +clusterBin ['iter10'] = cms.int32(500) +clusterMax ['iter10'] = cms.double(100000) -selectedIterTrackingStep.extend( ['initialStep'] ) -selectedIterTrackingStep.extend( ['lowPtTripletStep'] ) -selectedIterTrackingStep.extend( ['pixelPairStep'] ) -selectedIterTrackingStep.extend( ['detachedTripletStep'] ) -selectedIterTrackingStep.extend( ['mixedTripletStep'] ) -selectedIterTrackingStep.extend( ['pixelLessStep'] ) -selectedIterTrackingStep.extend( ['tobTecStep'] ) -selectedIterTrackingStep.extend( ['muonSeededStepInOut'] ) -selectedIterTrackingStep.extend( ['muonSeededStepOutIn'] ) +selectedIterTrackingStep.extend( ['iter0'] ) +selectedIterTrackingStep.extend( ['iter1'] ) +selectedIterTrackingStep.extend( ['iter2'] ) +selectedIterTrackingStep.extend( ['iter3'] ) +selectedIterTrackingStep.extend( ['iter4'] ) +selectedIterTrackingStep.extend( ['iter5'] ) +selectedIterTrackingStep.extend( ['iter6'] ) +selectedIterTrackingStep.extend( ['iter9'] ) +selectedIterTrackingStep.extend( ['iter10'] ) diff --git a/DQM/TrackingMonitorSource/python/TrackingSourceConfigP5_cff.py b/DQM/TrackingMonitorSource/python/TrackingSourceConfigP5_cff.py index ec31d3007e5e8..ea07f96ccc45f 100644 --- a/DQM/TrackingMonitorSource/python/TrackingSourceConfigP5_cff.py +++ b/DQM/TrackingMonitorSource/python/TrackingSourceConfigP5_cff.py @@ -77,6 +77,6 @@ # Clone for Heavy Ion Tracks (for HI Collisions) import DQM.TrackingMonitor.TrackEfficiencyMonitor_cfi TrackEffMon_hi = DQM.TrackingMonitor.TrackEfficiencyMonitor_cfi.TrackEffMon.clone() -TrackEffMon_hi.TKTrackCollection = 'hiGeneralTracks' +TrackEffMon_hi.TKTrackCollection = 'hiGlobalPrimTracks' TrackEffMon_hi.AlgoName = 'HeavyIonTk' TrackEffMon_hi.FolderName = 'Tracking/TrackParameters/TrackEfficiency' diff --git a/DQM/TrackingMonitorSource/python/TrackingSourceConfig_Tier0_HeavyIons_cff.py b/DQM/TrackingMonitorSource/python/TrackingSourceConfig_Tier0_HeavyIons_cff.py deleted file mode 100644 index 4e7788a4e2d59..0000000000000 --- a/DQM/TrackingMonitorSource/python/TrackingSourceConfig_Tier0_HeavyIons_cff.py +++ /dev/null @@ -1,10 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -# TrackingMonitor #### -import DQM.TrackingMonitor.TrackerHeavyIonTrackingMonitor_cfi -TrackMon_hi = DQM.TrackingMonitor.TrackerHeavyIonTrackingMonitor_cfi.TrackerHeavyIonTrackMon.clone() -TrackMon_hi.FolderName = 'Tracking/TrackParameters' -TrackMon_hi.BSFolderName = 'Tracking/TrackParameters/BeamSpotParameters' -TrackMon_hi.TrackProducer = cms.InputTag("hiGeneralTracks") - -TrackMonDQMTier0_hi = cms.Sequence(TrackMon_hi) diff --git a/DQMOffline/Alignment/python/ALCARECOTkAlDQM_cff.py b/DQMOffline/Alignment/python/ALCARECOTkAlDQM_cff.py index 80708e564c92d..3f302d154a3f9 100644 --- a/DQMOffline/Alignment/python/ALCARECOTkAlDQM_cff.py +++ b/DQMOffline/Alignment/python/ALCARECOTkAlDQM_cff.py @@ -206,8 +206,6 @@ AlgoName = 'ALCARECO'+__selectionName, FolderName = "AlCaReco/"+__selectionName, BSFolderName = "AlCaReco/"+__selectionName+"/BeamSpot", - primaryVertex = "hiSelectedVertex", - allTrackProducer = "hiGeneralTracks", # margins and settings TkSizeBin = 71, TkSizeMin = -0.5, @@ -218,7 +216,7 @@ ALCARECOTkAlMinBiasHITkAlDQM = ALCARECOTkAlMinBiasTkAlDQM.clone( #names and desigantions TrackProducer = 'ALCARECO'+__selectionName, - ReferenceTrackProducer = 'hiGeneralTracks', + ReferenceTrackProducer = 'hiSelectedTracks', CaloJetCollection = 'iterativeConePu5CaloJets', AlgoName = 'ALCARECO'+__selectionName, FolderName = "AlCaReco/"+__selectionName, @@ -236,7 +234,7 @@ histLabel = __selectionName, HLTPaths = [], eventSetupPathsKey = ALCARECOTkAlMinBiasHIHLT.eventSetupPathsKey.value() - ) +) ALCARECOTkAlMinBiasHIDQM = cms.Sequence( ALCARECOTkAlMinBiasHITrackingDQM + ALCARECOTkAlMinBiasHITkAlDQM+ALCARECOTkAlMinBiasHIHLTDQM) diff --git a/DQMOffline/CalibTracker/python/ALCARECOSiStripCalMinBiasDQMHI_cff.py b/DQMOffline/CalibTracker/python/ALCARECOSiStripCalMinBiasDQMHI_cff.py index b36d29687744d..6c9501d71270a 100644 --- a/DQMOffline/CalibTracker/python/ALCARECOSiStripCalMinBiasDQMHI_cff.py +++ b/DQMOffline/CalibTracker/python/ALCARECOSiStripCalMinBiasDQMHI_cff.py @@ -15,8 +15,6 @@ AlgoName = 'ALCARECO'+__selectionName, FolderName = "AlCaReco/"+__selectionName, BSFolderName = "AlCaReco/"+__selectionName+"/BeamSpot", - primaryVertex = "hiSelectedVertex", - allTrackProducer = "hiGeneralTracks", # margins and settings TkSizeBin = 300, TkSizeMin = -0.5, @@ -29,7 +27,7 @@ TrackProducer = 'ALCARECO'+__selectionName, AlgoName = 'ALCARECO'+__selectionName, FolderName = "AlCaReco/"+__selectionName, - ReferenceTrackProducer = 'hiGeneralTracks', + ReferenceTrackProducer = 'hiSelectedTracks', # margins and settings fillInvariantMass = False, TrackPtMax = 30, diff --git a/DQMOffline/Configuration/python/DQMOfflineHeavyIons_SecondStep_cff.py b/DQMOffline/Configuration/python/DQMOfflineHeavyIons_SecondStep_cff.py index 17d30aa066cbe..8e919edf30032 100644 --- a/DQMOffline/Configuration/python/DQMOfflineHeavyIons_SecondStep_cff.py +++ b/DQMOffline/Configuration/python/DQMOfflineHeavyIons_SecondStep_cff.py @@ -36,15 +36,13 @@ from DQMOffline.L1Trigger.L1TriggerDqmOffline_cff import * from DQMOffline.Trigger.DQMOffline_Trigger_Client_cff import * from DQMOffline.Trigger.DQMOffline_HLT_Client_cff import * -from DQM.TrackingMonitorClient.TrackingDQMClientHeavyIons_cfi import * DQMOfflineHeavyIons_SecondStep_PrePOG = cms.Sequence( muonQualityTests * photonOfflineDQMClient * l1TriggerDqmOfflineClient * triggerOfflineDQMClient * hltOfflineDQMClient - * alcaBeamMonitorClient - * hiTrackingDqmClientHeavyIons + * alcaBeamMonitorClient ) DQMOfflineHeavyIons_SecondStepPOG = cms.Sequence( dqmRefHistoRootFileGetter * diff --git a/DQMOffline/Configuration/python/DQMOfflineHeavyIons_cff.py b/DQMOffline/Configuration/python/DQMOfflineHeavyIons_cff.py index 2e47ba45ff2bf..5f9b939eb27ee 100644 --- a/DQMOffline/Configuration/python/DQMOfflineHeavyIons_cff.py +++ b/DQMOffline/Configuration/python/DQMOfflineHeavyIons_cff.py @@ -35,8 +35,6 @@ from DQMOffline.Trigger.DQMOffline_Trigger_cff import * #from DQMOffline.RecoB.PrimaryVertexMonitor_cff import * from DQM.Physics.DQMPhysics_cff import * -from DQM.TrackingMonitorSource.TrackingSourceConfig_Tier0_HeavyIons_cff import * - egammaDQMOffline.remove(electronAnalyzerSequence) egammaDQMOffline.remove(zmumugammaAnalysis) @@ -48,15 +46,7 @@ hltResults.RecHitsEBTag = cms.untracked.InputTag("ecalRecHit", "EcalRecHitsEB") hltResults.RecHitsEETag = cms.untracked.InputTag("ecalRecHit", "EcalRecHitsEE") - -globalAnalyzer.inputTags.offlinePVs = cms.InputTag("hiSelectedVertex") -trackerAnalyzer.inputTags.offlinePVs = cms.InputTag("hiSelectedVertex") -tightAnalyzer.inputTags.offlinePVs = cms.InputTag("hiSelectedVertex") -looseAnalyzer.inputTags.offlinePVs = cms.InputTag("hiSelectedVertex") - - DQMOfflineHeavyIonsPrePOG = cms.Sequence( muonMonitors - * TrackMonDQMTier0_hi * jetMETDQMOfflineSource * egammaDQMOffline * triggerOfflineDQMSource diff --git a/DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py b/DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py index 905187a445d29..0906fd73bd0ee 100644 --- a/DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py +++ b/DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py @@ -101,10 +101,10 @@ ) DQMHarvestMuon = cms.Sequence( dtClients * - rpcTier0Client * - cscOfflineCollisionsClients * - muonQualityTests - ) + rpcTier0Client * + cscOfflineCollisionsClients * + muonQualityTests + ) DQMHarvestEcal = cms.Sequence( ecal_dqm_client_offline * es_dqm_client_offline ) @@ -112,8 +112,6 @@ DQMHarvestJetMET = cms.Sequence( SusyPostProcessorSequence ) -DQMHarvestEGamma = cms.Sequence( egammaPostProcessing ) - -DQMHarvestBTag = cms.Sequence( bTagCollectorSequenceDATA ) +DQMHarvestEGamma = cms.Sequence( egammaPostProcessing ) -DQMHarvestMiniAOD = cms.Sequence( ) +DQMHarvestBTag = cms.Sequence( bTagCollectorSequenceDATA ) diff --git a/DQMOffline/Configuration/python/DQMOffline_cff.py b/DQMOffline/Configuration/python/DQMOffline_cff.py index 1b2359cd7fe71..24e75c2da8626 100644 --- a/DQMOffline/Configuration/python/DQMOffline_cff.py +++ b/DQMOffline/Configuration/python/DQMOffline_cff.py @@ -44,8 +44,6 @@ from DQM.Physics.DQMPhysics_cff import * from Validation.RecoTau.DQMSequences_cfi import * from DQM.TrackingMonitorSource.TrackingSourceConfig_Tier0_cff import * -# miniAOD DQM validation -from Validation.RecoParticleFlow.miniAODDQM_cff import * DQMOfflinePrePOG = cms.Sequence( TrackingDQMSourceTier0 * muonMonitors * @@ -121,4 +119,4 @@ DQMOfflineBTag = cms.Sequence( bTagPlotsDATA ) -DQMOfflineMiniAOD = cms.Sequence( miniAODDQMSequence ) + diff --git a/DQMOffline/Configuration/python/autoDQM.py b/DQMOffline/Configuration/python/autoDQM.py index 7a5669bb73681..be3145934b061 100644 --- a/DQMOffline/Configuration/python/autoDQM.py +++ b/DQMOffline/Configuration/python/autoDQM.py @@ -17,8 +17,6 @@ 'express': ['@commonSiStripZeroBias+@muon+@hcal+@jetmet+@ecal', '@commonSiStripZeroBias+@muon+@hcal+@jetmet+@ecal'], 'allForPrompt': ['@common+@muon+@hcal+@jetmet+@ecal', - '@common+@muon+@hcal+@jetmet+@ecal'], - 'miniAOD': ['DQMOfflineMiniAOD', - 'DQMHarvestMiniAOD'] + '@common+@muon+@hcal+@jetmet+@ecal'] } diff --git a/DQMOffline/PFTau/BuildFile.xml b/DQMOffline/PFTau/BuildFile.xml index fcdc0f5a25f68..7429b24fd3d4f 100644 --- a/DQMOffline/PFTau/BuildFile.xml +++ b/DQMOffline/PFTau/BuildFile.xml @@ -7,7 +7,6 @@ - diff --git a/DQMOffline/PFTau/interface/Benchmark.h b/DQMOffline/PFTau/interface/Benchmark.h index 3a3fc3b050984..bfa74d180af07 100644 --- a/DQMOffline/PFTau/interface/Benchmark.h +++ b/DQMOffline/PFTau/interface/Benchmark.h @@ -3,7 +3,6 @@ #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h" -#include "DQMServices/Core/interface/DQMStore.h" #include @@ -38,6 +37,8 @@ class Benchmark{ VALIDATION }; + static DQMStore *DQM_; + Benchmark(Mode mode = DEFAULT) : dir_(0), mode_(mode), ptMin_(0), ptMax_(10e10), @@ -63,40 +64,30 @@ class Benchmark{ /// write to the TFile, in plain ROOT mode. No need to call this function in DQM mode void write(); - + protected: - - /// book a 1D histogram, either with DQM or plain root depending if DQM_ has been initialized in a child analyzer or not. - //TH1F* book1D(const char* histname, const char* title, - /// book a 1D histogram, either through IBooker or plain root - TH1F* book1D(DQMStore::IBooker& b, const char* histname, const char* title, + + /// book a 1D histogram, either with DQM or plain root. + TH1F* book1D(const char* histname, const char* title, int nbins, float xmin, float xmax); - - /// book a 2D histogram, either with DQM or plain root depending if DQM_ has been initialized in a child analyzer or not. - //TH2F* book2D(const char* histname, const char* title, - /// book a 2D histogram, either through IBooker or plain root - TH2F* book2D(DQMStore::IBooker& b, const char* histname, const char* title, + + /// book a 2D histogram, either with DQM or plain root. + TH2F* book2D(const char* histname, const char* title, int nbinsx, float xmin, float xmax, int nbinsy, float ymin, float ymax ); - /// book a 2D histogram, either with DQM or plain root depending if DQM_ has been initialized in a child analyzer or not. - //TH2F* book2D(const char* histname, const char* title, - /// book a 2D histogram, either through IBooker or plain root - TH2F* book2D(DQMStore::IBooker& b, const char* histname, const char* title, + /// book a 2D histogram, either with DQM or plain root. + TH2F* book2D(const char* histname, const char* title, int nbinsx, float* xbins, int nbinsy, float ymin, float ymax ); - /// book a TProfile histogram, either with DQM or plain root depending if DQM_ has been initialized in a child analyzer or not. - //TProfile* bookProfile(const char* histname, const char* title, - /// book a TProfile, either through IBooker or plain root - TProfile* bookProfile(DQMStore::IBooker& b, const char* histname, const char* title, + /// book a TProfile histogram, either with DQM or plain root. + TProfile* bookProfile(const char* histname, const char* title, int nbinsx, float xmin, float xmax, float ymin, float ymax, const char* option ); - /// book a TProfile histogram, either with DQM or plain root depending if DQM_ has been initialized in a child analyzer or not. - //TProfile* bookProfile(const char* histname, const char* title, - /// book a TProfile, either through IBooker or plain root - TProfile* bookProfile(DQMStore::IBooker& b, const char* histname, const char* title, + /// book a TProfile histogram, either with DQM or plain root. + TProfile* bookProfile(const char* histname, const char* title, int nbinsx, float* xbins, float ymin, float ymax, const char* option ); diff --git a/DQMOffline/PFTau/interface/CandidateBenchmark.h b/DQMOffline/PFTau/interface/CandidateBenchmark.h index 8de3bd5548248..8cc24d614bae5 100644 --- a/DQMOffline/PFTau/interface/CandidateBenchmark.h +++ b/DQMOffline/PFTau/interface/CandidateBenchmark.h @@ -16,8 +16,9 @@ class CandidateBenchmark : public Benchmark { virtual ~CandidateBenchmark(); /// book histograms - void setup(DQMStore::IBooker& b); - void setup(DQMStore::IBooker& b, const edm::ParameterSet& parameterSet); + void setup(); + /// book histograms + void setup(const edm::ParameterSet& parameterSet); template< class C> void fill( const C& candidates); diff --git a/DQMOffline/PFTau/interface/METBenchmark.h b/DQMOffline/PFTau/interface/METBenchmark.h index 4e46f7dd595fe..5ad08a1f2ecab 100644 --- a/DQMOffline/PFTau/interface/METBenchmark.h +++ b/DQMOffline/PFTau/interface/METBenchmark.h @@ -5,8 +5,6 @@ #include "DataFormats/METReco/interface/METFwd.h" -#include "DQMServices/Core/interface/DQMStore.h" - /// To plot MET quantities class METBenchmark : public Benchmark { @@ -16,7 +14,7 @@ class METBenchmark : public Benchmark { virtual ~METBenchmark(); /// book histograms - void setup(DQMStore::IBooker& b); + void setup(); /// fill a collection template< class C> diff --git a/DQMOffline/PFTau/interface/MatchCandidateBenchmark.h b/DQMOffline/PFTau/interface/MatchCandidateBenchmark.h index 7d742fe6d6c84..3b8de66e3cfef 100644 --- a/DQMOffline/PFTau/interface/MatchCandidateBenchmark.h +++ b/DQMOffline/PFTau/interface/MatchCandidateBenchmark.h @@ -14,13 +14,15 @@ class MatchCandidateBenchmark : public Benchmark { public: + //MatchCandidateBenchmark(Mode mode); MatchCandidateBenchmark(Mode mode); virtual ~MatchCandidateBenchmark(); /// book histograms - void setup(DQMStore::IBooker& b); - void setup(DQMStore::IBooker& b, const edm::ParameterSet& parameterSet); + void setup(); + /// book histograms + void setup(const edm::ParameterSet& parameterSet); /// fill histograms with a given particle void fillOne( const reco::Candidate& candidate, @@ -36,7 +38,7 @@ class MatchCandidateBenchmark : public Benchmark { TH2F* delta_et_VS_et_; TH2F* delta_eta_VS_et_; TH2F* delta_phi_VS_et_; - + ///LEONARDO add these histos TH2F* BRdelta_et_Over_et_VS_et_; TH2F* ERdelta_et_Over_et_VS_et_; std::vector pTRes_ ; diff --git a/DQMOffline/PFTau/interface/MatchMETBenchmark.h b/DQMOffline/PFTau/interface/MatchMETBenchmark.h index bfb291f73216c..da078ad606e10 100644 --- a/DQMOffline/PFTau/interface/MatchMETBenchmark.h +++ b/DQMOffline/PFTau/interface/MatchMETBenchmark.h @@ -16,7 +16,7 @@ class MatchMETBenchmark : public Benchmark { virtual ~MatchMETBenchmark(); /// book histograms - void setup(DQMStore::IBooker& b); + void setup(); /// fill histograms with a given particle void fillOne( const reco::MET& candidate, diff --git a/DQMOffline/PFTau/interface/Matchers.h b/DQMOffline/PFTau/interface/Matchers.h index 52c22e363ccd3..f756f6e8eafbf 100644 --- a/DQMOffline/PFTau/interface/Matchers.h +++ b/DQMOffline/PFTau/interface/Matchers.h @@ -3,17 +3,14 @@ #include "DataFormats/Math/interface/deltaR.h" -#include "DataFormats/MuonReco/interface/MuonSelectors.h" -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Utilities/interface/EDGetToken.h" - #include #include namespace PFB { - - template< typename C, typename M > + + + template< typename C, typename M> void match( const C& candCollection, const M& matchedCandCollection, std::vector& matchIndices, @@ -36,7 +33,7 @@ namespace PFB { for( unsigned jm=0; jm - template< typename C, typename M > - void match( const C& candCollection, - const M& matchedCandCollection, - std::vector& matchIndices, - const edm::ParameterSet & parameterSet, - //const MM& muonMatchedCandCollection, - edm::View muonMatchedCandCollection, - bool matchCharge = false, - float dRMax=-1) { - - // compute distance to each candidate in the matchedCandCollection. - - float dR2Max = 0; - if(dRMax>0) dR2Max = dRMax*dRMax; - - matchIndices.clear(); - matchIndices.resize( candCollection.size(), -1); - - for( unsigned i=0; i("slimmedLikeSelection") ) { - if ( !( muonMatchedCandCollection[jm].pt() > parameterSet.getParameter("ptBase") || - muonMatchedCandCollection[jm].isPFMuon() || - ( muonMatchedCandCollection[jm].pt() > parameterSet.getParameter("ptNotPF") && - (muonMatchedCandCollection[jm].isGlobalMuon() || muonMatchedCandCollection[jm].isStandAloneMuon() || muonMatchedCandCollection[jm].numberOfMatches() > 0 || muon::isGoodMuon(muonMatchedCandCollection[jm], muon::RPCMuLoose) ) ) - ) ) - continue ; - } - - if( matchCharge && - candCollection[i].charge() != matchedCandCollection[jm].charge() ) - continue ; - - double dR2 = reco::deltaR2( candCollection[i], - matchedCandCollection[jm] ); - if( dR20 && dR2min < dR2Max) || dRMax<=0 ) { - matchIndices[i] = jMin; - /* std::cout<<"match "< diff --git a/DQMOffline/PFTau/interface/PFCandidateMonitor.h b/DQMOffline/PFTau/interface/PFCandidateMonitor.h index 300e70a687239..50f4030a9290f 100644 --- a/DQMOffline/PFTau/interface/PFCandidateMonitor.h +++ b/DQMOffline/PFTau/interface/PFCandidateMonitor.h @@ -34,23 +34,22 @@ class PFCandidateMonitor : public Benchmark { void setDirectory(TDirectory* dir); /// book histograms - void setup(DQMStore::IBooker& b); - void setup(DQMStore::IBooker& b, const edm::ParameterSet & parameterSet); + void setup(); + + /// book histograms + void setup(const edm::ParameterSet & parameterSet); /// fill histograms with all particle template< class T, class C> /*void fill(const T& candidateCollection, - const C& matchedCandCollection, float& minVal, float& maxVal) ;*/ - void fill(const T& candidateCollection, - const C& matchedCandCollection, float& minVal, float& maxVal, - const edm::ParameterSet & parameterSet) ; - template< class T, class C, class M> - void fill(const T& candidateCollection, - const C& matchedCandCollection, float& minVal, float& maxVal, - const edm::ParameterSet & parameterSet, const M& muonMatchedCandCollection ) ; + const C& matchedCandCollection, float& minVal, float& maxVal);*/ - void fillOne(const reco::Candidate& cand); + void fill(const T& candidateCollection, + const C& matchedCandCollection, float& minVal, float& maxVal, + const edm::ParameterSet & parameterSet); + void fillOne(const reco::Candidate& cand); + protected: CandidateBenchmark candBench_; MatchCandidateBenchmark matchCandBench_; @@ -75,10 +74,12 @@ class PFCandidateMonitor : public Benchmark { #include "DQMOffline/PFTau/interface/Matchers.h" template< class T, class C> + /*void PFCandidateMonitor::fill(const T& candCollection, + const C& matchedCandCollection, float& minVal, float& maxVal) {*/ void PFCandidateMonitor::fill(const T& candCollection, const C& matchedCandCollection, float& minVal, float& maxVal, const edm::ParameterSet & parameterSet) { - + matching_done_ = false; if ( createEfficiencyHistos_ ) { for( unsigned i=0; i std::vector matchIndices; PFB::match( candCollection, matchedCandCollection, matchIndices, matchCharge_, dRMax_ ); - //PFB::match( candCollection, matchedCandCollection, matchIndices, parameterSet, matchCharge_, dRMax_ ); // now matchIndices[i] stores the j-th closest matched jet matching_done_ = true; @@ -130,63 +130,4 @@ template< class T, class C> } } } - -template< class T, class C, class M> - /*void PFCandidateMonitor::fill(const T& candCollection, - const C& matchedCandCollection, float& minVal, float& maxVal) {*/ - void PFCandidateMonitor::fill(const T& candCollection, - const C& matchedCandCollection, float& minVal, float& maxVal, - const edm::ParameterSet & parameterSet, const M& muonMatchedCandCollection) { - - - matching_done_ = false; - if ( createEfficiencyHistos_ ) { - for( unsigned i=0; iFill( reco::deltaR( candCollection[i], matchedCandCollection[j] ) ) ; - } - } - - std::vector matchIndices; - //PFB::match( candCollection, matchedCandCollection, matchIndices, matchCharge_, dRMax_ ); - //PFB::match( candCollection, matchedCandCollection, matchIndices, parameterSet, matchCharge_, dRMax_ ); - PFB::match( candCollection, matchedCandCollection, matchIndices, parameterSet, muonMatchedCandCollection, matchCharge_, dRMax_ ); - // now matchIndices[i] stores the j-th closest matched jet - matching_done_ = true; - - for (unsigned int i = 0; i < (candCollection).size(); i++) { - const reco::Candidate& cand = candCollection[i]; - - if( !isInRange(cand.pt(), cand.eta(), cand.phi() ) ) continue; - - int iMatch = matchIndices[i]; - assert(iMatch< static_cast(matchedCandCollection.size())); - - if( iMatch!=-1 ) { - const reco::Candidate& matchedCand = matchedCandCollection[ iMatch ]; - if(!isInRange(matchedCand.pt(),matchedCand.eta(),matchedCand.phi() ) ) continue; - //std::cout <<"PFJet pT " < maxVal) maxVal = ptRes; - if (ptRes < minVal) minVal = ptRes; - - if ( !createEfficiencyHistos_ ) { - candBench_.fillOne(cand); // fill pt, eta phi and charge histos for MATCHED candidate - matchCandBench_.fillOne(cand, matchedCand, parameterSet); // fill delta_x_VS_y histos for matched couple - if (createReferenceHistos_) fillOne(matchedCand); // fill pt_ref, eta_ref and phi_ref histos for MATCHED reference candidate - } - else { - candBench_.fillOne(matchedCand); // fill pt, eta phi and charge histos for MATCHED candidate - matchCandBench_.fillOne(cand, matchedCand, parameterSet); // fill delta_x_VS_y histos for matched couple - if (createReferenceHistos_) fillOne(cand); // fill pt_ref, eta_ref and phi_ref histos for MATCHED reference candidate - } - - } - } -} #endif diff --git a/DQMOffline/PFTau/interface/PFJetMonitor.h b/DQMOffline/PFTau/interface/PFJetMonitor.h index 7a5e4e345c717..84feb48a9e827 100644 --- a/DQMOffline/PFTau/interface/PFJetMonitor.h +++ b/DQMOffline/PFTau/interface/PFJetMonitor.h @@ -23,13 +23,14 @@ class PFJetMonitor : public Benchmark { virtual ~PFJetMonitor(); /// set the parameters locally - void setParameters(float dRMax, bool matchCharge, Benchmark::Mode mode, - float ptmin, float ptmax, float etamin, float etamax, float phimin, float phimax, - bool fracHistoFlag=true); + void setParameters(float dRMax, bool matchCharge, + Benchmark::Mode mode,float ptmin, + float ptmax, float etamin, float etamax, + float phimin, float phimax, bool fracHistoFlag=true); void setParameters(float dRMax, bool onlyTwoJets, bool matchCharge, Benchmark::Mode mode, - float ptmin, float ptmax, float etamin, float etamax, float phimin, float phimax, - bool fracHistoFlag=true); + float ptmin, float ptmax, float etamin, float etamax, + float phimin, float phimax, bool fracHistoFlag=true); /// set the parameters accessing them from ParameterSet void setParameters( const edm::ParameterSet& parameterSet); @@ -38,17 +39,19 @@ class PFJetMonitor : public Benchmark { void setDirectory(TDirectory* dir); /// book histograms - void setup(DQMStore::IBooker& b); - void setup(DQMStore::IBooker& b, const edm::ParameterSet & parameterSet); + void setup(); + + /// book histograms + void setup(const edm::ParameterSet & parameterSet); /// fill histograms with all particle template< class T, class C> - void fill(const T& jetCollection, const C& matchedJetCollection, - float& minVal, float& maxVal); + void fill(const T& jetCollection, + const C& matchedJetCollection, float& minVal, float& maxVal); template< class T, class C> - void fill(const T& candidateCollection, const C& matchedCandCollection, - float& minVal, float& maxVal, float& jetpT, + void fill(const T& candidateCollection, + const C& matchedCandCollection, float& minVal, float& maxVal, float& jetpT, const edm::ParameterSet & parameterSet); void fillOne(const reco::Jet& jet, @@ -90,7 +93,7 @@ template< class T, class C> int iMatch = matchIndices[i]; assert(iMatch< static_cast(matchedJetCollection.size())); - if( iMatch != -1 ) { + if( iMatch!=-1 ) { const reco::Candidate& matchedJet = matchedJetCollection[ iMatch ]; if( !isInRange( matchedJet.pt(), matchedJet.eta(), matchedJet.phi() ) ) continue; float ptRes = (jet.pt() - matchedJet.pt())/matchedJet.pt(); diff --git a/DQMOffline/PFTau/interface/PFMETMonitor.h b/DQMOffline/PFTau/interface/PFMETMonitor.h index e6336585e666b..7a4dacc15693e 100644 --- a/DQMOffline/PFTau/interface/PFMETMonitor.h +++ b/DQMOffline/PFTau/interface/PFMETMonitor.h @@ -27,14 +27,16 @@ class PFMETMonitor : public Benchmark { void setDirectory(TDirectory* dir); /// book histograms - void setup(DQMStore::IBooker& b); - void setup(DQMStore::IBooker& b, const edm::ParameterSet & parameterSet); + void setup(); + + /// book histograms + void setup(const edm::ParameterSet & parameterSet); - void fillOne(const reco::MET& met, const reco::MET& matchedMet, - float& minVal, float& maxVal); + void fillOne(const reco::MET& met, + const reco::MET& matchedMet, float& minVal, float& maxVal); - void fillOne(const reco::MET& met, const reco::MET& matchedMet, - float& minVal, float& maxVal, + void fillOne(const reco::MET& met, + const reco::MET& matchedMet, float& minVal, float& maxVal, const edm::ParameterSet & parameterSet); protected: diff --git a/DQMOffline/PFTau/plugins/BenchmarkAnalyzer.cc b/DQMOffline/PFTau/plugins/BenchmarkAnalyzer.cc index e6e42e4bc998b..9a0397410ed78 100644 --- a/DQMOffline/PFTau/plugins/BenchmarkAnalyzer.cc +++ b/DQMOffline/PFTau/plugins/BenchmarkAnalyzer.cc @@ -18,21 +18,21 @@ BenchmarkAnalyzer::BenchmarkAnalyzer(const edm::ParameterSet& parameterSet) inputLabel_ = parameterSet.getParameter("InputCollection"); benchmarkLabel_ = parameterSet.getParameter("BenchmarkLabel"); - std::string folder = benchmarkLabel_ ; - - subsystemname_ = "ParticleFlow" ; - eventInfoFolder_ = subsystemname_ + "/" + folder ; } -// -// -- BookHistograms -// -void BenchmarkAnalyzer::bookHistograms(DQMStore::IBooker & ibooker, - edm::Run const & /* iRun */, - edm::EventSetup const & /* iSetup */ ) -{ - ibooker.setCurrentFolder(eventInfoFolder_) ; - cout << "path set to " << eventInfoFolder_ << endl; + +void +BenchmarkAnalyzer::beginJob() +{ + Benchmark::DQM_ = edm::Service().operator->(); + if(!Benchmark::DQM_) { + throw "Please initialize the DQM service in your cfg"; + } + + // part of the following could be put in the base class + string path = "PFTask/" + benchmarkLabel_ ; + Benchmark::DQM_->setCurrentFolder(path.c_str()); + cout<<"path set to "<("mode") ) @@ -28,21 +28,21 @@ CandidateBenchmarkAnalyzer::CandidateBenchmarkAnalyzer(const edm::ParameterSet& parameterSet.getParameter("phiMax") ); myColl_ = consumes< View >(inputLabel_); - } -void CandidateBenchmarkAnalyzer::bookHistograms(DQMStore::IBooker & ibooker, - edm::Run const & iRun, - edm::EventSetup const & iSetup ) +void +CandidateBenchmarkAnalyzer::beginJob() { - BenchmarkAnalyzer::bookHistograms(ibooker, iRun, iSetup); - setup(ibooker); + + BenchmarkAnalyzer::beginJob(); + setup(); } void CandidateBenchmarkAnalyzer::analyze(const edm::Event& iEvent, - const edm::EventSetup& iSetup) { + const edm::EventSetup& iSetup) { + Handle< View > collection; iEvent.getByToken(myColl_, collection); @@ -50,3 +50,6 @@ CandidateBenchmarkAnalyzer::analyze(const edm::Event& iEvent, fill( *collection ); } + +void CandidateBenchmarkAnalyzer::endJob() { +} diff --git a/DQMOffline/PFTau/plugins/CandidateBenchmarkAnalyzer.h b/DQMOffline/PFTau/plugins/CandidateBenchmarkAnalyzer.h index e2855dac638b0..cc2b89454a242 100644 --- a/DQMOffline/PFTau/plugins/CandidateBenchmarkAnalyzer.h +++ b/DQMOffline/PFTau/plugins/CandidateBenchmarkAnalyzer.h @@ -16,8 +16,8 @@ class CandidateBenchmarkAnalyzer: public BenchmarkAnalyzer, public CandidateBenc CandidateBenchmarkAnalyzer(const edm::ParameterSet& parameterSet); void analyze(const edm::Event&, const edm::EventSetup&); - - void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; + void beginJob() ; + void endJob(); edm::EDGetTokenT< edm::View > myColl_; }; diff --git a/DQMOffline/PFTau/plugins/METBenchmarkAnalyzer.cc b/DQMOffline/PFTau/plugins/METBenchmarkAnalyzer.cc index 717c5d2fd13de..8888c0401c42f 100644 --- a/DQMOffline/PFTau/plugins/METBenchmarkAnalyzer.cc +++ b/DQMOffline/PFTau/plugins/METBenchmarkAnalyzer.cc @@ -8,13 +8,13 @@ #include "DataFormats/Candidate/interface/CandidateFwd.h" #include "DataFormats/METReco/interface/MET.h" -#include "DQMServices/Core/interface/DQMStore.h" using namespace reco; using namespace edm; using namespace std; + METBenchmarkAnalyzer::METBenchmarkAnalyzer(const edm::ParameterSet& parameterSet) : BenchmarkAnalyzer(parameterSet), METBenchmark( (Benchmark::Mode) parameterSet.getParameter("mode") ) @@ -27,21 +27,21 @@ METBenchmarkAnalyzer::METBenchmarkAnalyzer(const edm::ParameterSet& parameterSet parameterSet.getParameter("phiMax") ); myColl_ = consumes< View >(inputLabel_); - } -void METBenchmarkAnalyzer::bookHistograms(DQMStore::IBooker & ibooker, - edm::Run const & iRun, - edm::EventSetup const & iSetup ) +void +METBenchmarkAnalyzer::beginJob() { - BenchmarkAnalyzer::bookHistograms(ibooker, iRun, iSetup); - setup(ibooker); + + BenchmarkAnalyzer::beginJob(); + setup(); } void METBenchmarkAnalyzer::analyze(const edm::Event& iEvent, - const edm::EventSetup& iSetup) { + const edm::EventSetup& iSetup) { + Handle< View > collection; iEvent.getByToken(myColl_, collection); @@ -49,3 +49,6 @@ METBenchmarkAnalyzer::analyze(const edm::Event& iEvent, fill( *collection ); } + +void METBenchmarkAnalyzer::endJob() { +} diff --git a/DQMOffline/PFTau/plugins/METBenchmarkAnalyzer.h b/DQMOffline/PFTau/plugins/METBenchmarkAnalyzer.h index 2af570c9d7d96..dfe46f9236108 100644 --- a/DQMOffline/PFTau/plugins/METBenchmarkAnalyzer.h +++ b/DQMOffline/PFTau/plugins/METBenchmarkAnalyzer.h @@ -15,8 +15,8 @@ class METBenchmarkAnalyzer: public BenchmarkAnalyzer, public METBenchmark { METBenchmarkAnalyzer(const edm::ParameterSet& parameterSet); void analyze(const edm::Event&, const edm::EventSetup&); - - void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; + void beginJob() ; + void endJob(); edm::EDGetTokenT< edm::View > myColl_; }; diff --git a/DQMOffline/PFTau/plugins/MatchMETBenchmarkAnalyzer.cc b/DQMOffline/PFTau/plugins/MatchMETBenchmarkAnalyzer.cc index 7f879f0651ba7..06700968b3f41 100644 --- a/DQMOffline/PFTau/plugins/MatchMETBenchmarkAnalyzer.cc +++ b/DQMOffline/PFTau/plugins/MatchMETBenchmarkAnalyzer.cc @@ -16,25 +16,30 @@ MatchMETBenchmarkAnalyzer::MatchMETBenchmarkAnalyzer(const edm::ParameterSet& pa BenchmarkAnalyzer(parameterSet), MatchMETBenchmark( (Benchmark::Mode) parameterSet.getParameter("mode") ) { - matchedInputLabel_ = parameterSet.getParameter("MatchCollection"); + matchedInputLabel_=parameterSet.getParameter("MatchCollection"); +// setRange( parameterSet.getParameter("ptMin"), +// parameterSet.getParameter("ptMax"), +// -0.1, 0.1, // range in eta for MET. +// parameterSet.getParameter("phiMin"), +// parameterSet.getParameter("phiMax") ); myColl_ = consumes< View >(inputLabel_); myMatchColl_ = consumes< View >(matchedInputLabel_); - } - -void MatchMETBenchmarkAnalyzer::bookHistograms(DQMStore::IBooker & ibooker, - edm::Run const & iRun, - edm::EventSetup const & iSetup ) +void +MatchMETBenchmarkAnalyzer::beginJob() { - BenchmarkAnalyzer::bookHistograms(ibooker, iRun, iSetup); - setup(ibooker); + + BenchmarkAnalyzer::beginJob(); + setup(); } -void MatchMETBenchmarkAnalyzer::analyze(const edm::Event& iEvent, - const edm::EventSetup& iSetup) { - +void +MatchMETBenchmarkAnalyzer::analyze(const edm::Event& iEvent, + const edm::EventSetup& iSetup) { + + Handle< View > collection; iEvent.getByToken(myColl_, collection); @@ -44,3 +49,5 @@ void MatchMETBenchmarkAnalyzer::analyze(const edm::Event& iEvent, fillOne( (*collection)[0] , (*matchedCollection)[0]); } +void MatchMETBenchmarkAnalyzer::endJob() { +} diff --git a/DQMOffline/PFTau/plugins/MatchMETBenchmarkAnalyzer.h b/DQMOffline/PFTau/plugins/MatchMETBenchmarkAnalyzer.h index ae9a580f8fe3c..7c1e9841ab8bb 100644 --- a/DQMOffline/PFTau/plugins/MatchMETBenchmarkAnalyzer.h +++ b/DQMOffline/PFTau/plugins/MatchMETBenchmarkAnalyzer.h @@ -12,10 +12,10 @@ class MatchMETBenchmarkAnalyzer: public BenchmarkAnalyzer, public MatchMETBenchm public: MatchMETBenchmarkAnalyzer(const edm::ParameterSet& parameterSet); - + void analyze(const edm::Event&, const edm::EventSetup&); - void beginJob(){}; - void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; + void beginJob() ; + void endJob(); protected: edm::EDGetTokenT< edm::View > myColl_; diff --git a/DQMOffline/PFTau/plugins/PFCandidateBenchmarkAnalyzer.cc b/DQMOffline/PFTau/plugins/PFCandidateBenchmarkAnalyzer.cc index 91efda21775bb..60225db9e659b 100644 --- a/DQMOffline/PFTau/plugins/PFCandidateBenchmarkAnalyzer.cc +++ b/DQMOffline/PFTau/plugins/PFCandidateBenchmarkAnalyzer.cc @@ -11,11 +11,15 @@ #include "DQMServices/Core/interface/DQMStore.h" #include "FWCore/ServiceRegistry/interface/Service.h" +// #include "DQMServices/Core/interface/MonitorElement.h" +// #include + using namespace reco; using namespace edm; using namespace std; + PFCandidateBenchmarkAnalyzer::PFCandidateBenchmarkAnalyzer(const edm::ParameterSet& parameterSet) : BenchmarkAnalyzer(parameterSet), PFCandidateBenchmark( (Benchmark::Mode) parameterSet.getParameter("mode") ) @@ -28,24 +32,28 @@ PFCandidateBenchmarkAnalyzer::PFCandidateBenchmarkAnalyzer(const edm::ParameterS parameterSet.getParameter("phiMax") ); myColl_ = consumes< PFCandidateCollection >(inputLabel_); - } -void PFCandidateBenchmarkAnalyzer::bookHistograms(DQMStore::IBooker & ibooker, - edm::Run const & iRun, - edm::EventSetup const & iSetup ) +void +PFCandidateBenchmarkAnalyzer::beginJob() { - BenchmarkAnalyzer::bookHistograms(ibooker, iRun, iSetup); - setup(ibooker); + BenchmarkAnalyzer::beginJob(); + setup(); } -void PFCandidateBenchmarkAnalyzer::analyze(const edm::Event& iEvent, - const edm::EventSetup& iSetup) { - + +void +PFCandidateBenchmarkAnalyzer::analyze(const edm::Event& iEvent, + const edm::EventSetup& iSetup) { + + Handle collection; iEvent.getByToken(myColl_, collection); fill( *collection ); } + +void PFCandidateBenchmarkAnalyzer::endJob() { +} diff --git a/DQMOffline/PFTau/plugins/PFCandidateBenchmarkAnalyzer.h b/DQMOffline/PFTau/plugins/PFCandidateBenchmarkAnalyzer.h index 610d6beda1030..2cae486f19bc0 100644 --- a/DQMOffline/PFTau/plugins/PFCandidateBenchmarkAnalyzer.h +++ b/DQMOffline/PFTau/plugins/PFCandidateBenchmarkAnalyzer.h @@ -15,8 +15,8 @@ class PFCandidateBenchmarkAnalyzer: public BenchmarkAnalyzer, public PFCandidate PFCandidateBenchmarkAnalyzer(const edm::ParameterSet& parameterSet); void analyze(const edm::Event&, const edm::EventSetup&); - - void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; + void beginJob(); + void endJob(); edm::EDGetTokenT< reco::PFCandidateCollection > myColl_; }; diff --git a/DQMOffline/PFTau/plugins/PFCandidateDQMAnalyzer.cc b/DQMOffline/PFTau/plugins/PFCandidateDQMAnalyzer.cc index 267a3863b9f69..dbdb930c272a4 100644 --- a/DQMOffline/PFTau/plugins/PFCandidateDQMAnalyzer.cc +++ b/DQMOffline/PFTau/plugins/PFCandidateDQMAnalyzer.cc @@ -13,8 +13,6 @@ #include "DQMServices/Core/interface/DQMStore.h" #include "DQMServices/Core/interface/MonitorElement.h" #include "FWCore/ServiceRegistry/interface/Service.h" - - // // -- Constructor // @@ -31,38 +29,25 @@ PFCandidateDQMAnalyzer::PFCandidateDQMAnalyzer(const edm::ParameterSet& paramete myCand_ = consumes< edm::View >(inputLabel_); myMatchedCand_ = consumes< edm::View >(matchLabel_); - - - std::string folder = benchmarkLabel_ ; - - subsystemname_ = "ParticleFlow" ; - eventInfoFolder_ = subsystemname_ + "/" + folder ; - - nBadEvents_ = 0; - } - - // -// -- BookHistograms +// -- BeginJob // -void PFCandidateDQMAnalyzer::bookHistograms(DQMStore::IBooker & ibooker, - edm::Run const & /* iRun */, - edm::EventSetup const & /* iSetup */ ) -{ - ibooker.setCurrentFolder(eventInfoFolder_) ; - - edm::LogInfo("PFCandidateDQMAnalyzer") << " PFCandidateDQMAnalyzer::bookHistograms " << "Histogram Folder path set to " << eventInfoFolder_; - - pfCandidateMonitor_.setup(ibooker, pSet_); +void PFCandidateDQMAnalyzer::beginJob() { + + Benchmark::DQM_ = edm::Service().operator->(); + // part of the following could be put in the base class + std::string path = "ParticleFlow/" + benchmarkLabel_; + Benchmark::DQM_->setCurrentFolder(path.c_str()); + edm::LogInfo("PFCandidateDQMAnalyzer") << " PFCandidateDQMAnalyzer::beginJob " << "Histogram Folder path set to "<< path; + pfCandidateMonitor_.setup(pSet_); + nBadEvents_ = 0; } - - // // -- Analyze // void PFCandidateDQMAnalyzer::analyze(edm::Event const& iEvent, - edm::EventSetup const& iSetup) { + edm::EventSetup const& iSetup) { edm::Handle< edm::View > candCollection; edm::Handle< edm::View > matchedCandCollection; @@ -77,11 +62,41 @@ void PFCandidateDQMAnalyzer::analyze(edm::Event const& iEvent, float maxRes = 0.0; float minRes = 99.99; if (candCollection.isValid() && matchedCandCollection.isValid()) { + //pfCandidateMonitor_.fill( *candCollection, *matchedCandCollection, minRes, maxRes); pfCandidateMonitor_.fill( *candCollection, *matchedCandCollection, minRes, maxRes, pSet_); - - } -} + edm::ParameterSet skimPS = pSet_.getParameter("SkimParameter"); + if ( (skimPS.getParameter("switchOn")) && + (nBadEvents_ <= skimPS.getParameter("maximumNumberToBeStored")) ) { + if ( minRes < skimPS.getParameter("lowerCutOffOnResolution")) { + nBadEvents_++; + storeBadEvents(iEvent,minRes); + } else if (maxRes > skimPS.getParameter("upperCutOffOnResolution")) { + nBadEvents_++; + storeBadEvents(iEvent,maxRes); + } + } + } +} +void PFCandidateDQMAnalyzer::storeBadEvents(edm::Event const& iEvent, float& val) { + unsigned int runNb = iEvent.id().run(); + unsigned int evtNb = iEvent.id().event(); + unsigned int lumiNb = iEvent.id().luminosityBlock(); + + std::string path = "ParticleFlow/" + benchmarkLabel_ + "/BadEvents"; + Benchmark::DQM_->setCurrentFolder(path.c_str()); + std::ostringstream eventid_str; + eventid_str << runNb << "_"<< evtNb << "_" << lumiNb; + MonitorElement* me = Benchmark::DQM_->get(path + "/" + eventid_str.str()); + if (me) me->Reset(); + else me = Benchmark::DQM_->bookFloat(eventid_str.str()); + me->Fill(val); +} +// +// -- EndJob +// +void PFCandidateDQMAnalyzer::endJob() { +} #include "FWCore/Framework/interface/MakerMacros.h" DEFINE_FWK_MODULE (PFCandidateDQMAnalyzer) ; diff --git a/DQMOffline/PFTau/plugins/PFCandidateDQMAnalyzer.h b/DQMOffline/PFTau/plugins/PFCandidateDQMAnalyzer.h index c6c6ca0a9595e..644d20a4c9ce7 100644 --- a/DQMOffline/PFTau/plugins/PFCandidateDQMAnalyzer.h +++ b/DQMOffline/PFTau/plugins/PFCandidateDQMAnalyzer.h @@ -10,19 +10,18 @@ #include "DQMOffline/PFTau/interface/PFCandidateMonitor.h" -#include "DQMServices/Core/interface/DQMEDAnalyzer.h" -class PFCandidateDQMAnalyzer: public DQMEDAnalyzer { +class PFCandidateDQMAnalyzer: public edm::EDAnalyzer { public: PFCandidateDQMAnalyzer(const edm::ParameterSet& parameterSet); private: void analyze(edm::Event const&, edm::EventSetup const&); + void beginJob() ; + void endJob(); - void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; - - MonitorElement * eventId_; + void storeBadEvents(edm::Event const&, float& val); edm::EDGetTokenT< edm::View > myCand_; edm::EDGetTokenT< edm::View > myMatchedCand_; @@ -34,8 +33,6 @@ class PFCandidateDQMAnalyzer: public DQMEDAnalyzer { PFCandidateMonitor pfCandidateMonitor_; edm::ParameterSet pSet_; - std::string eventInfoFolder_; - std::string subsystemname_; int nBadEvents_; }; diff --git a/DQMOffline/PFTau/plugins/PFCandidateManagerAnalyzer.cc b/DQMOffline/PFTau/plugins/PFCandidateManagerAnalyzer.cc index 0530baef8568a..add81cf4d1039 100644 --- a/DQMOffline/PFTau/plugins/PFCandidateManagerAnalyzer.cc +++ b/DQMOffline/PFTau/plugins/PFCandidateManagerAnalyzer.cc @@ -11,6 +11,8 @@ #include "DQMServices/Core/interface/DQMStore.h" #include "FWCore/ServiceRegistry/interface/Service.h" +// #include "DQMServices/Core/interface/MonitorElement.h" +// #include using namespace reco; using namespace edm; @@ -34,22 +36,23 @@ PFCandidateManagerAnalyzer::PFCandidateManagerAnalyzer(const edm::ParameterSet& myColl_ = consumes< PFCandidateCollection >(inputLabel_); myMatchColl_ = consumes< View >(matchLabel_); - } -void PFCandidateManagerAnalyzer::bookHistograms(DQMStore::IBooker & ibooker, - edm::Run const & iRun, - edm::EventSetup const & iSetup ) +void +PFCandidateManagerAnalyzer::beginJob() { - BenchmarkAnalyzer::bookHistograms(ibooker, iRun, iSetup); - setup(ibooker); + + BenchmarkAnalyzer::beginJob(); + setup(); } void PFCandidateManagerAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { - + + + Handle< PFCandidateCollection > collection; iEvent.getByToken(myColl_, collection); @@ -59,3 +62,5 @@ PFCandidateManagerAnalyzer::analyze(const edm::Event& iEvent, fill( *collection, *matchCollection ); } +void PFCandidateManagerAnalyzer::endJob() { +} diff --git a/DQMOffline/PFTau/plugins/PFCandidateManagerAnalyzer.h b/DQMOffline/PFTau/plugins/PFCandidateManagerAnalyzer.h index c5fca0cf62a19..3fbf83eb56980 100644 --- a/DQMOffline/PFTau/plugins/PFCandidateManagerAnalyzer.h +++ b/DQMOffline/PFTau/plugins/PFCandidateManagerAnalyzer.h @@ -15,8 +15,8 @@ class PFCandidateManagerAnalyzer: public BenchmarkAnalyzer, public PFCandidateMa PFCandidateManagerAnalyzer(const edm::ParameterSet& parameterSet); void analyze(const edm::Event&, const edm::EventSetup&); - - void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; + void beginJob() ; + void endJob(); private: edm::EDGetTokenT< reco::PFCandidateCollection > myColl_; diff --git a/DQMOffline/PFTau/plugins/PFClient.cc b/DQMOffline/PFTau/plugins/PFClient.cc index 32e6e44c7e260..53dcca3fb96b8 100644 --- a/DQMOffline/PFTau/plugins/PFClient.cc +++ b/DQMOffline/PFTau/plugins/PFClient.cc @@ -10,7 +10,6 @@ #include "DQMServices/Core/interface/MonitorElement.h" #include "FWCore/ServiceRegistry/interface/Service.h" - // // -- Constructor // @@ -24,40 +23,48 @@ PFClient::PFClient(const edm::ParameterSet& parameterSet) profileFlag_ = parameterSet.getParameter< bool> ("CreateProfilePlots" ); profileHistogramNames_ = parameterSet.getParameter< std::vector >( "HistogramNamesForProfilePlots" ); } +// +// -- BeginJob +// +void PFClient::beginJob() { - + dqmStore_ = edm::Service().operator->(); +} // // -- EndJobBegin Run // -void PFClient::dqmEndJob(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter) -{ - doSummaries(ibooker, igetter); - doProjection(ibooker, igetter); - if (efficiencyFlag_) doEfficiency(ibooker, igetter); - if (profileFlag_) doProfiles(ibooker, igetter); +void PFClient::endRun(edm::Run const& run, edm::EventSetup const& eSetup) { + doSummaries(); + doProjection(); + if (efficiencyFlag_) doEfficiency(); + if (profileFlag_) doProfiles(); } +// +// -- EndJob +// +void PFClient::endJob() { - +} // // -- Create Summaries // -void PFClient::doSummaries(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter) { +void PFClient::doSummaries() { - for (std::vector::const_iterator ifolder = folderNames_.begin(); ifolder != folderNames_.end(); ifolder++) { + for (std::vector::const_iterator ifolder = folderNames_.begin(); + ifolder != folderNames_.end(); ifolder++) { std::string path = "ParticleFlow/"+(*ifolder); - for (std::vector::const_iterator ihist = histogramNames_.begin(); ihist != histogramNames_.end(); ihist++) { + for (std::vector::const_iterator ihist = histogramNames_.begin(); + ihist != histogramNames_.end(); ihist++) { std::string hname = (*ihist); - createResolutionPlots(ibooker, igetter, path, hname); + createResolutionPlots(path, hname); } } } - - // // -- Create Projection // -void PFClient::doProjection(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter) { +void PFClient::doProjection() { for (std::vector::const_iterator ifolder = folderNames_.begin(); ifolder != folderNames_.end(); ifolder++) { @@ -66,16 +73,14 @@ void PFClient::doProjection(DQMStore::IBooker& ibooker, DQMStore::IGetter& igett for (std::vector::const_iterator ihist = projectionHistogramNames_.begin(); ihist != projectionHistogramNames_.end(); ihist++) { std::string hname = (*ihist); - createProjectionPlots(ibooker, igetter, path, hname); + createProjectionPlots(path, hname); } } } - - // // -- Create Profile // -void PFClient::doProfiles(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter) { +void PFClient::doProfiles() { for (std::vector::const_iterator ifolder = folderNames_.begin(); ifolder != folderNames_.end(); ifolder++) { @@ -84,16 +89,14 @@ void PFClient::doProfiles(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter for (std::vector::const_iterator ihist = profileHistogramNames_.begin(); ihist != profileHistogramNames_.end(); ihist++) { std::string hname = (*ihist); - createProfilePlots(ibooker, igetter, path, hname); + createProfilePlots(path, hname); } } } - - // // -- Create Efficiency // -void PFClient::doEfficiency(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter) { +void PFClient::doEfficiency() { for (std::vector::const_iterator ifolder = folderNames_.begin(); ifolder != folderNames_.end(); ifolder++) { std::string path = "ParticleFlow/"+(*ifolder); @@ -101,18 +104,15 @@ void PFClient::doEfficiency(DQMStore::IBooker& ibooker, DQMStore::IGetter& igett for (std::vector::const_iterator ihist = effHistogramNames_.begin(); ihist != effHistogramNames_.end(); ihist++) { std::string hname = (*ihist); - createEfficiencyPlots(ibooker, igetter, path, hname); + createEfficiencyPlots(path, hname); } } } - - // // -- Create Resolution Plots // -void PFClient::createResolutionPlots(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter, std::string& folder, std::string& name) { - MonitorElement* me = igetter.get(folder+"/"+name); - +void PFClient::createResolutionPlots(std::string& folder, std::string& name) { + MonitorElement* me = dqmStore_->get(folder+"/"+name); if (!me) return; MonitorElement* me_average; @@ -137,20 +137,20 @@ void PFClient::createResolutionPlots(DQMStore::IBooker& ibooker, DQMStore::IGett if (ix == nbinx) xbins[ix] = th->GetXaxis()->GetBinUpEdge(ix); } std::string tit_new = ";"+xtit+";"+ytit; - ibooker.setCurrentFolder(folder); - MonitorElement* me_slice = ibooker.book1D("PFlowSlice","PFlowSlice",nbiny,ymin,ymax); + dqmStore_->setCurrentFolder(folder); + MonitorElement* me_slice = dqmStore_->book1D("PFlowSlice","PFlowSlice",nbiny,ymin,ymax); tit_new = ";"+xtit+";Average_"+ytit; - me_average = ibooker.book1D("average_"+name,tit_new, nbinx, xbins); + me_average = dqmStore_->book1D("average_"+name,tit_new, nbinx, xbins); me_average->setEfficiencyFlag(); tit_new = ";"+xtit+";RMS_"+ytit; - me_rms = ibooker.book1D("rms_"+name,tit_new, nbinx, xbins); + me_rms = dqmStore_->book1D("rms_"+name,tit_new, nbinx, xbins); me_rms->setEfficiencyFlag(); tit_new = ";"+xtit+";Mean_"+ytit; - me_mean = ibooker.book1D("mean_"+name,tit_new, nbinx, xbins); + me_mean = dqmStore_->book1D("mean_"+name,tit_new, nbinx, xbins); me_mean->setEfficiencyFlag(); tit_new = ";"+xtit+";Sigma_"+ytit; - me_sigma = ibooker.book1D("sigma_"+name,tit_new, nbinx, xbins); + me_sigma = dqmStore_->book1D("sigma_"+name,tit_new, nbinx, xbins); me_sigma->setEfficiencyFlag(); double average, rms, mean, sigma; @@ -166,17 +166,16 @@ void PFClient::createResolutionPlots(DQMStore::IBooker& ibooker, DQMStore::IGett me_mean->setBinContent(ix,mean); me_sigma->setBinContent(ix,sigma); } - if (me_slice) igetter.removeElement(me_slice->getName()); //? + if (me_slice) dqmStore_->removeElement(me_slice->getName()); delete [] xbins; } } - // // -- Create Projection Plots // -void PFClient::createProjectionPlots(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter, std::string& folder, std::string& name) { - MonitorElement* me = igetter.get(folder+"/"+name); +void PFClient::createProjectionPlots(std::string& folder, std::string& name) { + MonitorElement* me = dqmStore_->get(folder+"/"+name); if (!me) return; MonitorElement* projection = 0; @@ -199,13 +198,13 @@ void PFClient::createProjectionPlots(DQMStore::IBooker& ibooker, DQMStore::IGett } std::string tit_new; - ibooker.setCurrentFolder(folder); + dqmStore_->setCurrentFolder(folder); if (folder == "ParticleFlow/PFElectronValidation/CompWithGenElectron") { - if (name == "delta_et_Over_et_VS_et_") projection = ibooker.book1D("delta_et_Over_et","E_{T} resolution;#DeltaE_{T}/E_{T}",nbiny,ymin,ymax) ; - if (name == "delta_et_VS_et_") projection = ibooker.book1D("delta_et_","#DeltaE_{T};#DeltaE_{T}",nbiny,ymin,ymax) ; - if (name == "delta_eta_VS_et_") projection = ibooker.book1D("delta_eta_","#Delta#eta;#Delta#eta",nbiny,ymin,ymax) ; - if (name == "delta_phi_VS_et_") projection = ibooker.book1D("delta_phi_","#Delta#phi;#Delta#phi",nbiny,ymin,ymax) ; + if (name == "delta_et_Over_et_VS_et_") projection = dqmStore_->book1D("delta_et_Over_et","E_{T} resolution;#DeltaE_{T}/E_{T}",nbiny,ymin,ymax) ; + if (name == "delta_et_VS_et_") projection = dqmStore_->book1D("delta_et_","#DeltaE_{T};#DeltaE_{T}",nbiny,ymin,ymax) ; + if (name == "delta_eta_VS_et_") projection = dqmStore_->book1D("delta_eta_","#Delta#eta;#Delta#eta",nbiny,ymin,ymax) ; + if (name == "delta_phi_VS_et_") projection = dqmStore_->book1D("delta_phi_","#Delta#phi;#Delta#phi",nbiny,ymin,ymax) ; } if (projection) { @@ -218,12 +217,11 @@ void PFClient::createProjectionPlots(DQMStore::IBooker& ibooker, DQMStore::IGett } } - // // -- Create Profile Plots // -void PFClient::createProfilePlots(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter, std::string& folder, std::string& name) { - MonitorElement* me = igetter.get(folder+"/"+name); +void PFClient::createProfilePlots(std::string& folder, std::string& name) { + MonitorElement* me = dqmStore_->get(folder+"/"+name); if (!me) return; if ( (me->kind() == MonitorElement::DQM_KIND_TH2F) || @@ -243,12 +241,12 @@ void PFClient::createProfilePlots(DQMStore::IBooker& ibooker, DQMStore::IGetter& } std::string tit_new; - ibooker.setCurrentFolder(folder); + dqmStore_->setCurrentFolder(folder); //TProfiles MonitorElement* me_profile[2]; - me_profile[0] = ibooker.bookProfile("profile_"+name, tit_new, + me_profile[0] = dqmStore_->bookProfile("profile_"+name, tit_new, nbinx, xbins, ymin, ymax, "" ); - me_profile[1] = ibooker.bookProfile("profileRMS_"+name, tit_new, + me_profile[1] = dqmStore_->bookProfile("profileRMS_"+name, tit_new, nbinx, xbins, ymin, ymax, "s" ); TProfile* profileX = th->ProfileX(); //size_t nbiny = me->getNbinsY(); @@ -274,7 +272,6 @@ void PFClient::createProfilePlots(DQMStore::IBooker& ibooker, DQMStore::IGetter& } } - // // -- Get Histogram Parameters // @@ -299,14 +296,12 @@ void PFClient::getHistogramParameters(MonitorElement* me_slice, double& average, } } } - - // // -- Create Efficiency Plots // -void PFClient::createEfficiencyPlots(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter, std::string& folder, std::string& name) { - MonitorElement* me1 = igetter.get(folder+"/"+name+"ref_"); - MonitorElement* me2 = igetter.get(folder+"/"+name+"gen_"); +void PFClient::createEfficiencyPlots(std::string& folder, std::string& name) { + MonitorElement* me1 = dqmStore_->get(folder+"/"+name+"ref_"); + MonitorElement* me2 = dqmStore_->get(folder+"/"+name+"gen_"); if (!me1 || !me2) return; TH1F* me1_forEff = (TH1F*)me1->getTH1F()->Rebin(2,"me1_forEff"); @@ -327,8 +322,8 @@ void PFClient::createEfficiencyPlots(DQMStore::IBooker& ibooker, DQMStore::IGett std::string tit_new; tit_new = ";"+xtit+";"+xtit+" efficiency"; - ibooker.setCurrentFolder(folder); - me_eff = ibooker.book1D("efficiency_"+name,tit_new, nbinx, xmin, xmax); + dqmStore_->setCurrentFolder(folder); + me_eff = dqmStore_->book1D("efficiency_"+name,tit_new, nbinx, xmin, xmax); me_eff->Reset(); me_eff->setEfficiencyFlag(); /* @@ -346,6 +341,5 @@ void PFClient::createEfficiencyPlots(DQMStore::IBooker& ibooker, DQMStore::IGett me_eff->getTH1F()->Divide( me1_forEff, me2_forEff, 1, 1, "B"); } } - #include "FWCore/Framework/interface/MakerMacros.h" DEFINE_FWK_MODULE (PFClient) ; diff --git a/DQMOffline/PFTau/plugins/PFClient.h b/DQMOffline/PFTau/plugins/PFClient.h index 6f4408006513a..45a0238d9f665 100644 --- a/DQMOffline/PFTau/plugins/PFClient.h +++ b/DQMOffline/PFTau/plugins/PFClient.h @@ -6,30 +6,32 @@ #include "FWCore/Utilities/interface/InputTag.h" -#include "DQMServices/Core/interface/DQMEDHarvester.h" class DQMStore; class MonitorElement; -class PFClient: public DQMEDHarvester { +class PFClient: public edm::EDAnalyzer { public: PFClient(const edm::ParameterSet& parameterSet); private: - void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; - - void doSummaries(DQMStore::IBooker &, DQMStore::IGetter &); - void doEfficiency(DQMStore::IBooker &, DQMStore::IGetter &); - void doProjection(DQMStore::IBooker &, DQMStore::IGetter &); - void doProfiles(DQMStore::IBooker &, DQMStore::IGetter &); - void createResolutionPlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string& folder, std::string& name); - void getHistogramParameters(MonitorElement* me_slice, - double& avarage, double& rms, double& mean, double& sigma); - void createEfficiencyPlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string& folder, std::string& name); - - void createProjectionPlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string& folder, std::string& name); - void createProfilePlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string& folder, std::string& name); - + void beginJob(); + void analyze(edm::Event const&, edm::EventSetup const&){;} + void endRun(edm::Run const& run, edm::EventSetup const& eSetup); + void endJob(); + + void doSummaries(); + void doEfficiency(); + void doProjection(); + void doProfiles(); + void createResolutionPlots(std::string& folder, std::string& name); + void getHistogramParameters(MonitorElement* me_slice, double& avarage, double& rms, + double& mean, double& sigma); + void createEfficiencyPlots(std::string& folder, std::string& name); + + void createProjectionPlots(std::string& folder, std::string& name); + void createProfilePlots(std::string& folder, std::string& name); + std::vector folderNames_; std::vector histogramNames_; std::vector effHistogramNames_; @@ -38,6 +40,8 @@ class PFClient: public DQMEDHarvester { bool efficiencyFlag_; bool profileFlag_; + DQMStore* dqmStore_; + }; #endif diff --git a/DQMOffline/PFTau/plugins/PFClient_JetRes.cc b/DQMOffline/PFTau/plugins/PFClient_JetRes.cc index b2274e24da5c7..ddb521d68fa4b 100644 --- a/DQMOffline/PFTau/plugins/PFClient_JetRes.cc +++ b/DQMOffline/PFTau/plugins/PFClient_JetRes.cc @@ -12,8 +12,6 @@ #include "TGraph.h" #include "TCanvas.h" - - // // -- Constructor // @@ -24,23 +22,32 @@ PFClient_JetRes::PFClient_JetRes(const edm::ParameterSet& parameterSet) efficiencyFlag_ = parameterSet.getParameter< bool> ("CreateEfficiencyPlots" ); effHistogramNames_ = parameterSet.getParameter< std::vector >( "HistogramNamesForEfficiencyPlots" ); PtBins_ = parameterSet.getParameter< std::vector >( "VariablePtBins" ) ; -} +} +// +// -- BeginJob +// +void PFClient_JetRes::beginJob() { + dqmStore_ = edm::Service().operator->(); +} // // -- EndJobBegin Run // -void PFClient_JetRes::dqmEndJob(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter) -{ - doSummaries(ibooker, igetter); - if (efficiencyFlag_) doEfficiency(ibooker, igetter); +void PFClient_JetRes::endRun(edm::Run const& run, edm::EventSetup const& eSetup) { + doSummaries(); + if (efficiencyFlag_) doEfficiency(); } +// +// -- EndJob +// +void PFClient_JetRes::endJob() { - +} // // -- Create Summaries // -void PFClient_JetRes::doSummaries(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter) { +void PFClient_JetRes::doSummaries() { for (std::vector::const_iterator ifolder = folderNames_.begin(); ifolder != folderNames_.end(); ifolder++) { @@ -49,16 +56,14 @@ void PFClient_JetRes::doSummaries(DQMStore::IBooker& ibooker, DQMStore::IGetter& for (std::vector::const_iterator ihist = histogramNames_.begin(); ihist != histogramNames_.end(); ihist++) { std::string hname = (*ihist); - createResolutionPlots(ibooker, igetter, path, hname); + createResolutionPlots(path, hname); } } } - - // -// -- Create Efficiency +// -- Create Summaries // -void PFClient_JetRes::doEfficiency(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter) { +void PFClient_JetRes::doEfficiency() { for (std::vector::const_iterator ifolder = folderNames_.begin(); ifolder != folderNames_.end(); ifolder++) { std::string path = "ParticleFlow/"+(*ifolder); @@ -66,17 +71,15 @@ void PFClient_JetRes::doEfficiency(DQMStore::IBooker& ibooker, DQMStore::IGetter for (std::vector::const_iterator ihist = effHistogramNames_.begin(); ihist != effHistogramNames_.end(); ihist++) { std::string hname = (*ihist); - createEfficiencyPlots(ibooker, igetter, path, hname); + createEfficiencyPlots(path, hname); } } } - - // // -- Create Resolution Plots // -void PFClient_JetRes::createResolutionPlots(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter, std::string& folder, std::string& name) { - MonitorElement* me = igetter.get(folder+"/"+name); +void PFClient_JetRes::createResolutionPlots(std::string& folder, std::string& name) { + MonitorElement* me = dqmStore_->get(folder+"/"+name); if (!me) return; MonitorElement* pT[PtBins_.size() -1]; @@ -84,7 +87,7 @@ void PFClient_JetRes::createResolutionPlots(DQMStore::IBooker& ibooker, DQMStore //std::vector pTRange (PtBins_.size() -1) ; //char* pTRange[PtBins_.size() -1] ; - std::vector pTRange(PtBins_.size() -1) ; + TString pTRange[PtBins_.size() -1] ; //float pTCenter[PtBins_.size() -1] ; MonitorElement* me_average; @@ -123,28 +126,28 @@ void PFClient_JetRes::createResolutionPlots(DQMStore::IBooker& ibooker, DQMStore } std::string tit_new; - ibooker.setCurrentFolder(folder); - //MonitorElement* me_slice = ibooker.book1D("PFlowSlice", "PFlowSlice", nbiny, ymin, ymax); + dqmStore_->setCurrentFolder(folder); + //MonitorElement* me_slice = dqmStore_->book1D("PFlowSlice", "PFlowSlice", nbiny, ymin, ymax); tit_new = "Average "+ytit+";"+xtit+";Average_"+ytit ; - me_average = ibooker.book1D("average_"+name,tit_new, nbinx, xbins); + me_average = dqmStore_->book1D("average_"+name,tit_new, nbinx, xbins); me_average->setEfficiencyFlag(); tit_new = "RMS "+ytit+";"+xtit+";RMS_"+ytit ; - me_rms = ibooker.book1D("rms_"+name,tit_new, nbinx, xbins); + me_rms = dqmStore_->book1D("rms_"+name,tit_new, nbinx, xbins); me_rms->setEfficiencyFlag(); tit_new = ";"+xtit+";Mean_"+ytit; - me_mean = ibooker.book1D("mean_"+name,tit_new, nbinx, xbins); + me_mean = dqmStore_->book1D("mean_"+name,tit_new, nbinx, xbins); me_mean->setEfficiencyFlag(); tit_new = ";"+xtit+";Sigma_"+ytit; - me_sigma = ibooker.book1D("sigma_"+name,tit_new, nbinx, xbins); + me_sigma = dqmStore_->book1D("sigma_"+name,tit_new, nbinx, xbins); me_sigma->setEfficiencyFlag(); double average, rms, mean, sigma; for (size_t ix = 1; ix < nbinx+1; ++ix) { //me_slice->Reset(); - if (name == "delta_et_Over_et_VS_et_") pT[ix-1] = ibooker.book1D(pTRange[ix-1], TString::Format("Total %s;%s;Events", ytit.data(), ytit.data() ), nbiny, ymin, ymax) ; - if (name == "BRdelta_et_Over_et_VS_et_") pT[ix-1] = ibooker.book1D(pTRange[ix-1], TString::Format("Barrel %s;%s;Events", ytit.data(), ytit.data()), nbiny, ymin, ymax) ; - else if (name == "ERdelta_et_Over_et_VS_et_") pT[ix-1] = ibooker.book1D(pTRange[ix-1], TString::Format("Endcap %s;%s;Events", ytit.data(), ytit.data() ), nbiny, ymin, ymax) ; + if (name == "delta_et_Over_et_VS_et_") pT[ix-1] = dqmStore_->book1D(pTRange[ix-1], TString::Format("Total %s;%s;Events", ytit.data(), ytit.data() ), nbiny, ymin, ymax) ; + if (name == "BRdelta_et_Over_et_VS_et_") pT[ix-1] = dqmStore_->book1D(pTRange[ix-1], TString::Format("Barrel %s;%s;Events", ytit.data(), ytit.data()), nbiny, ymin, ymax) ; + else if (name == "ERdelta_et_Over_et_VS_et_") pT[ix-1] = dqmStore_->book1D(pTRange[ix-1], TString::Format("Endcap %s;%s;Events", ytit.data(), ytit.data() ), nbiny, ymin, ymax) ; for (size_t iy = 0; iy <= nbiny+1; ++iy) // add under and overflow if (th->GetBinContent(ix,iy)) { @@ -162,12 +165,10 @@ void PFClient_JetRes::createResolutionPlots(DQMStore::IBooker& ibooker, DQMStore me_mean->setBinContent(ix,mean); me_sigma->setBinContent(ix,sigma); } - //if (me_slice) igetter.removeElement(me_slice->getName()); + //if (me_slice) dqmStore_->removeElement(me_slice->getName()); delete [] xbins; } } - - // // -- Get Histogram Parameters // @@ -192,14 +193,12 @@ void PFClient_JetRes::getHistogramParameters(MonitorElement* me_slice, double& a } } } - - // // -- Create Resolution Plots // -void PFClient_JetRes::createEfficiencyPlots(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter, std::string& folder, std::string& name) { - MonitorElement* me1 = igetter.get(folder+"/"+name); - MonitorElement* me2 = igetter.get(folder+"/"+name+"ref_"); +void PFClient_JetRes::createEfficiencyPlots(std::string& folder, std::string& name) { + MonitorElement* me1 = dqmStore_->get(folder+"/"+name); + MonitorElement* me2 = dqmStore_->get(folder+"/"+name+"ref_"); if (!me1 || !me2) return; MonitorElement* me_eff; if ( (me1->kind() == MonitorElement::DQM_KIND_TH1F) && @@ -213,8 +212,8 @@ void PFClient_JetRes::createEfficiencyPlots(DQMStore::IBooker& ibooker, DQMStore std::string tit_new; tit_new = ";"+xtit+";Efficiency"; - ibooker.setCurrentFolder(folder); - me_eff = ibooker.book1D("efficiency_"+name,tit_new, nbinx, xmin, xmax); + dqmStore_->setCurrentFolder(folder); + me_eff = dqmStore_->book1D("efficiency_"+name,tit_new, nbinx, xmin, xmax); double efficiency; me_eff->Reset(); me_eff->setEfficiencyFlag(); @@ -227,6 +226,5 @@ void PFClient_JetRes::createEfficiencyPlots(DQMStore::IBooker& ibooker, DQMStore } } } - #include "FWCore/Framework/interface/MakerMacros.h" DEFINE_FWK_MODULE (PFClient_JetRes) ; diff --git a/DQMOffline/PFTau/plugins/PFClient_JetRes.h b/DQMOffline/PFTau/plugins/PFClient_JetRes.h index ae2d6c2afb585..59c9ada07e274 100644 --- a/DQMOffline/PFTau/plugins/PFClient_JetRes.h +++ b/DQMOffline/PFTau/plugins/PFClient_JetRes.h @@ -6,25 +6,27 @@ #include "FWCore/Utilities/interface/InputTag.h" -#include "DQMServices/Core/interface/DQMEDHarvester.h" class DQMStore; class MonitorElement; -class PFClient_JetRes: public DQMEDHarvester { +class PFClient_JetRes: public edm::EDAnalyzer { public: PFClient_JetRes(const edm::ParameterSet& parameterSet); private: - void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; - - void doSummaries(DQMStore::IBooker &, DQMStore::IGetter &); - void doEfficiency(DQMStore::IBooker &, DQMStore::IGetter &); - void createResolutionPlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string& folder, std::string& name); - void getHistogramParameters(MonitorElement* me_slice, - double& avarage, double& rms, double& mean, double& sigma); - void createEfficiencyPlots(DQMStore::IBooker &, DQMStore::IGetter &, std::string& folder, std::string& name); - + void beginJob(); + void analyze(edm::Event const&, edm::EventSetup const&){;} + void endRun(edm::Run const& run, edm::EventSetup const& eSetup); + void endJob(); + + void doSummaries(); + void doEfficiency(); + void createResolutionPlots(std::string& folder, std::string& name); + void getHistogramParameters(MonitorElement* me_slice, double& avarage, double& rms, + double& mean, double& sigma); + void createEfficiencyPlots(std::string& folder, std::string& name); + std::vector folderNames_; std::vector histogramNames_; std::vector effHistogramNames_; @@ -32,6 +34,8 @@ class PFClient_JetRes: public DQMEDHarvester { bool efficiencyFlag_; + DQMStore* dqmStore_; + }; #endif diff --git a/DQMOffline/PFTau/plugins/PFJetDQMAnalyzer.cc b/DQMOffline/PFTau/plugins/PFJetDQMAnalyzer.cc index d938d987054b0..a94e3b89cb4bf 100644 --- a/DQMOffline/PFTau/plugins/PFJetDQMAnalyzer.cc +++ b/DQMOffline/PFTau/plugins/PFJetDQMAnalyzer.cc @@ -16,8 +16,6 @@ #include "DQMServices/Core/interface/DQMStore.h" #include "DQMServices/Core/interface/MonitorElement.h" #include "FWCore/ServiceRegistry/interface/Service.h" - - // // -- Constructor // @@ -33,37 +31,25 @@ PFJetDQMAnalyzer::PFJetDQMAnalyzer(const edm::ParameterSet& parameterSet) myJet_ = consumes< edm::View >(inputLabel_); myMatchedJet_ = consumes< edm::View >(matchLabel_); - - - std::string folder = benchmarkLabel_ ; - - subsystemname_ = "ParticleFlow" ; - eventInfoFolder_ = subsystemname_ + "/" + folder ; - - nBadEvents_ = 0; - } - - // -// -- BookHistograms +// -- BeginJob // -void PFJetDQMAnalyzer::bookHistograms(DQMStore::IBooker & ibooker, - edm::Run const & /* iRun */, - edm::EventSetup const & /* iSetup */ ) -{ - ibooker.setCurrentFolder(eventInfoFolder_) ; - - edm::LogInfo("PFJetDQMAnalyzer") << " PFJetDQMAnalyzer::bookHistograms " << "Histogram Folder path set to " << eventInfoFolder_; - - pfJetMonitor_.setup(ibooker, pSet_); +void PFJetDQMAnalyzer::beginJob() { + + Benchmark::DQM_ = edm::Service().operator->(); + // part of the following could be put in the base class + std::string path = "ParticleFlow/" + benchmarkLabel_; + Benchmark::DQM_->setCurrentFolder(path.c_str()); + edm::LogInfo("PFJetDQMAnalyzer") << " PFJetDQMAnalyzer::beginJob " << "Histogram Folder path set to "<< path; + pfJetMonitor_.setup(pSet_); // booking histograms of type delta_frac_VS_frac from PFJetMonitor, pt_ eta_ phi_ and charge_ from CandidateBenchmark, delta_x_VS_y from MatchCandidateBenchmark + nBadEvents_ = 0; } - - // // -- Analyze // -void PFJetDQMAnalyzer::analyze(edm::Event const& iEvent, edm::EventSetup const& iSetup) { +void PFJetDQMAnalyzer::analyze(edm::Event const& iEvent, + edm::EventSetup const& iSetup) { edm::Handle< edm::View > jetCollection; iEvent.getByToken(myJet_, jetCollection); @@ -75,11 +61,41 @@ void PFJetDQMAnalyzer::analyze(edm::Event const& iEvent, edm::EventSetup const& float minRes = 99.99; float jetpT = 0.0; if (jetCollection.isValid() && matchedJetCollection.isValid()) { + //pfJetMonitor_.fill( *jetCollection, *matchedJetCollection, minRes, maxRes); // match collections and fill pt eta phi and charge histos for candidate jet, fill delta_x_VS_y histos for matched couples, book and fill delta_frac_VS_frac histos for matched couples pfJetMonitor_.fill( *jetCollection, *matchedJetCollection, minRes, maxRes, jetpT, pSet_); // match collections and fill pt eta phi and charge histos for candidate jet, fill delta_x_VS_y histos for matched couples, book and fill delta_frac_VS_frac histos for matched couples - + edm::ParameterSet skimPS = pSet_.getParameter("SkimParameter"); + if ( (skimPS.getParameter("switchOn")) && + (nBadEvents_ <= skimPS.getParameter("maximumNumberToBeStored")) ) { + if (jetpT > skimPS.getParameter("minimumJetpT")) { + if ( minRes < skimPS.getParameter("lowerCutOffOnResolution")) { + storeBadEvents(iEvent,minRes); + nBadEvents_++; + } else if (maxRes > skimPS.getParameter("upperCutOffOnResolution")) { + storeBadEvents(iEvent,maxRes); + nBadEvents_++; + } + } // minimum jet pT check + } } } - - +void PFJetDQMAnalyzer::storeBadEvents(edm::Event const& iEvent, float& val) { + unsigned int runNb = iEvent.id().run(); + unsigned int evtNb = iEvent.id().event(); + unsigned int lumiNb = iEvent.id().luminosityBlock(); + + std::string path = "ParticleFlow/" + benchmarkLabel_ + "/BadEvents"; + Benchmark::DQM_->setCurrentFolder(path.c_str()); + std::ostringstream eventid_str; + eventid_str << runNb << "_"<< evtNb << "_" << lumiNb; + MonitorElement* me = Benchmark::DQM_->get(path + "/" + eventid_str.str()); + if (me) me->Reset(); + else me = Benchmark::DQM_->bookFloat(eventid_str.str()); + me->Fill(val); +} +// +// -- EndJob +// +void PFJetDQMAnalyzer::endJob() { +} #include "FWCore/Framework/interface/MakerMacros.h" DEFINE_FWK_MODULE (PFJetDQMAnalyzer) ; diff --git a/DQMOffline/PFTau/plugins/PFJetDQMAnalyzer.h b/DQMOffline/PFTau/plugins/PFJetDQMAnalyzer.h index d7cecd12cdec0..1b4dbf7ca1162 100644 --- a/DQMOffline/PFTau/plugins/PFJetDQMAnalyzer.h +++ b/DQMOffline/PFTau/plugins/PFJetDQMAnalyzer.h @@ -10,17 +10,18 @@ #include "DQMOffline/PFTau/interface/PFJetMonitor.h" -#include "DQMServices/Core/interface/DQMEDAnalyzer.h" -class PFJetDQMAnalyzer: public DQMEDAnalyzer { +class PFJetDQMAnalyzer: public edm::EDAnalyzer { public: PFJetDQMAnalyzer(const edm::ParameterSet& parameterSet); private: void analyze(edm::Event const&, edm::EventSetup const&); + void beginJob() ; + void endJob(); - void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; + void storeBadEvents(edm::Event const&, float& val); edm::EDGetTokenT< edm::View > myJet_; edm::EDGetTokenT< edm::View > myMatchedJet_; @@ -31,8 +32,6 @@ class PFJetDQMAnalyzer: public DQMEDAnalyzer { PFJetMonitor pfJetMonitor_; edm::ParameterSet pSet_; - std::string eventInfoFolder_; - std::string subsystemname_; int nBadEvents_; }; diff --git a/DQMOffline/PFTau/plugins/PFMETDQMAnalyzer.cc b/DQMOffline/PFTau/plugins/PFMETDQMAnalyzer.cc index 2822a218cde56..c9d8841735429 100644 --- a/DQMOffline/PFTau/plugins/PFMETDQMAnalyzer.cc +++ b/DQMOffline/PFTau/plugins/PFMETDQMAnalyzer.cc @@ -14,8 +14,6 @@ #include "DQMServices/Core/interface/DQMStore.h" #include "DQMServices/Core/interface/MonitorElement.h" #include "FWCore/ServiceRegistry/interface/Service.h" - - // // -- Constructor // @@ -31,38 +29,25 @@ PFMETDQMAnalyzer::PFMETDQMAnalyzer(const edm::ParameterSet& parameterSet) myMET_ = consumes< edm::View >(inputLabel_); myMatchedMET_ = consumes< edm::View >(matchLabel_); - - - std::string folder = benchmarkLabel_ ; - - subsystemname_ = "ParticleFlow" ; - eventInfoFolder_ = subsystemname_ + "/" + folder ; - - nBadEvents_ = 0; - } - - // -// -- BookHistograms +// -- BeginJob // -void PFMETDQMAnalyzer::bookHistograms(DQMStore::IBooker & ibooker, - edm::Run const & /* iRun */, - edm::EventSetup const & /* iSetup */ ) -{ - ibooker.setCurrentFolder(eventInfoFolder_) ; - - edm::LogInfo("PFMETDQMAnalyzer") << " PFMETDQMAnalyzer::bookHistograms " << "Histogram Folder path set to " << eventInfoFolder_; - - pfMETMonitor_.setup(ibooker, pSet_); +void PFMETDQMAnalyzer::beginJob() { + + Benchmark::DQM_ = edm::Service().operator->(); + // part of the following could be put in the base class + std::string path = "ParticleFlow/" + benchmarkLabel_; + Benchmark::DQM_->setCurrentFolder(path.c_str()); + edm::LogInfo("PFJMETDQMAnalyzer") << " PFMETDQMAnalyzer::beginJob " <<"Histogram Folder path set to "<< path; + pfMETMonitor_.setup(pSet_); + nBadEvents_ = 0; } - - // // -- Analyze // void PFMETDQMAnalyzer::analyze(edm::Event const& iEvent, - edm::EventSetup const& iSetup) { + edm::EventSetup const& iSetup) { edm::Handle< edm::View > metCollection; iEvent.getByToken(myMET_, metCollection); @@ -73,10 +58,39 @@ void PFMETDQMAnalyzer::analyze(edm::Event const& iEvent, float maxRes = 0.0; float minRes = 99.99; pfMETMonitor_.fillOne( (*metCollection)[0], (*matchedMetCollection)[0], minRes, maxRes); - + //pfMETMonitor_.fillOne( (*metCollection)[0], (*matchedMetCollection)[0], minRes, maxRes, pSet_); + edm::ParameterSet skimPS = pSet_.getParameter("SkimParameter"); + if ( (skimPS.getParameter("switchOn")) && + (nBadEvents_ <= skimPS.getParameter("maximumNumberToBeStored")) ) { + if ( minRes < skimPS.getParameter("lowerCutOffOnResolution")) { + storeBadEvents(iEvent,minRes); + nBadEvents_++; + } else if (maxRes > skimPS.getParameter("upperCutOffOnResolution")) { + nBadEvents_++; + storeBadEvents(iEvent,maxRes); + } + } } } +void PFMETDQMAnalyzer::storeBadEvents(edm::Event const& iEvent, float& val) { + unsigned int runNb = iEvent.id().run(); + unsigned int evtNb = iEvent.id().event(); + unsigned int lumiNb = iEvent.id().luminosityBlock(); + + std::string path = "ParticleFlow/" + benchmarkLabel_ + "/BadEvents"; + Benchmark::DQM_->setCurrentFolder(path.c_str()); + std::ostringstream eventid_str; + eventid_str << runNb << "_"<< evtNb << "_" << lumiNb; + MonitorElement* me = Benchmark::DQM_->get(path + "/" + eventid_str.str()); + if (me) me->Reset(); + else me = Benchmark::DQM_->bookFloat(eventid_str.str()); + me->Fill(val); +} - +// +// -- EndJob +// +void PFMETDQMAnalyzer::endJob() { +} #include "FWCore/Framework/interface/MakerMacros.h" DEFINE_FWK_MODULE (PFMETDQMAnalyzer) ; diff --git a/DQMOffline/PFTau/plugins/PFMETDQMAnalyzer.h b/DQMOffline/PFTau/plugins/PFMETDQMAnalyzer.h index 6886aa6ba7f29..cf939f73746b7 100644 --- a/DQMOffline/PFTau/plugins/PFMETDQMAnalyzer.h +++ b/DQMOffline/PFTau/plugins/PFMETDQMAnalyzer.h @@ -10,17 +10,18 @@ #include "DQMOffline/PFTau/interface/PFMETMonitor.h" -#include "DQMServices/Core/interface/DQMEDAnalyzer.h" -class PFMETDQMAnalyzer: public DQMEDAnalyzer { +class PFMETDQMAnalyzer: public edm::EDAnalyzer { public: PFMETDQMAnalyzer(const edm::ParameterSet& parameterSet); private: void analyze(edm::Event const&, edm::EventSetup const&); + void beginJob() ; + void endJob(); - void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; + void storeBadEvents(edm::Event const&, float& val); edm::EDGetTokenT< edm::View > myMET_; edm::EDGetTokenT< edm::View > myMatchedMET_; @@ -31,8 +32,6 @@ class PFMETDQMAnalyzer: public DQMEDAnalyzer { PFMETMonitor pfMETMonitor_; edm::ParameterSet pSet_; - std::string eventInfoFolder_; - std::string subsystemname_; int nBadEvents_; }; diff --git a/DQMOffline/PFTau/plugins/PFMuonDQMAnalyzer.cc b/DQMOffline/PFTau/plugins/PFMuonDQMAnalyzer.cc deleted file mode 100644 index 79536748ef3d2..0000000000000 --- a/DQMOffline/PFTau/plugins/PFMuonDQMAnalyzer.cc +++ /dev/null @@ -1,86 +0,0 @@ -#include "DQMOffline/PFTau/plugins/PFMuonDQMAnalyzer.h" - -#include "FWCore/MessageLogger/interface/MessageLogger.h" - -#include "FWCore/Framework/interface/Event.h" -#include "DataFormats/Common/interface/Handle.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/Utilities/interface/InputTag.h" - -#include "DataFormats/Candidate/interface/CandidateFwd.h" -#include "DataFormats/Candidate/interface/Candidate.h" -#include "DataFormats/MuonReco/interface/Muon.h" - -#include "DQMServices/Core/interface/DQMStore.h" -#include "DQMServices/Core/interface/MonitorElement.h" -#include "FWCore/ServiceRegistry/interface/Service.h" -// -// -- Constructor -// -PFMuonDQMAnalyzer::PFMuonDQMAnalyzer(const edm::ParameterSet& parameterSet) - -{ - pSet_ = parameterSet; - inputLabel_ = pSet_.getParameter("InputCollection"); - matchLabel_ = pSet_.getParameter("MatchCollection"); - benchmarkLabel_ = pSet_.getParameter("BenchmarkLabel"); - createEfficiencyHistos_ = pSet_.getParameter( "CreateEfficiencyHistos" ); - - pfCandidateMonitor_.setParameters(parameterSet); - - myCand_ = consumes< edm::View >(inputLabel_); - myMatchedCand_ = consumes< edm::View >(matchLabel_); - - - std::string folder = benchmarkLabel_ ; - - subsystemname_ = "ParticleFlow" ; - eventInfoFolder_ = subsystemname_ + "/" + folder ; - - nBadEvents_ = 0; - -} - - -// -// -- BookHistograms -// -void PFMuonDQMAnalyzer::bookHistograms(DQMStore::IBooker & ibooker, - edm::Run const & /* iRun */, - edm::EventSetup const & /* iSetup */ ) -{ - ibooker.setCurrentFolder(eventInfoFolder_) ; - - edm::LogInfo("PFMuonDQMAnalyzer") << " PFMuonDQMAnalyzer::bookHistograms " << "Histogram Folder path set to " << eventInfoFolder_; - - pfCandidateMonitor_.setup(ibooker, pSet_); -} - - -// -// -- Analyze -// -void PFMuonDQMAnalyzer::analyze(edm::Event const& iEvent, - edm::EventSetup const& iSetup) { - - edm::Handle< edm::View > candCollection; - edm::Handle< edm::View > matchedCandCollection; - if ( !createEfficiencyHistos_ ) { - iEvent.getByToken( myCand_, candCollection); - iEvent.getByToken( myMatchedCand_, matchedCandCollection); - } else { - iEvent.getByToken( myMatchedCand_, candCollection); - iEvent.getByToken( myCand_, matchedCandCollection); - } - - float maxRes = 0.0; - float minRes = 99.99; - if (candCollection.isValid() && matchedCandCollection.isValid()) { - pfCandidateMonitor_.fill( *candCollection, *matchedCandCollection, minRes, maxRes, pSet_, *matchedCandCollection) ; - - } -} - - -#include "FWCore/Framework/interface/MakerMacros.h" -DEFINE_FWK_MODULE (PFMuonDQMAnalyzer) ; diff --git a/DQMOffline/PFTau/plugins/PFMuonDQMAnalyzer.h b/DQMOffline/PFTau/plugins/PFMuonDQMAnalyzer.h deleted file mode 100644 index b3858d7a4b8b7..0000000000000 --- a/DQMOffline/PFTau/plugins/PFMuonDQMAnalyzer.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef __DQMOffline_PFTau_PFMuonDQMAnalyzer__ -#define __DQMOffline_PFTau_PFMuonDQMAnalyzer__ - -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/EDAnalyzer.h" - -#include "FWCore/Utilities/interface/InputTag.h" -#include "FWCore/Utilities/interface/EDGetToken.h" - -#include "DQMOffline/PFTau/interface/PFCandidateMonitor.h" - -#include "DQMServices/Core/interface/DQMEDAnalyzer.h" - -class PFMuonDQMAnalyzer: public DQMEDAnalyzer { - public: - - PFMuonDQMAnalyzer(const edm::ParameterSet& parameterSet); - - private: - void analyze(edm::Event const&, edm::EventSetup const&); - - void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; - - - edm::EDGetTokenT< edm::View > myCand_; - edm::EDGetTokenT< edm::View > myMatchedCand_; - edm::InputTag matchLabel_; - edm::InputTag inputLabel_; - std::string benchmarkLabel_; - bool createEfficiencyHistos_; - - double ptBase_; - double ptNotPF_; - - PFCandidateMonitor pfCandidateMonitor_; - - edm::ParameterSet pSet_; - std::string eventInfoFolder_; - std::string subsystemname_; - - int nBadEvents_; -}; - -#endif diff --git a/DQMOffline/PFTau/python/PFClient_cfi.py b/DQMOffline/PFTau/python/PFClient_cfi.py index b885e0ac9e128..a3ab8f5d67c8f 100644 --- a/DQMOffline/PFTau/python/PFClient_cfi.py +++ b/DQMOffline/PFTau/python/PFClient_cfi.py @@ -8,7 +8,7 @@ HistogramNamesForProjectionPlots = cms.vstring( " " ), CreateProfilePlots = cms.bool(False), HistogramNamesForProfilePlots = cms.vstring( " " ), - ) +) # need a different Client to store the slices pfClient_JetRes = cms.EDAnalyzer("PFClient_JetRes", @@ -20,4 +20,4 @@ HistogramNamesForProfilePlots = cms.vstring( " " ), #VariablePtBins = cms.vint32(0,1,2,5,10,20,50,100,200,400,1000) VariablePtBins = cms.vint32(20,40,60,80,100,150,200,250,300,400,500,750) - ) +) diff --git a/DQMOffline/PFTau/python/PFElectronDQMAnalyzer_cfi.py b/DQMOffline/PFTau/python/PFElectronDQMAnalyzer_cfi.py index 18608d62e77ef..79e952078e960 100644 --- a/DQMOffline/PFTau/python/PFElectronDQMAnalyzer_cfi.py +++ b/DQMOffline/PFTau/python/PFElectronDQMAnalyzer_cfi.py @@ -15,11 +15,10 @@ etaMax = cms.double(2.5), phiMin = cms.double(-3.14), phiMax = cms.double(3.14), - slimmedLikeSelection = cms.bool(False), # Histogram Parameters related to pt #VariablePtBins = cms.vdouble(0.,1.,2.,5.,10.,20.,50.,100.,200.,400.,1000.), VariablePtBins = cms.vdouble(0.), # if only one entry PtHistoParameter used - PtHistoParameter = cms.PSet( + PtHistoParameter = cms.PSet( switchOn = cms.bool(True), nBin = cms.int32(60), xMin = cms.double(0.0), @@ -78,5 +77,12 @@ nBin = cms.int32(3), xMin = cms.double(-1.5), xMax = cms.double(1.5) + ), +# parameter for event skim + SkimParameter = cms.PSet( + switchOn = cms.bool(False), + maximumNumberToBeStored = cms.int32(100), + lowerCutOffOnResolution = cms.double(-1.5), + upperCutOffOnResolution = cms.double(1.5) ) ) diff --git a/DQMOffline/PFTau/python/PFJetDQMAnalyzer_cfi.py b/DQMOffline/PFTau/python/PFJetDQMAnalyzer_cfi.py index c8b209b8fc1a0..77e1e20de27bd 100644 --- a/DQMOffline/PFTau/python/PFJetDQMAnalyzer_cfi.py +++ b/DQMOffline/PFTau/python/PFJetDQMAnalyzer_cfi.py @@ -76,5 +76,13 @@ nBin = cms.int32(3), xMin = cms.double(-1.5), xMax = cms.double(1.5) + ), +# parameter for event skim + SkimParameter = cms.PSet( + switchOn = cms.bool(False), + maximumNumberToBeStored = cms.int32(100), + minimumJetpT = cms.double(100), + lowerCutOffOnResolution = cms.double(-0.2), + upperCutOffOnResolution = cms.double(0.2) ) ) diff --git a/DQMOffline/PFTau/python/PFJetResDQMAnalyzer_cfi.py b/DQMOffline/PFTau/python/PFJetResDQMAnalyzer_cfi.py index aacd025196d40..77ab2e441ba02 100644 --- a/DQMOffline/PFTau/python/PFJetResDQMAnalyzer_cfi.py +++ b/DQMOffline/PFTau/python/PFJetResDQMAnalyzer_cfi.py @@ -80,5 +80,13 @@ nBin = cms.int32(3), xMin = cms.double(-1.5), xMax = cms.double(1.5) + ), +# parameter for event skim + SkimParameter = cms.PSet( + switchOn = cms.bool(False), + maximumNumberToBeStored = cms.int32(100), + minimumJetpT = cms.double(100), + lowerCutOffOnResolution = cms.double(-0.2), + upperCutOffOnResolution = cms.double(0.2) ) ) diff --git a/DQMOffline/PFTau/python/PFMETDQMAnalyzer_cfi.py b/DQMOffline/PFTau/python/PFMETDQMAnalyzer_cfi.py index 9578bff76a99d..e257b5f1a3645 100644 --- a/DQMOffline/PFTau/python/PFMETDQMAnalyzer_cfi.py +++ b/DQMOffline/PFTau/python/PFMETDQMAnalyzer_cfi.py @@ -106,5 +106,12 @@ nBin = cms.int32(3), xMin = cms.double(-1.5), xMax = cms.double(1.5) + ), +# parameter for event skim + SkimParameter = cms.PSet( + switchOn = cms.bool(False), + maximumNumberToBeStored = cms.int32(100), + lowerCutOffOnResolution = cms.double(-1.5), + upperCutOffOnResolution = cms.double(1.5) ) ) diff --git a/DQMOffline/PFTau/python/PFMuonDQMAnalyzer_cfi.py b/DQMOffline/PFTau/python/PFMuonDQMAnalyzer_cfi.py deleted file mode 100644 index 92c3d6328bd4d..0000000000000 --- a/DQMOffline/PFTau/python/PFMuonDQMAnalyzer_cfi.py +++ /dev/null @@ -1,85 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -pfMuonDQMAnalyzer = cms.EDAnalyzer("PFMuonDQMAnalyzer", - InputCollection = cms.InputTag('muons'), - MatchCollection = cms.InputTag('gensource'), - BenchmarkLabel = cms.string('PFMuonValidation/PFMuonVsGenMuon'), - deltaRMax = cms.double(0.2), - matchCharge = cms.bool(True), - mode = cms.int32( 1 ), - CreateReferenceHistos = cms.bool(True), - CreateEfficiencyHistos = cms.bool(False), - ptMin = cms.double( 0.0 ), # since pT_reco seem to have this threshold - ptMax = cms.double( 999999 ), - etaMin = cms.double(-2.5), - etaMax = cms.double(2.5), - phiMin = cms.double(-3.14), - phiMax = cms.double(3.14), - # slimmed muons selection - slimmedLikeSelection = cms.bool(True), - ptBase = cms.double(5.0), - ptNotPF = cms.double(3.0), - # Histogram Parameters related to pt - #VariablePtBins = cms.vdouble(0.,1.,2.,5.,10.,20.,50.,100.,200.,400.,1000.), - VariablePtBins = cms.vdouble(0.), # if only one entry PtHistoParameter used - PtHistoParameter = cms.PSet( - switchOn = cms.bool(True), - nBin = cms.int32(60), - xMin = cms.double(0.0), - xMax = cms.double(120.0) - ), - DeltaPtHistoParameter = cms.PSet( - switchOn = cms.bool(True), - nBin = cms.int32(100), - xMin = cms.double(-30.0), - xMax = cms.double(30.0) - ), - DeltaPtOvPtHistoParameter = cms.PSet( - switchOn = cms.bool(True), - BROn = cms.bool(False), BREtaMin = cms.double(0.0), BREtaMax = cms.double(1.4), - EROn = cms.bool(False), EREtaMin = cms.double(1.6), EREtaMax = cms.double(2.4), - slicingOn = cms.bool(False), - nBin = cms.int32(160), #200 - xMin = cms.double(-1.0), - xMax = cms.double(1.0) - ), -# Histogram Parameters related to Eta - EtaHistoParameter = cms.PSet( - switchOn = cms.bool(True), - nBin = cms.int32(100), - xMin = cms.double(-5.0), - xMax = cms.double(5.0) - ), - DeltaEtaHistoParameter = cms.PSet( - switchOn = cms.bool(True), - nBin = cms.int32(400), - xMin = cms.double(-0.2), - xMax = cms.double(0.2) - ), -# Histogram Parameters related to Phi - PhiHistoParameter = cms.PSet( - switchOn = cms.bool(True), - nBin = cms.int32(100), - xMin = cms.double(-3.1416), - xMax = cms.double(3.1416) - ), - DeltaPhiHistoParameter = cms.PSet( - switchOn = cms.bool(True), - nBin = cms.int32(400), - xMin = cms.double(-0.2), - xMax = cms.double(0.2) - ), - DeltaRHistoParameter = cms.PSet( - switchOn = cms.bool(True), - nBin = cms.int32(150), - xMin = cms.double(0.0), - xMax = cms.double(1.0) - ), -# Histogram Parameters related to Charge - ChargeHistoParameter = cms.PSet( - switchOn = cms.bool(False), - nBin = cms.int32(3), - xMin = cms.double(-1.5), - xMax = cms.double(1.5) - ) - ) diff --git a/DQMOffline/PFTau/src/Benchmark.cc b/DQMOffline/PFTau/src/Benchmark.cc index f5ee5307aa848..234cb1982ccd2 100644 --- a/DQMOffline/PFTau/src/Benchmark.cc +++ b/DQMOffline/PFTau/src/Benchmark.cc @@ -10,39 +10,59 @@ using namespace std; +DQMStore* Benchmark::DQM_ = 0; + Benchmark::~Benchmark() { } - void Benchmark::setDirectory(TDirectory* dir) { dir_ = dir; + DQM_ = 0; } -TH1F* Benchmark::book1D(DQMStore::IBooker& b, const char* histname, const char* title, +TH1F* Benchmark::book1D(const char* histname, const char* title, int nbins, float xmin, float xmax) { - if( &b ) { + // DQM_ has to be initialized in a child analyzer. + if(DQM_) { edm::LogInfo("Benchmark") << " Benchmark::book1D " << "booking "<getTH1F(); + return DQM_->book1D(histname,title,nbins,xmin, xmax)->getTH1F(); + } + else if(dir_){ + TDirectory *oldpwd = gDirectory; + dir_->cd(); + TH1F *hist = new TH1F(histname, title, nbins, xmin, xmax); + cout<<"booking (ROOT mode) "<GetName()<cd(); + return hist; } else assert(0); } -TH2F* Benchmark::book2D(DQMStore::IBooker& b, const char* histname, const char* title, +TH2F* Benchmark::book2D(const char* histname, const char* title, int nbinsx, float xmin, float xmax, int nbinsy, float ymin, float ymax ) { - if( &b ) { + // DQM_ has to be initialized in a child analyzer. + if(DQM_) { edm::LogInfo("Benchmark") << " Benchmark::book2D "<<"booked "<getTH2F(); + return DQM_->book2D(histname,title,nbinsx,xmin, xmax, nbinsy, ymin, ymax)->getTH2F(); + } + else if(dir_) { + TDirectory *oldpwd = gDirectory; + dir_->cd(); + TH2F *hist = new TH2F(histname, title, nbinsx, xmin, xmax, nbinsy, ymin, ymax); + cout<<"booked (ROOT mode) "<GetName()<cd(); + return hist; } else assert(0); } -TH2F* Benchmark::book2D(DQMStore::IBooker& b, const char* histname, const char* title, +TH2F* Benchmark::book2D(const char* histname, const char* title, int nbinsx, float* xbins, int nbinsy, float ymin, float ymax ) { - if( &b ) { + if(DQM_) { edm::LogInfo("Benchmark") << " Benchmark::book2D " << " booked "<getTH2F(); + return DQM_->book2D(histname,title,nbinsx, xbins, nbinsy, &ybins[0])->getTH2F(); + } + else if(dir_) { + TDirectory *oldpwd = gDirectory; + dir_->cd(); + + // need to convert the float bin array into a double bin array, because the DQMStore functions take floats, while the ROOT functions take double. + vector xbinsd(nbinsx+1); + for(int i=0; i<=nbinsx; ++i) { + xbinsd[i] = xbins[i]; + } + + TH2F *hist = new TH2F(histname, title, nbinsx, &xbinsd[0], nbinsy, ymin, ymax); + cout<<"booked (ROOT mode) "<GetName()<cd(); + return hist; } else assert(0); } -TProfile* Benchmark::bookProfile(DQMStore::IBooker& b, const char* histname, const char* title, +TProfile* Benchmark::bookProfile(const char* histname, const char* title, int nbinsx, float xmin, float xmax, float ymin, float ymax, const char* option ) { - if( &b ) { + // DQM_ has to be initialized in a child analyzer. + if(DQM_) { edm::LogInfo("Benchmark") << " Benchmark::bookProfile "<<"booked "<getTProfile(); + return DQM_->bookProfile(histname, title, nbinsx, xmin, xmax, 0.0, 0.0, option )->getTProfile(); + } + else if(dir_) { + TDirectory *oldpwd = gDirectory; + dir_->cd(); + TProfile *hist = new TProfile(histname, title, nbinsx, xmin, xmax, ymin, ymax, option); + cout<<"booked (ROOT mode) "<GetName()<cd(); + return hist; } else assert(0); } -TProfile* Benchmark::bookProfile(DQMStore::IBooker& b, const char* histname, const char* title, +TProfile* Benchmark::bookProfile(const char* histname, const char* title, int nbinsx, float* xbins, float ymin, float ymax, const char* option ) { @@ -77,9 +121,18 @@ TProfile* Benchmark::bookProfile(DQMStore::IBooker& b, const char* histname, con xbinsd[i] = xbins[i]; } - if( &b ) { + // DQM_ has to be initialized in a child analyzer. + if(DQM_) { edm::LogInfo("Benchmark") << " Benchmark::bookProfile "<<"booked "<getTProfile(); + return DQM_->bookProfile(histname, title, nbinsx, &xbinsd[0], ymin, ymax, option)->getTProfile(); + } + else if(dir_) { + TDirectory *oldpwd = gDirectory; + dir_->cd(); + TProfile *hist = new TProfile(histname, title, nbinsx, &xbinsd[0], ymin, ymax, option); + cout<<"booked (ROOT mode) "<GetName()<cd(); + return hist; } else assert(0); } @@ -89,9 +142,9 @@ void Benchmark::write() { //COLIN not sure about the root mode if( dir_ ) dir_->Write(); - + //COLIN remove old bullshit: - // if ( ame.size() != 0 && file_) - // cout<<"saving histograms in "<Write(fileName.c_str()); +// if ( ame.size() != 0 && file_) +// cout<<"saving histograms in "<Write(fileName.c_str()); } diff --git a/DQMOffline/PFTau/src/CandidateBenchmark.cc b/DQMOffline/PFTau/src/CandidateBenchmark.cc index 548ae656c4e5a..81fa46d026419 100644 --- a/DQMOffline/PFTau/src/CandidateBenchmark.cc +++ b/DQMOffline/PFTau/src/CandidateBenchmark.cc @@ -26,7 +26,7 @@ CandidateBenchmark::CandidateBenchmark(Mode mode) : Benchmark(mode) { CandidateBenchmark::~CandidateBenchmark() {} -void CandidateBenchmark::setup(DQMStore::IBooker& b) { +void CandidateBenchmark::setup() { if (!histogramBooked_) { PhaseSpace ptPS(100,0,100); @@ -41,16 +41,19 @@ void CandidateBenchmark::setup(DQMStore::IBooker& b) { break; } - pt_ = book1D(b, "pt_", "pt_;p_{T} (GeV)", ptPS.n, ptPS.m, ptPS.M); - eta_ = book1D(b, "eta_", "eta_;#eta", etaPS.n, etaPS.m, etaPS.M); - phi_ = book1D(b, "phi_", "phi_;#phi", phiPS.n, phiPS.m, phiPS.M); - charge_ = book1D(b, "charge_", "charge_;charge", 3,-1.5,1.5); + pt_ = book1D("pt_", "pt_;p_{T} (GeV)", ptPS.n, ptPS.m, ptPS.M); + + eta_ = book1D("eta_", "eta_;#eta", etaPS.n, etaPS.m, etaPS.M); + + phi_ = book1D("phi_", "phi_;#phi", phiPS.n, phiPS.m, phiPS.M); + + charge_ = book1D("charge_", "charge_;charge", 3,-1.5,1.5); histogramBooked_ = true; } } -void CandidateBenchmark::setup(DQMStore::IBooker& b, const edm::ParameterSet& parameterSet) { +void CandidateBenchmark::setup(const edm::ParameterSet& parameterSet) { if (!histogramBooked_) { edm::ParameterSet ptPS = parameterSet.getParameter("PtHistoParameter"); edm::ParameterSet etaPS = parameterSet.getParameter("EtaHistoParameter"); @@ -58,22 +61,22 @@ void CandidateBenchmark::setup(DQMStore::IBooker& b, const edm::ParameterSet& pa edm::ParameterSet chPS = parameterSet.getParameter("ChargeHistoParameter"); if (ptPS.getParameter("switchOn")) { - pt_ = book1D(b, "pt_", "p_{T};p_{T} (GeV)", ptPS.getParameter("nBin"), + pt_ = book1D("pt_", "p_{T};p_{T} (GeV)", ptPS.getParameter("nBin"), ptPS.getParameter("xMin"), ptPS.getParameter("xMax")); } if (etaPS.getParameter("switchOn")) { - eta_ = book1D(b, "eta_", "#eta;#eta", etaPS.getParameter("nBin"), + eta_ = book1D("eta_", "#eta;#eta", etaPS.getParameter("nBin"), etaPS.getParameter("xMin"), etaPS.getParameter("xMax")); } if (phiPS.getParameter("switchOn")) { - phi_ = book1D(b, "phi_", "#phi;#phi", phiPS.getParameter("nBin"), + phi_ = book1D("phi_", "#phi;#phi", phiPS.getParameter("nBin"), phiPS.getParameter("xMin"), phiPS.getParameter("xMax")); } if (chPS.getParameter("switchOn")) { - charge_ = book1D(b, "charge_","charge;charge",chPS.getParameter("nBin"), + charge_ = book1D("charge_","charge;charge",chPS.getParameter("nBin"), chPS.getParameter("xMin"), chPS.getParameter("xMax")); } diff --git a/DQMOffline/PFTau/src/METBenchmark.cc b/DQMOffline/PFTau/src/METBenchmark.cc index 6e7dfce8c05dc..7478a23a5893c 100644 --- a/DQMOffline/PFTau/src/METBenchmark.cc +++ b/DQMOffline/PFTau/src/METBenchmark.cc @@ -6,7 +6,6 @@ #include "DQMServices/Core/interface/MonitorElement.h" #include "DQMServices/Core/interface/DQMStore.h" - #include #include #include @@ -20,7 +19,7 @@ using namespace std; METBenchmark::~METBenchmark() {} -void METBenchmark::setup(DQMStore::IBooker& b) { +void METBenchmark::setup() { //std::cout << "FL: METBenchmark.cc: start setup()" << std::endl; @@ -43,18 +42,18 @@ void METBenchmark::setup(DQMStore::IBooker& b) { break; } - pt_ = book1D(b, "pt_", "pt_;p_{T} [GeV]", ptPS.n, ptPS.m, ptPS.M); - pt2_ = book1D(b, "pt2_", "pt2_;p_{T} [GeV]", pt2PS.n, pt2PS.m, pt2PS.M); - px_ = book1D(b, "px_", "px_;p_{X} [GeV]", pxPS.n, pxPS.m, pxPS.M); - py_ = book1D(b, "py_", "py_;p_{Y} [GeV]", pxPS.n, pxPS.m, pxPS.M); + pt_ = book1D("pt_", "pt_;p_{T} [GeV]", ptPS.n, ptPS.m, ptPS.M); + pt2_ = book1D("pt2_", "pt2_;p_{T} [GeV]", pt2PS.n, pt2PS.m, pt2PS.M); + px_ = book1D("px_", "px_;p_{X} [GeV]", pxPS.n, pxPS.m, pxPS.M); + py_ = book1D("py_", "py_;p_{Y} [GeV]", pxPS.n, pxPS.m, pxPS.M); // might want to increase the number of bins, to match the size of the ECAL crystals - phi_ = book1D(b, "phi_", "phi_;#phi", phiPS.n, phiPS.m, phiPS.M); - sumEt_ = book1D(b, "sumEt_", "sumEt_;#SigmaE_{T} [GeV]", sumEtPS.n, sumEtPS.m, sumEtPS.M); - sumEt2_ = book1D(b, "sumEt2_", "sumEt2_;#SigmaE_{T} [GeV]", sumEt2PS.n, sumEt2PS.m, sumEt2PS.M); - etOverSumEt_ = book1D(b, "etOverSumEt_", "etOverSumEt_;p_{T}/#SigmaE_{T}", etOverSumEtPS.n, etOverSumEtPS.m, etOverSumEtPS.M); + phi_ = book1D("phi_", "phi_;#phi", phiPS.n, phiPS.m, phiPS.M); + sumEt_ = book1D("sumEt_", "sumEt_;#SigmaE_{T} [GeV]", sumEtPS.n, sumEtPS.m, sumEtPS.M); + sumEt2_ = book1D("sumEt2_", "sumEt2_;#SigmaE_{T} [GeV]", sumEt2PS.n, sumEt2PS.m, sumEt2PS.M); + etOverSumEt_ = book1D("etOverSumEt_", "etOverSumEt_;p_{T}/#SigmaE_{T}", etOverSumEtPS.n, etOverSumEtPS.m, etOverSumEtPS.M); - mex_VS_sumEt_= book2D(b, "mex_VS_sumEt_", + mex_VS_sumEt_= book2D("mex_VS_sumEt_", ";#SigmaE_{T} [GeV];p_{X} [GeV]", sumEt3PS.n, sumEt3PS.m, sumEt3PS.M, pxPS.n, pxPS.m, pxPS.M ); diff --git a/DQMOffline/PFTau/src/MatchCandidateBenchmark.cc b/DQMOffline/PFTau/src/MatchCandidateBenchmark.cc index c706dd85dd5f5..d2f37be5b48b0 100644 --- a/DQMOffline/PFTau/src/MatchCandidateBenchmark.cc +++ b/DQMOffline/PFTau/src/MatchCandidateBenchmark.cc @@ -1,19 +1,20 @@ #include "DQMOffline/PFTau/interface/MatchCandidateBenchmark.h" - #include "DataFormats/Candidate/interface/Candidate.h" +// #include "DQMServices/Core/interface/MonitorElement.h" +// #include "DQMServices/Core/interface/DQMStore.h" + #include #include #include #include -#include +#include using namespace std; - MatchCandidateBenchmark::MatchCandidateBenchmark(Mode mode) : Benchmark(mode) { delta_et_Over_et_VS_et_ = 0; @@ -28,11 +29,10 @@ MatchCandidateBenchmark::MatchCandidateBenchmark(Mode mode) : Benchmark(mode) { histogramBooked_ = false; } - MatchCandidateBenchmark::~MatchCandidateBenchmark() {} -void MatchCandidateBenchmark::setup(DQMStore::IBooker& b) { +void MatchCandidateBenchmark::setup() { if (!histogramBooked_) { PhaseSpace ptPS; PhaseSpace dptOvptPS; @@ -59,26 +59,26 @@ void MatchCandidateBenchmark::setup(DQMStore::IBooker& b) { float ptBins[11] = {0, 1, 2, 5, 10, 20, 50, 100, 200, 400, 1000}; int size = sizeof(ptBins)/sizeof(*ptBins); - delta_et_Over_et_VS_et_ = book2D(b, "delta_et_Over_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}", + delta_et_Over_et_VS_et_ = book2D("delta_et_Over_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}", size, ptBins, dptOvptPS.n, dptOvptPS.m, dptOvptPS.M ); - BRdelta_et_Over_et_VS_et_ = book2D(b, "BRdelta_et_Over_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}", + BRdelta_et_Over_et_VS_et_ = book2D("BRdelta_et_Over_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}", size, ptBins, dptOvptPS.n, dptOvptPS.m, dptOvptPS.M ); - ERdelta_et_Over_et_VS_et_ = book2D(b, "ERdelta_et_Over_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}", + ERdelta_et_Over_et_VS_et_ = book2D("ERdelta_et_Over_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}", size, ptBins, dptOvptPS.n, dptOvptPS.m, dptOvptPS.M ); - delta_et_VS_et_ = book2D(b, "delta_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}", + delta_et_VS_et_ = book2D("delta_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}", size, ptBins, dptPS.n, dptPS.m, dptPS.M ); - delta_eta_VS_et_ = book2D(b, "delta_eta_VS_et_", ";#E_{T, true} (GeV);#Delta#eta", + delta_eta_VS_et_ = book2D("delta_eta_VS_et_", ";#E_{T, true} (GeV);#Delta#eta", size, ptBins, detaPS.n, detaPS.m, detaPS.M ); - delta_phi_VS_et_ = book2D(b, "delta_phi_VS_et_", ";E_{T, true} (GeV);#Delta#phi", + delta_phi_VS_et_ = book2D("delta_phi_VS_et_", ";E_{T, true} (GeV);#Delta#phi", size, ptBins, dphiPS.n, dphiPS.m, dphiPS.M ); /* @@ -122,9 +122,7 @@ void MatchCandidateBenchmark::setup(DQMStore::IBooker& b) { histogramBooked_ = true; } } - - -void MatchCandidateBenchmark::setup(DQMStore::IBooker& b, const edm::ParameterSet& parameterSet) { +void MatchCandidateBenchmark::setup(const edm::ParameterSet& parameterSet) { std::vector ptBinsPS = parameterSet.getParameter< std::vector >( "VariablePtBins" ); pTRes_.resize(ptBinsPS.size()-1); BRpTRes_.resize(ptBinsPS.size()-1); ERpTRes_.resize(ptBinsPS.size()-1); @@ -154,7 +152,7 @@ void MatchCandidateBenchmark::setup(DQMStore::IBooker& b, const edm::ParameterSe } if (dptOvptPS.getParameter("switchOn")) { - delta_et_Over_et_VS_et_ = book2D(b, "delta_et_Over_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}", + delta_et_Over_et_VS_et_ = book2D("delta_et_Over_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}", ptBinsPS.size()-1, &(ptBins.front()), dptOvptPS.getParameter("nBin"), dptOvptPS.getParameter("xMin"), @@ -162,29 +160,29 @@ void MatchCandidateBenchmark::setup(DQMStore::IBooker& b, const edm::ParameterSe } if (dptOvptPS.getParameter("slicingOn")) { for (size_t i = 0; i < pTRes_.size(); i++) { - pTRes_[i] = book1D( b, TString::Format("Pt%d_%d", (int)ptBins[i], (int)ptBins[i+1]), ";#Deltap_{T}/p_{T};Entries", + pTRes_[i] = book1D( TString::Format("Pt%d_%d", (int)ptBins[i], (int)ptBins[i+1]), ";#Deltap_{T}/p_{T};Entries", dptOvptPS.getParameter("nBin"), dptOvptPS.getParameter("xMin"), dptOvptPS.getParameter("xMax")); - BRpTRes_[i] = book1D( b, TString::Format("BRPt%d_%d", (int)ptBins[i], (int)ptBins[i+1]), ";#Deltap_{T}/p_{T};Entries", + BRpTRes_[i] = book1D( TString::Format("BRPt%d_%d", (int)ptBins[i], (int)ptBins[i+1]), ";#Deltap_{T}/p_{T};Entries", dptOvptPS.getParameter("nBin"), dptOvptPS.getParameter("xMin"), dptOvptPS.getParameter("xMax")); - ERpTRes_[i] = book1D( b, TString::Format("ERPt%d_%d", (int)ptBins[i], (int)ptBins[i+1]), ";#Deltap_{T}/p_{T};Entries", + ERpTRes_[i] = book1D( TString::Format("ERPt%d_%d", (int)ptBins[i], (int)ptBins[i+1]), ";#Deltap_{T}/p_{T};Entries", dptOvptPS.getParameter("nBin"), dptOvptPS.getParameter("xMin"), dptOvptPS.getParameter("xMax")); } } if (dptOvptPS.getParameter("BROn")) { - BRdelta_et_Over_et_VS_et_ = book2D(b, "BRdelta_et_Over_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}", + BRdelta_et_Over_et_VS_et_ = book2D("BRdelta_et_Over_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}", ptBinsPS.size()-1, &(ptBins.front()), dptOvptPS.getParameter("nBin"), dptOvptPS.getParameter("xMin"), dptOvptPS.getParameter("xMax")); } if (dptOvptPS.getParameter("EROn")) { - ERdelta_et_Over_et_VS_et_ = book2D(b, "ERdelta_et_Over_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}", + ERdelta_et_Over_et_VS_et_ = book2D("ERdelta_et_Over_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}", ptBinsPS.size()-1, &(ptBins.front()), dptOvptPS.getParameter("nBin"), dptOvptPS.getParameter("xMin"), @@ -192,7 +190,7 @@ void MatchCandidateBenchmark::setup(DQMStore::IBooker& b, const edm::ParameterSe } if (dptPS.getParameter("switchOn")) { - delta_et_VS_et_ = book2D(b, "delta_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}", + delta_et_VS_et_ = book2D("delta_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}", ptBinsPS.size()-1, &(ptBins.front()), dptPS.getParameter("nBin"), dptPS.getParameter("xMin"), @@ -200,7 +198,7 @@ void MatchCandidateBenchmark::setup(DQMStore::IBooker& b, const edm::ParameterSe } if (detaPS.getParameter("switchOn")) { - delta_eta_VS_et_ = book2D(b, "delta_eta_VS_et_", ";E_{T, true} (GeV);#Delta#eta", + delta_eta_VS_et_ = book2D("delta_eta_VS_et_", ";E_{T, true} (GeV);#Delta#eta", ptBinsPS.size()-1, &(ptBins.front()), detaPS.getParameter("nBin"), detaPS.getParameter("xMin"), @@ -208,7 +206,7 @@ void MatchCandidateBenchmark::setup(DQMStore::IBooker& b, const edm::ParameterSe } if (dphiPS.getParameter("switchOn")) { - delta_phi_VS_et_ = book2D(b, "delta_phi_VS_et_", ";E_{T, true} (GeV);#Delta#phi", + delta_phi_VS_et_ = book2D("delta_phi_VS_et_", ";E_{T, true} (GeV);#Delta#phi", ptBinsPS.size()-1, &(ptBins.front()), dphiPS.getParameter("nBin"), dphiPS.getParameter("xMin"), @@ -258,8 +256,7 @@ void MatchCandidateBenchmark::setup(DQMStore::IBooker& b, const edm::ParameterSe ptBinsPS.size()-1, &(ptBins.front()), dphiPS.getParameter("xMin"), dphiPS.getParameter("xMax"), "s" ); - } - */ + }*/ histogramBooked_ = true; } diff --git a/DQMOffline/PFTau/src/MatchMETBenchmark.cc b/DQMOffline/PFTau/src/MatchMETBenchmark.cc index 60780c7e69720..fa4f7b74cf374 100644 --- a/DQMOffline/PFTau/src/MatchMETBenchmark.cc +++ b/DQMOffline/PFTau/src/MatchMETBenchmark.cc @@ -2,21 +2,19 @@ #include "DataFormats/METReco/interface/MET.h" #include "DataFormats/Candidate/interface/Candidate.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" - +// #include "DQMServices/Core/interface/MonitorElement.h" +// #include "DQMServices/Core/interface/DQMStore.h" #include #include #include #include - using namespace std; - MatchMETBenchmark::~MatchMETBenchmark() {} - -void MatchMETBenchmark::setup(DQMStore::IBooker& b) { +void MatchMETBenchmark::setup() { //std::cout << "FL: MatchMETBenchmark.cc: start setup()" << std::endl; PhaseSpace ptPS; @@ -53,46 +51,46 @@ void MatchMETBenchmark::setup(DQMStore::IBooker& b) { //float ptBins[11] = {0, 1, 2, 5, 10, 20, 50, 100, 200, 400, 1000}; - delta_et_Over_et_VS_et_ = book2D(b, "delta_et_Over_et_VS_et_", + delta_et_Over_et_VS_et_ = book2D("delta_et_Over_et_VS_et_", ";ME_{T, true} (GeV);#DeltaME_{T}/ME_{T}", ptPS.n, ptPS.m, ptPS.M, dptOvptPS.n, dptOvptPS.m, dptOvptPS.M ); - delta_et_VS_et_ = book2D(b, "delta_et_VS_et_", + delta_et_VS_et_ = book2D("delta_et_VS_et_", ";ME_{T, true} (GeV);#DeltaME_{T}", ptPS.n, ptPS.m, ptPS.M, dptPS.n, dptPS.m, dptPS.M ); - delta_phi_VS_et_ = book2D(b, "delta_phi_VS_et_", + delta_phi_VS_et_ = book2D("delta_phi_VS_et_", ";ME_{T, true} (GeV);#Delta#phi", ptPS.n, ptPS.m, ptPS.M, dphiPS.n, dphiPS.m, dphiPS.M ); - delta_ex_ = book1D(b, "delta_ex_", + delta_ex_ = book1D("delta_ex_", "#DeltaME_{X}", dptPS.n, dptPS.m, dptPS.M ); - RecEt_VS_TrueEt_ = book2D(b, "RecEt_VS_TrueEt_", + RecEt_VS_TrueEt_ = book2D("RecEt_VS_TrueEt_", ";ME_{T, true} (GeV);ME_{T}", ptPS.n, ptPS.m, ptPS.M, ptPS.n, ptPS.m, ptPS.M ); - delta_set_VS_set_ = book2D(b, "delta_set_VS_set_", + delta_set_VS_set_ = book2D("delta_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}", setPS.n, setPS.m, setPS.M, dsetPS.n, dsetPS.m, dsetPS.M ); - delta_set_Over_set_VS_set_ = book2D(b, "delta_set_Over_set_VS_set_", + delta_set_Over_set_VS_set_ = book2D("delta_set_Over_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}/SE_{T}", setPS.n, setPS.m, setPS.M, dptOvptPS.n, dptOvptPS.m, dptOvptPS.M ); - delta_ex_VS_set_ = book2D(b, "delta_ex_VS_set_", + delta_ex_VS_set_ = book2D("delta_ex_VS_set_", ";SE_{T, true} (GeV);#DeltaE_{X}", setPS.n, setPS.m, setPS.M, ptPS.n, -ptPS.M, ptPS.M ); - RecSet_Over_TrueSet_VS_TrueSet_ = book2D(b, "RecSet_Over_TrueSet_VS_TrueSet_", + RecSet_Over_TrueSet_VS_TrueSet_ = book2D("RecSet_Over_TrueSet_VS_TrueSet_", ";SE_{T, true} (GeV);SE_{T}/SE_{T}", setPS.n, setPS.m, setPS.M, setOvsetPS.n, setOvsetPS.m, setOvsetPS.M ); diff --git a/DQMOffline/PFTau/src/PFCandidateBenchmark.cc b/DQMOffline/PFTau/src/PFCandidateBenchmark.cc index 87fa5dc14f555..4180427f72001 100644 --- a/DQMOffline/PFTau/src/PFCandidateBenchmark.cc +++ b/DQMOffline/PFTau/src/PFCandidateBenchmark.cc @@ -1,8 +1,9 @@ #include "DQMOffline/PFTau/interface/PFCandidateBenchmark.h" - #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" +// #include "DQMServices/Core/interface/MonitorElement.h" +// #include "DQMServices/Core/interface/DQMStore.h" #include #include @@ -17,7 +18,7 @@ using namespace std; PFCandidateBenchmark::~PFCandidateBenchmark() {} -void PFCandidateBenchmark::setup(DQMStore::IBooker& b) { +void PFCandidateBenchmark::setup() { PhaseSpace ecalEnergyPS(100,0,100); PhaseSpace hcalEnergyPS(100,0,100); @@ -34,18 +35,18 @@ void PFCandidateBenchmark::setup(DQMStore::IBooker& b) { break; } - particleId_ = book1D(b, "particleId_", "particle ID", 7,1,8); - ecalEnergy_ = book1D(b, "ecalEnergy_", "ECAL energy, corrected;E_{ECAL} (GeV)", + particleId_ = book1D("particleId_", "particle ID", 7,1,8); + ecalEnergy_ = book1D("ecalEnergy_", "ECAL energy, corrected;E_{ECAL} (GeV)", ecalEnergyPS.n, ecalEnergyPS.m, ecalEnergyPS.M); - hcalEnergy_ = book1D(b, "hcalEnergy_", "HCAL energy, corrected;E_{HCAL} (GeV)", + hcalEnergy_ = book1D("hcalEnergy_", "HCAL energy, corrected;E_{HCAL} (GeV)", ecalEnergyPS.n, ecalEnergyPS.m, ecalEnergyPS.M); - mva_e_pi_ = book1D(b, "mva_e_pi_", "e VS #pi MVA output;MVA", + mva_e_pi_ = book1D("mva_e_pi_", "e VS #pi MVA output;MVA", mva_e_piPS.n, mva_e_piPS.m, mva_e_piPS.M); - elementsInBlocksSize_ = book1D(b, "elementsInBlocksSize_", "number of elements used", 10, 0, 10); - + elementsInBlocksSize_ = book1D("elementsInBlocksSize_", "number of elements used", 10, 0, 10); } + void PFCandidateBenchmark::fill( const reco::PFCandidateCollection& pfCands) { for(unsigned i=0; i @@ -42,8 +42,11 @@ void PFCandidateManager::setParameters( float dRMax, } -void PFCandidateManager::setup(DQMStore::IBooker& b) { - candBench_.setup(b); - pfCandBench_.setup(b); - matchCandBench_.setup(b); +void PFCandidateManager::setup() { + candBench_.setup(); + pfCandBench_.setup(); + matchCandBench_.setup(); } + + + diff --git a/DQMOffline/PFTau/src/PFCandidateMonitor.cc b/DQMOffline/PFTau/src/PFCandidateMonitor.cc index 7b46a833ebe38..9bf30c8e658f7 100644 --- a/DQMOffline/PFTau/src/PFCandidateMonitor.cc +++ b/DQMOffline/PFTau/src/PFCandidateMonitor.cc @@ -2,14 +2,13 @@ #include "DataFormats/JetReco/interface/PFJet.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "DQMOffline/PFTau/interface/Matchers.h" + #include "DQMOffline/PFTau/interface/PFCandidateMonitor.h" #include #include #include #include - - // // -- Constructor // @@ -35,14 +34,11 @@ PFCandidateMonitor::PFCandidateMonitor( float dRMax, bool matchCharge, Benchmark createReferenceHistos_ = false; histogramBooked_ = false; } - - // // -- Destructor // PFCandidateMonitor::~PFCandidateMonitor() {} - // // -- Set Parameters accessing them from ParameterSet // @@ -64,8 +60,6 @@ void PFCandidateMonitor::setParameters( const edm::ParameterSet & parameterSet) candBench_.setParameters(mode_); matchCandBench_.setParameters(mode_); } - - // // -- Set Parameters // @@ -82,14 +76,12 @@ void PFCandidateMonitor::setParameters(float dRMax, bool matchCharge, Benchmark: candBench_.setParameters(mode_); matchCandBench_.setParameters(mode_); } - - // // -- Create histograms accessing parameters from ParameterSet // -void PFCandidateMonitor::setup(DQMStore::IBooker& b, const edm::ParameterSet & parameterSet) { - candBench_.setup(b, parameterSet); - matchCandBench_.setup(b, parameterSet); +void PFCandidateMonitor::setup(const edm::ParameterSet & parameterSet) { + candBench_.setup(parameterSet); + matchCandBench_.setup(parameterSet); if (createReferenceHistos_ && !histogramBooked_) { edm::ParameterSet ptPS = parameterSet.getParameter("PtHistoParameter"); @@ -99,82 +91,63 @@ void PFCandidateMonitor::setup(DQMStore::IBooker& b, const edm::ParameterSet & p edm::ParameterSet dR = parameterSet.getParameter("DeltaRHistoParameter"); if (ptPS.getParameter("switchOn")) { - pt_ref_ = book1D(b, "pt_ref_", "p_{T}_ref;p_{T} (GeV)", ptPS.getParameter("nBin"), - ptPS.getParameter("xMin"), - ptPS.getParameter("xMax")); - if (createEfficiencyHistos_) { - pt_gen_ = book1D(b, "pt_gen_", "p_{T}_gen;p_{T} (GeV)", ptPS.getParameter("nBin"), - ptPS.getParameter("xMin"), - ptPS.getParameter("xMax") ) ; - } + pt_ref_ = book1D("pt_ref_", "p_{T}_ref;p_{T} (GeV)", ptPS.getParameter("nBin"), + ptPS.getParameter("xMin"), + ptPS.getParameter("xMax")); + if (createEfficiencyHistos_) pt_gen_ = book1D( "pt_gen_", "p_{T}_gen;p_{T} (GeV)", ptPS.getParameter("nBin"), + ptPS.getParameter("xMin"), + ptPS.getParameter("xMax") ) ; } if (etaPS.getParameter("switchOn")) { - eta_ref_ = book1D(b, "eta_ref_", "#eta_ref;#eta", etaPS.getParameter("nBin"), - etaPS.getParameter("xMin"), - etaPS.getParameter("xMax")); - if (createEfficiencyHistos_) { - eta_gen_ = book1D(b, "eta_gen_", "#eta_gen;#eta", etaPS.getParameter("nBin"), - etaPS.getParameter("xMin"), - etaPS.getParameter("xMax") ) ; - } + eta_ref_ = book1D("eta_ref_", "#eta_ref;#eta", etaPS.getParameter("nBin"), + etaPS.getParameter("xMin"), + etaPS.getParameter("xMax")); + if (createEfficiencyHistos_) eta_gen_ = book1D( "eta_gen_", "#eta_gen;#eta", etaPS.getParameter("nBin"), + etaPS.getParameter("xMin"), + etaPS.getParameter("xMax") ) ; } - if (phiPS.getParameter("switchOn")) { - phi_ref_ = book1D(b, "phi_ref_", "#phi_ref;#phi", phiPS.getParameter("nBin"), - phiPS.getParameter("xMin"), - phiPS.getParameter("xMax")); - if (createEfficiencyHistos_) { - phi_gen_ = book1D(b, "phi_gen_", "#phi_gen;#phi", phiPS.getParameter("nBin"), - phiPS.getParameter("xMin"), - phiPS.getParameter("xMax") ) ; - } - } - - if ( createEfficiencyHistos_ && dR.getParameter("switchOn") ) { - deltaR_ = book1D(b, "deltaR_", "#DeltaR;#DeltaR", - dR.getParameter("nBin"), - dR.getParameter("xMin"), - dR.getParameter("xMax")); + phi_ref_ = book1D("phi_ref_", "#phi_ref;#phi", phiPS.getParameter("nBin"), + phiPS.getParameter("xMin"), + phiPS.getParameter("xMax")); + if (createEfficiencyHistos_) phi_gen_ = book1D( "phi_gen_", "#phi_gen;#phi", phiPS.getParameter("nBin"), + phiPS.getParameter("xMin"), + phiPS.getParameter("xMax") ) ; } + if ( createEfficiencyHistos_ && dR.getParameter("switchOn") ) + deltaR_ = book1D("deltaR_", "#DeltaR;#DeltaR", + dR.getParameter("nBin"), + dR.getParameter("xMin"), + dR.getParameter("xMax")); histogramBooked_ = true; } } - - // // -- Create histograms using local parameters // -void PFCandidateMonitor::setup(DQMStore::IBooker& b) { - candBench_.setup(b); - matchCandBench_.setup(b); +void PFCandidateMonitor::setup() { + candBench_.setup(); + matchCandBench_.setup(); if (createReferenceHistos_ && !histogramBooked_) { PhaseSpace ptPS(100,0,100); PhaseSpace phiPS(360, -3.1416, 3.1416); PhaseSpace etaPS(100, -5,5); - pt_ref_ = book1D(b, "pt_ref_", "p_{T}_ref;p_{T} (GeV)", ptPS.n, ptPS.m, ptPS.M); - if (createEfficiencyHistos_) { - pt_gen_ = book1D(b, "pt_gen_", "p_{T}_gen;p_{T} (GeV)", ptPS.n, ptPS.m, ptPS.M); - } - - eta_ref_ = book1D(b, "eta_ref_", "#eta_ref;#eta", etaPS.n, etaPS.m, etaPS.M); - if (createEfficiencyHistos_) { - eta_gen_ = book1D(b, "eta_gen_", "#eta_gen;#eta", etaPS.n, etaPS.m, etaPS.M); - } - - phi_ref_ = book1D(b, "phi_ref_", "#phi_ref;#phi", phiPS.n, phiPS.m, phiPS.M); - if (createEfficiencyHistos_) { - phi_gen_ = book1D(b, "phi_gen_", "#phi_gen;#phi", phiPS.n, phiPS.m, phiPS.M); - } + pt_ref_ = book1D("pt_ref_", "p_{T}_ref;p_{T} (GeV)", ptPS.n, ptPS.m, ptPS.M); + if (createEfficiencyHistos_) pt_gen_ = book1D("pt_gen_", "p_{T}_gen;p_{T} (GeV)", ptPS.n, ptPS.m, ptPS.M); + + eta_ref_ = book1D("eta_ref_", "#eta_ref;#eta", etaPS.n, etaPS.m, etaPS.M); + if (createEfficiencyHistos_) eta_gen_ = book1D("eta_gen_", "#eta_gen;#eta", etaPS.n, etaPS.m, etaPS.M); + + phi_ref_ = book1D("phi_ref_", "#phi_ref;#phi", phiPS.n, phiPS.m, phiPS.M); + if (createEfficiencyHistos_) phi_gen_ = book1D("phi_gen_", "#phi_gen;#phi", phiPS.n, phiPS.m, phiPS.M); histogramBooked_ = true; } } - - // // -- Set directory to book histograms using ROOT // @@ -184,8 +157,6 @@ void PFCandidateMonitor::setDirectory(TDirectory* dir) { candBench_.setDirectory(dir); matchCandBench_.setDirectory(dir); } - - // // -- fill histograms for a single collection // @@ -193,14 +164,15 @@ void PFCandidateMonitor::fillOne(const reco::Candidate& cand) { if (matching_done_) { if (createReferenceHistos_ && histogramBooked_) { - if (pt_ref_) pt_ref_->Fill( cand.pt() ); - if (eta_ref_) eta_ref_->Fill( cand.eta() ); - if (phi_ref_) phi_ref_->Fill( cand.phi() ); + if (pt_ref_) pt_ref_->Fill(cand.pt()); + if (eta_ref_) eta_ref_->Fill(cand.eta() ); + if (phi_ref_) phi_ref_->Fill(cand.phi() ); } } else if (createEfficiencyHistos_ && histogramBooked_) { - if (pt_gen_) pt_gen_->Fill( cand.pt() ); - if (eta_gen_) eta_gen_->Fill( cand.eta() ); - if (phi_gen_) phi_gen_->Fill( cand.phi() ); + if (pt_gen_) pt_gen_->Fill(cand.pt()); + if (eta_gen_) eta_gen_->Fill(cand.eta() ); + if (phi_gen_) phi_gen_->Fill(cand.phi() ); } } + diff --git a/DQMOffline/PFTau/src/PFJetMonitor.cc b/DQMOffline/PFTau/src/PFJetMonitor.cc index bb9333d891a49..9bf8fda885a28 100644 --- a/DQMOffline/PFTau/src/PFJetMonitor.cc +++ b/DQMOffline/PFTau/src/PFJetMonitor.cc @@ -2,14 +2,13 @@ #include "DataFormats/JetReco/interface/PFJet.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "DQMOffline/PFTau/interface/Matchers.h" + #include "DQMOffline/PFTau/interface/PFJetMonitor.h" #include #include #include #include - - // // -- Constructor // @@ -33,14 +32,11 @@ PFJetMonitor::PFJetMonitor( float dRMax, bool matchCharge, Benchmark::Mode mode) createPFractionHistos_ = false; histogramBooked_ = false; } - - // // -- Destructor // PFJetMonitor::~PFJetMonitor() {} - // // -- Set Parameters accessing them from ParameterSet // @@ -62,8 +58,6 @@ void PFJetMonitor::setParameters( const edm::ParameterSet & parameterSet) { candBench_.setParameters(mode_); matchCandBench_.setParameters(mode_); } - - // // -- Set Parameters // @@ -96,54 +90,48 @@ void PFJetMonitor::setParameters(float dRMax, bool onlyTwoJets, bool matchCharge candBench_.setParameters(mode_); matchCandBench_.setParameters(mode_); } - - // // -- Create histograms accessing parameters from ParameterSet // -void PFJetMonitor::setup(DQMStore::IBooker& b, const edm::ParameterSet & parameterSet) { - candBench_.setup(b, parameterSet); - matchCandBench_.setup(b, parameterSet); +void PFJetMonitor::setup(const edm::ParameterSet & parameterSet) { + candBench_.setup(parameterSet); + matchCandBench_.setup(parameterSet); edm::ParameterSet dR = parameterSet.getParameter("DeltaRHistoParameter"); - if ( dR.getParameter("switchOn") ) { - deltaR_ = book1D(b, "deltaR_", "#DeltaR;#DeltaR", + if ( dR.getParameter("switchOn") ) + deltaR_ = book1D("deltaR_", "#DeltaR;#DeltaR", dR.getParameter("nBin"), dR.getParameter("xMin"), dR.getParameter("xMax")); - } + if (createPFractionHistos_ && !histogramBooked_) { - delta_frac_VS_frac_muon_ = book2D(b, "delta_frac_VS_frac_muon_", "#DeltaFraction_Vs_Fraction(muon)", 100, 0.0, 1.0, 100, -1.0, 1.0); - delta_frac_VS_frac_photon_ = book2D(b, "delta_frac_VS_frac_photon_", "#DeltaFraction_Vs_Fraction(photon)", 100, 0.0, 1.0, 100, -1.0, 1.0); - delta_frac_VS_frac_electron_ = book2D(b, "delta_frac_VS_frac_electron_", "#DeltaFraction_Vs_Fraction(electron)", 100, 0.0, 1.0, 100, -1.0, 1.0); - delta_frac_VS_frac_charged_hadron_ = book2D(b, "delta_frac_VS_frac_charged_hadron_", "#DeltaFraction_Vs_Fraction(charged hadron)", 100, 0.0, 1.0, 100, -1.0, 1.0); - delta_frac_VS_frac_neutral_hadron_ = book2D(b, "delta_frac_VS_frac_neutral_hadron_", "#DeltaFraction_Vs_Fraction(neutral hadron)", 100, 0.0, 1.0, 100, -1.0, 1.0); + delta_frac_VS_frac_muon_ = book2D("delta_frac_VS_frac_muon_", "#DeltaFraction_Vs_Fraction(muon)", 100, 0.0, 1.0, 100, -1.0, 1.0); + delta_frac_VS_frac_photon_ = book2D("delta_frac_VS_frac_photon_", "#DeltaFraction_Vs_Fraction(photon)", 100, 0.0, 1.0, 100, -1.0, 1.0); + delta_frac_VS_frac_electron_ = book2D("delta_frac_VS_frac_electron_", "#DeltaFraction_Vs_Fraction(electron)", 100, 0.0, 1.0, 100, -1.0, 1.0); + delta_frac_VS_frac_charged_hadron_ = book2D("delta_frac_VS_frac_charged_hadron_", "#DeltaFraction_Vs_Fraction(charged hadron)", 100, 0.0, 1.0, 100, -1.0, 1.0); + delta_frac_VS_frac_neutral_hadron_ = book2D("delta_frac_VS_frac_neutral_hadron_", "#DeltaFraction_Vs_Fraction(neutral hadron)", 100, 0.0, 1.0, 100, -1.0, 1.0); histogramBooked_ = true; } } - - // // -- Create histograms using local parameters // -void PFJetMonitor::setup(DQMStore::IBooker& b) { - candBench_.setup(b); - matchCandBench_.setup(b); +void PFJetMonitor::setup() { + candBench_.setup(); + matchCandBench_.setup(); if (createPFractionHistos_ && !histogramBooked_) { - delta_frac_VS_frac_muon_ = book2D(b, "delta_frac_VS_frac_muon_", "#DeltaFraction_Vs_Fraction(muon)", 100, 0.0, 1.0, 100, -1.0, 1.0); - delta_frac_VS_frac_photon_ = book2D(b, "delta_frac_VS_frac_photon_", "#DeltaFraction_Vs_Fraction(photon)", 100, 0.0, 1.0, 100, -1.0, 1.0); - delta_frac_VS_frac_electron_ = book2D(b, "delta_frac_VS_frac_electron_", "#DeltaFraction_Vs_Fraction(electron)", 100, 0.0, 1.0, 100, -1.0, 1.0); - delta_frac_VS_frac_charged_hadron_ = book2D(b, "delta_frac_VS_frac_charged_hadron_", "#DeltaFraction_Vs_Fraction(charged hadron)", 100, 0.0, 1.0, 100, -1.0, 1.0); - delta_frac_VS_frac_neutral_hadron_ = book2D(b, "delta_frac_VS_frac_neutral_hadron_", "#DeltaFraction_Vs_Fraction(neutral hadron)", 100, 0.0, 1.0, 100, -1.0, 1.0); + delta_frac_VS_frac_muon_ = book2D("delta_frac_VS_frac_muon_", "#DeltaFraction_Vs_Fraction(muon)", 100, 0.0, 1.0, 100, -1.0, 1.0); + delta_frac_VS_frac_photon_ = book2D("delta_frac_VS_frac_photon_", "#DeltaFraction_Vs_Fraction(photon)", 100, 0.0, 1.0, 100, -1.0, 1.0); + delta_frac_VS_frac_electron_ = book2D("delta_frac_VS_frac_electron_", "#DeltaFraction_Vs_Fraction(electron)", 100, 0.0, 1.0, 100, -1.0, 1.0); + delta_frac_VS_frac_charged_hadron_ = book2D("delta_frac_VS_frac_charged_hadron_", "#DeltaFraction_Vs_Fraction(charged hadron)", 100, 0.0, 1.0, 100, -1.0, 1.0); + delta_frac_VS_frac_neutral_hadron_ = book2D("delta_frac_VS_frac_neutral_hadron_", "#DeltaFraction_Vs_Fraction(neutral hadron)", 100, 0.0, 1.0, 100, -1.0, 1.0); histogramBooked_ = true; } } - - // // -- Set directory to book histograms using ROOT // @@ -154,13 +142,12 @@ void PFJetMonitor::setDirectory(TDirectory* dir) { candBench_.setDirectory(dir); matchCandBench_.setDirectory(dir); } - - // // -- fill histograms for a given Jet pair // void PFJetMonitor::fillOne(const reco::Jet& jet, const reco::Jet& matchedJet) { + std::cout <<"\nfillone Jet histos" <(&jet); const reco::PFJet* pfMatchedJet = dynamic_cast(&matchedJet); diff --git a/DQMOffline/PFTau/src/PFMETMonitor.cc b/DQMOffline/PFTau/src/PFMETMonitor.cc index f2fe5816b1359..d4d4a5624fada 100644 --- a/DQMOffline/PFTau/src/PFMETMonitor.cc +++ b/DQMOffline/PFTau/src/PFMETMonitor.cc @@ -11,7 +11,6 @@ #include - // // -- Constructor // @@ -39,14 +38,11 @@ PFMETMonitor::PFMETMonitor( Benchmark::Mode mode) : createMETSpecificHistos_ = false; histogramBooked_ = false; } - - // // -- Destructor // PFMETMonitor::~PFMETMonitor() {} - // // -- Set Parameters accessing them from ParameterSet // @@ -65,8 +61,6 @@ void PFMETMonitor::setParameters( const edm::ParameterSet & parameterSet) { candBench_.setParameters(mode_); matchCandBench_.setParameters(mode_); } - - // // -- Set Parameters // @@ -81,14 +75,12 @@ void PFMETMonitor::setParameters(Benchmark::Mode mode, float ptmin, float ptmax, candBench_.setParameters(mode_); matchCandBench_.setParameters(mode_); } - - // // -- Create histograms accessing parameters from ParameterSet // -void PFMETMonitor::setup(DQMStore::IBooker& b, const edm::ParameterSet & parameterSet) { - candBench_.setup(b, parameterSet); - matchCandBench_.setup(b, parameterSet); +void PFMETMonitor::setup(const edm::ParameterSet & parameterSet) { + candBench_.setup(parameterSet); + matchCandBench_.setup(parameterSet); if (createMETSpecificHistos_ && !histogramBooked_) { @@ -100,26 +92,26 @@ void PFMETMonitor::setup(DQMStore::IBooker& b, const edm::ParameterSet & paramet edm::ParameterSet setOvsetPS = parameterSet.getParameter("DeltaSumEtOvSumEtHistoParameter"); if (pxPS.getParameter("switchOn")) { - px_ = book1D(b, "px_", "px_;p_{X} (GeV)", + px_ = book1D("px_", "px_;p_{X} (GeV)", pxPS.getParameter("nBin"), pxPS.getParameter("xMin"), pxPS.getParameter("xMax")); } if (setPS.getParameter("switchOn")) { - sumEt_ = book1D(b, "sumEt_", "sumEt_;#sumE_{T}", + sumEt_ = book1D("sumEt_", "sumEt_;#sumE_{T}", setPS.getParameter("nBin"), setPS.getParameter("xMin"), setPS.getParameter("xMax")); } if (dpxPS.getParameter("switchOn")) { - delta_ex_ = book1D(b, "delta_ex_", "#DeltaME_{X}", + delta_ex_ = book1D("delta_ex_", "#DeltaME_{X}", dpxPS.getParameter("nBin"), dpxPS.getParameter("xMin"), dpxPS.getParameter("xMax")); } if (dpxPS.getParameter("switchOn")) { - delta_ex_VS_set_ = book2D(b, "delta_ex_VS_set_", ";SE_{T, true} (GeV);#DeltaE_{X}", + delta_ex_VS_set_ = book2D("delta_ex_VS_set_", ";SE_{T, true} (GeV);#DeltaE_{X}", setPS.getParameter("nBin"), setPS.getParameter("xMin"), setPS.getParameter("xMax"), @@ -128,7 +120,7 @@ void PFMETMonitor::setup(DQMStore::IBooker& b, const edm::ParameterSet & paramet dptPS.getParameter("xMax")); } if (dsetPS.getParameter("switchOn")) { - delta_set_VS_set_ = book2D(b, "delta_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}", + delta_set_VS_set_ = book2D("delta_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}", setPS.getParameter("nBin"), setPS.getParameter("xMin"), setPS.getParameter("xMax"), @@ -137,7 +129,7 @@ void PFMETMonitor::setup(DQMStore::IBooker& b, const edm::ParameterSet & paramet dsetPS.getParameter("xMax")); } if (setOvsetPS.getParameter("switchOn")) { - delta_set_Over_set_VS_set_ = book2D(b, "delta_set_Over_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}/SE_{T}", + delta_set_Over_set_VS_set_ = book2D("delta_set_Over_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}/SE_{T}", setPS.getParameter("nBin"), setPS.getParameter("xMin"), setPS.getParameter("xMax"), @@ -145,16 +137,15 @@ void PFMETMonitor::setup(DQMStore::IBooker& b, const edm::ParameterSet & paramet setOvsetPS.getParameter("xMin"), setOvsetPS.getParameter("xMax")); } - // TProfile if (dpxPS.getParameter("switchOn")) { - profile_delta_ex_VS_set_ = bookProfile(b, "profile_delta_ex_VS_set_", ";SE_{T, true} (GeV);#DeltaE_{X}", + profile_delta_ex_VS_set_ = bookProfile("profile_delta_ex_VS_set_", ";SE_{T, true} (GeV);#DeltaE_{X}", setPS.getParameter("nBin"), setPS.getParameter("xMin"), setPS.getParameter("xMax"), dptPS.getParameter("xMin"), dptPS.getParameter("xMax"), "" ); - profileRMS_delta_ex_VS_set_ = bookProfile(b, "profileRMS_delta_ex_VS_set_", ";SE_{T, true} (GeV);#DeltaE_{X}", + profileRMS_delta_ex_VS_set_ = bookProfile("profileRMS_delta_ex_VS_set_", ";SE_{T, true} (GeV);#DeltaE_{X}", setPS.getParameter("nBin"), setPS.getParameter("xMin"), setPS.getParameter("xMax"), @@ -162,13 +153,13 @@ void PFMETMonitor::setup(DQMStore::IBooker& b, const edm::ParameterSet & paramet dptPS.getParameter("xMax"), "s" ); } if (dsetPS.getParameter("switchOn")) { - profile_delta_set_VS_set_ = bookProfile(b, "profile_delta_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}", + profile_delta_set_VS_set_ = bookProfile("profile_delta_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}", setPS.getParameter("nBin"), setPS.getParameter("xMin"), setPS.getParameter("xMax"), dsetPS.getParameter("xMin"), dsetPS.getParameter("xMax"), "" ); - profileRMS_delta_set_VS_set_ = bookProfile(b, "profileRMS_delta_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}", + profileRMS_delta_set_VS_set_ = bookProfile("profileRMS_delta_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}", setPS.getParameter("nBin"), setPS.getParameter("xMin"), setPS.getParameter("xMax"), @@ -176,13 +167,13 @@ void PFMETMonitor::setup(DQMStore::IBooker& b, const edm::ParameterSet & paramet dsetPS.getParameter("xMax"), "s" ); } if (setOvsetPS.getParameter("switchOn")) { - profile_delta_set_Over_set_VS_set_ = bookProfile(b, "profile_delta_set_Over_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}/SE_{T}", + profile_delta_set_Over_set_VS_set_ = bookProfile("profile_delta_set_Over_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}/SE_{T}", setPS.getParameter("nBin"), setPS.getParameter("xMin"), setPS.getParameter("xMax"), setOvsetPS.getParameter("xMin"), setOvsetPS.getParameter("xMax"), "" ); - profileRMS_delta_set_Over_set_VS_set_ = bookProfile(b, "profileRMS_delta_set_Over_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}/SE_{T}", + profileRMS_delta_set_Over_set_VS_set_ = bookProfile("profileRMS_delta_set_Over_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}/SE_{T}", setPS.getParameter("nBin"), setPS.getParameter("xMin"), setPS.getParameter("xMax"), @@ -192,14 +183,12 @@ void PFMETMonitor::setup(DQMStore::IBooker& b, const edm::ParameterSet & paramet histogramBooked_ = true; } } - - // // -- Create histograms using local parameters // -void PFMETMonitor::setup(DQMStore::IBooker& b) { - candBench_.setup(b); - matchCandBench_.setup(b); +void PFMETMonitor::setup() { + candBench_.setup(); + matchCandBench_.setup(); if (createMETSpecificHistos_ && !histogramBooked_) { @@ -209,51 +198,53 @@ void PFMETMonitor::setup(DQMStore::IBooker& b) { PhaseSpace dsetPS = PhaseSpace( 50, -1000.0, 1000); PhaseSpace setOvsetPS = PhaseSpace( 100,0., 2.); - px_ = book1D(b, "px_", "px_;p_{X} (GeV)", pxPS.n, pxPS.m, pxPS.M); - sumEt_ = book1D(b, "sumEt_", "sumEt_;#sumE_{T}", setPS.n, setPS.m, setPS.M); - delta_ex_ = book1D(b, "delta_ex_", "#DeltaME_{X}", dpxPS.n, dpxPS.m, dpxPS.M); - delta_ex_VS_set_ = book2D(b, "delta_ex_VS_set_", ";SE_{T, true} (GeV);#DeltaE_{X}", + px_ = book1D("px_", "px_;p_{X} (GeV)", pxPS.n, pxPS.m, pxPS.M); + + sumEt_ = book1D("sumEt_", "sumEt_;#sumE_{T}", setPS.n, setPS.m, setPS.M); + + delta_ex_ = book1D("delta_ex_", "#DeltaME_{X}", dpxPS.n, dpxPS.m, dpxPS.M); + + delta_ex_VS_set_ = book2D("delta_ex_VS_set_", ";SE_{T, true} (GeV);#DeltaE_{X}", setPS.n, setPS.m, setPS.M, dpxPS.n, dpxPS.m, dpxPS.M ); - delta_set_VS_set_ = book2D(b, "delta_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}", + + delta_set_VS_set_ = book2D("delta_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}", setPS.n, setPS.m, setPS.M, dsetPS.n, dsetPS.m, dsetPS.M ); - delta_set_Over_set_VS_set_ = book2D(b, "delta_set_Over_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}/SE_{T}", + delta_set_Over_set_VS_set_ = book2D("delta_set_Over_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}/SE_{T}", setPS.n, setPS.m, setPS.M, setOvsetPS.n, setOvsetPS.m, setOvsetPS.M ); - // TProfile - profile_delta_ex_VS_set_ = bookProfile(b, "profile_delta_ex_VS_set_", ";SE_{T, true} (GeV);#DeltaE_{X}", + profile_delta_ex_VS_set_ = bookProfile("profile_delta_ex_VS_set_", ";SE_{T, true} (GeV);#DeltaE_{X}", setPS.n, setPS.m, setPS.M, setOvsetPS.m, setOvsetPS.M, "" ); - profile_delta_set_VS_set_ = bookProfile(b, "profile_delta_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}", + profile_delta_set_VS_set_ = bookProfile("profile_delta_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}", setPS.n, setPS.m, setPS.M, setOvsetPS.m, setOvsetPS.M, "" ); - profile_delta_set_Over_set_VS_set_ = bookProfile(b, "profile_delta_set_Over_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}/SE_{T}", + + profile_delta_set_Over_set_VS_set_ = bookProfile("profile_delta_set_Over_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}/SE_{T}", setPS.n, setPS.m, setPS.M, setOvsetPS.m, setOvsetPS.M, "" ); - // TProfile RMS - profileRMS_delta_ex_VS_set_ = bookProfile(b, "profileRMS_delta_ex_VS_set_", ";SE_{T, true} (GeV);#DeltaE_{X}", + profileRMS_delta_ex_VS_set_ = bookProfile("profileRMS_delta_ex_VS_set_", ";SE_{T, true} (GeV);#DeltaE_{X}", setPS.n, setPS.m, setPS.M, setOvsetPS.m, setOvsetPS.M, "s" ); - profileRMS_delta_set_VS_set_ = bookProfile(b, "profileRMS_delta_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}", + profileRMS_delta_set_VS_set_ = bookProfile("profileRMS_delta_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}", setPS.n, setPS.m, setPS.M, setOvsetPS.m, setOvsetPS.M, "s" ); - profileRMS_delta_set_Over_set_VS_set_ = bookProfile(b, "profileRMS_delta_set_Over_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}/SE_{T}", + profileRMS_delta_set_Over_set_VS_set_ = bookProfile("profileRMS_delta_set_Over_set_VS_set_", ";SE_{T, true} (GeV);#DeltaSE_{T}/SE_{T}", setPS.n, setPS.m, setPS.M, setOvsetPS.m, setOvsetPS.M, "s" ); histogramBooked_ = true; } } - void PFMETMonitor::setDirectory(TDirectory* dir) { Benchmark::setDirectory(dir); @@ -261,12 +252,15 @@ void PFMETMonitor::setDirectory(TDirectory* dir) { matchCandBench_.setDirectory(dir); } - void PFMETMonitor::fillOne(const reco::MET& met, const reco::MET& matchedMet, float& minVal, float& maxVal) { + /*void PFMETMonitor::fillOne(const reco::MET& met, + const reco::MET& matchedMet, float& minVal, float& maxVal, + const edm::ParameterSet & parameterSet) {*/ candBench_.fillOne(met); //std::cout <<"\nfillone MET candBench" <second.get_value(); - lumi.file_ls = lumiNumber; + lumi.ls = lumiNumber; lumi.datafilename = std::next(pt.get_child("data").begin(), datafn_position) ->second.get_value(); + lumi.loaded = true; return lumi; } @@ -70,13 +71,6 @@ DQMFileIterator::DQMFileIterator(edm::ParameterSet const& pset) forceFileCheckTimeoutMillis_ = 5015; reset(); - - if (mon_.isAvailable()) { - ptree doc; - doc.put("run", runNumber_); - mon_->outputUpdate(doc); - updateMonitoring(); - } } DQMFileIterator::~DQMFileIterator() {} @@ -86,7 +80,7 @@ void DQMFileIterator::reset() { eor_.loaded = false; state_ = State::OPEN; - nextLumiNumber_ = 1; + currentLumi_ = 1; lumiSeen_.clear(); lastLumiLoad_ = std::chrono::high_resolution_clock::now(); @@ -97,16 +91,16 @@ void DQMFileIterator::reset() { DQMFileIterator::State DQMFileIterator::state() { return state_; } -const DQMFileIterator::LumiEntry DQMFileIterator::open() { - LumiEntry& lumi = lumiSeen_[nextLumiNumber_]; - advanceToLumi(nextLumiNumber_ + 1); +const DQMFileIterator::LumiEntry& DQMFileIterator::front() { + return lumiSeen_[currentLumi_]; +} - lumi.state = "open: file iterator"; - return lumi; +void DQMFileIterator::pop() { + advanceToLumi(currentLumi_ + 1); } bool DQMFileIterator::lumiReady() { - if (lumiSeen_.find(nextLumiNumber_) != lumiSeen_.end()) { + if (lumiSeen_.find(currentLumi_) != lumiSeen_.end()) { return true; } @@ -127,38 +121,23 @@ void DQMFileIterator::advanceToLumi(unsigned int lumi) { using boost::property_tree::ptree; using boost::str; - unsigned int currentLumi = nextLumiNumber_; + unsigned int prev_lumi = currentLumi_; - nextLumiNumber_ = lumi; + currentLumi_ = lumi; lastLumiLoad_ = std::chrono::high_resolution_clock::now(); + // report the successful lumi file open if (mon_.isAvailable()) { - // report the successful lumi file open - ptree doc; - doc.put("lumi", currentLumi); - mon_->outputUpdate(doc); - updateMonitoring(); - } -} - -void DQMFileIterator::updateMonitoring() { - if (! mon_.isAvailable()) - return; + ptree children; - ptree children; - auto iter = lumiSeen_.begin(); - for (; iter != lumiSeen_.end(); ++iter) { - ptree lumi; - lumi.put("filename", iter->second.filename); - lumi.put("file_ls", iter->second.file_ls); - lumi.put("state", iter->second.state); + auto iter = lumiSeen_.begin(); + for (; iter != lumiSeen_.end(); ++iter) { + children.put(std::to_string(iter->first), iter->second.filename); + } - children.add_child(std::to_string(iter->first), lumi); + mon_->registerExtra("lumiSeen", children); + mon_->reportLumiSection(runNumber_, prev_lumi); } - - ptree doc; - doc.add_child("lumiSeen", children); - mon_->outputUpdate(doc); } std::string DQMFileIterator::make_path_data(const LumiEntry& lumi) { @@ -178,21 +157,21 @@ void DQMFileIterator::collect(bool ignoreTimers) { now - runPathLastCollect_).count(); // don't refresh if it's too soon - if ((!ignoreTimers) && (last_ms >= 0) && (last_ms < 100)) { + if ((!ignoreTimers) && (last_ms < 100)) { return; } // check if directory changed - std::time_t mtime_now = boost::filesystem::last_write_time(runPath_); + std::time_t t = boost::filesystem::last_write_time(runPath_); - if ((!ignoreTimers) && (last_ms < forceFileCheckTimeoutMillis_) && (mtime_now == runPathMTime_)) { + if ((!ignoreTimers) && (last_ms < forceFileCheckTimeoutMillis_) && (t == runPathMTime_)) { //logFileAction("Directory hasn't changed."); return; } else { //logFileAction("Directory changed, updating."); } - runPathMTime_ = mtime_now; + runPathMTime_ = t; runPathLastCollect_ = now; using boost::filesystem::directory_iterator; @@ -202,7 +181,7 @@ void DQMFileIterator::collect(bool ignoreTimers) { directory_iterator dend; for (directory_iterator di(runPath_); di != dend; ++di) { - const boost::regex fn_re("run(\\d+)_ls(\\d+)_([a-zA-Z0-9]+)(_.*)?\\.jsn"); + const boost::regex fn_re("run(\\d+)_ls(\\d+)(_.*).jsn"); const std::string filename = di->path().filename().string(); const std::string fn = di->path().string(); @@ -217,7 +196,7 @@ void DQMFileIterator::collect(bool ignoreTimers) { // check if this is EoR // for various reasons we have to load it after all other files - if ((lumi == 0) && (label == "EoR") && (!eor_.loaded)) { + if ((lumi == 0) && (label == "_EoR") && (!eor_.loaded)) { fn_eor = fn; continue; } @@ -229,24 +208,14 @@ void DQMFileIterator::collect(bool ignoreTimers) { // check if this belongs to us if (label != streamLabel_) { - std::string msg("Found and skipped json file (stream label mismatch, "); - msg += label + " [files] != " + streamLabel_ + " [config]"; - msg += "): "; - logFileAction(msg, fn); + logFileAction("Found and skipped json file (stream label mismatch): ", + fn); continue; } - try { - LumiEntry lumi_jsn = LumiEntry::load_json(fn, lumi, datafnPosition_); - lumiSeen_.emplace(lumi, lumi_jsn); - logFileAction("Found and loaded json file: ", fn); - } catch (const std::exception& e) { - // don't reset the mtime, keep it waiting - std::string msg("Found, tried to load the json, but failed ("); - msg += e.what(); - msg += "): "; - logFileAction(msg, fn); - } + LumiEntry lumi_jsn = LumiEntry::load_json(fn, lumi, datafnPosition_); + lumiSeen_.emplace(lumi, lumi_jsn); + logFileAction("Found and loaded json file: ", fn); } } @@ -285,21 +254,21 @@ void DQMFileIterator::update_state() { // special case for missing lumi files // skip to the next available, but after the timeout if ((state_ != State::EOR) && (nextLumiTimeoutMillis_ >= 0)) { - auto iter = lumiSeen_.lower_bound(nextLumiNumber_); - if ((iter != lumiSeen_.end()) && iter->first != nextLumiNumber_) { + auto iter = lumiSeen_.lower_bound(currentLumi_); + if ((iter != lumiSeen_.end()) && iter->first != currentLumi_) { auto elapsed = high_resolution_clock::now() - lastLumiLoad_; auto elapsed_ms = duration_cast(elapsed).count(); if (elapsed_ms >= nextLumiTimeoutMillis_) { std::string msg("Timeout reached, skipping lumisection(s) "); - msg += std::to_string(nextLumiNumber_) + " .. " + + msg += std::to_string(currentLumi_) + " .. " + std::to_string(iter->first - 1); - msg += ", nextLumiNumber_ is now " + std::to_string(iter->first); + msg += ", currentLumi_ is now " + std::to_string(iter->first); logFileAction(msg); - nextLumiNumber_ = iter->first; + currentLumi_ = iter->first; } } } @@ -311,7 +280,7 @@ void DQMFileIterator::update_state() { // after all lumi have been pop()'ed // current lumi will become larger than the last lumi - if (nextLumiNumber_ > eor_.n_lumi) { + if (currentLumi_ > eor_.n_lumi) { state_ = State::EOR; } } @@ -319,8 +288,6 @@ void DQMFileIterator::update_state() { if (state_ != old_state) { logFileAction("Streamer state changed: ", std::to_string(old_state) + "->" + std::to_string(state_)); - - updateMonitoring(); } } @@ -331,24 +298,20 @@ void DQMFileIterator::logFileAction(const std::string& msg, edm::FlushMessageLog(); } -void DQMFileIterator::logLumiState(const LumiEntry& lumi, const std::string& msg) { - if (lumiSeen_.find(lumi.file_ls) != lumiSeen_.end()) { - lumiSeen_[lumi.file_ls].state = msg; - } else { - logFileAction("Internal error: referenced lumi is not the map."); +void DQMFileIterator::updateWatchdog() { + const char* x = getenv("WATCHDOG_FD"); + if (x) { + int fd = atoi(x); + write(fd, ".\n", 2); } } void DQMFileIterator::delay() { //logFileAction("Streamer waiting for the next LS."); - if (mon_.isAvailable()) - mon_->keepAlive(); - + updateWatchdog(); usleep(delayMillis_ * 1000); - - if (mon_.isAvailable()) - mon_->keepAlive(); + updateWatchdog(); } void DQMFileIterator::fillDescription(edm::ParameterSetDescription& desc) { diff --git a/DQMServices/StreamerIO/plugins/DQMFileIterator.h b/DQMServices/StreamerIO/plugins/DQMFileIterator.h index 5b32cdde59e62..b04c63281f682 100644 --- a/DQMServices/StreamerIO/plugins/DQMFileIterator.h +++ b/DQMServices/StreamerIO/plugins/DQMFileIterator.h @@ -18,16 +18,15 @@ namespace dqmservices { class DQMFileIterator { public: struct LumiEntry { + bool loaded = false; std::string filename; - unsigned int file_ls; + int ls; std::size_t n_events; std::string datafilename; static LumiEntry load_json(const std::string& filename, int lumiNumber, unsigned int datafn_position); - - std::string state; }; struct EorEntry { @@ -55,16 +54,13 @@ class DQMFileIterator { /* methods to iterate the actual files */ - /* nextLumiNumber_ is the first unprocessed lumi number - * lumiReady() returns if the next lumi is ready to be loaded - * open() opens a file and advances the pointer to the next lumi - * + /* currentLumi_ is the first unprocessed lumi number + * lumiReady() returns if it is loadable * front() a reference to the description (LumiEntry) * pop() advances to the next lumi */ bool lumiReady(); - const LumiEntry open(); - + const LumiEntry& front(); void pop(); std::string make_path_data(const LumiEntry& lumi); @@ -75,11 +71,8 @@ class DQMFileIterator { /* misc helpers for input sources */ void logFileAction(const std::string& msg, const std::string& fileName = "") const; - void logLumiState(const LumiEntry& lumi, const std::string& msg); - void delay(); - void updateMonitoring(); - + void updateWatchdog(); unsigned int runNumber(); unsigned int lastLumiFound(); @@ -97,12 +90,13 @@ class DQMFileIterator { // file name position in the json file unsigned int datafnPosition_; + std::string runPath_; EorEntry eor_; State state_; - unsigned int nextLumiNumber_; + unsigned int currentLumi_; std::map lumiSeen_; /* this should be different, diff --git a/DQMServices/StreamerIO/plugins/DQMMonitoringService.cc b/DQMServices/StreamerIO/plugins/DQMMonitoringService.cc index a9747d00ae2bd..212a27836647b 100644 --- a/DQMServices/StreamerIO/plugins/DQMMonitoringService.cc +++ b/DQMServices/StreamerIO/plugins/DQMMonitoringService.cc @@ -11,82 +11,244 @@ namespace dqmservices { -DQMMonitoringService::DQMMonitoringService(const edm::ParameterSet &pset, edm::ActivityRegistry& ar) { - const char* x = getenv("DQMMON_UPDATE_PIPE"); +namespace fs = boost::filesystem; - if (x) { - std::cerr << "Monitoring pipe: " << x << std::endl; - mstream_.reset(new std::ofstream(x)); - } else { - std::cerr << "Monitoring file not found, disabling." << std::endl; +#define MAX_LOG_SIZE 64*1024 + +DQMMonitoringService::DQMMonitoringService(const edm::ParameterSet &pset, edm::ActivityRegistry&) { + json_path_ = pset.getUntrackedParameter("jsonPath"); + + char host[128]; + if (gethostname(host ,sizeof(host)) == -1) { + throw cms::Exception("DQMMonitoringService") + << "Internal error, cannot get host name"; } + hostname_ = host; + fseq_ = 0; + tag_ = ""; nevents_ = 0; last_report_nevents_ = 0; last_report_time_ = std::chrono::high_resolution_clock::now(); - ar.watchPreGlobalBeginLumi(this, &DQMMonitoringService::evLumi); - ar.watchPreSourceEvent(this, &DQMMonitoringService::evEvent); + try { + fillProcessInfoCmdline(); + } catch (...) { + // pass + } } DQMMonitoringService::~DQMMonitoringService() { } -void DQMMonitoringService::evLumi(GlobalContext const& iContext) { - unsigned int run = iContext.luminosityBlockID().run(); - unsigned int lumi = iContext.luminosityBlockID().luminosityBlock(); +void DQMMonitoringService::registerExtra(std::string name, ptree data) { + extra_.put_child(name, data); +} - ptree doc; - doc.put("cmssw_run", run); - doc.put("cmssw_lumi", lumi); - outputUpdate(doc); +void DQMMonitoringService::reportLumiSection(int run, int lumi) { + try { + reportLumiSectionUnsafe(run, lumi); + } catch (...) { + // pass + } } -void DQMMonitoringService::evEvent(StreamID const& iContext) { - nevents_ += 1; +void DQMMonitoringService::reportEvents(int nevts) { + nevents_ += nevts; +} +void DQMMonitoringService::reportLumiSectionUnsafe(int run, int lumi) { using std::chrono::duration_cast; + using std::chrono::milliseconds; using std::chrono::seconds; - + + int pid = getpid(); + ++fseq_; + + if (! fs::is_directory(json_path_)) { + extra_.clear(); + return; // no directory present, quit + } + auto now = std::chrono::high_resolution_clock::now(); - auto count = duration_cast(now - last_report_time_).count(); - ptree doc; - doc.put("events_total", nevents_); + // document unique id + std::string id = + str(boost::format("dqm-source-state-run%06d-host%s-pid%06d") % run % hostname_ % pid); + + // output jsn file + std::string path_id; - if (count > 0) { - float rate = (nevents_ - last_report_nevents_) / count; - doc.put("events_rate", rate); + // check for debug fn + if (fs::exists(json_path_ / ".debug")) { + path_id = str(boost::format("%d.%08d+%s.jsn") % std::time(NULL) % fseq_ % id); + } else { + path_id = id + ".jsn"; } + std::string tmp_path = (json_path_ / (path_id + ".tmp")).string(); + std::string final_path = (json_path_ / path_id).string(); + + float rate = (nevents_ - last_report_nevents_); + rate = rate / duration_cast(now - last_report_time_).count(); + + ptree pt; + pt.put("_id", id); + pt.put("pid", pid); + pt.put("tag", tag_); + pt.put("hostname", hostname_); + pt.put("sequence", fseq_); + pt.put("type", "dqm-source-state"); + pt.put("run", run); + pt.put("lumi", lumi); + + pt.put("events_total", nevents_); + pt.put("events_rate", rate); + + pt.put("report_timestamp", std::time(NULL)); + + // add some additional per-lumi information + std::string log = hackoutTheStdErr(); + pt.put("stderr", log); + + fillProcessInfoStatus(); + + // these are predefined + pt.add_child("extra", extra_); + pt.add_child("ps_info", ps_info_); + + std::ofstream file(tmp_path); + write_json(file, pt, true); + file.close(); + last_report_time_ = now; last_report_nevents_ = nevents_; - outputUpdate(doc); + rename(tmp_path.c_str(), final_path.c_str()); } -void DQMMonitoringService::outputUpdate(ptree& doc) { - if (!mstream_) - return; +void DQMMonitoringService::fillProcessInfoCmdline() { + int fd = open("/proc/self/cmdline", O_RDONLY); + ptree cmdline; - try { - doc.put("update_timestamp", std::time(NULL)); + if (fd != -1) { + unsigned char buf[1024]; + int nbytesread = read(fd, buf, 1024); - write_json(*mstream_, doc, false); - mstream_->flush(); - } catch (...) { - // pass + // make last character zero + // in case we have read less than buf + if (nbytesread > 0) + buf[nbytesread-1] = 0; + + unsigned char *end = buf + nbytesread; + for (unsigned char *p = buf; p < end; /**/) { + std::string token((char *)p); + ptree child; + child.put("", token); + cmdline.push_back(std::make_pair("", child)); + + if ((tag_.size() == 0) && + (token.find(".py") != std::string::npos)) { + + // a hack to set the tag until we figure + // out how to set it properly + tag_ = token; + boost::replace_last(tag_, ".py", ""); + boost::replace_last(tag_, "_cfg", ""); + + size_t pos = tag_.rfind("/"); + if (pos != std::string::npos) { + tag_ = tag_.substr(pos + 1); + } + } + + while (*p++); // skip until start of next 0-terminated section + } + close(fd); } + + ps_info_.put_child("cmdline", cmdline); } -void DQMMonitoringService::keepAlive() { - if (!mstream_) - return; +void DQMMonitoringService::fillProcessInfoStatus() { + ptree data; + + std::ifstream in("/proc/self/status"); + std::string line; + + if (in) { + while (std::getline(in, line)) { + size_t pos = line.find(':'); + if (pos == std::string::npos) + continue; + + std::string value = line.substr(pos+1); + boost::trim(value); // value + line.resize(pos); // key + + data.put(line, value); + } + + in.close(); + } - *mstream_ << "\n"; - mstream_->flush(); + ps_info_.put_child("status", data); } +std::string DQMMonitoringService::hackoutTheStdErr() { + // magic + char buf[MAX_LOG_SIZE + 1]; + ssize_t ret = readlink("/proc/self/fd/2", buf, MAX_LOG_SIZE); + if (ret > 0) { + buf[ret] = 0; + } else { + return "error: can't read the stderr link."; + } + + if (strstr(buf, "/dev/") != NULL) { + // can't read this weird file + return "error: stderr is a special file."; + } + + // try to open + FILE *sr = fopen(buf , "rb"); + if (sr == NULL) + return "error: can't open the stderr (deleted?)."; + + // try to get the last position + // if this is an ordinary it will succeed + fseek(sr, 0, SEEK_END); + long size = ftell(sr); + if (size > 0) { + long from = size - (MAX_LOG_SIZE); + if (from < 0) + from = 0; + + fseek(sr, from, SEEK_SET); + size_t read = fread(buf, 1, MAX_LOG_SIZE, sr); + buf[read] = 0; + + // If "from" was not zero, discard the first line. + // Since it will be corrupted anyway. + char *start = buf; + + if (from != 0) { + start = strchr(start, '\n'); + if (start == NULL) { + // should not happen + // return an empty string + start = buf + read; + } else { + start = start + 1; + } + } + + return std::string(start); + } + + fclose(sr); + return "error: stderr is not a seek-able file."; +} } // end-of-namespace diff --git a/DQMServices/StreamerIO/plugins/DQMMonitoringService.h b/DQMServices/StreamerIO/plugins/DQMMonitoringService.h index c605cb4667625..fd44b2810e12a 100644 --- a/DQMServices/StreamerIO/plugins/DQMMonitoringService.h +++ b/DQMServices/StreamerIO/plugins/DQMMonitoringService.h @@ -9,9 +9,7 @@ #include "DataFormats/Provenance/interface/ModuleDescription.h" #include "DataFormats/Provenance/interface/ParameterSetID.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "FWCore/ServiceRegistry/interface/StreamContext.h" -#include "FWCore/ServiceRegistry/interface/GlobalContext.h" -#include "FWCore/Utilities/interface/StreamID.h" + #include "boost/filesystem.hpp" #include @@ -35,30 +33,34 @@ namespace dqmservices { using boost::property_tree::ptree; -using edm::StreamID; -using edm::StreamContext; -using edm::GlobalContext; class DQMMonitoringService { public: DQMMonitoringService(const edm::ParameterSet &, edm::ActivityRegistry&); ~DQMMonitoringService(); - void keepAlive(); - void outputUpdate(ptree& doc); - - void evLumi(GlobalContext const&); - void evEvent(StreamID const&); - - //void makeReport(); + void registerExtra(std::string name, ptree data); + void reportLumiSection(int run, int lumi); + void reportEvents(int nevts); private: - std::shared_ptr mstream_; - ptree doc_; - + boost::filesystem::path json_path_; + std::string hostname_; + std::string tag_; + int fseq_; long nevents_; + + ptree extra_; + ptree ps_info_; + long last_report_nevents_; std::chrono::high_resolution_clock::time_point last_report_time_; + + void reportLumiSectionUnsafe(int run, int lumi); + + void fillProcessInfoCmdline(); + void fillProcessInfoStatus(); + std::string hackoutTheStdErr(); }; } // end-of-namespace diff --git a/DQMServices/StreamerIO/plugins/DQMProtobufReader.cc b/DQMServices/StreamerIO/plugins/DQMProtobufReader.cc index ff9ef44bf2a2b..7e201ce6a932b 100644 --- a/DQMServices/StreamerIO/plugins/DQMProtobufReader.cc +++ b/DQMServices/StreamerIO/plugins/DQMProtobufReader.cc @@ -40,7 +40,6 @@ edm::InputSource::ItemType DQMProtobufReader::getNextItemType() { // skip to the next file if we have no files openned yet if (fiterator_.lumiReady()) { - return InputSource::IsLumi; } @@ -60,7 +59,18 @@ std::shared_ptr DQMProtobufReader::readRunAuxiliary_() { edm::RunAuxiliary* aux = new edm::RunAuxiliary( fiterator_.runNumber(), edm::Timestamp(), edm::Timestamp()); return std::shared_ptr(aux); -} +}; + +std::shared_ptr +DQMProtobufReader::readLuminosityBlockAuxiliary_() { + fiterator_.logFileAction("readLuminosityBlockAuxiliary_"); + + edm::LuminosityBlockAuxiliary* aux = new edm::LuminosityBlockAuxiliary( + fiterator_.runNumber(), fiterator_.front().ls, edm::Timestamp(), + edm::Timestamp()); + + return std::shared_ptr(aux); +}; void DQMProtobufReader::readRun_(edm::RunPrincipal& rpCache) { fiterator_.logFileAction("readRun_"); @@ -73,18 +83,6 @@ void DQMProtobufReader::readRun_(edm::RunPrincipal& rpCache) { } } -std::shared_ptr -DQMProtobufReader::readLuminosityBlockAuxiliary_() { - fiterator_.logFileAction("readLuminosityBlockAuxiliary_"); - - currentLumi_ = fiterator_.open(); - edm::LuminosityBlockAuxiliary* aux = new edm::LuminosityBlockAuxiliary( - fiterator_.runNumber(), currentLumi_.file_ls, edm::Timestamp(), - edm::Timestamp()); - - return std::shared_ptr(aux); -} - void DQMProtobufReader::readLuminosityBlock_( edm::LuminosityBlockPrincipal& lbCache) { @@ -106,11 +104,11 @@ void DQMProtobufReader::readLuminosityBlock_( } // load the new file - std::string p = fiterator_.make_path_data(currentLumi_); - + const DQMFileIterator::LumiEntry& lumi = fiterator_.front(); + std::string p = fiterator_.make_path_data(lumi); if (!boost::filesystem::exists(p)) { fiterator_.logFileAction("Data file is missing ", p); - fiterator_.logLumiState(currentLumi_, "error: data file missing"); + fiterator_.pop(); return; } @@ -118,8 +116,7 @@ void DQMProtobufReader::readLuminosityBlock_( fiterator_.logFileAction("Successfully opened file ", p); store->load(p); fiterator_.logFileAction("Closed file ", p); - - fiterator_.logLumiState(currentLumi_, "closed: ok"); + fiterator_.pop(); }; void DQMProtobufReader::readEvent_(edm::EventPrincipal&) {}; diff --git a/DQMServices/StreamerIO/plugins/DQMProtobufReader.h b/DQMServices/StreamerIO/plugins/DQMProtobufReader.h index 5558d0a88277c..4fa7e50e5deb0 100644 --- a/DQMServices/StreamerIO/plugins/DQMProtobufReader.h +++ b/DQMServices/StreamerIO/plugins/DQMProtobufReader.h @@ -39,8 +39,6 @@ class DQMProtobufReader : public edm::InputSource { std::unique_ptr streamReader_; DQMFileIterator fiterator_; - DQMFileIterator::LumiEntry currentLumi_; - InputSource::ItemType nextItemType; }; diff --git a/DQMServices/StreamerIO/plugins/DQMStreamerReader.cc b/DQMServices/StreamerIO/plugins/DQMStreamerReader.cc index 5b387c4f1d1ca..fcf96d1d5f99e 100644 --- a/DQMServices/StreamerIO/plugins/DQMStreamerReader.cc +++ b/DQMServices/StreamerIO/plugins/DQMStreamerReader.cc @@ -29,7 +29,8 @@ DQMStreamerReader::DQMStreamerReader(edm::ParameterSet const& pset, edm::InputSourceDescription const& desc) : StreamerInputSource(pset, desc), fiterator_(pset), - streamReader_() { + streamReader_(), + eventSkipperByID_(edm::EventSkipperByID::create(pset).release()) { runNumber_ = pset.getUntrackedParameter("runNumber"); runInputDir_ = pset.getUntrackedParameter("runInputDir"); @@ -97,7 +98,7 @@ void DQMStreamerReader::openFile_(std::string newStreamerFile_) { edm::ParameterSet pset; streamReader_ = std::unique_ptr( - new edm::StreamerInputFile(newStreamerFile_)); + new edm::StreamerInputFile(newStreamerFile_, eventSkipperByID_)); InitMsgView const* header = getHeaderMsg(); deserializeAndMergeWithRegistry(*header, false); @@ -137,8 +138,9 @@ void DQMStreamerReader::closeFile_() { bool DQMStreamerReader::openNextFile_() { closeFile_(); - currentLumi_ = fiterator_.open(); - std::string p = fiterator_.make_path_data(currentLumi_); + const DQMFileIterator::LumiEntry& lumi = fiterator_.front(); + std::string p = fiterator_.make_path_data(lumi); + fiterator_.pop(); if (boost::filesystem::exists(p)) { openFile_(p); @@ -146,7 +148,6 @@ bool DQMStreamerReader::openNextFile_() { } else { /* dat file missing */ fiterator_.logFileAction("Data file (specified in json) is missing:", p); - fiterator_.logLumiState(currentLumi_, "error: data file missing"); return false; } @@ -240,6 +241,8 @@ bool DQMStreamerReader::prepareNextFile() { * If end-of-run nullptr is returned. */ EventMsgView const* DQMStreamerReader::prepareNextEvent() { + fiterator_.updateWatchdog(); + EventMsgView const* eview = nullptr; typedef DQMFileIterator::State State; @@ -295,6 +298,10 @@ bool DQMStreamerReader::checkNextEvent() { processedEventPerLs_ += 1; deserializeEvent(*eview); + if (mon_.isAvailable()) { + mon_->reportEvents(1); + } + return true; } @@ -362,6 +369,13 @@ void DQMStreamerReader::skip(int toSkip) { if (evMsg == nullptr) { return; } + + // If the event would have been skipped anyway, don't count it as a skipped + // event. + if (eventSkipperByID_ && eventSkipperByID_->skipIt( + evMsg->run(), evMsg->lumi(), evMsg->event())) { + --i; + } } } diff --git a/DQMServices/StreamerIO/plugins/DQMStreamerReader.h b/DQMServices/StreamerIO/plugins/DQMStreamerReader.h index fbcf81b762bc3..550245d438343 100644 --- a/DQMServices/StreamerIO/plugins/DQMStreamerReader.h +++ b/DQMServices/StreamerIO/plugins/DQMStreamerReader.h @@ -57,7 +57,6 @@ class DQMStreamerReader : public edm::StreamerInputSource { bool acceptAllEvt_; bool matchTriggerSel_; - DQMFileIterator::LumiEntry currentLumi_; unsigned int runNumber_; std::string runInputDir_; std::string streamLabel_; diff --git a/DQMServices/StreamerIO/python/DQMProtobufReader_cff.py b/DQMServices/StreamerIO/python/DQMProtobufReader_cff.py index 559d433c8057d..5fccc77f7c145 100644 --- a/DQMServices/StreamerIO/python/DQMProtobufReader_cff.py +++ b/DQMServices/StreamerIO/python/DQMProtobufReader_cff.py @@ -22,7 +22,7 @@ "Directory where the DQM files will appear.") options.register('streamLabel', - 'streamDQMHistograms', # default value + '_streamDQMHistograms_StorageManager', # default value VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, "Stream label used in json discovery.") diff --git a/DQMServices/StreamerIO/scripts/esMonitoring.py b/DQMServices/StreamerIO/scripts/esMonitoring.py deleted file mode 100755 index 9a48ca14a00c2..0000000000000 --- a/DQMServices/StreamerIO/scripts/esMonitoring.py +++ /dev/null @@ -1,334 +0,0 @@ -#!/usr/bin/env python - -import argparse -import subprocess -import socket, fcntl, select, atexit, signal -import sys, os, time, datetime -import collections -import json - -def log(s): - sys.stderr.write("m: " + s + "\n"); - sys.stderr.flush() - -def dt2time(dt): - # convert datetime timstamp to unix - return time.mktime(dt.timetuple()) - -class ElasticReport(object): - def __init__(self, pid, cmdline, history, json): - self.s_history = history - self.s_json = json - - self.last_make_report = None - self.make_report_timer = 30 - self.seq = 0 - - self.doc = { - "pid": pid, - "hostname": socket.gethostname(), - "sequence": self.seq, - "cmdline": cmdline, - } - - self.defaults() - - def defaults(self): - self.id_format = u"%(type)s-run%(run)06d-host%(hostname)s-pid%(pid)06d" - self.doc["type"] = "dqm-source-state" - self.doc["run"] = 0 - - # figure out the tag - c = self.doc["cmdline"] - for l in c: - if l.endswith(".py"): - l = os.path.basename(l) - l = l.replace(".py", "") - l = l.replace("_cfg", "") - self.doc["tag"] = l - - self.make_id() - - def make_id(self): - id = self.id_format % self.doc - self.doc["_id"] = id - return id - - def update_doc(self, keys): - for key, value in keys.items(): - self.doc[key] = value - - def update_from_json(self): - while self.s_json.have_docs(): - doc = self.s_json.get_doc() - - # convert some values to integers - for k in ["pid", "run", "lumi"]: - if doc.has_key(k): - doc[k] = int(doc[k]) - - self.update_doc(doc) - - def update_ps_status(self): - try: - pid = int(self.doc["pid"]) - fn = "/proc/%d/status" % pid - f = open(fn, "r") - d = {} - for line in f: - k, v = line.strip().split(":", 1) - d[k.strip()] = v.strip() - f.close() - - self.doc["ps_info"] = d - except: - pass - - def update_stderr(self): - if self.s_history: - self.doc["stderr"] = self.s_history.read() - - def make_report(self): - self.last_make_report = time.time() - self.doc["report_timestamp"] = time.time() - - self.update_from_json() - self.make_id() - self.update_ps_status() - self.update_stderr() - #print self.doc - - fn_id = self.doc["_id"] + ".jsn" - fn = os.path.join("/tmp/dqm_monitoring/", fn_id) - fn_tmp = os.path.join("/tmp/dqm_monitoring/", fn_id + ".tmp") - - with open(fn_tmp, "w") as f: - json.dump(self.doc, f, indent=True) - - os.rename(fn_tmp, fn) - - def try_update(self): - # first time - if self.last_make_report is None: - return self.make_report() - - # is json stream has updates - if self.s_json and self.s_json.have_docs(): - return self.make_report() - - now = time.time() - delta = now - self.last_make_report - if delta > self.make_report_timer: - return self.make_report() - - def write(self, rbuf): - self.try_update() - - def flush(self): - self.try_update() - -class History(object): - def __init__(self, history_size=64*1024): - self.max_size = history_size - self.buf = collections.deque() - self.size = 0 - - def pop(self): - if not len(self.buf): - return None - - elm = self.buf.popleft() - self.size -= len(elm) - - return elm - - def push(self, rbuf): - self.buf.append(rbuf) - self.size += len(rbuf) - - def write(self, rbuf): - l = len(rbuf) - while (self.size + l) >= self.max_size: - self.pop() - - self.push(rbuf) - - def read(self): - return "".join(self.buf) - - def flush(self): - pass - -class JsonInput(object): - def __init__(self): - self.buf = [] - self.docs = [] - - def parse_line(self, line): - if not line.strip(): - # this is keep alive - # not yet implemented - return - - try: - doc = json.loads(line) - self.docs.append(doc) - except: - log("cannot deserialize json: %s" % line) - - def get_doc(self): - return self.docs.pop(0) - - def have_docs(self): - return len(self.docs) > 0 - - def write(self, rbuf): - self.buf.append(rbuf) - if "\n" in rbuf: - # split whatever we have - all = "".join(self.buf) - spl = all.split("\n") - - while len(spl) > 1: - line = spl.pop(0) - self.parse_line(line) - - self.buf = [spl[0]] - - def flush(self): - pass - -class DescriptorCapture(object): - def __init__(self, f, write_files=[]): - self.f = f - self.fd = f.fileno() - self.write_files = write_files - - def read_in(self, rbuf): - for f in self.write_files: - f.write(rbuf) - f.flush() - - def close_in(self): - log("closed fd %d" % self.fd) - self.f.close() - - @staticmethod - def event_loop(desc, timeout, timeout_call=None): - fd_map = {} - p = select.poll() - - for desc in desc: - fd_map[desc.fd] = desc - p.register(desc.fd, select.POLLIN) - - while len(fd_map) > 0: - events = p.poll(timeout) - if len(events) == 0: - if timeout_call: - timeout_call() - - for fd, ev in events: - rbuf = os.read(fd, 1024) - if len(rbuf) == 0: - fd_map[fd].close_in() - - p.unregister(fd) - del fd_map[fd] - else: - fd_map[fd].read_in(rbuf) - - -def create_fifo(): - prefix = "/tmp" - if os.path.isdir("/tmp/dqm_monitoring"): - prefix = "/tmp/dqm_monitoring" - - base = ".es_monitoring_pid%08d" % os.getpid() - fn = os.path.join(prefix, base) - - if os.path.exists(fn): - os.unlink(fn) - - os.mkfifo(fn, 0600) - if not os.path.exists(fn): - log("Failed to create fifo file: %s" % fn) - sys.exit(-1) - - atexit.register(os.unlink, fn) - return fn - -CURRENT_PROC = [] -def launch_monitoring(args): - fifo = create_fifo() - mon_fd = os.open(fifo, os.O_RDONLY | os.O_NONBLOCK) - - def preexec(): - # this should only be open on a parent - os.close(mon_fd) - - # open fifo once (hack) - # so there is *always* at least one writter - # which closes with the executable - os.open(fifo, os.O_WRONLY) - - try: - # ensure the child dies if we are SIGKILLED - import ctypes - libc = ctypes.CDLL("libc.so.6") - PR_SET_PDEATHSIG = 1 - libc.prctl(PR_SET_PDEATHSIG, signal.SIGKILL) - except: - log("Failed to setup PR_SET_PDEATHSIG.") - pass - - env = os.environ - env["DQMMON_UPDATE_PIPE"] = fifo - - p = subprocess.Popen(args.pargs, preexec_fn=preexec, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - CURRENT_PROC.append(p) - - mon_file = os.fdopen(mon_fd) - s_hist = History() - s_json = JsonInput() - report_sink = ElasticReport(pid=p.pid, cmdline=args.pargs, history=s_hist, json=s_json) - - stdout_cap = DescriptorCapture(p.stdout, write_files=[sys.stdout, s_hist, report_sink, ], ) - stderr_cap = DescriptorCapture(p.stderr, write_files=[sys.stderr, s_hist, report_sink, ], ) - stdmon_cap = DescriptorCapture(mon_file, write_files=[s_json, report_sink, ],) - - fs = [stdout_cap, stderr_cap, stdmon_cap] - try: - DescriptorCapture.event_loop(fs, timeout=1000, timeout_call=report_sink.flush) - except select.error, e: - # we have this on ctrl+c - # just terminate the child - log("Select error (we will terminate): " + str(e)) - p.terminate() - - # at this point the program is dead - r = p.wait() - CURRENT_PROC.remove(p) - - report_sink.update_doc({ "exit_code": r }) - report_sink.make_report() - - return r - -def handle_signal(signum, frame): - for proc in CURRENT_PROC: - proc.send_signal(signum) - -if __name__ == "__main__": - parser = argparse.ArgumentParser(description="Kill/restart the child process if it doesn't out the required string.") - parser.add_argument("-t", type=int, default="2", help="Timeout in seconds.") - parser.add_argument("-s", type=int, default="2000", help="Signal to send.") - parser.add_argument("-r", "--restart", action="store_true", default=False, help="Restart the process after killing it.") - parser.add_argument("pargs", nargs=argparse.REMAINDER) - args = parser.parse_args() - - # do some signal magic - signal.signal(signal.SIGINT, handle_signal) - signal.signal(signal.SIGTERM, handle_signal) - - sys.exit(launch_monitoring(args)) diff --git a/DataFormats/EgammaCandidates/interface/Photon.h b/DataFormats/EgammaCandidates/interface/Photon.h index 7245e97c8bd7c..869739f38736e 100644 --- a/DataFormats/EgammaCandidates/interface/Photon.h +++ b/DataFormats/EgammaCandidates/interface/Photon.h @@ -165,8 +165,6 @@ namespace reco { {} } ; void setShowerShapeVariables ( const ShowerShape& a ) { showerShapeBlock_ = a ;} - void full5x5_setShowerShapeVariables ( const ShowerShape& a ) { full5x5_showerShapeBlock_ = a ;} - /// the total hadronic over electromagnetic fraction float hadronicOverEm() const {return showerShapeBlock_.hcalDepth1OverEcal + showerShapeBlock_.hcalDepth2OverEcal ;} /// the hadronic release in depth1 over electromagnetic fraction @@ -193,18 +191,6 @@ namespace reco { float r1x5 () const {return showerShapeBlock_.e1x5/showerShapeBlock_.e5x5;} float r2x5 () const {return showerShapeBlock_.e2x5/showerShapeBlock_.e5x5;} float r9 () const {return showerShapeBlock_.e3x3/this->superCluster()->rawEnergy();} - - ///full5x5 Shower shape variables - float full5x5_e1x5() const {return full5x5_showerShapeBlock_.e1x5;} - float full5x5_e2x5() const {return full5x5_showerShapeBlock_.e2x5;} - float full5x5_e3x3() const {return full5x5_showerShapeBlock_.e3x3;} - float full5x5_e5x5() const {return full5x5_showerShapeBlock_.e5x5;} - float full5x5_maxEnergyXtal() const {return full5x5_showerShapeBlock_.maxEnergyXtal;} - float full5x5_sigmaEtaEta() const {return full5x5_showerShapeBlock_.sigmaEtaEta;} - float full5x5_sigmaIetaIeta() const {return full5x5_showerShapeBlock_.sigmaIetaIeta;} - float full5x5_r1x5 () const {return full5x5_showerShapeBlock_.e1x5/full5x5_showerShapeBlock_.e5x5;} - float full5x5_r2x5 () const {return full5x5_showerShapeBlock_.e2x5/full5x5_showerShapeBlock_.e5x5;} - float full5x5_r9 () const {return full5x5_showerShapeBlock_.e3x3/this->superCluster()->rawEnergy();} //======================================================= // Energy Determinations @@ -481,7 +467,6 @@ namespace reco { IsolationVariables isolationR04_; IsolationVariables isolationR03_; ShowerShape showerShapeBlock_; - ShowerShape full5x5_showerShapeBlock_; EnergyCorrections eCorrections_; MIPVariables mipVariableBlock_; PflowIsolationVariables pfIsolation_; diff --git a/DataFormats/EgammaCandidates/src/Photon.cc b/DataFormats/EgammaCandidates/src/Photon.cc index c0be91986b457..0932bd8eb287f 100644 --- a/DataFormats/EgammaCandidates/src/Photon.cc +++ b/DataFormats/EgammaCandidates/src/Photon.cc @@ -23,7 +23,6 @@ Photon::Photon( const Photon& rhs ) : isolationR04_ ( rhs.isolationR04_), isolationR03_ ( rhs.isolationR03_), showerShapeBlock_ ( rhs.showerShapeBlock_), - full5x5_showerShapeBlock_ ( rhs.full5x5_showerShapeBlock_), eCorrections_(rhs.eCorrections_), mipVariableBlock_ (rhs.mipVariableBlock_), pfIsolation_ ( rhs.pfIsolation_ ) diff --git a/DataFormats/EgammaCandidates/src/classes_def.xml b/DataFormats/EgammaCandidates/src/classes_def.xml index c2001d06caba0..fbe46ad71580a 100644 --- a/DataFormats/EgammaCandidates/src/classes_def.xml +++ b/DataFormats/EgammaCandidates/src/classes_def.xml @@ -9,9 +9,8 @@ - + - diff --git a/RecoHI/HiCentralityAlgos/interface/CentralityProvider.h b/DataFormats/HeavyIonEvent/interface/CentralityProvider.h similarity index 81% rename from RecoHI/HiCentralityAlgos/interface/CentralityProvider.h rename to DataFormats/HeavyIonEvent/interface/CentralityProvider.h index 27094fdab2d00..c926444f6bff2 100644 --- a/RecoHI/HiCentralityAlgos/interface/CentralityProvider.h +++ b/DataFormats/HeavyIonEvent/interface/CentralityProvider.h @@ -8,16 +8,14 @@ #include "CondFormats/HIObjects/interface/CentralityTable.h" #include "CondFormats/DataRecord/interface/HeavyIonRcd.h" #include "FWCore/Framework/interface/ESHandle.h" -#include "FWCore/Framework/interface/ConsumesCollector.h" class CentralityProvider : public CentralityBins { public: CentralityProvider(const edm::EventSetup& iSetup); - CentralityProvider(const edm::EventSetup& iSetup, edm::ConsumesCollector && iC); ~CentralityProvider(){;} - enum VariableType {HFtowers, HFtowersPlus, HFtowersMinus, HFtowersTrunc, HFtowersPlusTrunc, HFtowersMinusTrunc, HFhits, PixelHits, PixelTracks, Tracks, EB, EE, Missing}; + enum VariableType {HFtowers,HFhits,PixelHits,PixelTracks,Tracks,EB,EE,Missing}; int getNbins() const {return table_.size();} double centralityValue() const; @@ -38,14 +36,13 @@ class CentralityProvider : public CentralityBins { const reco::Centrality* raw() const {return chandle_.product();} private: - edm::EDGetTokenT tag_; + edm::InputTag tag_; std::string centralityVariable_; std::string centralityLabel_; std::string centralityMC_; unsigned int prevRun_; mutable edm::Handle chandle_; VariableType varType_; - unsigned int pPbRunFlip_; }; #endif diff --git a/DataFormats/HeavyIonEvent/interface/VoronoiBackground.h b/DataFormats/HeavyIonEvent/interface/VoronoiBackground.h deleted file mode 100644 index a6185c6c6d3b3..0000000000000 --- a/DataFormats/HeavyIonEvent/interface/VoronoiBackground.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef DataFormats_VoronoiBackground_h -#define DataFormats_VoronoiBackground_h - -#include "DataFormats/Candidate/interface/Candidate.h" -#include "DataFormats/Common/interface/ValueMap.h" - -#include -#include - -namespace reco { class VoronoiBackground { -public: - VoronoiBackground(); - VoronoiBackground(double pt0, double pt1, double mt0, double mt1, double v); - virtual ~VoronoiBackground(); - - double pt() const{ return pt_posteq; } - double pt_equalized() const{ return pt_posteq; } - double pt_subtracted() const{ return pt_preeq; } - - double mt() const{ return mt_posteq; } - double mt_equalized() const{ return mt_posteq; } - double mt_initial() const{ return mt_preeq; } - - double area() const{ return voronoi_area; } - -protected: - - double pt_preeq; - double pt_posteq; - - double mt_preeq; - double mt_posteq; - - double voronoi_area; - -}; - - typedef edm::ValueMap VoronoiMap; - typedef edm::Ref CandidateViewRef; - - -} - -#endif - - diff --git a/RecoHI/HiCentralityAlgos/src/CentralityProvider.cc b/DataFormats/HeavyIonEvent/src/CentralityProvider.cc similarity index 71% rename from RecoHI/HiCentralityAlgos/src/CentralityProvider.cc rename to DataFormats/HeavyIonEvent/src/CentralityProvider.cc index 08cb8b4e2a9fe..6a9146a72dae2 100644 --- a/RecoHI/HiCentralityAlgos/src/CentralityProvider.cc +++ b/DataFormats/HeavyIonEvent/src/CentralityProvider.cc @@ -1,23 +1,15 @@ -#include "RecoHI/HiCentralityAlgos/interface/CentralityProvider.h" +#include "DataFormats/HeavyIonEvent/interface/CentralityProvider.h" -CentralityProvider::CentralityProvider(const edm::EventSetup& iSetup){} - -CentralityProvider::CentralityProvider(const edm::EventSetup& iSetup, edm::ConsumesCollector && iC) : +CentralityProvider::CentralityProvider(const edm::EventSetup& iSetup) : prevRun_(0), varType_(Missing) { const edm::ParameterSet &thepset = edm::getProcessParameterSet(); if(thepset.exists("HeavyIonGlobalParameters")){ edm::ParameterSet hiPset = thepset.getParameter("HeavyIonGlobalParameters"); - tag_ = iC.consumes(hiPset.getParameter("centralitySrc")); + tag_ = hiPset.getParameter("centralitySrc"); centralityVariable_ = hiPset.getParameter("centralityVariable"); - pPbRunFlip_ = hiPset.getUntrackedParameter("pPbRunFlip",99999999); if(centralityVariable_.compare("HFtowers") == 0) varType_ = HFtowers; - if(centralityVariable_.compare("HFtowersPlus") == 0) varType_ = HFtowersPlus; - if(centralityVariable_.compare("HFtowersMinus") == 0) varType_ = HFtowersMinus; - if(centralityVariable_.compare("HFtowersTrunc") == 0) varType_ = HFtowersTrunc; - if(centralityVariable_.compare("HFtowersPlusTrunc") == 0) varType_ = HFtowersPlusTrunc; - if(centralityVariable_.compare("HFtowersMinusTrunc") == 0) varType_ = HFtowersMinusTrunc; if(centralityVariable_.compare("HFhits") == 0) varType_ = HFhits; if(centralityVariable_.compare("PixelHits") == 0) varType_ = PixelHits; if(centralityVariable_.compare("PixelTracks") == 0) varType_ = PixelTracks; @@ -40,15 +32,8 @@ CentralityProvider::CentralityProvider(const edm::EventSetup& iSetup, edm::Consu } void CentralityProvider::newEvent(const edm::Event& ev,const edm::EventSetup& iSetup){ - ev.getByToken(tag_,chandle_); + ev.getByLabel(tag_,chandle_); if(ev.id().run() == prevRun_) return; - if(prevRun_ < pPbRunFlip_ && ev.id().run() >= pPbRunFlip_){ - std::cout<<"Attention, the sides are flipped from this run on!"<EtHFhitSum(); if(varType_ == HFtowers) var = chandle_->EtHFtowerSum(); - if(varType_ == HFtowersPlus) var = chandle_->EtHFtowerSumPlus(); - if(varType_ == HFtowersMinus) var = chandle_->EtHFtowerSumMinus(); - if(varType_ == HFtowersTrunc) var = chandle_->EtHFtruncated(); - if(varType_ == HFtowersPlusTrunc) var = chandle_->EtHFtruncatedPlus(); - if(varType_ == HFtowersMinusTrunc) var = chandle_->EtHFtruncatedMinus(); if(varType_ == PixelHits) var = chandle_->multiplicityPixel(); if(varType_ == PixelTracks) var = chandle_->NpixelTracks(); if(varType_ == Tracks) var = chandle_->Ntracks(); diff --git a/DataFormats/HeavyIonEvent/src/VoronoiBackground.cc b/DataFormats/HeavyIonEvent/src/VoronoiBackground.cc deleted file mode 100644 index c9b67e1ac78b9..0000000000000 --- a/DataFormats/HeavyIonEvent/src/VoronoiBackground.cc +++ /dev/null @@ -1,28 +0,0 @@ -#include "DataFormats/HeavyIonEvent/interface/VoronoiBackground.h" -using namespace reco; - -VoronoiBackground::VoronoiBackground() - : -pt_preeq(0), -pt_posteq(0), -mt_preeq(0), -mt_posteq(0), -voronoi_area(0) -{ -} - -VoronoiBackground::VoronoiBackground(double pt0, double pt1, double mt0, double mt1, double v) - : - pt_preeq(pt0), - pt_posteq(pt1), - mt_preeq(mt0), - mt_posteq(mt1), - voronoi_area(v) -{ -} - -VoronoiBackground::~VoronoiBackground() -{ -} - - diff --git a/DataFormats/HeavyIonEvent/src/classes.h b/DataFormats/HeavyIonEvent/src/classes.h index f7393781df694..8b7e19d0b7ae2 100644 --- a/DataFormats/HeavyIonEvent/src/classes.h +++ b/DataFormats/HeavyIonEvent/src/classes.h @@ -1,8 +1,6 @@ #include "DataFormats/HeavyIonEvent/interface/Centrality.h" #include "DataFormats/HeavyIonEvent/interface/EvtPlane.h" #include "DataFormats/HeavyIonEvent/interface/HeavyIon.h" -#include "DataFormats/HeavyIonEvent/interface/VoronoiBackground.h" - #include "DataFormats/Common/interface/Wrapper.h" namespace DataFormats_HeavyIonEvent { @@ -20,16 +18,6 @@ namespace DataFormats_HeavyIonEvent { reco::EvtPlaneCollection evcol; edm::Wrapper wevcol; - reco::VoronoiBackground vor; - edm::Wrapper wvor; - - reco::VoronoiMap pfvorvmap; - edm::Wrapper pfwvorvmap; - - std::vector vecvor; - edm::Wrapper > vecwvor; - - pat::HeavyIon p_hi; edm::Wrapper w_v_p_hi; }; diff --git a/DataFormats/HeavyIonEvent/src/classes_def.xml b/DataFormats/HeavyIonEvent/src/classes_def.xml index 3339db96c6222..54191c4c69179 100644 --- a/DataFormats/HeavyIonEvent/src/classes_def.xml +++ b/DataFormats/HeavyIonEvent/src/classes_def.xml @@ -15,10 +15,4 @@ - - - - - - diff --git a/DataFormats/TrackReco/interface/TrackBase.h b/DataFormats/TrackReco/interface/TrackBase.h index 4365277368f37..05b0776aab687 100644 --- a/DataFormats/TrackReco/interface/TrackBase.h +++ b/DataFormats/TrackReco/interface/TrackBase.h @@ -95,18 +95,8 @@ class TrackBase /// track algorithm enum TrackAlgorithm { - undefAlgorithm = 0, ctf = 1, rs = 2, cosmics = 3, - initialStep = 4, - lowPtTripletStep = 5, - pixelPairStep = 6, - detachedTripletStep = 7, - mixedTripletStep = 8, - pixelLessStep = 9, - tobTecStep = 10, - jetCoreRegionalStep = 11, - conversionStep = 12, - muonSeededStepInOut = 13, - muonSeededStepOutIn = 14, + undefAlgorithm = 0, ctf = 1, rs = 2, cosmics = 3, iter0 = 4, + iter1 = 5, iter2 = 6, iter3 = 7, iter4 = 8, iter5 = 9, iter6 = 10, iter7 = 11, iter8 = 12, iter9 = 13, iter10 = 14, outInEcalSeededConv = 15, inOutEcalSeededConv = 16, nuclInter = 17, standAloneMuon = 18, globalMuon = 19, cosmicStandAloneMuon = 20, cosmicGlobalMuon = 21, @@ -432,28 +422,28 @@ inline std::string TrackBase::algoName() const return "cosmics"; case beamhalo: return "beamhalo"; - case initialStep: - return "initialStep"; - case lowPtTripletStep: - return "lowPtTripletStep"; - case pixelPairStep: - return "pixelPairStep"; - case detachedTripletStep: - return "detachedTripletStep"; - case mixedTripletStep: - return "mixedTripletStep"; - case pixelLessStep: - return "pixelLessStep"; - case tobTecStep: - return "tobTecStep"; - case jetCoreRegionalStep: - return "jetCoreRegionalStep"; - case conversionStep: - return "conversionStep"; - case muonSeededStepInOut: - return "muonSeededStepInOut"; - case muonSeededStepOutIn: - return "muonSeededStepOutIn"; + case iter0: + return "iter0"; + case iter1: + return "iter1"; + case iter2: + return "iter2"; + case iter3: + return "iter3"; + case iter4: + return "iter4"; + case iter5: + return "iter5"; + case iter6: + return "iter6"; + case iter7: + return "iter7"; + case iter8: + return "iter8"; + case iter9: + return "iter9"; + case iter10: + return "iter10"; case outInEcalSeededConv: return "outInEcalSeededConv"; case inOutEcalSeededConv: diff --git a/DataFormats/TrackReco/src/TrackBase.cc b/DataFormats/TrackReco/src/TrackBase.cc index 44e5fd1d8fe9e..9953756743fd3 100644 --- a/DataFormats/TrackReco/src/TrackBase.cc +++ b/DataFormats/TrackReco/src/TrackBase.cc @@ -11,17 +11,17 @@ std::string const TrackBase::algoNames[] = { "ctf", "rs", "cosmics", - "initialStep", - "lowPtTripletStep", - "pixelPairStep", - "detachedTripletStep", - "mixedTripletStep", - "pixelLessStep", - "tobTecStep", - "jetCoreRegionalStep", - "conversionStep", - "muonSeededStepInOut", - "muonSeededStepOutIn", + "iter0", + "iter1", + "iter2", + "iter3", + "iter4", + "iter5", + "iter6", + "iter7", + "iter8", + "iter9", + "iter10", "outInEcalSeededConv", "inOutEcalSeededConv", "nuclInter", @@ -93,6 +93,7 @@ TrackBase::~TrackBase() ; } + TrackBase::CovarianceMatrix & TrackBase::fill(CovarianceMatrix &v) const { return fillCovariance(v, covariance_); diff --git a/EventFilter/CSCRawToDigi/interface/CSCEventData.h b/EventFilter/CSCRawToDigi/interface/CSCEventData.h index 5e05eb4044d0f..9a8bfc04830d7 100644 --- a/EventFilter/CSCRawToDigi/interface/CSCEventData.h +++ b/EventFilter/CSCRawToDigi/interface/CSCEventData.h @@ -8,7 +8,7 @@ class CSCDMBHeader; class CSCDMBTrailer; class CSCStripDigi; class CSCALCTHeader; -struct CSCALCTHeader2007; +class CSCALCTHeader2007; class CSCAnodeData; class CSCALCTTrailer; class CSCTMBHeader; diff --git a/EventFilter/CSCRawToDigi/interface/CSCTMBHeader.h b/EventFilter/CSCRawToDigi/interface/CSCTMBHeader.h index 8e840effb99d6..422a6c13f1365 100644 --- a/EventFilter/CSCRawToDigi/interface/CSCTMBHeader.h +++ b/EventFilter/CSCRawToDigi/interface/CSCTMBHeader.h @@ -16,9 +16,9 @@ #include #endif class CSCDMBHeader; -struct CSCTMBHeader2006; -struct CSCTMBHeader2007; -struct CSCTMBHeader2013; +class CSCTMBHeader2006; +class CSCTMBHeader2007; +class CSCTMBHeader2013; class CSCTMBHeader { diff --git a/FWCore/Utilities/interface/CRC32Calculator.h b/FWCore/Utilities/interface/CRC32Calculator.h index f185417acb529..3505b1ad1451e 100644 --- a/FWCore/Utilities/interface/CRC32Calculator.h +++ b/FWCore/Utilities/interface/CRC32Calculator.h @@ -53,7 +53,7 @@ from the original code follow below to attribute the source. /* */ /*****************************************************************/ -#include +#include "boost/cstdint.hpp" #include @@ -65,11 +65,11 @@ namespace cms { CRC32Calculator(std::string const& message); - std::uint32_t checksum() { return checksum_; } + boost::uint32_t checksum() { return checksum_; } private: - std::uint32_t checksum_; + boost::uint32_t checksum_; }; } #endif diff --git a/FWCore/Utilities/interface/tinyxml.h b/FWCore/Utilities/interface/tinyxml.h index 9762f0fbab7b0..7308a0bc179ef 100644 --- a/FWCore/Utilities/interface/tinyxml.h +++ b/FWCore/Utilities/interface/tinyxml.h @@ -372,7 +372,7 @@ class TiXmlBase bool ignoreCase, TiXmlEncoding encoding ); - static const char* const errorString[ TIXML_ERROR_STRING_COUNT ]; + static const char* errorString[ TIXML_ERROR_STRING_COUNT ]; TiXmlCursor location; diff --git a/FWCore/Utilities/src/CRC32Calculator.cc b/FWCore/Utilities/src/CRC32Calculator.cc index 25cf00f0aa538..227fb2c704ac5 100644 --- a/FWCore/Utilities/src/CRC32Calculator.cc +++ b/FWCore/Utilities/src/CRC32Calculator.cc @@ -6,10 +6,10 @@ namespace cms { namespace { - const std::uint32_t CRC32_XINIT = 0xFFFFFFFFL; - const std::uint32_t CRC32_XOROT = 0xFFFFFFFFL; + const boost::uint32_t CRC32_XINIT = 0xFFFFFFFFL; + const boost::uint32_t CRC32_XOROT = 0xFFFFFFFFL; - const std::uint32_t crctable[256] = + boost::uint32_t crctable[256] = { 0x00000000L, 0x77073096L, 0xEE0E612CL, 0x990951BAL, 0x076DC419L, 0x706AF48FL, 0xE963A535L, 0x9E6495A3L, @@ -84,9 +84,9 @@ namespace cms { checksum_ = CRC32_XINIT; /* process each byte prior to checksum field */ - auto length = message.length(); + int length = message.length(); char const* p = message.data(); - for (size_t j = 0; j < length; j++) { + for (int j = 0; j < length; j++) { unsigned char uc = *p++; checksum_ = cms::crctable[(checksum_ ^ uc) & 0xFFL] ^ (checksum_ >> 8); } diff --git a/FWCore/Utilities/src/tinyxmlerror.cc b/FWCore/Utilities/src/tinyxmlerror.cc index 4228487b144a9..5da130e783842 100644 --- a/FWCore/Utilities/src/tinyxmlerror.cc +++ b/FWCore/Utilities/src/tinyxmlerror.cc @@ -35,7 +35,7 @@ distribution. // It also cleans up the code a bit. // -const char* const TiXmlBase::errorString[ TIXML_ERROR_STRING_COUNT ] = +const char* TiXmlBase::errorString[ TIXML_ERROR_STRING_COUNT ] = { "No error", "Error", diff --git a/FastSimulation/PileUpProducer/plugins/PileUpProducer.cc b/FastSimulation/PileUpProducer/plugins/PileUpProducer.cc index 647e058c337e0..11463648d069f 100644 --- a/FastSimulation/PileUpProducer/plugins/PileUpProducer.cc +++ b/FastSimulation/PileUpProducer/plugins/PileUpProducer.cc @@ -267,7 +267,7 @@ void PileUpProducer::produce(edm::Event & iEvent, const edm::EventSetup & es) std::vector trueInteractionList; trueInteractionList.push_back(truePUevts); - PileupMixing_ = std::auto_ptr< PileupMixingContent >(new PileupMixingContent(bunchCrossingList,numInteractionList,trueInteractionList,25)); // it shouldn't matter what the assumed bunchspacing is if there is no OOT PU. Add argument for compatibility. + PileupMixing_ = std::auto_ptr< PileupMixingContent >(new PileupMixingContent(bunchCrossingList,numInteractionList,trueInteractionList)); iEvent.put(PileupMixing_); // Get N events from random files diff --git a/FastSimulation/Tracking/plugins/FastTrackMerger.cc b/FastSimulation/Tracking/plugins/FastTrackMerger.cc index a55c2ef77594b..d86bfce5525ef 100644 --- a/FastSimulation/Tracking/plugins/FastTrackMerger.cc +++ b/FastSimulation/Tracking/plugins/FastTrackMerger.cc @@ -104,13 +104,13 @@ FastTrackMerger::produce(edm::Event& e, const edm::EventSetup& es) { // The track algorithm (only of merging after iterative tracking) reco::TrackBase::TrackAlgorithm algo; switch(trackAlgo) { - case 4: algo = reco::TrackBase::initialStep; break; - case 5: algo = reco::TrackBase::lowPtTripletStep; break; - case 6: algo = reco::TrackBase::pixelPairStep; break; - case 7: algo = reco::TrackBase::detachedTripletStep; break; - case 8: algo = reco::TrackBase::mixedTripletStep; break; - case 9: algo = reco::TrackBase::pixelLessStep; break; - case 10: algo = reco::TrackBase::tobTecStep; break; + case 4: algo = reco::TrackBase::iter0; break; + case 5: algo = reco::TrackBase::iter1; break; + case 6: algo = reco::TrackBase::iter2; break; + case 7: algo = reco::TrackBase::iter3; break; + case 8: algo = reco::TrackBase::iter4; break; + case 9: algo = reco::TrackBase::iter5; break; + case 10: algo = reco::TrackBase::iter6; break; default: algo = reco::TrackBase::undefAlgorithm; } diff --git a/FastSimulation/Tracking/python/IterativeDetachedTripletStep_cff.py b/FastSimulation/Tracking/python/IterativeDetachedTripletStep_cff.py index 09d598e9a69cf..a9691d7900bca 100644 --- a/FastSimulation/Tracking/python/IterativeDetachedTripletStep_cff.py +++ b/FastSimulation/Tracking/python/IterativeDetachedTripletStep_cff.py @@ -59,7 +59,7 @@ RemoveTrackProducers = cms.untracked.VInputTag(cms.InputTag("initialStepTracks"), cms.InputTag("lowPtTripletStepTracks"), cms.InputTag("pixelPairStepTracks")), - trackAlgo = cms.untracked.uint32(7), # detachedTripletStep + trackAlgo = cms.untracked.uint32(7), # iter3 MinNumberOfTrajHits = cms.untracked.uint32(3), MaxLostTrajHits = cms.untracked.uint32(1) ) diff --git a/FastSimulation/Tracking/python/IterativeInitialStep_cff.py b/FastSimulation/Tracking/python/IterativeInitialStep_cff.py index a23d1f9778146..9bd9e2728bec7 100644 --- a/FastSimulation/Tracking/python/IterativeInitialStep_cff.py +++ b/FastSimulation/Tracking/python/IterativeInitialStep_cff.py @@ -17,7 +17,7 @@ iterativeInitialSeeds.maxD0 = [1.] iterativeInitialSeeds.maxZ0 = [30.] iterativeInitialSeeds.numberOfHits = [3] -iterativeInitialSeeds.originRadius = [1.0] # note: standard tracking uses 0.03, but this value gives a much better agreement in rate and shape for initialStep +iterativeInitialSeeds.originRadius = [1.0] # note: standard tracking uses 0.03, but this value gives a much better agreement in rate and shape for iter0 iterativeInitialSeeds.originHalfLength = [999] # it was 15.9 iterativeInitialSeeds.originpTMin = [0.6] iterativeInitialSeeds.zVertexConstraint = [-1.0] @@ -52,7 +52,7 @@ initialStepTracks = cms.EDProducer("FastTrackMerger", TrackProducers = cms.VInputTag(cms.InputTag("iterativeInitialTrackCandidates"), cms.InputTag("iterativeInitialTracks")), - trackAlgo = cms.untracked.uint32(4) # initialStep + trackAlgo = cms.untracked.uint32(4) # iter0 ) #vertices diff --git a/FastSimulation/Tracking/python/IterativeLowPtTripletStep_cff.py b/FastSimulation/Tracking/python/IterativeLowPtTripletStep_cff.py index e9cf847c8d9dd..d478eaba2405d 100644 --- a/FastSimulation/Tracking/python/IterativeLowPtTripletStep_cff.py +++ b/FastSimulation/Tracking/python/IterativeLowPtTripletStep_cff.py @@ -55,7 +55,7 @@ TrackProducers = cms.VInputTag(cms.InputTag("iterativeLowPtTripletTrackCandidatesWithTriplets"), cms.InputTag("iterativeLowPtTripletTracksWithTriplets")), RemoveTrackProducers = cms.untracked.VInputTag(cms.InputTag("initialStep")), - trackAlgo = cms.untracked.uint32(5), # lowPtTripletStep + trackAlgo = cms.untracked.uint32(5), # iter1 MinNumberOfTrajHits = cms.untracked.uint32(3), MaxLostTrajHits = cms.untracked.uint32(1) ) diff --git a/FastSimulation/Tracking/python/IterativePixelPairStep_cff.py b/FastSimulation/Tracking/python/IterativePixelPairStep_cff.py index a56a9e496d2a1..97dc404449108 100644 --- a/FastSimulation/Tracking/python/IterativePixelPairStep_cff.py +++ b/FastSimulation/Tracking/python/IterativePixelPairStep_cff.py @@ -57,7 +57,7 @@ cms.InputTag("iterativePixelPairTracks")), RemoveTrackProducers = cms.untracked.VInputTag(cms.InputTag("initialStepTracks"), cms.InputTag("lowPtTripletStepTracks")), - trackAlgo = cms.untracked.uint32(6), # pixelPairStep + trackAlgo = cms.untracked.uint32(6), # iter2 MinNumberOfTrajHits = cms.untracked.uint32(3), MaxLostTrajHits = cms.untracked.uint32(1) ) diff --git a/FastSimulation/Tracking/python/IterativeTobTecStep_cff.py b/FastSimulation/Tracking/python/IterativeTobTecStep_cff.py index de22ac7858401..5b1a80e73c1ad 100644 --- a/FastSimulation/Tracking/python/IterativeTobTecStep_cff.py +++ b/FastSimulation/Tracking/python/IterativeTobTecStep_cff.py @@ -71,7 +71,7 @@ cms.InputTag("detachedTripletStepTracks"), cms.InputTag("mixedTripletStepTracks"), cms.InputTag("pixelLessStepTracks")), - trackAlgo = cms.untracked.uint32(10), # tobTecStep + trackAlgo = cms.untracked.uint32(10), # iter6 MinNumberOfTrajHits = cms.untracked.uint32(6), # was 4 MaxLostTrajHits = cms.untracked.uint32(0) ) diff --git a/FastSimulation/Tracking/python/MuonSeededStep_cff.py b/FastSimulation/Tracking/python/MuonSeededStep_cff.py index e5be6c670d8f6..e03a8b8503fa9 100644 --- a/FastSimulation/Tracking/python/MuonSeededStep_cff.py +++ b/FastSimulation/Tracking/python/MuonSeededStep_cff.py @@ -45,7 +45,7 @@ cms.InputTag("mixedTripletStepTracks"), cms.InputTag("pixelLessStepTracks"), cms.InputTag("tobTecStepTracks")), - trackAlgo = cms.untracked.uint32(13), # muonSeededStepInOut + trackAlgo = cms.untracked.uint32(13), # iter9 MinNumberOfTrajHits = cms.untracked.uint32(5), # placeholder; how much should it be? MaxLostTrajHits = cms.untracked.uint32(8) # placeholder; how much should it be? ) @@ -59,7 +59,7 @@ cms.InputTag("mixedTripletStepTracks"), cms.InputTag("pixelLessStepTracks"), cms.InputTag("tobTecStepTracks")), - trackAlgo = cms.untracked.uint32(14), # muonSeededStepOutIn + trackAlgo = cms.untracked.uint32(14), # iter10 MinNumberOfTrajHits = cms.untracked.uint32(5), # placeholder; how much should it be? MaxLostTrajHits = cms.untracked.uint32(8) # placeholder; how much should it be? ) diff --git a/FastSimulation/Validation/test/trackingPerformanceValidation.py b/FastSimulation/Validation/test/trackingPerformanceValidation.py index 530d03b62e3bf..53fea45d486b5 100755 --- a/FastSimulation/Validation/test/trackingPerformanceValidation.py +++ b/FastSimulation/Validation/test/trackingPerformanceValidation.py @@ -49,8 +49,8 @@ # track algorithm name and quality. Can be a list. -#Algos= ['ootb', 'initialStep', 'lowPtTripletStep'] -Algos= ['ootb', 'initialStep', 'lowPtTripletStep','pixelPairStep','detachedTripletStep','mixedTripletStep','pixelLessStep'] +#Algos= ['ootb', 'iter0', 'iter1'] +Algos= ['ootb', 'iter0', 'iter1','iter2','iter3','iter4','iter5'] #Qualities=[''] Qualities=['', 'highPurity'] @@ -144,9 +144,9 @@ def do_validation(samples, GlobalTag, trackquality, trackalgorithm): global Sequence, RefSelection, RefRepository, NewSelection, NewRepository, defaultNevents, Events, castorHarvestedFilesDirectory global cfg, macro, Tracksname print 'Tag: ' + GlobalTag - tracks_map = { 'ootb':'general_AssociatorByHitsRecoDenom','initialStep':'cutsRecoZero_AssociatorByHitsRecoDenom','lowPtTripletStep':'cutsRecoFirst_AssociatorByHitsRecoDenom','pixelPairStep':'cutsRecoSecond_AssociatorByHitsRecoDenom','detachedTripletStep':'cutsRecoThird_AssociatorByHitsRecoDenom','mixedTripletStep':'cutsRecoFourth_AssociatorByHitsRecoDenom','pixelLessStep':'cutsRecoFifth_AssociatorByHitsRecoDenom'} - tracks_map_hp = { 'ootb':'cutsRecoHp_AssociatorByHitsRecoDenom','initialStep':'cutsRecoZeroHp_AssociatorByHitsRecoDenom','lowPtTripletStep':'cutsRecoFirstHp_AssociatorByHitsRecoDenom','pixelPairStep':'cutsRecoSecondHp_AssociatorByHitsRecoDenom','detachedTripletStep':'cutsRecoThirdHp_AssociatorByHitsRecoDenom','mixedTripletStep':'cutsRecoFourthHp_AssociatorByHitsRecoDenom','pixelLessStep':'cutsRecoFifthHp_AssociatorByHitsRecoDenom'} - if(trackalgorithm=='initialStep' or trackalgorithm=='ootb'): + tracks_map = { 'ootb':'general_AssociatorByHitsRecoDenom','iter0':'cutsRecoZero_AssociatorByHitsRecoDenom','iter1':'cutsRecoFirst_AssociatorByHitsRecoDenom','iter2':'cutsRecoSecond_AssociatorByHitsRecoDenom','iter3':'cutsRecoThird_AssociatorByHitsRecoDenom','iter4':'cutsRecoFourth_AssociatorByHitsRecoDenom','iter5':'cutsRecoFifth_AssociatorByHitsRecoDenom'} + tracks_map_hp = { 'ootb':'cutsRecoHp_AssociatorByHitsRecoDenom','iter0':'cutsRecoZeroHp_AssociatorByHitsRecoDenom','iter1':'cutsRecoFirstHp_AssociatorByHitsRecoDenom','iter2':'cutsRecoSecondHp_AssociatorByHitsRecoDenom','iter3':'cutsRecoThirdHp_AssociatorByHitsRecoDenom','iter4':'cutsRecoFourthHp_AssociatorByHitsRecoDenom','iter5':'cutsRecoFifthHp_AssociatorByHitsRecoDenom'} + if(trackalgorithm=='iter0' or trackalgorithm=='ootb'): mineff='0.80' maxeff='1.01' maxfake='0.7' diff --git a/GeneratorInterface/Core/interface/GenXSecAnalyzer.h b/GeneratorInterface/Core/interface/GenXSecAnalyzer.h index 2e75703f75721..be04f680f5559 100644 --- a/GeneratorInterface/Core/interface/GenXSecAnalyzer.h +++ b/GeneratorInterface/Core/interface/GenXSecAnalyzer.h @@ -48,25 +48,12 @@ class GenXSecAnalyzer : public edm::one::EDAnalyzer genFilterInfoToken_; edm::EDGetTokenT genLumiInfoToken_; - // ----------member data -------------------------- - int hepidwtup_; - unsigned int theProcesses_size; - // final cross sections GenLumiInfoProduct::XSec xsec_; - // statistics from additional generator filter - GenFilterInfo filterOnlyEffStat_; - // statistics for event level efficiency, the size is the number of processes + 1 - std::vector eventEffStat_; - // statistics from jet matching, the size is the number of processes + 1 - std::vector jetMatchEffStat_; - // uncertainty-averaged cross sections before matching, the size is the number of processes + 1 - std::vector xsecBeforeMatching_; - // uncertainty-averaged cross sections after matching, the size is the number of processes + 1 - std::vector xsecAfterMatching_; - // the size depends on the number of MC with different LHE information - std::vector products_; - + GenFilterInfo jetMatchEffStat_; + GenFilterInfo totalEffStat_; // statistics from total filter + // ----------member data --------------------------- + std::vector products_; // the size depends on the number of MC with different LHE information }; #endif diff --git a/GeneratorInterface/Core/plugins/GenXSecAnalyzer.cc b/GeneratorInterface/Core/plugins/GenXSecAnalyzer.cc index 51de9d111b200..791de6df80023 100644 --- a/GeneratorInterface/Core/plugins/GenXSecAnalyzer.cc +++ b/GeneratorInterface/Core/plugins/GenXSecAnalyzer.cc @@ -5,15 +5,12 @@ GenXSecAnalyzer::GenXSecAnalyzer(const edm::ParameterSet& iConfig): hepidwtup_(-1), - theProcesses_size(0), xsec_(0,0), - filterOnlyEffStat_(0,0,0,0,0.,0.,0.,0.) + jetMatchEffStat_(0,0,0,0,0.,0.,0.,0.), + totalEffStat_(0,0,0,0,0.,0.,0.,0.) { - eventEffStat_.clear(); - jetMatchEffStat_.clear(); - xsecBeforeMatching_.clear(); - xsecAfterMatching_.clear(); products_.clear(); + genFilterInfoToken_ = consumes(edm::InputTag("genFilterEfficiencyProducer","")); genLumiInfoToken_ = consumes(edm::InputTag("generator","")); } @@ -24,10 +21,6 @@ GenXSecAnalyzer::~GenXSecAnalyzer() void GenXSecAnalyzer::beginJob() { - eventEffStat_.clear(); - jetMatchEffStat_.clear(); - xsecBeforeMatching_.clear(); - xsecAfterMatching_.clear(); products_.clear(); } @@ -43,20 +36,21 @@ GenXSecAnalyzer::beginLuminosityBlock(edm::LuminosityBlock const& iLumi, edm::Ev void GenXSecAnalyzer::endLuminosityBlock(edm::LuminosityBlock const& iLumi, edm::EventSetup const&) { - // add up information of GenFilterInfo from different luminosity blocks + edm::Handle genFilter; iLumi.getByToken(genFilterInfoToken_,genFilter); if(genFilter.isValid()) - filterOnlyEffStat_.mergeProduct(*genFilter); + totalEffStat_.mergeProduct(*genFilter); + edm::Handle genLumiInfo; iLumi.getByToken(genLumiInfoToken_,genLumiInfo); if (!genLumiInfo.isValid()) return; - + hepidwtup_ = genLumiInfo->getHEPIDWTUP(); std::vector theProcesses = genLumiInfo->getProcessInfos(); - theProcesses_size = theProcesses.size(); + unsigned int theProcesses_size = theProcesses.size(); // if it's a pure parton-shower generator, check there should be only one element in thisProcessInfos // the error of lheXSec is -1 if(hepidwtup_== -1) @@ -71,6 +65,27 @@ GenXSecAnalyzer::endLuminosityBlock(edm::LuminosityBlock const& iLumi, edm::Even } } + // doing generic summing + for(unsigned int ip=0; ip < theProcesses_size; ip++) + { + GenLumiInfoProduct::FinalStat temp_killed = theProcesses[ip].killed(); + GenLumiInfoProduct::FinalStat temp_selected = theProcesses[ip].selected(); + double passw = temp_killed.sum(); + double passw2 = temp_killed.sum2(); + double totalw = temp_selected.sum(); + double totalw2 = temp_selected.sum2(); + jetMatchEffStat_.mergeProduct(GenFilterInfo( + theProcesses[ip].nPassPos(), + theProcesses[ip].nPassNeg(), + theProcesses[ip].nTotalPos(), + theProcesses[ip].nTotalNeg(), + passw, + passw2, + totalw, + totalw2) + ); + + } // now determine if this LuminosityBlock has the same lheXSec as existing products bool sameMC = false; for(unsigned int i=0; i < products_.size(); i++){ @@ -86,92 +101,8 @@ GenXSecAnalyzer::endLuminosityBlock(edm::LuminosityBlock const& iLumi, edm::Even } if(!sameMC) - products_.push_back(*genLumiInfo); - - - // initialize jetMatchEffStat with nprocess+1 elements - if(jetMatchEffStat_.size()==0){ - - for(unsigned int ip=0; ip < theProcesses_size; ip++) - { - jetMatchEffStat_.push_back(GenFilterInfo(0,0,0,0,0.,0.,0.,0.)); - } - jetMatchEffStat_.push_back(GenFilterInfo(0,0,0,0,0.,0.,0.,0.)); - } - - // initialize event-level statistics with nprocess+1 elements - if(eventEffStat_.size()==0){ - - for(unsigned int ip=0; ip < theProcesses_size; ip++) - { - eventEffStat_.push_back(GenFilterInfo(0,0,0,0,0.,0.,0.,0.)); - } - eventEffStat_.push_back(GenFilterInfo(0,0,0,0,0.,0.,0.,0.)); - } - - // doing generic summing for jet matching statistics - for(unsigned int ip=0; ip < theProcesses_size; ip++) - { - GenLumiInfoProduct::FinalStat temp_killed = theProcesses[ip].killed(); - GenLumiInfoProduct::FinalStat temp_selected = theProcesses[ip].selected(); - double passw = temp_killed.sum(); - double passw2 = temp_killed.sum2(); - double totalw = temp_selected.sum(); - double totalw2 = temp_selected.sum2(); - // matching statistics for each process - jetMatchEffStat_[ip].mergeProduct(GenFilterInfo( - theProcesses[ip].nPassPos(), - theProcesses[ip].nPassNeg(), - theProcesses[ip].nTotalPos(), - theProcesses[ip].nTotalNeg(), - passw, - passw2, - totalw, - totalw2) - ); - // matching statistics for all processes - jetMatchEffStat_[theProcesses_size].mergeProduct(GenFilterInfo( - theProcesses[ip].nPassPos(), - theProcesses[ip].nPassNeg(), - theProcesses[ip].nTotalPos(), - theProcesses[ip].nTotalNeg(), - passw, - passw2, - totalw, - totalw2) - ); - - - - // event-level statistics for each process - eventEffStat_[ip].mergeProduct(GenFilterInfo( - theProcesses[ip].nPassPos()+theProcesses[ip].nPassNeg(), - 0, - theProcesses[ip].nTotalPos()+theProcesses[ip].nTotalNeg(), - 0, - theProcesses[ip].nPassPos()+theProcesses[ip].nPassNeg(), - theProcesses[ip].nPassPos()+theProcesses[ip].nPassNeg(), - theProcesses[ip].nTotalPos()+theProcesses[ip].nTotalNeg(), - theProcesses[ip].nTotalPos()+theProcesses[ip].nTotalNeg()) - ); - // event-level statistics for all processes - eventEffStat_[theProcesses_size].mergeProduct(GenFilterInfo( - theProcesses[ip].nPassPos()+theProcesses[ip].nPassNeg(), - 0, - theProcesses[ip].nTotalPos()+theProcesses[ip].nTotalNeg(), - 0, - theProcesses[ip].nPassPos()+theProcesses[ip].nPassNeg(), - theProcesses[ip].nPassPos()+theProcesses[ip].nPassNeg(), - theProcesses[ip].nTotalPos()+theProcesses[ip].nTotalNeg(), - theProcesses[ip].nTotalPos()+theProcesses[ip].nTotalNeg()) - ); - - - } - - + products_.push_back(*genLumiInfo); return; - } void @@ -187,56 +118,42 @@ GenXSecAnalyzer::compute() GenLumiInfoProduct::ProcessInfo proc = products_[i].getProcessInfos()[0]; double hepxsec_value = proc.lheXSec().value(); + sigSum += proc.tried().sum() * hepxsec_value; totalN += proc.tried().sum(); } - // average over number of events since the cross sections have no errors double sigAve = totalN>1e-6? sigSum/totalN: 0; - xsecBeforeMatching_.push_back(GenLumiInfoProduct::XSec(sigAve,-1)); - xsecAfterMatching_.push_back(GenLumiInfoProduct::XSec(sigAve,-1)); + xsec_ = GenLumiInfoProduct::XSec(sigAve,-1); } // for ME+parton shower MC else{ - const unsigned int sizeOfInfos= theProcesses_size+1; - // for computing cross sectiona before matching - double sum_numerator_before[sizeOfInfos]; - double sum_denominator_before[sizeOfInfos]; - - // for computing cross sectiona after matching - double sum_numerator_after[sizeOfInfos]; - double sum_denominator_after[sizeOfInfos]; - - // initialize every element with zero - for(unsigned int i=0; i < sizeOfInfos; i++) - { - sum_numerator_before[i]=0; - sum_denominator_before[i]=0; - sum_numerator_after[i]=0; - sum_denominator_after[i]=0; - } + double sum_numerator = 0; + double sum_denominator = 0; - // loop over different MC samples for(unsigned int i=0; i < products_.size(); i++){ - // sum of cross sections and errors over different processes double sigSelSum = 0.0; - double errSel2Sum = 0.0; double sigSum = 0.0; + double sigBrSum = 0.0; double err2Sum = 0.0; + double errBr2Sum = 0.0; - // loop over different processes for each sample unsigned int vectorSize = products_[i].getProcessInfos().size(); for(unsigned int ip=0; ip < vectorSize; ip++){ GenLumiInfoProduct::ProcessInfo proc = products_[i].getProcessInfos()[ip]; double hepxsec_value = proc.lheXSec().value(); double hepxsec_error = proc.lheXSec().error(); - // skips computation if jet matching efficiency=0 - if (proc.killed().n()<1) + if (!proc.killed().n()) continue; - // computing jet matching efficiency for this process + double sigma2Sum, sigma2Err; + sigma2Sum = hepxsec_value * hepxsec_value; + sigma2Err = hepxsec_error * hepxsec_error; + + double sigmaAvg = hepxsec_value; + double fracAcc = 0; double ntotal = proc.nTotalPos()-proc.nTotalNeg(); double npass = proc.nPassPos() -proc.nPassNeg(); @@ -251,99 +168,76 @@ GenXSecAnalyzer::compute() if(fracAcc<1e-6)continue; - // cross section after matching for this particular process - double sigmaFin = hepxsec_value * fracAcc; + double fracBr = proc.accepted().sum() > 0.0 ? + proc.acceptedBr().sum() / proc.accepted().sum() : 1; + double sigmaFin = sigmaAvg * fracAcc * fracBr; + double sigmaFinBr = sigmaFin * fracBr; - // computing error on jet matching efficiency double relErr = 1.0; - double efferr2=0; - switch(hepidwtup_) { - case 3: case -3: - { - double ntotal_pos = proc.nTotalPos(); - double effp = ntotal_pos > 1e-6? - (double)proc.nPassPos()/ntotal_pos:0; - double effp_err2 = ntotal_pos > 1e-6? - (1-effp)*effp/ntotal_pos: 0; - - double ntotal_neg = proc.nTotalNeg(); - double effn = ntotal_neg > 1e-6? - (double)proc.nPassNeg()/ntotal_neg:0; - double effn_err2 = ntotal_neg > 1e-6? - (1-effn)*effn/ntotal_neg: 0; - - efferr2 = ntotal > 0 ? - (ntotal_pos*ntotal_pos*effp_err2 + - ntotal_neg*ntotal_neg*effn_err2)/ntotal/ntotal:0; - break; - } - default: - { - double denominator = pow(proc.selected().sum(),4); - double passw = proc.killed().sum(); - double passw2 = proc.killed().sum2(); - double failw = proc.selected().sum() - passw; - double failw2 = proc.selected().sum2() - passw2; - double numerator = (passw2*failw*failw + failw2*passw*passw); + if (proc.killed().n() > 1) { + double efferr2=0; + switch(hepidwtup_) { + case 3: case -3: + { + double ntotal_pos = proc.nTotalPos(); + double effp = ntotal_pos > 1e-6? + (double)proc.nPassPos()/ntotal_pos:0; + double effp_err2 = ntotal_pos > 1e-6? + (1-effp)*effp/ntotal_pos: 0; + + double ntotal_neg = proc.nTotalNeg(); + double effn = ntotal_neg > 1e-6? + (double)proc.nPassNeg()/ntotal_neg:0; + double effn_err2 = ntotal_neg > 1e-6? + (1-effn)*effn/ntotal_neg: 0; + + efferr2 = ntotal > 0 ? + (ntotal_pos*ntotal_pos*effp_err2 + + ntotal_neg*ntotal_neg*effn_err2)/ntotal/ntotal:0; + break; + } + default: + { + double denominator = pow(proc.selected().sum(),4); + double passw = proc.killed().sum(); + double passw2 = proc.killed().sum2(); + double failw = proc.selected().sum() - passw; + double failw2 = proc.selected().sum2() - passw2; + double numerator = (passw2*failw*failw + failw2*passw*passw); - efferr2 = denominator>1e-6? - numerator/denominator:0; - break; + efferr2 = denominator>1e-6? + numerator/denominator:0; + break; + } } + double delta2Veto = efferr2/fracAcc/fracAcc; + double delta2Sum = delta2Veto + + sigma2Err / sigma2Sum; + relErr = (delta2Sum > 0.0 ? + std::sqrt(delta2Sum) : 0.0); } - double delta2Veto = efferr2/fracAcc/fracAcc; - - // computing total error on cross section after matching efficiency - - double sigma2Sum, sigma2Err; - sigma2Sum = hepxsec_value * hepxsec_value; - sigma2Err = hepxsec_error * hepxsec_error; - - // sum of cross sections before matching and errors over different samples for each process - sum_denominator_before[ip] += (sigma2Err > 0)? 1/sigma2Err: 0; - sum_numerator_before[ip] += (sigma2Err > 0)? hepxsec_value/sigma2Err: 0; - - - double delta2Sum = delta2Veto - + sigma2Err / sigma2Sum; - relErr = (delta2Sum > 0.0 ? - std::sqrt(delta2Sum) : 0.0); double deltaFin = sigmaFin * relErr; + double deltaFinBr = sigmaFinBr * relErr; - // sum of cross sections and errors over different processes - sigSelSum += hepxsec_value; - errSel2Sum += sigma2Err; + sigSelSum += sigmaAvg; sigSum += sigmaFin; + sigBrSum += sigmaFinBr; err2Sum += deltaFin * deltaFin; - - // sum of cross sections after matching and errors over different samples for each process - sum_denominator_after[ip] += (deltaFin > 0)? 1/(deltaFin * deltaFin): 0; - sum_numerator_after[ip] += (deltaFin > 0)? sigmaFin/(deltaFin * deltaFin): 0; + errBr2Sum += deltaFinBr * deltaFinBr; - } // end of loop over different processes - sum_denominator_before[sizeOfInfos-1] += (errSel2Sum> 0)? 1/errSel2Sum: 0; - sum_numerator_before[sizeOfInfos-1] += (errSel2Sum> 0)? sigSelSum/errSel2Sum: 0; + } // end of loop over different processes - sum_denominator_after[sizeOfInfos-1] += (err2Sum>0)? 1/err2Sum: 0; - sum_numerator_after[sizeOfInfos-1] += (err2Sum>0)? sigSum/err2Sum: 0; + double dN = std::sqrt(errBr2Sum); + sum_denominator += (dN> 1e-6)? 1/dN/dN: 0; + sum_numerator += (dN> 1e-6)? sigBrSum/dN/dN: 0; } // end of loop over different samples - - - for(unsigned int i=0; i0) ? (sum_numerator_before[i]/sum_denominator_before[i]):0; - double final_error = (sum_denominator_before[i]>0) ? (1/sqrt(sum_denominator_before[i])):-1; - xsecBeforeMatching_.push_back(GenLumiInfoProduct::XSec(final_value, final_error)); - - double final_value2 = (sum_denominator_after[i]>0) ? (sum_numerator_after[i]/sum_denominator_after[i]):0; - double final_error2 = (sum_denominator_after[i]>0) ? 1/sqrt(sum_denominator_after[i]):-1; - xsecAfterMatching_.push_back(GenLumiInfoProduct::XSec(final_value2, final_error2)); - } - + double final_value = sum_denominator > 0? sum_numerator/sum_denominator : 0; + double final_error = sum_denominator > 0? 1/sqrt(sum_denominator) : -1; + xsec_ = GenLumiInfoProduct::XSec(final_value, final_error); } return; } @@ -367,114 +261,36 @@ GenXSecAnalyzer::endJob() { compute(); + double filterOnly_eff = totalEffStat_.filterEfficiency(hepidwtup_); + double filterOnly_err = totalEffStat_.filterEfficiencyError(hepidwtup_); + + double jetmatching_eff_total = jetMatchEffStat_.filterEfficiency(hepidwtup_); + double jetmatching_err_total = jetMatchEffStat_.filterEfficiencyError(hepidwtup_); - edm::LogPrint("GenXSecAnalyzer") - << "-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- \n" - << "Overall cross-section summary:" << "\n" - << "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------"; - edm::LogPrint("GenXSecAnalyzer") - << "Process\t\txsec_before [pb]\t\tpassed\tnposw\tnnegw\ttried\tnposw\tnnegw \txsec_match [pb]\t\t\taccepted [%]\t event_eff [%]"; - - const int sizeOfInfos= theProcesses_size+1; - const int last = sizeOfInfos-1; - std::string title[sizeOfInfos]; - - for(int i=0; i < sizeOfInfos; i++){ - - double jetmatch_eff=0; - double jetmatch_err=0; - - if(i==last) - { - title[i] = "Total"; - - edm::LogPrint("GenXSecAnalyzer") - << "-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- "; - jetmatch_eff = xsecBeforeMatching_[i].value()>0? xsecAfterMatching_[i].value()/xsecBeforeMatching_[i].value(): 0; - jetmatch_err = (xsecBeforeMatching_[i].value()>0 && xsecAfterMatching_[i].value()>0 && - pow(xsecAfterMatching_[i].error()/xsecAfterMatching_[i].value(),2)>pow(xsecBeforeMatching_[i].error()/xsecBeforeMatching_[i].value(),2) - )? jetmatch_eff*sqrt(pow(xsecAfterMatching_[i].error()/xsecAfterMatching_[i].value(),2)- - pow(xsecBeforeMatching_[i].error()/xsecBeforeMatching_[i].value(),2)):-1; - } - else - { - title[i] = Form("%d",i); - jetmatch_eff = jetMatchEffStat_[i].filterEfficiency(hepidwtup_); - jetmatch_err = jetMatchEffStat_[i].filterEfficiencyError(hepidwtup_); - } - - - edm::LogPrint("GenXSecAnalyzer") - << title[i] << "\t\t" - << std::scientific << std::setprecision(3) - << xsecBeforeMatching_[i].value() << " +/- " - << xsecBeforeMatching_[i].error() << "\t\t" - << eventEffStat_[i].numEventsPassed() << "\t" - << jetMatchEffStat_[i].numPassPositiveEvents() << "\t" - << jetMatchEffStat_[i].numPassNegativeEvents() << "\t" - << eventEffStat_[i].numEventsTotal() << "\t" - << jetMatchEffStat_[i].numTotalPositiveEvents() << "\t" - << jetMatchEffStat_[i].numTotalNegativeEvents() << "\t" - << std::scientific << std::setprecision(3) - << xsecAfterMatching_[i].value() << " +/- " - << xsecAfterMatching_[i].error() << "\t\t" - << std::fixed << std::setprecision(1) - << (jetmatch_eff*100) << " +/- " << (jetmatch_err*100) << "\t" - << std::fixed << std::setprecision(1) - << (eventEffStat_[i].filterEfficiency(+3) * 100) << " +/- " << ( eventEffStat_[i].filterEfficiencyError(+3) * 100); + edm::LogPrint("GenXSecAnalyzer") << "------------------------------------" << "\n" + << "Overall cross-section summary:" << "\n" + << "------------------------------------"; + + edm::LogPrint("GenXSecAnalyzer") << "jet matching efficiency = " << + jetMatchEffStat_.sumPassWeights() << "/" << + jetMatchEffStat_.sumWeights() << " = " + << std::setprecision(6) << jetmatching_eff_total << " +- " << jetmatching_err_total << "\n"; + edm::LogPrint("GenXSecAnalyzer") << "Before filter: cross section = " << std::setprecision(6) << xsec_.value() << " +- " << std::setprecision(6) << xsec_.error() << " pb"; - } + edm::LogPrint("GenXSecAnalyzer") << "Filter efficiency = " << std::setprecision(6) + << filterOnly_eff << " +- " << filterOnly_err; - edm::LogPrint("GenXSecAnalyzer") - << "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------"; - edm::LogPrint("GenXSecAnalyzer") - << "Before matching: total cross section = " - << std::scientific << std::setprecision(3) - << xsecBeforeMatching_[last].value() << " +- " << xsecBeforeMatching_[last].error() << " pb"; - - double xsec_match = xsecAfterMatching_[last].value(); - double error_match = xsecAfterMatching_[last].error(); - - edm::LogPrint("GenXSecAnalyzer") - << "After matching: total cross section = " - << std::scientific << std::setprecision(3) - << xsec_match << " +- " << error_match << " pb"; - - double filterOnly_eff = filterOnlyEffStat_.filterEfficiency(hepidwtup_); - double filterOnly_err = filterOnlyEffStat_.filterEfficiencyError(hepidwtup_); - - edm::LogPrint("GenXSecAnalyzer") - << "Filter efficiency (taking into account weights)= " - << "(" << filterOnlyEffStat_.sumPassWeights() << ")" - << " / " - << "(" << filterOnlyEffStat_.sumWeights() << ")" - << " = " - << std::scientific << std::setprecision(3) - << filterOnly_eff << " +- " << filterOnly_err; - - double filterOnly_event_total = filterOnlyEffStat_.numTotalPositiveEvents() + filterOnlyEffStat_.numTotalNegativeEvents(); - double filterOnly_event_eff = filterOnly_event_total > 0 ? - (filterOnlyEffStat_.numPassPositiveEvents() + filterOnlyEffStat_.numPassNegativeEvents())/filterOnly_event_total : 0; - double filterOnly_event_err = sqrt((1-filterOnly_event_eff)*filterOnly_event_eff/filterOnly_event_total); - edm::LogPrint("GenXSecAnalyzer") - << "Filter efficiency (event-level)= " - << std::scientific << std::setprecision(3) - << filterOnly_event_eff << " +- " << filterOnly_event_err; - - - double xsec_final = xsec_match*filterOnly_eff ; - double error_final = xsec_final*sqrt(error_match*error_match/xsec_match/xsec_match+ - filterOnly_err*filterOnly_err/filterOnly_eff/filterOnly_eff); - - edm::LogPrint("GenXSecAnalyzer") - << "After filter: final cross section = " - << std::scientific << std::setprecision(3) - << xsec_final << " +- " << error_final << " pb"; - - xsec_ = GenLumiInfoProduct::XSec(xsec_final,error_final); + double xsec_after = xsec_.value()*filterOnly_eff ; + double error_after = xsec_after*sqrt(xsec_.error()*xsec_.error()/xsec_.value()/xsec_.value()+ + filterOnly_err*filterOnly_err/filterOnly_eff/filterOnly_eff); + edm::LogPrint("GenXSecAnalyzer") << "After filter: cross section = " + << std::setprecision(6) << xsec_after + << " +- " + << std::setprecision(6) << error_after + << " pb"; } diff --git a/GeneratorInterface/LHEInterface/src/LHERunInfo.cc b/GeneratorInterface/LHEInterface/src/LHERunInfo.cc index 40284808843d5..897848dc67434 100644 --- a/GeneratorInterface/LHEInterface/src/LHERunInfo.cc +++ b/GeneratorInterface/LHEInterface/src/LHERunInfo.cc @@ -300,22 +300,16 @@ void LHERunInfo::statistics() const double sigSelSum = 0.0; double sigSum = 0.0; double sigBrSum = 0.0; - double errSel2Sum = 0.0; double err2Sum = 0.0; double errBr2Sum = 0.0; - double errMatch2Sum = 0.0; unsigned long nAccepted = 0; unsigned long nTried = 0; - unsigned long nAccepted_pos = 0; - unsigned long nTried_pos = 0; - unsigned long nAccepted_neg = 0; - unsigned long nTried_neg = 0; int idwtup = std::abs(heprup.IDWTUP); std::cout << std::endl; std::cout << "Process and cross-section statistics" << std::endl; std::cout << "------------------------------------" << std::endl; - std::cout << "Process\t\txsec_before [pb]\t\tpassed\tnposw\tnnegw\ttried\tnposw\tnnegw \txsec_match [pb]\t\t\taccepted [%]\t event_eff [%]" + std::cout << "Process\tevents\ttried\txsec [pb]\t\taccepted [%]" << std::endl; for(std::vector::const_iterator proc = processes.begin(); @@ -354,10 +348,8 @@ void LHERunInfo::statistics() const double sigmaFinBr = sigmaFin * fracBr; double relErr = 1.0; - double relAccErr = 1.0; - double efferr2=0; - if (proc->killed().n() > 1) { + double efferr2=0; switch(idwtup) { case 3: case -3: { @@ -397,71 +389,36 @@ void LHERunInfo::statistics() const + sigma2Err / sigma2Sum; relErr = (delta2Sum > 0.0 ? std::sqrt(delta2Sum) : 0.0); - relAccErr = (delta2Veto > 0.0 ? - std::sqrt(delta2Veto) : 0.0); } double deltaFin = sigmaFin * relErr; double deltaFinBr = sigmaFinBr * relErr; - - double ntotal_proc = proc->nTotalPos()+proc->nTotalNeg(); - double event_eff_proc = ntotal_proc>1e-6? (double)(proc->nPassPos()+ proc->nPassNeg())/ntotal_proc: -1; - double event_eff_err_proc = ntotal_proc>1e-6? std::sqrt((1-event_eff_proc)*event_eff_proc/ntotal_proc): -1; - - std::cout << proc->process() << "\t\t" - << std::scientific << std::setprecision(3) - << heprup.XSECUP[proc->heprupIndex()] << " +/- " - << heprup.XERRUP[proc->heprupIndex()] << "\t\t" + + std::cout << proc->process() << "\t" << proc->accepted().n() << "\t" - << proc->nPassPos() << "\t" - << proc->nPassNeg() << "\t" << proc->tried().n() << "\t" - << proc->nTotalPos() << "\t" - << proc->nTotalNeg() << "\t" << std::scientific << std::setprecision(3) << sigmaFinBr << " +/- " - << deltaFinBr << "\t\t" + << deltaFinBr << "\t" << std::fixed << std::setprecision(1) - << (fracAcc * 100) << " +/- " << ( std::sqrt(efferr2) * 100) << "\t" - << std::fixed << std::setprecision(1) - << (event_eff_proc * 100) << " +/- " << ( event_eff_err_proc * 100) - << std::endl; + << (fracAcc * 100) << std::endl; nAccepted += proc->accepted().n(); nTried += proc->tried().n(); - nAccepted_pos += proc->nPassPos(); - nTried_pos += proc->nTotalPos(); - nAccepted_neg += proc->nPassNeg(); - nTried_neg += proc->nTotalNeg(); sigSelSum += sigmaAvg; sigSum += sigmaFin; sigBrSum += sigmaFinBr; - errSel2Sum += sigma2Err; err2Sum += deltaFin * deltaFin; errBr2Sum += deltaFinBr * deltaFinBr; - errMatch2Sum += sigmaFin*relAccErr*sigmaFin*relAccErr; } - double ntotal_all = (nTried_pos+nTried_neg); - double event_eff_all = ntotal_all>1e-6? (double)(nAccepted_pos+nAccepted_neg)/ntotal_all: -1; - double event_eff_err_all = ntotal_all>1e-6? std::sqrt((1-event_eff_all)*event_eff_all/ntotal_all): -1; - - std::cout << "Total\t\t" - << std::scientific << std::setprecision(3) - << sigSelSum << " +/- " << std::sqrt(errSel2Sum) << "\t\t" + std::cout << "Total\t" << nAccepted << "\t" - << nAccepted_pos << "\t" - << nAccepted_neg << "\t" << nTried << "\t" - << nTried_pos << "\t" - << nTried_neg << "\t" << std::scientific << std::setprecision(3) << sigBrSum << " +/- " - << std::sqrt(errBr2Sum) << "\t\t" + << std::sqrt(errBr2Sum) << "\t" << std::fixed << std::setprecision(1) - << (sigSum / sigSelSum * 100) << " +/- " << (std::sqrt(errMatch2Sum)/sigSelSum * 100) << "\t" - << std::fixed << std::setprecision(1) - << (event_eff_all * 100) << " +/- " << (event_eff_err_all * 100) - << std::endl; + << (sigSum / sigSelSum * 100) << std::endl; } LHERunInfo::Header::Header() : diff --git a/HLTrigger/Configuration/python/HLT_FULL_Famos_cff.py b/HLTrigger/Configuration/python/HLT_FULL_Famos_cff.py index d8cc0f4fa3405..1268787a102f0 100644 --- a/HLTrigger/Configuration/python/HLT_FULL_Famos_cff.py +++ b/HLTrigger/Configuration/python/HLT_FULL_Famos_cff.py @@ -1,11 +1,11 @@ -# /dev/CMSSW_7_2_1/HLT/V29 (CMSSW_7_2_0) +# /dev/CMSSW_7_2_1/HLT/V26 (CMSSW_7_2_0_pre8) import FWCore.ParameterSet.Config as cms from FastSimulation.HighLevelTrigger.HLTSetup_cff import * HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_7_2_1/HLT/V29') + tableName = cms.string('/dev/CMSSW_7_2_1/HLT/V26') ) HLTIter4PSetTrajectoryFilterIT = cms.PSet( @@ -726,11 +726,11 @@ 'HcalCellDead' ) ) hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", - categoryVariableName = cms.string( "vertexCategory" ), + trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), + categoryVariableName = cms.string( "vertexCategory" ), trackSelection = cms.PSet( totalHitsMin = cms.uint32( 0 ), jetDeltaRMax = cms.double( 0.3 ), @@ -752,7 +752,7 @@ calibrationRecords = cms.vstring( 'CombinedSVRecoVertex', 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), - trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), + correctVertexMass = cms.bool( True ), charmCut = cms.double( 1.5 ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), @@ -2256,7 +2256,6 @@ DT_12 = cms.vdouble( 0.183, 0.054, -0.087, 0.028, 0.002, 0.0 ), DT_14 = cms.vdouble( 0.359, 0.052, -0.107, 0.072, -0.004, 0.0 ), CSC_13_3_scale = cms.vdouble( -1.701268, 0.0 ), - DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23 = cms.vdouble( -0.081, 0.113, -0.029, 0.015, 0.008, 0.0 ), CSC_24 = cms.vdouble( 0.004, 0.021, -0.002, 0.053, 0.0, 0.0 ), OL_2222 = cms.vdouble( 0.107, 0.0, 0.0, 0.04, 0.0, 0.0 ), @@ -2271,14 +2270,14 @@ SME_22_0_scale = cms.vdouble( -3.457901, 0.0 ), DT_24_1_scale = cms.vdouble( -7.490909, 0.0 ), OL_1232_0_scale = cms.vdouble( -5.964634, 0.0 ), - DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), + SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), SME_13_0_scale = cms.vdouble( 0.104905, 0.0 ), SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), - CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), + SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), @@ -2297,7 +2296,7 @@ DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), - SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), + CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), @@ -2305,7 +2304,7 @@ DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), EnableDTMeasurement = cms.bool( True ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), @@ -2315,7 +2314,7 @@ CSC_02 = cms.vdouble( 0.612, -0.207, 0.0, 0.067, -0.001, 0.0 ), CSC_03 = cms.vdouble( 0.787, -0.338, 0.029, 0.101, -0.008, 0.0 ), CSC_01 = cms.vdouble( 0.166, 0.0, 0.0, 0.031, 0.0, 0.0 ), - SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), + DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), crackWindow = cms.double( 0.04 ), @@ -2328,10 +2327,11 @@ DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), beamSpotTag = cms.InputTag( "offlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), - EnableCSCMeasurement = cms.bool( True ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), OL_2222_0_scale = cms.vdouble( -7.667231, 0.0 ), - CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), + EnableCSCMeasurement = cms.bool( True ), CSC_12 = cms.vdouble( -0.161, 0.254, -0.047, 0.042, -0.007, 0.0 ) ) hltL2MuonSeeds = cms.EDProducer( "L2MuonSeedGenerator", @@ -4323,16 +4323,12 @@ pvSrc = cms.InputTag( "" ) ) hltFastPVJetVertexChecker = cms.EDFilter( "JetVertexChecker", - minPt = cms.double( 0.0 ), - maxTrackPt = cms.double( 20.0 ), + beamSpot = cms.InputTag( "offlineBeamSpot" ), maxNJetsToCheck = cms.int32( 2 ), minPtRatio = cms.double( 0.1 ), doFilter = cms.bool( False ), jetTracks = cms.InputTag( "hltFastPVJetTracksAssociator" ), - maxChi2 = cms.double( 20.0 ), - newMethod = cms.bool( False ), - maxNjetsOutput = cms.int32( 2 ), - beamSpot = cms.InputTag( "offlineBeamSpot" ) + minPt = cms.double( 0.0 ) ) hltFastPVPixelTracksMerger = cms.EDProducer( "SimpleTrackListMerger", ShareFrac = cms.double( 0.19 ), @@ -12692,7 +12688,6 @@ hltL3fL1sMu16Eta2p1f0TkFiltered20Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 2.1 ), minPt = cms.double( 20.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -12845,7 +12840,6 @@ hltL3fL1sMu16f0TkFiltered24Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 1.0E99 ), minPt = cms.double( 24.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -12881,7 +12875,6 @@ hltL3fL1sMu20Eta2p1f0TkFiltered24Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 2.1 ), minPt = cms.double( 24.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -15437,44 +15430,40 @@ htLabels = cms.VInputTag( 'hltPFHT4Jet' ), minHt = cms.vdouble( 650.0 ) ) -hltPrePFHT7504Jet = cms.EDFilter( "HLTPrescaler", - L1GtReadoutRecordTag = cms.InputTag( "gtDigis" ), - offset = cms.uint32( 0 ) -) -hltPF4JetHT750 = cms.EDFilter( "HLTHtMhtFilter", - saveTags = cms.bool( True ), - mhtLabels = cms.VInputTag( 'hltPFHT4Jet' ), - meffSlope = cms.vdouble( 1.0 ), - minMeff = cms.vdouble( 0.0 ), - minMht = cms.vdouble( 0.0 ), - htLabels = cms.VInputTag( 'hltPFHT4Jet' ), - minHt = cms.vdouble( 750.0 ) -) -hltPrePFHT350 = cms.EDFilter( "HLTPrescaler", +hltPrePFHT650 = cms.EDFilter( "HLTPrescaler", L1GtReadoutRecordTag = cms.InputTag( "gtDigis" ), offset = cms.uint32( 0 ) ) -hltPrePFHT600 = cms.EDFilter( "HLTPrescaler", - L1GtReadoutRecordTag = cms.InputTag( "gtDigis" ), - offset = cms.uint32( 0 ) -) -hltHt500 = cms.EDFilter( "HLTHtMhtFilter", +hltHt550 = cms.EDFilter( "HLTHtMhtFilter", saveTags = cms.bool( False ), mhtLabels = cms.VInputTag( 'hltHtMht' ), meffSlope = cms.vdouble( 1.0 ), minMeff = cms.vdouble( 0.0 ), minMht = cms.vdouble( 0.0 ), htLabels = cms.VInputTag( 'hltHtMht' ), - minHt = cms.vdouble( 500.0 ) + minHt = cms.vdouble( 550.0 ) ) -hltPFHT600 = cms.EDFilter( "HLTHtMhtFilter", +hltPFHT650 = cms.EDFilter( "HLTHtMhtFilter", saveTags = cms.bool( True ), mhtLabels = cms.VInputTag( 'hltPFHT' ), meffSlope = cms.vdouble( 1.0 ), minMeff = cms.vdouble( 0.0 ), minMht = cms.vdouble( 0.0 ), htLabels = cms.VInputTag( 'hltPFHT' ), - minHt = cms.vdouble( 600.0 ) + minHt = cms.vdouble( 650.0 ) +) +hltPrePFHT7504Jet = cms.EDFilter( "HLTPrescaler", + L1GtReadoutRecordTag = cms.InputTag( "gtDigis" ), + offset = cms.uint32( 0 ) +) +hltPF4JetHT750 = cms.EDFilter( "HLTHtMhtFilter", + saveTags = cms.bool( True ), + mhtLabels = cms.VInputTag( 'hltPFHT4Jet' ), + meffSlope = cms.vdouble( 1.0 ), + minMeff = cms.vdouble( 0.0 ), + minMht = cms.vdouble( 0.0 ), + htLabels = cms.VInputTag( 'hltPFHT4Jet' ), + minHt = cms.vdouble( 750.0 ) ) hltPrePFHT900 = cms.EDFilter( "HLTPrescaler", L1GtReadoutRecordTag = cms.InputTag( "gtDigis" ), @@ -18179,9 +18168,8 @@ HLT_PFHT350_PFMET120_NoiseCleaned_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT350PFMET120NoiseCleaned + HLTRecoMETSequence + hltMET70 + HLTHBHENoiseCleanerSequence + hltMetClean + hltMETClean60 + HLTAK4CaloJetsSequence + hltMetCleanUsingJetID + hltMETCleanUsingJetID60 + hltHtMht + hltHt280 + HLTAK4PFJetsSequence + hltPFMETProducer + hltPFMET120Filter + hltPFHT + hltPFHT350 + cms.SequencePlaceholder( "HLTEndSequence" ) ) HLT_PFHT550_4Jet_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT5504Jet + HLTAK4CaloJetsSequence + hltHtMht4Jet + hlt4JetHt450 + HLTAK4PFJetsSequence + hltPFHT4Jet + hltPF4JetHT550 + cms.SequencePlaceholder( "HLTEndSequence" ) ) HLT_PFHT650_4Jet_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT6504Jet + HLTAK4CaloJetsSequence + hltHtMht4Jet + hlt4JetHt550 + HLTAK4PFJetsSequence + hltPFHT4Jet + hltPF4JetHT650 + cms.SequencePlaceholder( "HLTEndSequence" ) ) +HLT_PFHT650_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT650 + HLTAK4CaloJetsSequence + hltHtMht + hltHt550 + HLTAK4PFJetsSequence + hltPFHT + hltPFHT650 + cms.SequencePlaceholder( "HLTEndSequence" ) ) HLT_PFHT750_4Jet_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT7504Jet + HLTAK4CaloJetsSequence + hltHtMht4Jet + hlt4JetHt550 + HLTAK4PFJetsSequence + hltPFHT4Jet + hltPF4JetHT750 + cms.SequencePlaceholder( "HLTEndSequence" ) ) -HLT_PFHT350_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT350 + HLTAK4CaloJetsSequence + hltHtMht + hltHt280 + HLTAK4PFJetsSequence + hltPFHT + hltPFHT350 + cms.SequencePlaceholder( "HLTEndSequence" ) ) -HLT_PFHT600_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT600 + HLTAK4CaloJetsSequence + hltHtMht + hltHt500 + HLTAK4PFJetsSequence + hltPFHT + hltPFHT600 + cms.SequencePlaceholder( "HLTEndSequence" ) ) HLT_PFHT900_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT900 + HLTAK4CaloJetsSequence + hltHtMht + hltHt700 + HLTAK4PFJetsSequence + hltPFHT + hltPFHT900 + cms.SequencePlaceholder( "HLTEndSequence" ) ) HLT_PFJet40_v1 = cms.Path( HLTBeginSequence + hltL1sL1SingleJet52 + hltPrePFJet40 + HLTAK4CaloJetsSequence + hltSingleCaloJet20 + HLTAK4PFJetsSequence + hltPFJetsCorrectedMatchedToCaloJets20 + hltSinglePFJet40 + cms.SequencePlaceholder( "HLTEndSequence" ) ) HLT_PFJet60_v1 = cms.Path( HLTBeginSequence + hltL1sL1SingleJet52 + hltPrePFJet60 + HLTAK4CaloJetsSequence + hltSingleCaloJet40 + HLTAK4PFJetsSequence + hltPFJetsCorrectedMatchedToCaloJets40 + hltSinglePFJet60 + cms.SequencePlaceholder( "HLTEndSequence" ) ) @@ -18229,7 +18217,7 @@ HLTriggerFirstPath = cms.Path( hltGetConditions + hltGetRaw + hltBoolFalse ) -HLTSchedule = cms.Schedule( *(HLT_AK8PFJet360TrimMod_Mass30_v1, HLT_AK8PFHT850_TrimR0p1PT0p03Mass50_v1, HLT_BTagCSV07_v1, HLT_CaloJet260_v1, HLT_Dimuon13_PsiPrime_v1, HLT_Dimuon13_Upsilon_v1, HLT_Dimuon20_Jpsi_v1, HLT_DoubleEle33_CaloIdL_GsfTrkIdVL_MW_v1, HLT_DoubleEle33_CaloIdL_GsfTrkIdVL_v1, HLT_DoubleMediumIsoPFTau40_Trk1_eta2p1_Reg_v1, HLT_DoubleMediumIsoPFTau40_Trk1_eta2p1_v1, HLT_DoubleMu4_3_Bs_v1, HLT_DoubleMu4_3_Jpsi_Displaced_v1, HLT_DoubleMu4_JpsiTrk_Displaced_v1, HLT_DoubleMu4_LowMassNonResonantTrk_Displaced_v1, HLT_DoubleMu4_PsiPrimeTrk_Displaced_v1, HLT_DoublePhoton85_v1, HLT_Ele17_Ele12_Ele10_CaloId_TrackId_v1, HLT_Ele17_Ele8_Gsf_v1, HLT_Ele20WP60_Ele8_Mass55_v1, HLT_Ele22_eta2p1_WP85_Gsf_LooseIsoPFTau20_v1, HLT_Ele23_Ele12_CaloId_TrackId_Iso_v1, HLT_Ele25WP60_SC4_Mass55_v1, HLT_Ele27_eta2p1_WP85_Gsf_CentralPFJet30_BTagCSV_v1, HLT_Ele27_eta2p1_WP85_Gsf_TriCentralPFJet40_v1, HLT_Ele27_eta2p1_WP85_Gsf_TriCentralPFJet60_50_35_v1, HLT_Ele27_eta2p1_WP85_Gsf_v1, HLT_Ele32_eta2p1_WP85_Gsf_CentralPFJet30_BTagCSV_v1, HLT_Ele32_eta2p1_WP85_Gsf_TriCentralPFJet40_v1, HLT_Ele32_eta2p1_WP85_Gsf_TriCentralPFJet60_50_35_v1, HLT_Ele32_eta2p1_WP85_Gsf_v1, HLT_Ele45_CaloIdVT_GsfTrkIdT_PFJet200_PFJet50_v1, HLT_Ele95_CaloIdVT_GsfTrkIdT_v1, HLT_HT650_v1, HLT_IsoMu17_eta2p1_LooseIsoPFTau20_v1, HLT_IsoMu20_eta2p1_IterTrk02_CentralPFJet30_BTagCSV_v1, HLT_IsoMu20_eta2p1_IterTrk02_TriCentralPFJet40_v1, HLT_IsoMu20_eta2p1_IterTrk02_TriCentralPFJet60_50_35_v1, HLT_IsoMu20_eta2p1_IterTrk02_v1, HLT_IsoMu24_IterTrk02_v1, HLT_IsoMu24_eta2p1_IterTrk02_CentralPFJet30_BTagCSV_v1, HLT_IsoMu24_eta2p1_IterTrk02_TriCentralPFJet40_v1, HLT_IsoMu24_eta2p1_IterTrk02_TriCentralPFJet60_50_35_v1, HLT_IsoMu24_eta2p1_IterTrk02_v1, HLT_IsoTkMu20_eta2p1_IterTrk02_v1, HLT_IsoTkMu24_IterTrk02_v1, HLT_IsoTkMu24_eta2p1_IterTrk02_v1, HLT_IterativeTracking_v1, HLT_L2DoubleMu23_NoVertex_v1, HLT_L2DoubleMu28_NoVertex_2Cha_Angle2p5_Mass10_v1, HLT_L2DoubleMu38_NoVertex_2Cha_Angle2p5_Mass10_v1, HLT_LooseIsoPFTau50_Trk30_eta2p1_MET120_v1, HLT_Mu17_Mu8_v1, HLT_Mu17_NoFilters_v1, HLT_Mu17_TkMu8_v1, HLT_Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_v1, HLT_Mu17_TrkIsoVVL_TkMu8_TrkIsoVVL_v1, HLT_Mu23_TrkIsoVVL_Ele12_Gsf_CaloId_TrackId_Iso_MediumWP_v1, HLT_Mu25_TkMu0_dEta18_Onia_v1, HLT_Mu30_TkMu11_v1, HLT_Mu40_eta2p1_PFJet200_PFJet50_v1, HLT_Mu40_v1, HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1, HLT_PFHT350_PFMET120_NoiseCleaned_v1, HLT_PFHT550_4Jet_v1, HLT_PFHT650_4Jet_v1, HLT_PFHT750_4Jet_v1, HLT_PFHT350_v1, HLT_PFHT600_v1, HLT_PFHT900_v1, HLT_PFJet40_v1, HLT_PFJet60_v1, HLT_PFJet80_v1, HLT_PFJet140_v1, HLT_PFJet200_v1, HLT_PFJet260_v1, HLT_PFJet320_v1, HLT_PFJet400_v1, HLT_PFJet450_v1, HLT_PFJet500_v1, HLT_PFMET120_NoiseCleaned_BTagCSV07_v1, HLT_PFMET120_NoiseCleaned_Mu5_v1, HLT_PFMET170_NoiseCleaned_v1, HLT_PFMHT100_SingleCentralJet60_BTagCSV0p6_v1, HLT_PFchMET90_NoiseCleaned_v1, HLT_Photon135_PFMET40_v1, HLT_Photon135_VBF_v1, HLT_Photon150_PFMET40_v1, HLT_Photon150_VBF_v1, HLT_Photon155_v1, HLT_Photon160_PFMET40_v1, HLT_Photon160_VBF_v1, HLT_Photon20_CaloIdVL_IsoL_v1, HLT_Photon22_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon22_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon250_NoHE_PFMET40_v1, HLT_Photon250_NoHE_VBF_v1, HLT_Photon300_NoHE_PFMET40_v1, HLT_Photon300_NoHE_VBF_v1, HLT_Photon36_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon18_AND_HE10_R9Id65_Mass95_v1, HLT_Photon36_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon36_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon42_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon22_AND_HE10_R9Id65_v1, HLT_Photon50_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon50_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon75_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon75_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon90_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon90_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Physics_v1, HLT_ReducedIterativeTracking_v1, HLT_ZeroBias_v1, HLTriggerFinalPath, HLTriggerFirstPath )) +HLTSchedule = cms.Schedule( *(HLT_AK8PFJet360TrimMod_Mass30_v1, HLT_AK8PFHT850_TrimR0p1PT0p03Mass50_v1, HLT_BTagCSV07_v1, HLT_CaloJet260_v1, HLT_Dimuon13_PsiPrime_v1, HLT_Dimuon13_Upsilon_v1, HLT_Dimuon20_Jpsi_v1, HLT_DoubleEle33_CaloIdL_GsfTrkIdVL_MW_v1, HLT_DoubleEle33_CaloIdL_GsfTrkIdVL_v1, HLT_DoubleMediumIsoPFTau40_Trk1_eta2p1_Reg_v1, HLT_DoubleMediumIsoPFTau40_Trk1_eta2p1_v1, HLT_DoubleMu4_3_Bs_v1, HLT_DoubleMu4_3_Jpsi_Displaced_v1, HLT_DoubleMu4_JpsiTrk_Displaced_v1, HLT_DoubleMu4_LowMassNonResonantTrk_Displaced_v1, HLT_DoubleMu4_PsiPrimeTrk_Displaced_v1, HLT_DoublePhoton85_v1, HLT_Ele17_Ele12_Ele10_CaloId_TrackId_v1, HLT_Ele17_Ele8_Gsf_v1, HLT_Ele20WP60_Ele8_Mass55_v1, HLT_Ele22_eta2p1_WP85_Gsf_LooseIsoPFTau20_v1, HLT_Ele23_Ele12_CaloId_TrackId_Iso_v1, HLT_Ele25WP60_SC4_Mass55_v1, HLT_Ele27_eta2p1_WP85_Gsf_CentralPFJet30_BTagCSV_v1, HLT_Ele27_eta2p1_WP85_Gsf_TriCentralPFJet40_v1, HLT_Ele27_eta2p1_WP85_Gsf_TriCentralPFJet60_50_35_v1, HLT_Ele27_eta2p1_WP85_Gsf_v1, HLT_Ele32_eta2p1_WP85_Gsf_CentralPFJet30_BTagCSV_v1, HLT_Ele32_eta2p1_WP85_Gsf_TriCentralPFJet40_v1, HLT_Ele32_eta2p1_WP85_Gsf_TriCentralPFJet60_50_35_v1, HLT_Ele32_eta2p1_WP85_Gsf_v1, HLT_Ele45_CaloIdVT_GsfTrkIdT_PFJet200_PFJet50_v1, HLT_Ele95_CaloIdVT_GsfTrkIdT_v1, HLT_HT650_v1, HLT_IsoMu17_eta2p1_LooseIsoPFTau20_v1, HLT_IsoMu20_eta2p1_IterTrk02_CentralPFJet30_BTagCSV_v1, HLT_IsoMu20_eta2p1_IterTrk02_TriCentralPFJet40_v1, HLT_IsoMu20_eta2p1_IterTrk02_TriCentralPFJet60_50_35_v1, HLT_IsoMu20_eta2p1_IterTrk02_v1, HLT_IsoMu24_IterTrk02_v1, HLT_IsoMu24_eta2p1_IterTrk02_CentralPFJet30_BTagCSV_v1, HLT_IsoMu24_eta2p1_IterTrk02_TriCentralPFJet40_v1, HLT_IsoMu24_eta2p1_IterTrk02_TriCentralPFJet60_50_35_v1, HLT_IsoMu24_eta2p1_IterTrk02_v1, HLT_IsoTkMu20_eta2p1_IterTrk02_v1, HLT_IsoTkMu24_IterTrk02_v1, HLT_IsoTkMu24_eta2p1_IterTrk02_v1, HLT_IterativeTracking_v1, HLT_L2DoubleMu23_NoVertex_v1, HLT_L2DoubleMu28_NoVertex_2Cha_Angle2p5_Mass10_v1, HLT_L2DoubleMu38_NoVertex_2Cha_Angle2p5_Mass10_v1, HLT_LooseIsoPFTau50_Trk30_eta2p1_MET120_v1, HLT_Mu17_Mu8_v1, HLT_Mu17_NoFilters_v1, HLT_Mu17_TkMu8_v1, HLT_Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_v1, HLT_Mu17_TrkIsoVVL_TkMu8_TrkIsoVVL_v1, HLT_Mu23_TrkIsoVVL_Ele12_Gsf_CaloId_TrackId_Iso_MediumWP_v1, HLT_Mu25_TkMu0_dEta18_Onia_v1, HLT_Mu30_TkMu11_v1, HLT_Mu40_eta2p1_PFJet200_PFJet50_v1, HLT_Mu40_v1, HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1, HLT_PFHT350_PFMET120_NoiseCleaned_v1, HLT_PFHT550_4Jet_v1, HLT_PFHT650_4Jet_v1, HLT_PFHT650_v1, HLT_PFHT750_4Jet_v1, HLT_PFHT900_v1, HLT_PFJet40_v1, HLT_PFJet60_v1, HLT_PFJet80_v1, HLT_PFJet140_v1, HLT_PFJet200_v1, HLT_PFJet260_v1, HLT_PFJet320_v1, HLT_PFJet400_v1, HLT_PFJet450_v1, HLT_PFJet500_v1, HLT_PFMET120_NoiseCleaned_BTagCSV07_v1, HLT_PFMET120_NoiseCleaned_Mu5_v1, HLT_PFMET170_NoiseCleaned_v1, HLT_PFMHT100_SingleCentralJet60_BTagCSV0p6_v1, HLT_PFchMET90_NoiseCleaned_v1, HLT_Photon135_PFMET40_v1, HLT_Photon135_VBF_v1, HLT_Photon150_PFMET40_v1, HLT_Photon150_VBF_v1, HLT_Photon155_v1, HLT_Photon160_PFMET40_v1, HLT_Photon160_VBF_v1, HLT_Photon20_CaloIdVL_IsoL_v1, HLT_Photon22_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon22_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon250_NoHE_PFMET40_v1, HLT_Photon250_NoHE_VBF_v1, HLT_Photon300_NoHE_PFMET40_v1, HLT_Photon300_NoHE_VBF_v1, HLT_Photon36_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon18_AND_HE10_R9Id65_Mass95_v1, HLT_Photon36_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon36_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon42_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon22_AND_HE10_R9Id65_v1, HLT_Photon50_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon50_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon75_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon75_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon90_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon90_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Physics_v1, HLT_ReducedIterativeTracking_v1, HLT_ZeroBias_v1, HLTriggerFinalPath, HLTriggerFirstPath )) # CMSSW version specific customizations import os diff --git a/HLTrigger/Configuration/python/HLT_FULL_cff.py b/HLTrigger/Configuration/python/HLT_FULL_cff.py index 777a736d7ab50..0b13518075299 100644 --- a/HLTrigger/Configuration/python/HLT_FULL_cff.py +++ b/HLTrigger/Configuration/python/HLT_FULL_cff.py @@ -1,10 +1,10 @@ -# /dev/CMSSW_7_2_1/HLT/V29 (CMSSW_7_2_0) +# /dev/CMSSW_7_2_1/HLT/V26 (CMSSW_7_2_0_pre8) import FWCore.ParameterSet.Config as cms HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_7_2_1/HLT/V29') + tableName = cms.string('/dev/CMSSW_7_2_1/HLT/V26') ) HLTIter4PSetTrajectoryFilterIT = cms.PSet( @@ -518,9 +518,7 @@ 'HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v1', 'HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1', 'HLT_PFHT350_PFMET120_NoiseCleaned_v1', - 'HLT_PFHT350_v1', 'HLT_PFHT550_4Jet_v1', - 'HLT_PFHT600_v1', 'HLT_PFHT650_4Jet_v1', 'HLT_PFHT750_4Jet_v1', 'HLT_PFHT900_v1', @@ -577,6 +575,7 @@ 'HLT_IsoTkMu24_IterTrk02_v1', 'HLT_IterativeTracking_v1', 'HLT_Mu17_NoFilters_v1', + 'HLT_PFHT650_v1', 'HLT_PFchMET90_NoiseCleaned_v1', 'HLT_Photon20_CaloIdVL_IsoL_v1', 'HLT_ReducedIterativeTracking_v1' ) @@ -889,11 +888,11 @@ 'HcalCellDead' ) ) hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", - categoryVariableName = cms.string( "vertexCategory" ), + trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), + categoryVariableName = cms.string( "vertexCategory" ), trackSelection = cms.PSet( totalHitsMin = cms.uint32( 0 ), jetDeltaRMax = cms.double( 0.3 ), @@ -915,7 +914,7 @@ calibrationRecords = cms.vstring( 'CombinedSVRecoVertex', 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), - trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), + correctVertexMass = cms.bool( True ), charmCut = cms.double( 1.5 ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), @@ -2739,7 +2738,6 @@ DT_12 = cms.vdouble( 0.183, 0.054, -0.087, 0.028, 0.002, 0.0 ), DT_14 = cms.vdouble( 0.359, 0.052, -0.107, 0.072, -0.004, 0.0 ), CSC_13_3_scale = cms.vdouble( -1.701268, 0.0 ), - DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23 = cms.vdouble( -0.081, 0.113, -0.029, 0.015, 0.008, 0.0 ), CSC_24 = cms.vdouble( 0.004, 0.021, -0.002, 0.053, 0.0, 0.0 ), OL_2222 = cms.vdouble( 0.107, 0.0, 0.0, 0.04, 0.0, 0.0 ), @@ -2754,14 +2752,14 @@ SME_22_0_scale = cms.vdouble( -3.457901, 0.0 ), DT_24_1_scale = cms.vdouble( -7.490909, 0.0 ), OL_1232_0_scale = cms.vdouble( -5.964634, 0.0 ), - DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), + SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), SME_13_0_scale = cms.vdouble( 0.104905, 0.0 ), SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), - CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), + SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), @@ -2780,7 +2778,7 @@ DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), - SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), + CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), @@ -2788,7 +2786,7 @@ DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), EnableDTMeasurement = cms.bool( True ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), @@ -2798,7 +2796,7 @@ CSC_02 = cms.vdouble( 0.612, -0.207, 0.0, 0.067, -0.001, 0.0 ), CSC_03 = cms.vdouble( 0.787, -0.338, 0.029, 0.101, -0.008, 0.0 ), CSC_01 = cms.vdouble( 0.166, 0.0, 0.0, 0.031, 0.0, 0.0 ), - SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), + DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), crackWindow = cms.double( 0.04 ), @@ -2811,10 +2809,11 @@ DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), - EnableCSCMeasurement = cms.bool( True ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), OL_2222_0_scale = cms.vdouble( -7.667231, 0.0 ), - CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), + EnableCSCMeasurement = cms.bool( True ), CSC_12 = cms.vdouble( -0.161, 0.254, -0.047, 0.042, -0.007, 0.0 ) ) hltL2MuonSeeds = cms.EDProducer( "L2MuonSeedGenerator", @@ -6197,16 +6196,12 @@ pvSrc = cms.InputTag( "" ) ) hltFastPVJetVertexChecker = cms.EDFilter( "JetVertexChecker", - minPt = cms.double( 0.0 ), - maxTrackPt = cms.double( 20.0 ), + beamSpot = cms.InputTag( "hltOnlineBeamSpot" ), maxNJetsToCheck = cms.int32( 2 ), minPtRatio = cms.double( 0.1 ), doFilter = cms.bool( False ), jetTracks = cms.InputTag( "hltFastPVJetTracksAssociator" ), - maxChi2 = cms.double( 20.0 ), - newMethod = cms.bool( False ), - maxNjetsOutput = cms.int32( 2 ), - beamSpot = cms.InputTag( "hltOnlineBeamSpot" ) + minPt = cms.double( 0.0 ) ) hltFastPVPixelTracksRecover = cms.EDProducer( "PixelTrackProducer", FilterPSet = cms.PSet( @@ -20147,7 +20142,6 @@ hltL3fL1sMu16Eta2p1f0TkFiltered20Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 2.1 ), minPt = cms.double( 20.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -20922,7 +20916,6 @@ hltL3fL1sMu16f0TkFiltered24Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 1.0E99 ), minPt = cms.double( 24.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -20958,7 +20951,6 @@ hltL3fL1sMu20Eta2p1f0TkFiltered24Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 2.1 ), minPt = cms.double( 24.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -25630,44 +25622,40 @@ htLabels = cms.VInputTag( 'hltPFHT4Jet' ), minHt = cms.vdouble( 650.0 ) ) -hltPrePFHT7504Jet = cms.EDFilter( "HLTPrescaler", - L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), - offset = cms.uint32( 0 ) -) -hltPF4JetHT750 = cms.EDFilter( "HLTHtMhtFilter", - saveTags = cms.bool( True ), - mhtLabels = cms.VInputTag( 'hltPFHT4Jet' ), - meffSlope = cms.vdouble( 1.0 ), - minMeff = cms.vdouble( 0.0 ), - minMht = cms.vdouble( 0.0 ), - htLabels = cms.VInputTag( 'hltPFHT4Jet' ), - minHt = cms.vdouble( 750.0 ) -) -hltPrePFHT350 = cms.EDFilter( "HLTPrescaler", +hltPrePFHT650 = cms.EDFilter( "HLTPrescaler", L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), offset = cms.uint32( 0 ) ) -hltPrePFHT600 = cms.EDFilter( "HLTPrescaler", - L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), - offset = cms.uint32( 0 ) -) -hltHt500 = cms.EDFilter( "HLTHtMhtFilter", +hltHt550 = cms.EDFilter( "HLTHtMhtFilter", saveTags = cms.bool( False ), mhtLabels = cms.VInputTag( 'hltHtMht' ), meffSlope = cms.vdouble( 1.0 ), minMeff = cms.vdouble( 0.0 ), minMht = cms.vdouble( 0.0 ), htLabels = cms.VInputTag( 'hltHtMht' ), - minHt = cms.vdouble( 500.0 ) + minHt = cms.vdouble( 550.0 ) ) -hltPFHT600 = cms.EDFilter( "HLTHtMhtFilter", +hltPFHT650 = cms.EDFilter( "HLTHtMhtFilter", saveTags = cms.bool( True ), mhtLabels = cms.VInputTag( 'hltPFHT' ), meffSlope = cms.vdouble( 1.0 ), minMeff = cms.vdouble( 0.0 ), minMht = cms.vdouble( 0.0 ), htLabels = cms.VInputTag( 'hltPFHT' ), - minHt = cms.vdouble( 600.0 ) + minHt = cms.vdouble( 650.0 ) +) +hltPrePFHT7504Jet = cms.EDFilter( "HLTPrescaler", + L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), + offset = cms.uint32( 0 ) +) +hltPF4JetHT750 = cms.EDFilter( "HLTHtMhtFilter", + saveTags = cms.bool( True ), + mhtLabels = cms.VInputTag( 'hltPFHT4Jet' ), + meffSlope = cms.vdouble( 1.0 ), + minMeff = cms.vdouble( 0.0 ), + minMht = cms.vdouble( 0.0 ), + htLabels = cms.VInputTag( 'hltPFHT4Jet' ), + minHt = cms.vdouble( 750.0 ) ) hltPrePFHT900 = cms.EDFilter( "HLTPrescaler", L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), @@ -29117,9 +29105,8 @@ HLT_PFHT350_PFMET120_NoiseCleaned_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT350PFMET120NoiseCleaned + HLTRecoMETSequence + hltMET70 + HLTHBHENoiseCleanerSequence + hltMetClean + hltMETClean60 + HLTAK4CaloJetsSequence + hltMetCleanUsingJetID + hltMETCleanUsingJetID60 + hltHtMht + hltHt280 + HLTAK4PFJetsSequence + hltPFMETProducer + hltPFMET120Filter + hltPFHT + hltPFHT350 + HLTEndSequence ) HLT_PFHT550_4Jet_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT5504Jet + HLTAK4CaloJetsSequence + hltHtMht4Jet + hlt4JetHt450 + HLTAK4PFJetsSequence + hltPFHT4Jet + hltPF4JetHT550 + HLTEndSequence ) HLT_PFHT650_4Jet_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT6504Jet + HLTAK4CaloJetsSequence + hltHtMht4Jet + hlt4JetHt550 + HLTAK4PFJetsSequence + hltPFHT4Jet + hltPF4JetHT650 + HLTEndSequence ) +HLT_PFHT650_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT650 + HLTAK4CaloJetsSequence + hltHtMht + hltHt550 + HLTAK4PFJetsSequence + hltPFHT + hltPFHT650 + HLTEndSequence ) HLT_PFHT750_4Jet_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT7504Jet + HLTAK4CaloJetsSequence + hltHtMht4Jet + hlt4JetHt550 + HLTAK4PFJetsSequence + hltPFHT4Jet + hltPF4JetHT750 + HLTEndSequence ) -HLT_PFHT350_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT350 + HLTAK4CaloJetsSequence + hltHtMht + hltHt280 + HLTAK4PFJetsSequence + hltPFHT + hltPFHT350 + HLTEndSequence ) -HLT_PFHT600_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT600 + HLTAK4CaloJetsSequence + hltHtMht + hltHt500 + HLTAK4PFJetsSequence + hltPFHT + hltPFHT600 + HLTEndSequence ) HLT_PFHT900_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT900 + HLTAK4CaloJetsSequence + hltHtMht + hltHt700 + HLTAK4PFJetsSequence + hltPFHT + hltPFHT900 + HLTEndSequence ) HLT_PFJet40_v1 = cms.Path( HLTBeginSequence + hltL1sL1SingleJet52 + hltPrePFJet40 + HLTAK4CaloJetsSequence + hltSingleCaloJet20 + HLTAK4PFJetsSequence + hltPFJetsCorrectedMatchedToCaloJets20 + hltSinglePFJet40 + HLTEndSequence ) HLT_PFJet60_v1 = cms.Path( HLTBeginSequence + hltL1sL1SingleJet52 + hltPrePFJet60 + HLTAK4CaloJetsSequence + hltSingleCaloJet40 + HLTAK4PFJetsSequence + hltPFJetsCorrectedMatchedToCaloJets40 + hltSinglePFJet60 + HLTEndSequence ) @@ -29167,7 +29154,7 @@ HLTriggerFirstPath = cms.Path( hltGetConditions + hltGetRaw + hltBoolFalse ) -HLTSchedule = cms.Schedule( *(HLTAnalyzerEndpath, HLT_AK8PFJet360TrimMod_Mass30_v1, HLT_AK8PFHT850_TrimR0p1PT0p03Mass50_v1, HLT_BTagCSV07_v1, HLT_CaloJet260_v1, HLT_Dimuon13_PsiPrime_v1, HLT_Dimuon13_Upsilon_v1, HLT_Dimuon20_Jpsi_v1, HLT_DoubleEle33_CaloIdL_GsfTrkIdVL_MW_v1, HLT_DoubleEle33_CaloIdL_GsfTrkIdVL_v1, HLT_DoubleMediumIsoPFTau40_Trk1_eta2p1_Reg_v1, HLT_DoubleMediumIsoPFTau40_Trk1_eta2p1_v1, HLT_DoubleMu33NoFiltersNoVtx_v1, HLT_DoubleMu38NoFiltersNoVtx_v1, HLT_DoubleMu4_3_Bs_v1, HLT_DoubleMu4_3_Jpsi_Displaced_v1, HLT_DoubleMu4_JpsiTrk_Displaced_v1, HLT_DoubleMu4_LowMassNonResonantTrk_Displaced_v1, HLT_DoubleMu4_PsiPrimeTrk_Displaced_v1, HLT_DoublePhoton85_v1, HLT_Ele17_Ele12_Ele10_CaloId_TrackId_v1, HLT_Ele17_Ele8_Gsf_v1, HLT_Ele20WP60_Ele8_Mass55_v1, HLT_Ele22_eta2p1_WP85_Gsf_LooseIsoPFTau20_v1, HLT_Ele23_Ele12_CaloId_TrackId_Iso_v1, HLT_Ele25WP60_SC4_Mass55_v1, HLT_Ele27_eta2p1_WP85_Gsf_CentralPFJet30_BTagCSV_v1, HLT_Ele27_eta2p1_WP85_Gsf_TriCentralPFJet40_v1, HLT_Ele27_eta2p1_WP85_Gsf_TriCentralPFJet60_50_35_v1, HLT_Ele27_eta2p1_WP85_Gsf_v1, HLT_Ele32_eta2p1_WP85_Gsf_CentralPFJet30_BTagCSV_v1, HLT_Ele32_eta2p1_WP85_Gsf_TriCentralPFJet40_v1, HLT_Ele32_eta2p1_WP85_Gsf_TriCentralPFJet60_50_35_v1, HLT_Ele32_eta2p1_WP85_Gsf_v1, HLT_Ele45_CaloIdVT_GsfTrkIdT_PFJet200_PFJet50_v1, HLT_Ele95_CaloIdVT_GsfTrkIdT_v1, HLT_HT650_v1, HLT_IsoMu17_eta2p1_LooseIsoPFTau20_v1, HLT_IsoMu20_eta2p1_IterTrk02_CentralPFJet30_BTagCSV_v1, HLT_IsoMu20_eta2p1_IterTrk02_TriCentralPFJet40_v1, HLT_IsoMu20_eta2p1_IterTrk02_TriCentralPFJet60_50_35_v1, HLT_IsoMu20_eta2p1_IterTrk02_v1, HLT_IsoMu24_IterTrk02_v1, HLT_IsoMu24_eta2p1_IterTrk02_CentralPFJet30_BTagCSV_v1, HLT_IsoMu24_eta2p1_IterTrk02_TriCentralPFJet40_v1, HLT_IsoMu24_eta2p1_IterTrk02_TriCentralPFJet60_50_35_v1, HLT_IsoMu24_eta2p1_IterTrk02_v1, HLT_IsoTkMu20_eta2p1_IterTrk02_v1, HLT_IsoTkMu24_IterTrk02_v1, HLT_IsoTkMu24_eta2p1_IterTrk02_v1, HLT_IterativeTracking_v1, HLT_JetE30_NoBPTX3BX_NoHalo_v1, HLT_JetE30_NoBPTX_v1, HLT_JetE50_NoBPTX3BX_NoHalo_v1, HLT_JetE70_NoBPTX3BX_NoHalo_v1, HLT_L2DoubleMu23_NoVertex_v1, HLT_L2DoubleMu28_NoVertex_2Cha_Angle2p5_Mass10_v1, HLT_L2DoubleMu38_NoVertex_2Cha_Angle2p5_Mass10_v1, HLT_L2Mu10_NoVertex_NoBPTX3BX_NoHalo_v1, HLT_L2Mu10_NoVertex_NoBPTX_v1, HLT_L2Mu20_NoVertex_3Sta_NoBPTX3BX_NoHalo_v1, HLT_L2Mu30_NoVertex_3Sta_NoBPTX3BX_NoHalo_v1, HLT_LooseIsoPFTau50_Trk30_eta2p1_MET120_v1, HLT_Mu17_Mu8_v1, HLT_Mu17_NoFilters_v1, HLT_Mu17_TkMu8_v1, HLT_Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_v1, HLT_Mu17_TrkIsoVVL_TkMu8_TrkIsoVVL_v1, HLT_Mu23_TrkIsoVVL_Ele12_Gsf_CaloId_TrackId_Iso_MediumWP_v1, HLT_Mu25_TkMu0_dEta18_Onia_v1, HLT_Mu30_TkMu11_v1, HLT_Mu38NoFiltersNoVtx_Photon38_CaloIdL_v1, HLT_Mu40_eta2p1_PFJet200_PFJet50_v1, HLT_Mu40_v1, HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v1, HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1, HLT_PFHT350_PFMET120_NoiseCleaned_v1, HLT_PFHT550_4Jet_v1, HLT_PFHT650_4Jet_v1, HLT_PFHT750_4Jet_v1, HLT_PFHT350_v1, HLT_PFHT600_v1, HLT_PFHT900_v1, HLT_PFJet40_v1, HLT_PFJet60_v1, HLT_PFJet80_v1, HLT_PFJet140_v1, HLT_PFJet200_v1, HLT_PFJet260_v1, HLT_PFJet320_v1, HLT_PFJet400_v1, HLT_PFJet450_v1, HLT_PFJet500_v1, HLT_PFMET120_NoiseCleaned_BTagCSV07_v1, HLT_PFMET120_NoiseCleaned_Mu5_v1, HLT_PFMET170_NoiseCleaned_v1, HLT_PFMHT100_SingleCentralJet60_BTagCSV0p6_v1, HLT_PFchMET90_NoiseCleaned_v1, HLT_Photon135_PFMET40_v1, HLT_Photon135_VBF_v1, HLT_Photon150_PFMET40_v1, HLT_Photon150_VBF_v1, HLT_Photon155_v1, HLT_Photon160_PFMET40_v1, HLT_Photon160_VBF_v1, HLT_Photon20_CaloIdVL_IsoL_v1, HLT_Photon22_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon22_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon250_NoHE_PFMET40_v1, HLT_Photon250_NoHE_VBF_v1, HLT_Photon300_NoHE_PFMET40_v1, HLT_Photon300_NoHE_VBF_v1, HLT_Photon36_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon18_AND_HE10_R9Id65_Mass95_v1, HLT_Photon36_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon36_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon42_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon22_AND_HE10_R9Id65_v1, HLT_Photon50_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon50_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon75_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon75_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon90_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon90_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Physics_v1, HLT_ReducedIterativeTracking_v1, HLT_ZeroBias_v1, HLTriggerFinalPath, HLTriggerFirstPath )) +HLTSchedule = cms.Schedule( *(HLTAnalyzerEndpath, HLT_AK8PFJet360TrimMod_Mass30_v1, HLT_AK8PFHT850_TrimR0p1PT0p03Mass50_v1, HLT_BTagCSV07_v1, HLT_CaloJet260_v1, HLT_Dimuon13_PsiPrime_v1, HLT_Dimuon13_Upsilon_v1, HLT_Dimuon20_Jpsi_v1, HLT_DoubleEle33_CaloIdL_GsfTrkIdVL_MW_v1, HLT_DoubleEle33_CaloIdL_GsfTrkIdVL_v1, HLT_DoubleMediumIsoPFTau40_Trk1_eta2p1_Reg_v1, HLT_DoubleMediumIsoPFTau40_Trk1_eta2p1_v1, HLT_DoubleMu33NoFiltersNoVtx_v1, HLT_DoubleMu38NoFiltersNoVtx_v1, HLT_DoubleMu4_3_Bs_v1, HLT_DoubleMu4_3_Jpsi_Displaced_v1, HLT_DoubleMu4_JpsiTrk_Displaced_v1, HLT_DoubleMu4_LowMassNonResonantTrk_Displaced_v1, HLT_DoubleMu4_PsiPrimeTrk_Displaced_v1, HLT_DoublePhoton85_v1, HLT_Ele17_Ele12_Ele10_CaloId_TrackId_v1, HLT_Ele17_Ele8_Gsf_v1, HLT_Ele20WP60_Ele8_Mass55_v1, HLT_Ele22_eta2p1_WP85_Gsf_LooseIsoPFTau20_v1, HLT_Ele23_Ele12_CaloId_TrackId_Iso_v1, HLT_Ele25WP60_SC4_Mass55_v1, HLT_Ele27_eta2p1_WP85_Gsf_CentralPFJet30_BTagCSV_v1, HLT_Ele27_eta2p1_WP85_Gsf_TriCentralPFJet40_v1, HLT_Ele27_eta2p1_WP85_Gsf_TriCentralPFJet60_50_35_v1, HLT_Ele27_eta2p1_WP85_Gsf_v1, HLT_Ele32_eta2p1_WP85_Gsf_CentralPFJet30_BTagCSV_v1, HLT_Ele32_eta2p1_WP85_Gsf_TriCentralPFJet40_v1, HLT_Ele32_eta2p1_WP85_Gsf_TriCentralPFJet60_50_35_v1, HLT_Ele32_eta2p1_WP85_Gsf_v1, HLT_Ele45_CaloIdVT_GsfTrkIdT_PFJet200_PFJet50_v1, HLT_Ele95_CaloIdVT_GsfTrkIdT_v1, HLT_HT650_v1, HLT_IsoMu17_eta2p1_LooseIsoPFTau20_v1, HLT_IsoMu20_eta2p1_IterTrk02_CentralPFJet30_BTagCSV_v1, HLT_IsoMu20_eta2p1_IterTrk02_TriCentralPFJet40_v1, HLT_IsoMu20_eta2p1_IterTrk02_TriCentralPFJet60_50_35_v1, HLT_IsoMu20_eta2p1_IterTrk02_v1, HLT_IsoMu24_IterTrk02_v1, HLT_IsoMu24_eta2p1_IterTrk02_CentralPFJet30_BTagCSV_v1, HLT_IsoMu24_eta2p1_IterTrk02_TriCentralPFJet40_v1, HLT_IsoMu24_eta2p1_IterTrk02_TriCentralPFJet60_50_35_v1, HLT_IsoMu24_eta2p1_IterTrk02_v1, HLT_IsoTkMu20_eta2p1_IterTrk02_v1, HLT_IsoTkMu24_IterTrk02_v1, HLT_IsoTkMu24_eta2p1_IterTrk02_v1, HLT_IterativeTracking_v1, HLT_JetE30_NoBPTX3BX_NoHalo_v1, HLT_JetE30_NoBPTX_v1, HLT_JetE50_NoBPTX3BX_NoHalo_v1, HLT_JetE70_NoBPTX3BX_NoHalo_v1, HLT_L2DoubleMu23_NoVertex_v1, HLT_L2DoubleMu28_NoVertex_2Cha_Angle2p5_Mass10_v1, HLT_L2DoubleMu38_NoVertex_2Cha_Angle2p5_Mass10_v1, HLT_L2Mu10_NoVertex_NoBPTX3BX_NoHalo_v1, HLT_L2Mu10_NoVertex_NoBPTX_v1, HLT_L2Mu20_NoVertex_3Sta_NoBPTX3BX_NoHalo_v1, HLT_L2Mu30_NoVertex_3Sta_NoBPTX3BX_NoHalo_v1, HLT_LooseIsoPFTau50_Trk30_eta2p1_MET120_v1, HLT_Mu17_Mu8_v1, HLT_Mu17_NoFilters_v1, HLT_Mu17_TkMu8_v1, HLT_Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_v1, HLT_Mu17_TrkIsoVVL_TkMu8_TrkIsoVVL_v1, HLT_Mu23_TrkIsoVVL_Ele12_Gsf_CaloId_TrackId_Iso_MediumWP_v1, HLT_Mu25_TkMu0_dEta18_Onia_v1, HLT_Mu30_TkMu11_v1, HLT_Mu38NoFiltersNoVtx_Photon38_CaloIdL_v1, HLT_Mu40_eta2p1_PFJet200_PFJet50_v1, HLT_Mu40_v1, HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v1, HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1, HLT_PFHT350_PFMET120_NoiseCleaned_v1, HLT_PFHT550_4Jet_v1, HLT_PFHT650_4Jet_v1, HLT_PFHT650_v1, HLT_PFHT750_4Jet_v1, HLT_PFHT900_v1, HLT_PFJet40_v1, HLT_PFJet60_v1, HLT_PFJet80_v1, HLT_PFJet140_v1, HLT_PFJet200_v1, HLT_PFJet260_v1, HLT_PFJet320_v1, HLT_PFJet400_v1, HLT_PFJet450_v1, HLT_PFJet500_v1, HLT_PFMET120_NoiseCleaned_BTagCSV07_v1, HLT_PFMET120_NoiseCleaned_Mu5_v1, HLT_PFMET170_NoiseCleaned_v1, HLT_PFMHT100_SingleCentralJet60_BTagCSV0p6_v1, HLT_PFchMET90_NoiseCleaned_v1, HLT_Photon135_PFMET40_v1, HLT_Photon135_VBF_v1, HLT_Photon150_PFMET40_v1, HLT_Photon150_VBF_v1, HLT_Photon155_v1, HLT_Photon160_PFMET40_v1, HLT_Photon160_VBF_v1, HLT_Photon20_CaloIdVL_IsoL_v1, HLT_Photon22_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon22_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon250_NoHE_PFMET40_v1, HLT_Photon250_NoHE_VBF_v1, HLT_Photon300_NoHE_PFMET40_v1, HLT_Photon300_NoHE_VBF_v1, HLT_Photon36_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon18_AND_HE10_R9Id65_Mass95_v1, HLT_Photon36_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon36_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon42_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon22_AND_HE10_R9Id65_v1, HLT_Photon50_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon50_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon75_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon75_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon90_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon90_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Physics_v1, HLT_ReducedIterativeTracking_v1, HLT_ZeroBias_v1, HLTriggerFinalPath, HLTriggerFirstPath )) # CMSSW version specific customizations import os diff --git a/HLTrigger/Configuration/python/HLT_Fake_Famos_cff.py b/HLTrigger/Configuration/python/HLT_Fake_Famos_cff.py index 064a0d92c42e1..2e2c88d04dd2a 100644 --- a/HLTrigger/Configuration/python/HLT_Fake_Famos_cff.py +++ b/HLTrigger/Configuration/python/HLT_Fake_Famos_cff.py @@ -1,11 +1,11 @@ -# /dev/CMSSW_7_2_1/Fake/V2 (CMSSW_7_2_0) +# /dev/CMSSW_7_2_1/Fake/V1 (CMSSW_7_2_0_pre8) import FWCore.ParameterSet.Config as cms from FastSimulation.HighLevelTrigger.HLTSetup_cff import * HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_7_2_1/Fake/V2') + tableName = cms.string('/dev/CMSSW_7_2_1/Fake/V1') ) HLTIter4PSetTrajectoryFilterIT = cms.PSet( @@ -733,11 +733,11 @@ 'HcalCellDead' ) ) hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", - categoryVariableName = cms.string( "vertexCategory" ), + trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), + categoryVariableName = cms.string( "vertexCategory" ), trackSelection = cms.PSet( totalHitsMin = cms.uint32( 0 ), jetDeltaRMax = cms.double( 0.3 ), @@ -759,7 +759,7 @@ calibrationRecords = cms.vstring( 'CombinedSVRecoVertex', 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), - trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), + correctVertexMass = cms.bool( True ), charmCut = cms.double( 1.5 ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), @@ -1812,7 +1812,6 @@ DT_12 = cms.vdouble( 0.183, 0.054, -0.087, 0.028, 0.002, 0.0 ), DT_14 = cms.vdouble( 0.359, 0.052, -0.107, 0.072, -0.004, 0.0 ), CSC_13_3_scale = cms.vdouble( -1.701268, 0.0 ), - DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23 = cms.vdouble( -0.081, 0.113, -0.029, 0.015, 0.008, 0.0 ), CSC_24 = cms.vdouble( 0.004, 0.021, -0.002, 0.053, 0.0, 0.0 ), OL_2222 = cms.vdouble( 0.107, 0.0, 0.0, 0.04, 0.0, 0.0 ), @@ -1827,14 +1826,14 @@ SME_22_0_scale = cms.vdouble( -3.457901, 0.0 ), DT_24_1_scale = cms.vdouble( -7.490909, 0.0 ), OL_1232_0_scale = cms.vdouble( -5.964634, 0.0 ), - DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), + SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), SME_13_0_scale = cms.vdouble( 0.104905, 0.0 ), SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), - CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), + SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), @@ -1853,7 +1852,7 @@ DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), - SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), + CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), @@ -1861,7 +1860,7 @@ DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), EnableDTMeasurement = cms.bool( True ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), @@ -1871,7 +1870,7 @@ CSC_02 = cms.vdouble( 0.612, -0.207, 0.0, 0.067, -0.001, 0.0 ), CSC_03 = cms.vdouble( 0.787, -0.338, 0.029, 0.101, -0.008, 0.0 ), CSC_01 = cms.vdouble( 0.166, 0.0, 0.0, 0.031, 0.0, 0.0 ), - SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), + DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), crackWindow = cms.double( 0.04 ), @@ -1884,10 +1883,11 @@ DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), beamSpotTag = cms.InputTag( "offlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), - EnableCSCMeasurement = cms.bool( True ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), OL_2222_0_scale = cms.vdouble( -7.667231, 0.0 ), - CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), + EnableCSCMeasurement = cms.bool( True ), CSC_12 = cms.vdouble( -0.161, 0.254, -0.047, 0.042, -0.007, 0.0 ) ) hltL2MuonSeeds = cms.EDProducer( "L2MuonSeedGenerator", @@ -3750,7 +3750,6 @@ hltL3fL1sMu16f0TkFiltered24Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 1.0E99 ), minPt = cms.double( 24.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -12864,16 +12863,12 @@ pvSrc = cms.InputTag( "" ) ) hltFastPVJetVertexChecker = cms.EDFilter( "JetVertexChecker", - minPt = cms.double( 0.0 ), - maxTrackPt = cms.double( 20.0 ), + beamSpot = cms.InputTag( "offlineBeamSpot" ), maxNJetsToCheck = cms.int32( 2 ), minPtRatio = cms.double( 0.1 ), doFilter = cms.bool( False ), jetTracks = cms.InputTag( "hltFastPVJetTracksAssociator" ), - maxChi2 = cms.double( 20.0 ), - newMethod = cms.bool( False ), - maxNjetsOutput = cms.int32( 2 ), - beamSpot = cms.InputTag( "offlineBeamSpot" ) + minPt = cms.double( 0.0 ) ) hltFastPVPixelTracksMerger = cms.EDProducer( "SimpleTrackListMerger", ShareFrac = cms.double( 0.19 ), diff --git a/HLTrigger/Configuration/python/HLT_Fake_cff.py b/HLTrigger/Configuration/python/HLT_Fake_cff.py index 1e237d620c8a7..b70e95d9cf449 100644 --- a/HLTrigger/Configuration/python/HLT_Fake_cff.py +++ b/HLTrigger/Configuration/python/HLT_Fake_cff.py @@ -1,10 +1,10 @@ -# /dev/CMSSW_7_2_1/Fake/V2 (CMSSW_7_2_0) +# /dev/CMSSW_7_2_1/Fake/V1 (CMSSW_7_2_0_pre8) import FWCore.ParameterSet.Config as cms HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_7_2_1/Fake/V2') + tableName = cms.string('/dev/CMSSW_7_2_1/Fake/V1') ) HLTIter4PSetTrajectoryFilterIT = cms.PSet( @@ -874,11 +874,11 @@ 'HcalCellDead' ) ) hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", - categoryVariableName = cms.string( "vertexCategory" ), + trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), + categoryVariableName = cms.string( "vertexCategory" ), trackSelection = cms.PSet( totalHitsMin = cms.uint32( 0 ), jetDeltaRMax = cms.double( 0.3 ), @@ -900,7 +900,7 @@ calibrationRecords = cms.vstring( 'CombinedSVRecoVertex', 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), - trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), + correctVertexMass = cms.bool( True ), charmCut = cms.double( 1.5 ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), @@ -2063,7 +2063,6 @@ DT_12 = cms.vdouble( 0.183, 0.054, -0.087, 0.028, 0.002, 0.0 ), DT_14 = cms.vdouble( 0.359, 0.052, -0.107, 0.072, -0.004, 0.0 ), CSC_13_3_scale = cms.vdouble( -1.701268, 0.0 ), - DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23 = cms.vdouble( -0.081, 0.113, -0.029, 0.015, 0.008, 0.0 ), CSC_24 = cms.vdouble( 0.004, 0.021, -0.002, 0.053, 0.0, 0.0 ), OL_2222 = cms.vdouble( 0.107, 0.0, 0.0, 0.04, 0.0, 0.0 ), @@ -2078,14 +2077,14 @@ SME_22_0_scale = cms.vdouble( -3.457901, 0.0 ), DT_24_1_scale = cms.vdouble( -7.490909, 0.0 ), OL_1232_0_scale = cms.vdouble( -5.964634, 0.0 ), - DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), + SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), SME_13_0_scale = cms.vdouble( 0.104905, 0.0 ), SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), - CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), + SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), @@ -2104,7 +2103,7 @@ DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), - SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), + CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), @@ -2112,7 +2111,7 @@ DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), EnableDTMeasurement = cms.bool( True ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), @@ -2122,7 +2121,7 @@ CSC_02 = cms.vdouble( 0.612, -0.207, 0.0, 0.067, -0.001, 0.0 ), CSC_03 = cms.vdouble( 0.787, -0.338, 0.029, 0.101, -0.008, 0.0 ), CSC_01 = cms.vdouble( 0.166, 0.0, 0.0, 0.031, 0.0, 0.0 ), - SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), + DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), crackWindow = cms.double( 0.04 ), @@ -2135,10 +2134,11 @@ DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), - EnableCSCMeasurement = cms.bool( True ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), OL_2222_0_scale = cms.vdouble( -7.667231, 0.0 ), - CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), + EnableCSCMeasurement = cms.bool( True ), CSC_12 = cms.vdouble( -0.161, 0.254, -0.047, 0.042, -0.007, 0.0 ) ) hltL2MuonSeeds = cms.EDProducer( "L2MuonSeedGenerator", @@ -5814,7 +5814,6 @@ hltL3fL1sMu16f0TkFiltered24Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 1.0E99 ), minPt = cms.double( 24.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -22514,16 +22513,12 @@ pvSrc = cms.InputTag( "" ) ) hltFastPVJetVertexChecker = cms.EDFilter( "JetVertexChecker", - minPt = cms.double( 0.0 ), - maxTrackPt = cms.double( 20.0 ), + beamSpot = cms.InputTag( "hltOnlineBeamSpot" ), maxNJetsToCheck = cms.int32( 2 ), minPtRatio = cms.double( 0.1 ), doFilter = cms.bool( False ), jetTracks = cms.InputTag( "hltFastPVJetTracksAssociator" ), - maxChi2 = cms.double( 20.0 ), - newMethod = cms.bool( False ), - maxNjetsOutput = cms.int32( 2 ), - beamSpot = cms.InputTag( "hltOnlineBeamSpot" ) + minPt = cms.double( 0.0 ) ) hltFastPVPixelTracksRecover = cms.EDProducer( "PixelTrackProducer", FilterPSet = cms.PSet( diff --git a/HLTrigger/Configuration/python/HLT_GRun_Famos_cff.py b/HLTrigger/Configuration/python/HLT_GRun_Famos_cff.py index 7bd4ca59bbfe8..388e61a5fdeea 100644 --- a/HLTrigger/Configuration/python/HLT_GRun_Famos_cff.py +++ b/HLTrigger/Configuration/python/HLT_GRun_Famos_cff.py @@ -1,11 +1,11 @@ -# /dev/CMSSW_7_2_1/GRun/V9 (CMSSW_7_2_0) +# /dev/CMSSW_7_2_1/GRun/V6 (CMSSW_7_2_0_pre8) import FWCore.ParameterSet.Config as cms from FastSimulation.HighLevelTrigger.HLTSetup_cff import * HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_7_2_1/GRun/V9') + tableName = cms.string('/dev/CMSSW_7_2_1/GRun/V6') ) HLTIter4PSetTrajectoryFilterIT = cms.PSet( @@ -726,11 +726,11 @@ 'HcalCellDead' ) ) hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", - categoryVariableName = cms.string( "vertexCategory" ), + trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), + categoryVariableName = cms.string( "vertexCategory" ), trackSelection = cms.PSet( totalHitsMin = cms.uint32( 0 ), jetDeltaRMax = cms.double( 0.3 ), @@ -752,7 +752,7 @@ calibrationRecords = cms.vstring( 'CombinedSVRecoVertex', 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), - trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), + correctVertexMass = cms.bool( True ), charmCut = cms.double( 1.5 ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), @@ -2256,7 +2256,6 @@ DT_12 = cms.vdouble( 0.183, 0.054, -0.087, 0.028, 0.002, 0.0 ), DT_14 = cms.vdouble( 0.359, 0.052, -0.107, 0.072, -0.004, 0.0 ), CSC_13_3_scale = cms.vdouble( -1.701268, 0.0 ), - DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23 = cms.vdouble( -0.081, 0.113, -0.029, 0.015, 0.008, 0.0 ), CSC_24 = cms.vdouble( 0.004, 0.021, -0.002, 0.053, 0.0, 0.0 ), OL_2222 = cms.vdouble( 0.107, 0.0, 0.0, 0.04, 0.0, 0.0 ), @@ -2271,14 +2270,14 @@ SME_22_0_scale = cms.vdouble( -3.457901, 0.0 ), DT_24_1_scale = cms.vdouble( -7.490909, 0.0 ), OL_1232_0_scale = cms.vdouble( -5.964634, 0.0 ), - DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), + SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), SME_13_0_scale = cms.vdouble( 0.104905, 0.0 ), SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), - CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), + SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), @@ -2297,7 +2296,7 @@ DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), - SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), + CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), @@ -2305,7 +2304,7 @@ DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), EnableDTMeasurement = cms.bool( True ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), @@ -2315,7 +2314,7 @@ CSC_02 = cms.vdouble( 0.612, -0.207, 0.0, 0.067, -0.001, 0.0 ), CSC_03 = cms.vdouble( 0.787, -0.338, 0.029, 0.101, -0.008, 0.0 ), CSC_01 = cms.vdouble( 0.166, 0.0, 0.0, 0.031, 0.0, 0.0 ), - SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), + DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), crackWindow = cms.double( 0.04 ), @@ -2328,10 +2327,11 @@ DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), beamSpotTag = cms.InputTag( "offlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), - EnableCSCMeasurement = cms.bool( True ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), OL_2222_0_scale = cms.vdouble( -7.667231, 0.0 ), - CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), + EnableCSCMeasurement = cms.bool( True ), CSC_12 = cms.vdouble( -0.161, 0.254, -0.047, 0.042, -0.007, 0.0 ) ) hltL2MuonSeeds = cms.EDProducer( "L2MuonSeedGenerator", @@ -11634,7 +11634,6 @@ hltL3fL1sMu16Eta2p1f0TkFiltered20Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 2.1 ), minPt = cms.double( 20.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -11787,7 +11786,6 @@ hltL3fL1sMu16f0TkFiltered24Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 1.0E99 ), minPt = cms.double( 24.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -11823,7 +11821,6 @@ hltL3fL1sMu20Eta2p1f0TkFiltered24Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 2.1 ), minPt = cms.double( 24.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -13876,32 +13873,6 @@ htLabels = cms.VInputTag( 'hltPFHT' ), minHt = cms.vdouble( 350.0 ) ) -hltPrePFHT350 = cms.EDFilter( "HLTPrescaler", - L1GtReadoutRecordTag = cms.InputTag( "gtDigis" ), - offset = cms.uint32( 0 ) -) -hltPrePFHT600 = cms.EDFilter( "HLTPrescaler", - L1GtReadoutRecordTag = cms.InputTag( "gtDigis" ), - offset = cms.uint32( 0 ) -) -hltHt500 = cms.EDFilter( "HLTHtMhtFilter", - saveTags = cms.bool( False ), - mhtLabels = cms.VInputTag( 'hltHtMht' ), - meffSlope = cms.vdouble( 1.0 ), - minMeff = cms.vdouble( 0.0 ), - minMht = cms.vdouble( 0.0 ), - htLabels = cms.VInputTag( 'hltHtMht' ), - minHt = cms.vdouble( 500.0 ) -) -hltPFHT600 = cms.EDFilter( "HLTHtMhtFilter", - saveTags = cms.bool( True ), - mhtLabels = cms.VInputTag( 'hltPFHT' ), - meffSlope = cms.vdouble( 1.0 ), - minMeff = cms.vdouble( 0.0 ), - minMht = cms.vdouble( 0.0 ), - htLabels = cms.VInputTag( 'hltPFHT' ), - minHt = cms.vdouble( 600.0 ) -) hltPrePFHT900 = cms.EDFilter( "HLTPrescaler", L1GtReadoutRecordTag = cms.InputTag( "gtDigis" ), offset = cms.uint32( 0 ) @@ -14035,16 +14006,12 @@ pvSrc = cms.InputTag( "" ) ) hltFastPVJetVertexChecker = cms.EDFilter( "JetVertexChecker", - minPt = cms.double( 0.0 ), - maxTrackPt = cms.double( 20.0 ), + beamSpot = cms.InputTag( "offlineBeamSpot" ), maxNJetsToCheck = cms.int32( 2 ), minPtRatio = cms.double( 0.1 ), doFilter = cms.bool( False ), jetTracks = cms.InputTag( "hltFastPVJetTracksAssociator" ), - maxChi2 = cms.double( 20.0 ), - newMethod = cms.bool( False ), - maxNjetsOutput = cms.int32( 2 ), - beamSpot = cms.InputTag( "offlineBeamSpot" ) + minPt = cms.double( 0.0 ) ) hltFastPVPixelTracksMerger = cms.EDProducer( "SimpleTrackListMerger", ShareFrac = cms.double( 0.19 ), @@ -14210,73 +14177,6 @@ MinTag = cms.double( 0.7 ), MaxTag = cms.double( 99999.0 ) ) -hltPrePFMET120NoiseCleanedMu5 = cms.EDFilter( "HLTPrescaler", - L1GtReadoutRecordTag = cms.InputTag( "gtDigis" ), - offset = cms.uint32( 0 ) -) -hltL1sL1SingleMuOpenCandidate = cms.EDFilter( "HLTLevel1GTSeed", - L1SeedsLogicalExpression = cms.string( "L1_SingleMuOpen" ), - saveTags = cms.bool( True ), - L1MuonCollectionTag = cms.InputTag( "l1extraParticles" ), - L1UseL1TriggerObjectMaps = cms.bool( False ), - L1UseAliasesForSeeding = cms.bool( True ), - L1GtReadoutRecordTag = cms.InputTag( "gtDigis" ), - L1CollectionsTag = cms.InputTag( "l1extraParticles" ), - L1NrBxInEvent = cms.int32( 1 ), - L1GtObjectMapTag = cms.InputTag( "gtDigis" ), - L1TechTriggerSeeding = cms.bool( False ) -) -hltPFMET120Mu5L1MuFiltered = cms.EDFilter( "HLTMuonL1Filter", - saveTags = cms.bool( False ), - CSCTFtag = cms.InputTag( "unused" ), - PreviousCandTag = cms.InputTag( "hltL1sL1SingleMuOpenCandidate" ), - MinPt = cms.double( 0.0 ), - MinN = cms.int32( 1 ), - MaxEta = cms.double( 2.5 ), - SelectQualities = cms.vint32( ), - CandTag = cms.InputTag( "l1extraParticles" ), - ExcludeSingleSegmentCSC = cms.bool( False ) -) -hltPFMET120Mu5L2PreFiltered = cms.EDFilter( "HLTMuonL2PreFilter", - saveTags = cms.bool( True ), - MaxDr = cms.double( 9999.0 ), - CutOnChambers = cms.bool( False ), - PreviousCandTag = cms.InputTag( "hltPFMET120Mu5L1MuFiltered" ), - MinPt = cms.double( 3.5 ), - MinN = cms.int32( 1 ), - SeedMapTag = cms.InputTag( "hltL2Muons" ), - MaxEta = cms.double( 2.5 ), - MinNhits = cms.vint32( 0, 1, 0, 1 ), - MinDxySig = cms.double( -1.0 ), - MinNchambers = cms.vint32( 0 ), - AbsEtaBins = cms.vdouble( 0.9, 1.5, 2.1, 5.0 ), - MaxDz = cms.double( 9999.0 ), - CandTag = cms.InputTag( "hltL2MuonCandidates" ), - BeamSpotTag = cms.InputTag( "offlineBeamSpot" ), - MinDr = cms.double( -1.0 ), - NSigmaPt = cms.double( 0.0 ), - MinNstations = cms.vint32( 0, 2, 0, 2 ) -) -hltPFMET120Mu5L3PreFiltered = cms.EDFilter( "HLTMuonL3PreFilter", - MaxNormalizedChi2 = cms.double( 20.0 ), - saveTags = cms.bool( True ), - PreviousCandTag = cms.InputTag( "hltPFMET120Mu5L2PreFiltered" ), - MinNmuonHits = cms.int32( 0 ), - MinN = cms.int32( 1 ), - MinTrackPt = cms.double( 0.0 ), - MaxEta = cms.double( 2.5 ), - MaxDXYBeamSpot = cms.double( 0.1 ), - MinNhits = cms.int32( 0 ), - MinDxySig = cms.double( -1.0 ), - NSigmaPt = cms.double( 0.0 ), - MaxDz = cms.double( 9999.0 ), - MaxPtDifference = cms.double( 9999.0 ), - MaxDr = cms.double( 2.0 ), - CandTag = cms.InputTag( "hltL3MuonCandidates" ), - MinDr = cms.double( -1.0 ), - BeamSpotTag = cms.InputTag( "offlineBeamSpot" ), - MinPt = cms.double( 5.0 ) -) hltPrePFMET170NoiseCleaned = cms.EDFilter( "HLTPrescaler", L1GtReadoutRecordTag = cms.InputTag( "gtDigis" ), offset = cms.uint32( 0 ) @@ -16205,12 +16105,9 @@ HLT_Mu40_v1 = cms.Path( HLTBeginSequence + hltL1sL1SingleMu16ORSingleMu25 + hltPreMu40 + hltL1fL1sMu16orMu25L1Filtered0 + HLTL2muonrecoSequence + hltL2fL1sMu16orMu25L1f0L2Filtered16Q + HLTL3muonrecoSequence + hltL3fL1sMu16orMu25L1f0L2f16QL3Filtered40Q + cms.SequencePlaceholder( "HLTEndSequence" ) ) HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1 = cms.Path( HLTBeginSequence + hltL1sL1Mu5EG20ORL1Mu5IsoEG18 + hltPreMu8TrkIsoVVLEle23GsfCaloIdTrackIdIsoMediumWP + hltL1sL1Mu5EG20ORL1Mu5IsoEG18L1Filtered0 + HLTL2muonrecoSequence + hltL2fL1sL1Mu5EG20ORL1Mu5IsoEG18L1f0L2Filtered5 + HLTL3muonrecoSequence + hltL3fL1sL1Mu5EG20ORL1Mu5IsoEG18L1f0L2f5L3Filtered8 + HLTL3muontrkisovvlSequence + hltL1sL1Mu5EG20ORL1Mu5IsoEG18L3IsoFiltered8 + HLTMu8Ele23_Gsf + cms.SequencePlaceholder( "HLTEndSequence" ) ) HLT_PFHT350_PFMET120_NoiseCleaned_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT350PFMET120NoiseCleaned + HLTRecoMETSequence + hltMET70 + HLTHBHENoiseCleanerSequence + hltMetClean + hltMETClean60 + HLTAK4CaloJetsSequence + hltMetCleanUsingJetID + hltMETCleanUsingJetID60 + hltHtMht + hltHt280 + HLTAK4PFJetsSequence + hltPFMETProducer + hltPFMET120Filter + hltPFHT + hltPFHT350 + cms.SequencePlaceholder( "HLTEndSequence" ) ) -HLT_PFHT350_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT350 + HLTAK4CaloJetsSequence + hltHtMht + hltHt280 + HLTAK4PFJetsSequence + hltPFHT + hltPFHT350 + cms.SequencePlaceholder( "HLTEndSequence" ) ) -HLT_PFHT600_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT600 + HLTAK4CaloJetsSequence + hltHtMht + hltHt500 + HLTAK4PFJetsSequence + hltPFHT + hltPFHT600 + cms.SequencePlaceholder( "HLTEndSequence" ) ) HLT_PFHT900_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT900 + HLTAK4CaloJetsSequence + hltHtMht + hltHt700 + HLTAK4PFJetsSequence + hltPFHT + hltPFHT900 + cms.SequencePlaceholder( "HLTEndSequence" ) ) HLT_PFJet260_v1 = cms.Path( HLTBeginSequence + hltL1sL1SingleJet200 + hltPrePFJet260 + HLTAK4CaloJetsSequence + hltSingleCaloJet210 + HLTAK4PFJetsSequence + hltPFJetsCorrectedMatchedToCaloJets210 + hltSinglePFJet260 + cms.SequencePlaceholder( "HLTEndSequence" ) ) HLT_PFMET120_NoiseCleaned_BTagCSV07_v1 = cms.Path( HLTBeginSequence + hltL1sL1ETM60ORETM70 + hltPrePFMET120NoiseCleanedBTagCSV07 + HLTRecoMETSequence + hltMET70 + HLTHBHENoiseCleanerSequence + hltMetClean + hltMETClean70 + HLTAK4CaloJetsSequence + hltMetCleanUsingJetID + hltMETCleanUsingJetID70 + hltSusyPreBtagJetFilter + HLTFastPrimaryVertexSequence + hltFastPVPixelVertexSelector + HLTBtagCSVSequenceL3 + hltBLifetimeL3FilterCSVsusy + HLTAK4PFJetsSequence + hltPFMETProducer + hltPFMET120Filter + cms.SequencePlaceholder( "HLTEndSequence" ) ) -HLT_PFMET120_NoiseCleaned_Mu5_v1 = cms.Path( HLTBeginSequence + hltL1sL1ETM60ORETM70 + hltPrePFMET120NoiseCleanedMu5 + cms.ignore(hltL1sL1SingleMuOpenCandidate) + HLTRecoMETSequence + hltMET70 + HLTHBHENoiseCleanerSequence + hltMetClean + hltMETClean70 + HLTAK4CaloJetsSequence + hltMetCleanUsingJetID + hltMETCleanUsingJetID70 + hltPFMET120Mu5L1MuFiltered + HLTL2muonrecoSequence + hltPFMET120Mu5L2PreFiltered + HLTL3muonrecoSequence + hltPFMET120Mu5L3PreFiltered + HLTAK4PFJetsSequence + hltPFMETProducer + hltPFMET120Filter + cms.SequencePlaceholder( "HLTEndSequence" ) ) HLT_PFMET170_NoiseCleaned_v1 = cms.Path( HLTBeginSequence + hltL1sL1ETM60ORETM70 + hltPrePFMET170NoiseCleaned + HLTRecoMETSequence + hltMET90 + HLTHBHENoiseCleanerSequence + hltMetClean + hltMETClean80 + HLTAK4CaloJetsSequence + hltMetCleanUsingJetID + hltMETCleanUsingJetID80 + HLTAK4PFJetsSequence + hltPFMETProducer + hltPFMET170Filter + cms.SequencePlaceholder( "HLTEndSequence" ) ) HLT_Photon135_PFMET40_v1 = cms.Path( HLTBeginSequence + hltL1sL1SingleEG35 + hltPrePhoton135PFMET40 + HLTSinglePhoton135Sequence + HLTAK4PFJetsSequence + hltPFMETProducer + hltPFMET40Filter + cms.SequencePlaceholder( "HLTEndSequence" ) ) HLT_Photon135_VBF_v1 = cms.Path( HLTBeginSequence + hltL1sL1SingleEG35 + hltPrePhoton135VBF + HLTSinglePhoton135Sequence + HLTAK4CaloJetsSequence + hltDiCaloJet20MJJ400AllJetsDEta3Filter + cms.SequencePlaceholder( "HLTEndSequence" ) ) @@ -16242,7 +16139,7 @@ HLTriggerFirstPath = cms.Path( hltGetConditions + hltGetRaw + hltBoolFalse ) -HLTSchedule = cms.Schedule( *(HLT_AK8PFJet360TrimMod_Mass30_v1, HLT_Dimuon13_PsiPrime_v1, HLT_Dimuon13_Upsilon_v1, HLT_Dimuon20_Jpsi_v1, HLT_DoubleEle33_CaloIdL_GsfTrkIdVL_MW_v1, HLT_DoubleEle33_CaloIdL_GsfTrkIdVL_v1, HLT_DoubleMediumIsoPFTau40_Trk1_eta2p1_Reg_v1, HLT_DoubleMu4_3_Bs_v1, HLT_DoubleMu4_3_Jpsi_Displaced_v1, HLT_DoubleMu4_JpsiTrk_Displaced_v1, HLT_DoubleMu4_LowMassNonResonantTrk_Displaced_v1, HLT_DoubleMu4_PsiPrimeTrk_Displaced_v1, HLT_DoublePhoton85_v1, HLT_Ele17_Ele12_Ele10_CaloId_TrackId_v1, HLT_Ele20WP60_Ele8_Mass55_v1, HLT_Ele22_eta2p1_WP85_Gsf_LooseIsoPFTau20_v1, HLT_Ele23_Ele12_CaloId_TrackId_Iso_v1, HLT_Ele25WP60_SC4_Mass55_v1, HLT_Ele27_eta2p1_WP85_Gsf_CentralPFJet30_BTagCSV_v1, HLT_Ele27_eta2p1_WP85_Gsf_TriCentralPFJet40_v1, HLT_Ele27_eta2p1_WP85_Gsf_TriCentralPFJet60_50_35_v1, HLT_Ele27_eta2p1_WP85_Gsf_v1, HLT_Ele32_eta2p1_WP85_Gsf_CentralPFJet30_BTagCSV_v1, HLT_Ele32_eta2p1_WP85_Gsf_TriCentralPFJet40_v1, HLT_Ele32_eta2p1_WP85_Gsf_TriCentralPFJet60_50_35_v1, HLT_Ele32_eta2p1_WP85_Gsf_v1, HLT_Ele45_CaloIdVT_GsfTrkIdT_PFJet200_PFJet50_v1, HLT_Ele95_CaloIdVT_GsfTrkIdT_v1, HLT_IsoMu17_eta2p1_LooseIsoPFTau20_v1, HLT_IsoMu20_eta2p1_IterTrk02_CentralPFJet30_BTagCSV_v1, HLT_IsoMu20_eta2p1_IterTrk02_TriCentralPFJet40_v1, HLT_IsoMu20_eta2p1_IterTrk02_TriCentralPFJet60_50_35_v1, HLT_IsoMu20_eta2p1_IterTrk02_v1, HLT_IsoMu24_IterTrk02_v1, HLT_IsoMu24_eta2p1_IterTrk02_CentralPFJet30_BTagCSV_v1, HLT_IsoMu24_eta2p1_IterTrk02_TriCentralPFJet40_v1, HLT_IsoMu24_eta2p1_IterTrk02_TriCentralPFJet60_50_35_v1, HLT_IsoMu24_eta2p1_IterTrk02_v1, HLT_IsoTkMu20_eta2p1_IterTrk02_v1, HLT_IsoTkMu24_IterTrk02_v1, HLT_IsoTkMu24_eta2p1_IterTrk02_v1, HLT_L2DoubleMu23_NoVertex_v1, HLT_L2DoubleMu28_NoVertex_2Cha_Angle2p5_Mass10_v1, HLT_L2DoubleMu38_NoVertex_2Cha_Angle2p5_Mass10_v1, HLT_LooseIsoPFTau50_Trk30_eta2p1_MET120_v1, HLT_Mu17_Mu8_v1, HLT_Mu17_TkMu8_v1, HLT_Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_v1, HLT_Mu17_TrkIsoVVL_TkMu8_TrkIsoVVL_v1, HLT_Mu23_TrkIsoVVL_Ele12_Gsf_CaloId_TrackId_Iso_MediumWP_v1, HLT_Mu25_TkMu0_dEta18_Onia_v1, HLT_Mu30_TkMu11_v1, HLT_Mu40_eta2p1_PFJet200_PFJet50_v1, HLT_Mu40_v1, HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1, HLT_PFHT350_PFMET120_NoiseCleaned_v1, HLT_PFHT350_v1, HLT_PFHT600_v1, HLT_PFHT900_v1, HLT_PFJet260_v1, HLT_PFMET120_NoiseCleaned_BTagCSV07_v1, HLT_PFMET120_NoiseCleaned_Mu5_v1, HLT_PFMET170_NoiseCleaned_v1, HLT_Photon135_PFMET40_v1, HLT_Photon135_VBF_v1, HLT_Photon150_PFMET40_v1, HLT_Photon150_VBF_v1, HLT_Photon155_v1, HLT_Photon160_PFMET40_v1, HLT_Photon160_VBF_v1, HLT_Photon22_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon22_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon250_NoHE_PFMET40_v1, HLT_Photon250_NoHE_VBF_v1, HLT_Photon300_NoHE_PFMET40_v1, HLT_Photon300_NoHE_VBF_v1, HLT_Photon36_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon18_AND_HE10_R9Id65_Mass95_v1, HLT_Photon36_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon36_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon42_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon22_AND_HE10_R9Id65_v1, HLT_Photon50_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon50_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon75_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon75_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon90_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon90_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Physics_v1, HLT_ReducedIterativeTracking_v1, HLT_ZeroBias_v1, HLTriggerFinalPath, HLTriggerFirstPath )) +HLTSchedule = cms.Schedule( *(HLT_AK8PFJet360TrimMod_Mass30_v1, HLT_Dimuon13_PsiPrime_v1, HLT_Dimuon13_Upsilon_v1, HLT_Dimuon20_Jpsi_v1, HLT_DoubleEle33_CaloIdL_GsfTrkIdVL_MW_v1, HLT_DoubleEle33_CaloIdL_GsfTrkIdVL_v1, HLT_DoubleMediumIsoPFTau40_Trk1_eta2p1_Reg_v1, HLT_DoubleMu4_3_Bs_v1, HLT_DoubleMu4_3_Jpsi_Displaced_v1, HLT_DoubleMu4_JpsiTrk_Displaced_v1, HLT_DoubleMu4_LowMassNonResonantTrk_Displaced_v1, HLT_DoubleMu4_PsiPrimeTrk_Displaced_v1, HLT_DoublePhoton85_v1, HLT_Ele17_Ele12_Ele10_CaloId_TrackId_v1, HLT_Ele20WP60_Ele8_Mass55_v1, HLT_Ele22_eta2p1_WP85_Gsf_LooseIsoPFTau20_v1, HLT_Ele23_Ele12_CaloId_TrackId_Iso_v1, HLT_Ele25WP60_SC4_Mass55_v1, HLT_Ele27_eta2p1_WP85_Gsf_CentralPFJet30_BTagCSV_v1, HLT_Ele27_eta2p1_WP85_Gsf_TriCentralPFJet40_v1, HLT_Ele27_eta2p1_WP85_Gsf_TriCentralPFJet60_50_35_v1, HLT_Ele27_eta2p1_WP85_Gsf_v1, HLT_Ele32_eta2p1_WP85_Gsf_CentralPFJet30_BTagCSV_v1, HLT_Ele32_eta2p1_WP85_Gsf_TriCentralPFJet40_v1, HLT_Ele32_eta2p1_WP85_Gsf_TriCentralPFJet60_50_35_v1, HLT_Ele32_eta2p1_WP85_Gsf_v1, HLT_Ele45_CaloIdVT_GsfTrkIdT_PFJet200_PFJet50_v1, HLT_Ele95_CaloIdVT_GsfTrkIdT_v1, HLT_IsoMu17_eta2p1_LooseIsoPFTau20_v1, HLT_IsoMu20_eta2p1_IterTrk02_CentralPFJet30_BTagCSV_v1, HLT_IsoMu20_eta2p1_IterTrk02_TriCentralPFJet40_v1, HLT_IsoMu20_eta2p1_IterTrk02_TriCentralPFJet60_50_35_v1, HLT_IsoMu20_eta2p1_IterTrk02_v1, HLT_IsoMu24_IterTrk02_v1, HLT_IsoMu24_eta2p1_IterTrk02_CentralPFJet30_BTagCSV_v1, HLT_IsoMu24_eta2p1_IterTrk02_TriCentralPFJet40_v1, HLT_IsoMu24_eta2p1_IterTrk02_TriCentralPFJet60_50_35_v1, HLT_IsoMu24_eta2p1_IterTrk02_v1, HLT_IsoTkMu20_eta2p1_IterTrk02_v1, HLT_IsoTkMu24_IterTrk02_v1, HLT_IsoTkMu24_eta2p1_IterTrk02_v1, HLT_L2DoubleMu23_NoVertex_v1, HLT_L2DoubleMu28_NoVertex_2Cha_Angle2p5_Mass10_v1, HLT_L2DoubleMu38_NoVertex_2Cha_Angle2p5_Mass10_v1, HLT_LooseIsoPFTau50_Trk30_eta2p1_MET120_v1, HLT_Mu17_Mu8_v1, HLT_Mu17_TkMu8_v1, HLT_Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_v1, HLT_Mu17_TrkIsoVVL_TkMu8_TrkIsoVVL_v1, HLT_Mu23_TrkIsoVVL_Ele12_Gsf_CaloId_TrackId_Iso_MediumWP_v1, HLT_Mu25_TkMu0_dEta18_Onia_v1, HLT_Mu30_TkMu11_v1, HLT_Mu40_eta2p1_PFJet200_PFJet50_v1, HLT_Mu40_v1, HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1, HLT_PFHT350_PFMET120_NoiseCleaned_v1, HLT_PFHT900_v1, HLT_PFJet260_v1, HLT_PFMET120_NoiseCleaned_BTagCSV07_v1, HLT_PFMET170_NoiseCleaned_v1, HLT_Photon135_PFMET40_v1, HLT_Photon135_VBF_v1, HLT_Photon150_PFMET40_v1, HLT_Photon150_VBF_v1, HLT_Photon155_v1, HLT_Photon160_PFMET40_v1, HLT_Photon160_VBF_v1, HLT_Photon22_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon22_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon250_NoHE_PFMET40_v1, HLT_Photon250_NoHE_VBF_v1, HLT_Photon300_NoHE_PFMET40_v1, HLT_Photon300_NoHE_VBF_v1, HLT_Photon36_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon18_AND_HE10_R9Id65_Mass95_v1, HLT_Photon36_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon36_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon42_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon22_AND_HE10_R9Id65_v1, HLT_Photon50_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon50_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon75_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon75_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon90_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon90_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Physics_v1, HLT_ReducedIterativeTracking_v1, HLT_ZeroBias_v1, HLTriggerFinalPath, HLTriggerFirstPath )) # CMSSW version specific customizations import os diff --git a/HLTrigger/Configuration/python/HLT_GRun_cff.py b/HLTrigger/Configuration/python/HLT_GRun_cff.py index f195e12dfc8fe..3bf14eb0e90c0 100644 --- a/HLTrigger/Configuration/python/HLT_GRun_cff.py +++ b/HLTrigger/Configuration/python/HLT_GRun_cff.py @@ -1,10 +1,10 @@ -# /dev/CMSSW_7_2_1/GRun/V9 (CMSSW_7_2_0) +# /dev/CMSSW_7_2_1/GRun/V6 (CMSSW_7_2_0_pre8) import FWCore.ParameterSet.Config as cms HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_7_2_1/GRun/V9') + tableName = cms.string('/dev/CMSSW_7_2_1/GRun/V6') ) HLTIter4PSetTrajectoryFilterIT = cms.PSet( @@ -505,12 +505,9 @@ 'HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v1', 'HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1', 'HLT_PFHT350_PFMET120_NoiseCleaned_v1', - 'HLT_PFHT350_v1', - 'HLT_PFHT600_v1', 'HLT_PFHT900_v1', 'HLT_PFJet260_v1', 'HLT_PFMET120_NoiseCleaned_BTagCSV07_v1', - 'HLT_PFMET120_NoiseCleaned_Mu5_v1', 'HLT_PFMET170_NoiseCleaned_v1', 'HLT_Photon135_PFMET40_v1', 'HLT_Photon135_VBF_v1', @@ -849,11 +846,11 @@ 'HcalCellDead' ) ) hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", - categoryVariableName = cms.string( "vertexCategory" ), + trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), + categoryVariableName = cms.string( "vertexCategory" ), trackSelection = cms.PSet( totalHitsMin = cms.uint32( 0 ), jetDeltaRMax = cms.double( 0.3 ), @@ -875,7 +872,7 @@ calibrationRecords = cms.vstring( 'CombinedSVRecoVertex', 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), - trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), + correctVertexMass = cms.bool( True ), charmCut = cms.double( 1.5 ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), @@ -2699,7 +2696,6 @@ DT_12 = cms.vdouble( 0.183, 0.054, -0.087, 0.028, 0.002, 0.0 ), DT_14 = cms.vdouble( 0.359, 0.052, -0.107, 0.072, -0.004, 0.0 ), CSC_13_3_scale = cms.vdouble( -1.701268, 0.0 ), - DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23 = cms.vdouble( -0.081, 0.113, -0.029, 0.015, 0.008, 0.0 ), CSC_24 = cms.vdouble( 0.004, 0.021, -0.002, 0.053, 0.0, 0.0 ), OL_2222 = cms.vdouble( 0.107, 0.0, 0.0, 0.04, 0.0, 0.0 ), @@ -2714,14 +2710,14 @@ SME_22_0_scale = cms.vdouble( -3.457901, 0.0 ), DT_24_1_scale = cms.vdouble( -7.490909, 0.0 ), OL_1232_0_scale = cms.vdouble( -5.964634, 0.0 ), - DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), + SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), SME_13_0_scale = cms.vdouble( 0.104905, 0.0 ), SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), - CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), + SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), @@ -2740,7 +2736,7 @@ DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), - SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), + CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), @@ -2748,7 +2744,7 @@ DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), EnableDTMeasurement = cms.bool( True ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), @@ -2758,7 +2754,7 @@ CSC_02 = cms.vdouble( 0.612, -0.207, 0.0, 0.067, -0.001, 0.0 ), CSC_03 = cms.vdouble( 0.787, -0.338, 0.029, 0.101, -0.008, 0.0 ), CSC_01 = cms.vdouble( 0.166, 0.0, 0.0, 0.031, 0.0, 0.0 ), - SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), + DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), crackWindow = cms.double( 0.04 ), @@ -2771,10 +2767,11 @@ DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), - EnableCSCMeasurement = cms.bool( True ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), OL_2222_0_scale = cms.vdouble( -7.667231, 0.0 ), - CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), + EnableCSCMeasurement = cms.bool( True ), CSC_12 = cms.vdouble( -0.161, 0.254, -0.047, 0.042, -0.007, 0.0 ) ) hltL2MuonSeeds = cms.EDProducer( "L2MuonSeedGenerator", @@ -18269,7 +18266,6 @@ hltL3fL1sMu16Eta2p1f0TkFiltered20Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 2.1 ), minPt = cms.double( 20.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -19044,7 +19040,6 @@ hltL3fL1sMu16f0TkFiltered24Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 1.0E99 ), minPt = cms.double( 24.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -19080,7 +19075,6 @@ hltL3fL1sMu20Eta2p1f0TkFiltered24Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 2.1 ), minPt = cms.double( 24.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -22397,32 +22391,6 @@ htLabels = cms.VInputTag( 'hltPFHT' ), minHt = cms.vdouble( 350.0 ) ) -hltPrePFHT350 = cms.EDFilter( "HLTPrescaler", - L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), - offset = cms.uint32( 0 ) -) -hltPrePFHT600 = cms.EDFilter( "HLTPrescaler", - L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), - offset = cms.uint32( 0 ) -) -hltHt500 = cms.EDFilter( "HLTHtMhtFilter", - saveTags = cms.bool( False ), - mhtLabels = cms.VInputTag( 'hltHtMht' ), - meffSlope = cms.vdouble( 1.0 ), - minMeff = cms.vdouble( 0.0 ), - minMht = cms.vdouble( 0.0 ), - htLabels = cms.VInputTag( 'hltHtMht' ), - minHt = cms.vdouble( 500.0 ) -) -hltPFHT600 = cms.EDFilter( "HLTHtMhtFilter", - saveTags = cms.bool( True ), - mhtLabels = cms.VInputTag( 'hltPFHT' ), - meffSlope = cms.vdouble( 1.0 ), - minMeff = cms.vdouble( 0.0 ), - minMht = cms.vdouble( 0.0 ), - htLabels = cms.VInputTag( 'hltPFHT' ), - minHt = cms.vdouble( 600.0 ) -) hltPrePFHT900 = cms.EDFilter( "HLTPrescaler", L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), offset = cms.uint32( 0 ) @@ -22756,16 +22724,12 @@ pvSrc = cms.InputTag( "" ) ) hltFastPVJetVertexChecker = cms.EDFilter( "JetVertexChecker", - minPt = cms.double( 0.0 ), - maxTrackPt = cms.double( 20.0 ), + beamSpot = cms.InputTag( "hltOnlineBeamSpot" ), maxNJetsToCheck = cms.int32( 2 ), minPtRatio = cms.double( 0.1 ), doFilter = cms.bool( False ), jetTracks = cms.InputTag( "hltFastPVJetTracksAssociator" ), - maxChi2 = cms.double( 20.0 ), - newMethod = cms.bool( False ), - maxNjetsOutput = cms.int32( 2 ), - beamSpot = cms.InputTag( "hltOnlineBeamSpot" ) + minPt = cms.double( 0.0 ) ) hltFastPVPixelTracksRecover = cms.EDProducer( "PixelTrackProducer", FilterPSet = cms.PSet( @@ -23511,73 +23475,6 @@ MinTag = cms.double( 0.7 ), MaxTag = cms.double( 99999.0 ) ) -hltPrePFMET120NoiseCleanedMu5 = cms.EDFilter( "HLTPrescaler", - L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), - offset = cms.uint32( 0 ) -) -hltL1sL1SingleMuOpenCandidate = cms.EDFilter( "HLTLevel1GTSeed", - L1SeedsLogicalExpression = cms.string( "L1_SingleMuOpen" ), - saveTags = cms.bool( True ), - L1MuonCollectionTag = cms.InputTag( "hltL1extraParticles" ), - L1UseL1TriggerObjectMaps = cms.bool( False ), - L1UseAliasesForSeeding = cms.bool( True ), - L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), - L1CollectionsTag = cms.InputTag( "hltL1extraParticles" ), - L1NrBxInEvent = cms.int32( 1 ), - L1GtObjectMapTag = cms.InputTag( "hltL1GtObjectMap" ), - L1TechTriggerSeeding = cms.bool( False ) -) -hltPFMET120Mu5L1MuFiltered = cms.EDFilter( "HLTMuonL1Filter", - saveTags = cms.bool( False ), - CSCTFtag = cms.InputTag( "unused" ), - PreviousCandTag = cms.InputTag( "hltL1sL1SingleMuOpenCandidate" ), - MinPt = cms.double( 0.0 ), - MinN = cms.int32( 1 ), - MaxEta = cms.double( 2.5 ), - SelectQualities = cms.vint32( ), - CandTag = cms.InputTag( "hltL1extraParticles" ), - ExcludeSingleSegmentCSC = cms.bool( False ) -) -hltPFMET120Mu5L2PreFiltered = cms.EDFilter( "HLTMuonL2PreFilter", - saveTags = cms.bool( True ), - MaxDr = cms.double( 9999.0 ), - CutOnChambers = cms.bool( False ), - PreviousCandTag = cms.InputTag( "hltPFMET120Mu5L1MuFiltered" ), - MinPt = cms.double( 3.5 ), - MinN = cms.int32( 1 ), - SeedMapTag = cms.InputTag( "hltL2Muons" ), - MaxEta = cms.double( 2.5 ), - MinNhits = cms.vint32( 0, 1, 0, 1 ), - MinDxySig = cms.double( -1.0 ), - MinNchambers = cms.vint32( 0 ), - AbsEtaBins = cms.vdouble( 0.9, 1.5, 2.1, 5.0 ), - MaxDz = cms.double( 9999.0 ), - CandTag = cms.InputTag( "hltL2MuonCandidates" ), - BeamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), - MinDr = cms.double( -1.0 ), - NSigmaPt = cms.double( 0.0 ), - MinNstations = cms.vint32( 0, 2, 0, 2 ) -) -hltPFMET120Mu5L3PreFiltered = cms.EDFilter( "HLTMuonL3PreFilter", - MaxNormalizedChi2 = cms.double( 20.0 ), - saveTags = cms.bool( True ), - PreviousCandTag = cms.InputTag( "hltPFMET120Mu5L2PreFiltered" ), - MinNmuonHits = cms.int32( 0 ), - MinN = cms.int32( 1 ), - MinTrackPt = cms.double( 0.0 ), - MaxEta = cms.double( 2.5 ), - MaxDXYBeamSpot = cms.double( 0.1 ), - MinNhits = cms.int32( 0 ), - MinDxySig = cms.double( -1.0 ), - NSigmaPt = cms.double( 0.0 ), - MaxDz = cms.double( 9999.0 ), - MaxPtDifference = cms.double( 9999.0 ), - MaxDr = cms.double( 2.0 ), - CandTag = cms.InputTag( "hltL3MuonCandidates" ), - MinDr = cms.double( -1.0 ), - BeamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), - MinPt = cms.double( 5.0 ) -) hltPrePFMET170NoiseCleaned = cms.EDFilter( "HLTPrescaler", L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), offset = cms.uint32( 0 ) @@ -26089,12 +25986,9 @@ HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v1 = cms.Path( HLTBeginSequence + hltL1sL1Mu5EG20 + hltPreMu42NoFiltersNoVtxPhoton42CaloIdL + hltL1fL1sMu5EG20L1Filtered5 + HLTL2muonrecoSequenceNoVtx + HLTL3NoFiltersNoVtxmuonrecoSequence + hltL2fL1sMu5EG20L1f5L2NoVtxFiltered16 + hltL3fL1Mu5EG20L1f5L2NVf12L3NoFiltersNoVtxFiltered42 + HLTDoFullUnpackingEgammaEcalSequence + HLTPFClusteringForEgamma + hltEgammaCandidates + hltEGL1Mu5EG20Filter + hltMu42NoFiltersNoVtxPhoton42CaloIdLEtFilter + hltEgammaClusterShape + hltMu42NoFiltersNoVtxPhoton42CaloIdLClusterShapeFilter + HLTDoLocalHcalWithTowerSequence + HLTFastJetForEgamma + hltEgammaHoverE + hltMu42NoFiltersNoVtxPhoton42CaloIdLHEFilter + HLTEndSequence ) HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1 = cms.Path( HLTBeginSequence + hltL1sL1Mu5EG20ORL1Mu5IsoEG18 + hltPreMu8TrkIsoVVLEle23GsfCaloIdTrackIdIsoMediumWP + hltL1sL1Mu5EG20ORL1Mu5IsoEG18L1Filtered0 + HLTL2muonrecoSequence + hltL2fL1sL1Mu5EG20ORL1Mu5IsoEG18L1f0L2Filtered5 + HLTL3muonrecoSequence + hltL3fL1sL1Mu5EG20ORL1Mu5IsoEG18L1f0L2f5L3Filtered8 + HLTL3muontrkisovvlSequence + hltL1sL1Mu5EG20ORL1Mu5IsoEG18L3IsoFiltered8 + HLTMu8Ele23_Gsf + HLTEndSequence ) HLT_PFHT350_PFMET120_NoiseCleaned_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT350PFMET120NoiseCleaned + HLTRecoMETSequence + hltMET70 + HLTHBHENoiseCleanerSequence + hltMetClean + hltMETClean60 + HLTAK4CaloJetsSequence + hltMetCleanUsingJetID + hltMETCleanUsingJetID60 + hltHtMht + hltHt280 + HLTAK4PFJetsSequence + hltPFMETProducer + hltPFMET120Filter + hltPFHT + hltPFHT350 + HLTEndSequence ) -HLT_PFHT350_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT350 + HLTAK4CaloJetsSequence + hltHtMht + hltHt280 + HLTAK4PFJetsSequence + hltPFHT + hltPFHT350 + HLTEndSequence ) -HLT_PFHT600_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT600 + HLTAK4CaloJetsSequence + hltHtMht + hltHt500 + HLTAK4PFJetsSequence + hltPFHT + hltPFHT600 + HLTEndSequence ) HLT_PFHT900_v1 = cms.Path( HLTBeginSequence + hltL1sL1HTT150ORHTT175 + hltPrePFHT900 + HLTAK4CaloJetsSequence + hltHtMht + hltHt700 + HLTAK4PFJetsSequence + hltPFHT + hltPFHT900 + HLTEndSequence ) HLT_PFJet260_v1 = cms.Path( HLTBeginSequence + hltL1sL1SingleJet200 + hltPrePFJet260 + HLTAK4CaloJetsSequence + hltSingleCaloJet210 + HLTAK4PFJetsSequence + hltPFJetsCorrectedMatchedToCaloJets210 + hltSinglePFJet260 + HLTEndSequence ) HLT_PFMET120_NoiseCleaned_BTagCSV07_v1 = cms.Path( HLTBeginSequence + hltL1sL1ETM60ORETM70 + hltPrePFMET120NoiseCleanedBTagCSV07 + HLTRecoMETSequence + hltMET70 + HLTHBHENoiseCleanerSequence + hltMetClean + hltMETClean70 + HLTAK4CaloJetsSequence + hltMetCleanUsingJetID + hltMETCleanUsingJetID70 + hltSusyPreBtagJetFilter + HLTFastPrimaryVertexSequence + hltFastPVPixelVertexSelector + HLTBtagCSVSequenceL3 + hltBLifetimeL3FilterCSVsusy + HLTAK4PFJetsSequence + hltPFMETProducer + hltPFMET120Filter + HLTEndSequence ) -HLT_PFMET120_NoiseCleaned_Mu5_v1 = cms.Path( HLTBeginSequence + hltL1sL1ETM60ORETM70 + hltPrePFMET120NoiseCleanedMu5 + cms.ignore(hltL1sL1SingleMuOpenCandidate) + HLTRecoMETSequence + hltMET70 + HLTHBHENoiseCleanerSequence + hltMetClean + hltMETClean70 + HLTAK4CaloJetsSequence + hltMetCleanUsingJetID + hltMETCleanUsingJetID70 + hltPFMET120Mu5L1MuFiltered + HLTL2muonrecoSequence + hltPFMET120Mu5L2PreFiltered + HLTL3muonrecoSequence + hltPFMET120Mu5L3PreFiltered + HLTAK4PFJetsSequence + hltPFMETProducer + hltPFMET120Filter + HLTEndSequence ) HLT_PFMET170_NoiseCleaned_v1 = cms.Path( HLTBeginSequence + hltL1sL1ETM60ORETM70 + hltPrePFMET170NoiseCleaned + HLTRecoMETSequence + hltMET90 + HLTHBHENoiseCleanerSequence + hltMetClean + hltMETClean80 + HLTAK4CaloJetsSequence + hltMetCleanUsingJetID + hltMETCleanUsingJetID80 + HLTAK4PFJetsSequence + hltPFMETProducer + hltPFMET170Filter + HLTEndSequence ) HLT_Photon135_PFMET40_v1 = cms.Path( HLTBeginSequence + hltL1sL1SingleEG35 + hltPrePhoton135PFMET40 + HLTSinglePhoton135Sequence + HLTAK4PFJetsSequence + hltPFMETProducer + hltPFMET40Filter + HLTEndSequence ) HLT_Photon135_VBF_v1 = cms.Path( HLTBeginSequence + hltL1sL1SingleEG35 + hltPrePhoton135VBF + HLTSinglePhoton135Sequence + HLTAK4CaloJetsSequence + hltDiCaloJet20MJJ400AllJetsDEta3Filter + HLTEndSequence ) @@ -26126,7 +26020,7 @@ HLTriggerFirstPath = cms.Path( hltGetConditions + hltGetRaw + hltBoolFalse ) -HLTSchedule = cms.Schedule( *(HLTAnalyzerEndpath, HLT_AK8PFJet360TrimMod_Mass30_v1, HLT_Dimuon13_PsiPrime_v1, HLT_Dimuon13_Upsilon_v1, HLT_Dimuon20_Jpsi_v1, HLT_DoubleEle33_CaloIdL_GsfTrkIdVL_MW_v1, HLT_DoubleEle33_CaloIdL_GsfTrkIdVL_v1, HLT_DoubleMediumIsoPFTau40_Trk1_eta2p1_Reg_v1, HLT_DoubleMu33NoFiltersNoVtx_v1, HLT_DoubleMu38NoFiltersNoVtx_v1, HLT_DoubleMu4_3_Bs_v1, HLT_DoubleMu4_3_Jpsi_Displaced_v1, HLT_DoubleMu4_JpsiTrk_Displaced_v1, HLT_DoubleMu4_LowMassNonResonantTrk_Displaced_v1, HLT_DoubleMu4_PsiPrimeTrk_Displaced_v1, HLT_DoublePhoton85_v1, HLT_Ele17_Ele12_Ele10_CaloId_TrackId_v1, HLT_Ele20WP60_Ele8_Mass55_v1, HLT_Ele22_eta2p1_WP85_Gsf_LooseIsoPFTau20_v1, HLT_Ele23_Ele12_CaloId_TrackId_Iso_v1, HLT_Ele25WP60_SC4_Mass55_v1, HLT_Ele27_eta2p1_WP85_Gsf_CentralPFJet30_BTagCSV_v1, HLT_Ele27_eta2p1_WP85_Gsf_TriCentralPFJet40_v1, HLT_Ele27_eta2p1_WP85_Gsf_TriCentralPFJet60_50_35_v1, HLT_Ele27_eta2p1_WP85_Gsf_v1, HLT_Ele32_eta2p1_WP85_Gsf_CentralPFJet30_BTagCSV_v1, HLT_Ele32_eta2p1_WP85_Gsf_TriCentralPFJet40_v1, HLT_Ele32_eta2p1_WP85_Gsf_TriCentralPFJet60_50_35_v1, HLT_Ele32_eta2p1_WP85_Gsf_v1, HLT_Ele45_CaloIdVT_GsfTrkIdT_PFJet200_PFJet50_v1, HLT_Ele95_CaloIdVT_GsfTrkIdT_v1, HLT_IsoMu17_eta2p1_LooseIsoPFTau20_v1, HLT_IsoMu20_eta2p1_IterTrk02_CentralPFJet30_BTagCSV_v1, HLT_IsoMu20_eta2p1_IterTrk02_TriCentralPFJet40_v1, HLT_IsoMu20_eta2p1_IterTrk02_TriCentralPFJet60_50_35_v1, HLT_IsoMu20_eta2p1_IterTrk02_v1, HLT_IsoMu24_IterTrk02_v1, HLT_IsoMu24_eta2p1_IterTrk02_CentralPFJet30_BTagCSV_v1, HLT_IsoMu24_eta2p1_IterTrk02_TriCentralPFJet40_v1, HLT_IsoMu24_eta2p1_IterTrk02_TriCentralPFJet60_50_35_v1, HLT_IsoMu24_eta2p1_IterTrk02_v1, HLT_IsoTkMu20_eta2p1_IterTrk02_v1, HLT_IsoTkMu24_IterTrk02_v1, HLT_IsoTkMu24_eta2p1_IterTrk02_v1, HLT_JetE30_NoBPTX3BX_NoHalo_v1, HLT_JetE30_NoBPTX_v1, HLT_JetE50_NoBPTX3BX_NoHalo_v1, HLT_JetE70_NoBPTX3BX_NoHalo_v1, HLT_L2DoubleMu23_NoVertex_v1, HLT_L2DoubleMu28_NoVertex_2Cha_Angle2p5_Mass10_v1, HLT_L2DoubleMu38_NoVertex_2Cha_Angle2p5_Mass10_v1, HLT_L2Mu10_NoVertex_NoBPTX3BX_NoHalo_v1, HLT_L2Mu10_NoVertex_NoBPTX_v1, HLT_L2Mu20_NoVertex_3Sta_NoBPTX3BX_NoHalo_v1, HLT_L2Mu30_NoVertex_3Sta_NoBPTX3BX_NoHalo_v1, HLT_LooseIsoPFTau50_Trk30_eta2p1_MET120_v1, HLT_Mu17_Mu8_v1, HLT_Mu17_TkMu8_v1, HLT_Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_v1, HLT_Mu17_TrkIsoVVL_TkMu8_TrkIsoVVL_v1, HLT_Mu23_TrkIsoVVL_Ele12_Gsf_CaloId_TrackId_Iso_MediumWP_v1, HLT_Mu25_TkMu0_dEta18_Onia_v1, HLT_Mu30_TkMu11_v1, HLT_Mu38NoFiltersNoVtx_Photon38_CaloIdL_v1, HLT_Mu40_eta2p1_PFJet200_PFJet50_v1, HLT_Mu40_v1, HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v1, HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1, HLT_PFHT350_PFMET120_NoiseCleaned_v1, HLT_PFHT350_v1, HLT_PFHT600_v1, HLT_PFHT900_v1, HLT_PFJet260_v1, HLT_PFMET120_NoiseCleaned_BTagCSV07_v1, HLT_PFMET120_NoiseCleaned_Mu5_v1, HLT_PFMET170_NoiseCleaned_v1, HLT_Photon135_PFMET40_v1, HLT_Photon135_VBF_v1, HLT_Photon150_PFMET40_v1, HLT_Photon150_VBF_v1, HLT_Photon155_v1, HLT_Photon160_PFMET40_v1, HLT_Photon160_VBF_v1, HLT_Photon22_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon22_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon250_NoHE_PFMET40_v1, HLT_Photon250_NoHE_VBF_v1, HLT_Photon300_NoHE_PFMET40_v1, HLT_Photon300_NoHE_VBF_v1, HLT_Photon36_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon18_AND_HE10_R9Id65_Mass95_v1, HLT_Photon36_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon36_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon42_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon22_AND_HE10_R9Id65_v1, HLT_Photon50_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon50_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon75_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon75_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon90_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon90_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Physics_v1, HLT_ReducedIterativeTracking_v1, HLT_ZeroBias_v1, HLTriggerFinalPath, HLTriggerFirstPath )) +HLTSchedule = cms.Schedule( *(HLTAnalyzerEndpath, HLT_AK8PFJet360TrimMod_Mass30_v1, HLT_Dimuon13_PsiPrime_v1, HLT_Dimuon13_Upsilon_v1, HLT_Dimuon20_Jpsi_v1, HLT_DoubleEle33_CaloIdL_GsfTrkIdVL_MW_v1, HLT_DoubleEle33_CaloIdL_GsfTrkIdVL_v1, HLT_DoubleMediumIsoPFTau40_Trk1_eta2p1_Reg_v1, HLT_DoubleMu33NoFiltersNoVtx_v1, HLT_DoubleMu38NoFiltersNoVtx_v1, HLT_DoubleMu4_3_Bs_v1, HLT_DoubleMu4_3_Jpsi_Displaced_v1, HLT_DoubleMu4_JpsiTrk_Displaced_v1, HLT_DoubleMu4_LowMassNonResonantTrk_Displaced_v1, HLT_DoubleMu4_PsiPrimeTrk_Displaced_v1, HLT_DoublePhoton85_v1, HLT_Ele17_Ele12_Ele10_CaloId_TrackId_v1, HLT_Ele20WP60_Ele8_Mass55_v1, HLT_Ele22_eta2p1_WP85_Gsf_LooseIsoPFTau20_v1, HLT_Ele23_Ele12_CaloId_TrackId_Iso_v1, HLT_Ele25WP60_SC4_Mass55_v1, HLT_Ele27_eta2p1_WP85_Gsf_CentralPFJet30_BTagCSV_v1, HLT_Ele27_eta2p1_WP85_Gsf_TriCentralPFJet40_v1, HLT_Ele27_eta2p1_WP85_Gsf_TriCentralPFJet60_50_35_v1, HLT_Ele27_eta2p1_WP85_Gsf_v1, HLT_Ele32_eta2p1_WP85_Gsf_CentralPFJet30_BTagCSV_v1, HLT_Ele32_eta2p1_WP85_Gsf_TriCentralPFJet40_v1, HLT_Ele32_eta2p1_WP85_Gsf_TriCentralPFJet60_50_35_v1, HLT_Ele32_eta2p1_WP85_Gsf_v1, HLT_Ele45_CaloIdVT_GsfTrkIdT_PFJet200_PFJet50_v1, HLT_Ele95_CaloIdVT_GsfTrkIdT_v1, HLT_IsoMu17_eta2p1_LooseIsoPFTau20_v1, HLT_IsoMu20_eta2p1_IterTrk02_CentralPFJet30_BTagCSV_v1, HLT_IsoMu20_eta2p1_IterTrk02_TriCentralPFJet40_v1, HLT_IsoMu20_eta2p1_IterTrk02_TriCentralPFJet60_50_35_v1, HLT_IsoMu20_eta2p1_IterTrk02_v1, HLT_IsoMu24_IterTrk02_v1, HLT_IsoMu24_eta2p1_IterTrk02_CentralPFJet30_BTagCSV_v1, HLT_IsoMu24_eta2p1_IterTrk02_TriCentralPFJet40_v1, HLT_IsoMu24_eta2p1_IterTrk02_TriCentralPFJet60_50_35_v1, HLT_IsoMu24_eta2p1_IterTrk02_v1, HLT_IsoTkMu20_eta2p1_IterTrk02_v1, HLT_IsoTkMu24_IterTrk02_v1, HLT_IsoTkMu24_eta2p1_IterTrk02_v1, HLT_JetE30_NoBPTX3BX_NoHalo_v1, HLT_JetE30_NoBPTX_v1, HLT_JetE50_NoBPTX3BX_NoHalo_v1, HLT_JetE70_NoBPTX3BX_NoHalo_v1, HLT_L2DoubleMu23_NoVertex_v1, HLT_L2DoubleMu28_NoVertex_2Cha_Angle2p5_Mass10_v1, HLT_L2DoubleMu38_NoVertex_2Cha_Angle2p5_Mass10_v1, HLT_L2Mu10_NoVertex_NoBPTX3BX_NoHalo_v1, HLT_L2Mu10_NoVertex_NoBPTX_v1, HLT_L2Mu20_NoVertex_3Sta_NoBPTX3BX_NoHalo_v1, HLT_L2Mu30_NoVertex_3Sta_NoBPTX3BX_NoHalo_v1, HLT_LooseIsoPFTau50_Trk30_eta2p1_MET120_v1, HLT_Mu17_Mu8_v1, HLT_Mu17_TkMu8_v1, HLT_Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_v1, HLT_Mu17_TrkIsoVVL_TkMu8_TrkIsoVVL_v1, HLT_Mu23_TrkIsoVVL_Ele12_Gsf_CaloId_TrackId_Iso_MediumWP_v1, HLT_Mu25_TkMu0_dEta18_Onia_v1, HLT_Mu30_TkMu11_v1, HLT_Mu38NoFiltersNoVtx_Photon38_CaloIdL_v1, HLT_Mu40_eta2p1_PFJet200_PFJet50_v1, HLT_Mu40_v1, HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v1, HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1, HLT_PFHT350_PFMET120_NoiseCleaned_v1, HLT_PFHT900_v1, HLT_PFJet260_v1, HLT_PFMET120_NoiseCleaned_BTagCSV07_v1, HLT_PFMET170_NoiseCleaned_v1, HLT_Photon135_PFMET40_v1, HLT_Photon135_VBF_v1, HLT_Photon150_PFMET40_v1, HLT_Photon150_VBF_v1, HLT_Photon155_v1, HLT_Photon160_PFMET40_v1, HLT_Photon160_VBF_v1, HLT_Photon22_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon22_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon250_NoHE_PFMET40_v1, HLT_Photon250_NoHE_VBF_v1, HLT_Photon300_NoHE_PFMET40_v1, HLT_Photon300_NoHE_VBF_v1, HLT_Photon36_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon18_AND_HE10_R9Id65_Mass95_v1, HLT_Photon36_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon36_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon42_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon22_AND_HE10_R9Id65_v1, HLT_Photon50_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon50_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon75_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon75_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Photon90_R9Id90_HE10_Iso40_EBOnly_PFMET40_v1, HLT_Photon90_R9Id90_HE10_Iso40_EBOnly_VBF_v1, HLT_Physics_v1, HLT_ReducedIterativeTracking_v1, HLT_ZeroBias_v1, HLTriggerFinalPath, HLTriggerFirstPath )) # CMSSW version specific customizations import os diff --git a/HLTrigger/Configuration/python/HLT_HIon_cff.py b/HLTrigger/Configuration/python/HLT_HIon_cff.py index 6014e5f721461..316f708d349b1 100644 --- a/HLTrigger/Configuration/python/HLT_HIon_cff.py +++ b/HLTrigger/Configuration/python/HLT_HIon_cff.py @@ -1,10 +1,10 @@ -# /dev/CMSSW_7_2_1/HIon/V9 (CMSSW_7_2_0) +# /dev/CMSSW_7_2_1/HIon/V6 (CMSSW_7_2_0_pre8) import FWCore.ParameterSet.Config as cms HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_7_2_1/HIon/V9') + tableName = cms.string('/dev/CMSSW_7_2_1/HIon/V6') ) HLTIter4PSetTrajectoryFilterIT = cms.PSet( @@ -754,11 +754,11 @@ 'HcalCellDead' ) ) hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", - categoryVariableName = cms.string( "vertexCategory" ), + trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), + categoryVariableName = cms.string( "vertexCategory" ), trackSelection = cms.PSet( totalHitsMin = cms.uint32( 0 ), jetDeltaRMax = cms.double( 0.3 ), @@ -780,7 +780,7 @@ calibrationRecords = cms.vstring( 'CombinedSVRecoVertex', 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), - trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), + correctVertexMass = cms.bool( True ), charmCut = cms.double( 1.5 ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), @@ -4010,7 +4010,6 @@ DT_12 = cms.vdouble( 0.183, 0.054, -0.087, 0.028, 0.002, 0.0 ), DT_14 = cms.vdouble( 0.359, 0.052, -0.107, 0.072, -0.004, 0.0 ), CSC_13_3_scale = cms.vdouble( -1.701268, 0.0 ), - DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23 = cms.vdouble( -0.081, 0.113, -0.029, 0.015, 0.008, 0.0 ), CSC_24 = cms.vdouble( 0.004, 0.021, -0.002, 0.053, 0.0, 0.0 ), OL_2222 = cms.vdouble( 0.107, 0.0, 0.0, 0.04, 0.0, 0.0 ), @@ -4025,14 +4024,14 @@ SME_22_0_scale = cms.vdouble( -3.457901, 0.0 ), DT_24_1_scale = cms.vdouble( -7.490909, 0.0 ), OL_1232_0_scale = cms.vdouble( -5.964634, 0.0 ), - DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), + SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), SME_13_0_scale = cms.vdouble( 0.104905, 0.0 ), SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), - CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), + SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), @@ -4051,7 +4050,7 @@ DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), - SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), + CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), @@ -4059,7 +4058,7 @@ DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), EnableDTMeasurement = cms.bool( True ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), @@ -4069,7 +4068,7 @@ CSC_02 = cms.vdouble( 0.612, -0.207, 0.0, 0.067, -0.001, 0.0 ), CSC_03 = cms.vdouble( 0.787, -0.338, 0.029, 0.101, -0.008, 0.0 ), CSC_01 = cms.vdouble( 0.166, 0.0, 0.0, 0.031, 0.0, 0.0 ), - SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), + DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), crackWindow = cms.double( 0.04 ), @@ -4082,10 +4081,11 @@ DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), - EnableCSCMeasurement = cms.bool( True ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), OL_2222_0_scale = cms.vdouble( -7.667231, 0.0 ), - CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), + EnableCSCMeasurement = cms.bool( True ), CSC_12 = cms.vdouble( -0.161, 0.254, -0.047, 0.042, -0.007, 0.0 ) ) hltL2MuonSeeds = cms.EDProducer( "L2MuonSeedGenerator", diff --git a/HLTrigger/Configuration/python/HLT_PIon_cff.py b/HLTrigger/Configuration/python/HLT_PIon_cff.py index 12440315c5bf2..9d3eb401bd4fb 100644 --- a/HLTrigger/Configuration/python/HLT_PIon_cff.py +++ b/HLTrigger/Configuration/python/HLT_PIon_cff.py @@ -1,10 +1,10 @@ -# /dev/CMSSW_7_2_1/PIon/V9 (CMSSW_7_2_0) +# /dev/CMSSW_7_2_1/PIon/V6 (CMSSW_7_2_0_pre8) import FWCore.ParameterSet.Config as cms HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_7_2_1/PIon/V9') + tableName = cms.string('/dev/CMSSW_7_2_1/PIon/V6') ) HLTIter4PSetTrajectoryFilterIT = cms.PSet( @@ -754,11 +754,11 @@ 'HcalCellDead' ) ) hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", - categoryVariableName = cms.string( "vertexCategory" ), + trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), + categoryVariableName = cms.string( "vertexCategory" ), trackSelection = cms.PSet( totalHitsMin = cms.uint32( 0 ), jetDeltaRMax = cms.double( 0.3 ), @@ -780,7 +780,7 @@ calibrationRecords = cms.vstring( 'CombinedSVRecoVertex', 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), - trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), + correctVertexMass = cms.bool( True ), charmCut = cms.double( 1.5 ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), @@ -4010,7 +4010,6 @@ DT_12 = cms.vdouble( 0.183, 0.054, -0.087, 0.028, 0.002, 0.0 ), DT_14 = cms.vdouble( 0.359, 0.052, -0.107, 0.072, -0.004, 0.0 ), CSC_13_3_scale = cms.vdouble( -1.701268, 0.0 ), - DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23 = cms.vdouble( -0.081, 0.113, -0.029, 0.015, 0.008, 0.0 ), CSC_24 = cms.vdouble( 0.004, 0.021, -0.002, 0.053, 0.0, 0.0 ), OL_2222 = cms.vdouble( 0.107, 0.0, 0.0, 0.04, 0.0, 0.0 ), @@ -4025,14 +4024,14 @@ SME_22_0_scale = cms.vdouble( -3.457901, 0.0 ), DT_24_1_scale = cms.vdouble( -7.490909, 0.0 ), OL_1232_0_scale = cms.vdouble( -5.964634, 0.0 ), - DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), + SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), SME_13_0_scale = cms.vdouble( 0.104905, 0.0 ), SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), - CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), + SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), @@ -4051,7 +4050,7 @@ DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), - SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), + CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), @@ -4059,7 +4058,7 @@ DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), EnableDTMeasurement = cms.bool( True ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), @@ -4069,7 +4068,7 @@ CSC_02 = cms.vdouble( 0.612, -0.207, 0.0, 0.067, -0.001, 0.0 ), CSC_03 = cms.vdouble( 0.787, -0.338, 0.029, 0.101, -0.008, 0.0 ), CSC_01 = cms.vdouble( 0.166, 0.0, 0.0, 0.031, 0.0, 0.0 ), - SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), + DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), crackWindow = cms.double( 0.04 ), @@ -4082,10 +4081,11 @@ DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), - EnableCSCMeasurement = cms.bool( True ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), OL_2222_0_scale = cms.vdouble( -7.667231, 0.0 ), - CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), + EnableCSCMeasurement = cms.bool( True ), CSC_12 = cms.vdouble( -0.161, 0.254, -0.047, 0.042, -0.007, 0.0 ) ) hltL2MuonSeeds = cms.EDProducer( "L2MuonSeedGenerator", diff --git a/HLTrigger/Configuration/python/HLTrigger_Datasets_GRun_cff.py b/HLTrigger/Configuration/python/HLTrigger_Datasets_GRun_cff.py index 68ee26d8be2c3..07b1e9b3fb01b 100644 --- a/HLTrigger/Configuration/python/HLTrigger_Datasets_GRun_cff.py +++ b/HLTrigger/Configuration/python/HLTrigger_Datasets_GRun_cff.py @@ -75,12 +75,9 @@ 'HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v1', 'HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1', 'HLT_PFHT350_PFMET120_NoiseCleaned_v1', - 'HLT_PFHT350_v1', - 'HLT_PFHT600_v1', 'HLT_PFHT900_v1', 'HLT_PFJet260_v1', 'HLT_PFMET120_NoiseCleaned_BTagCSV07_v1', - 'HLT_PFMET120_NoiseCleaned_Mu5_v1', 'HLT_PFMET170_NoiseCleaned_v1', 'HLT_Photon135_PFMET40_v1', 'HLT_Photon135_VBF_v1', diff --git a/HLTrigger/Configuration/python/Tools/confdb.py b/HLTrigger/Configuration/python/Tools/confdb.py index 5be6dd81c64ba..5f1ee1fc07cc1 100755 --- a/HLTrigger/Configuration/python/Tools/confdb.py +++ b/HLTrigger/Configuration/python/Tools/confdb.py @@ -1206,10 +1206,11 @@ def build_source(self): if self.config.input: # if a dataset or a list of input files was given, use it if self.config.input[0:8] == 'dataset:': - from dasFileQuery import dasFileQuery - # extract the dataset name, and use DAS to fine the list of LFNs + from dbsFileQuery import dbsFileQuery + # extract the dataset name, and use DBS to fine the list of LFNs dataset = self.config.input[8:] - files = dasFileQuery(dataset) + query = 'find file where dataset=' + dataset + files = dbsFileQuery(query) self.source = files else: # assume a list of input files diff --git a/HLTrigger/Configuration/python/Tools/dasFileQuery.py b/HLTrigger/Configuration/python/Tools/dasFileQuery.py deleted file mode 100644 index 30713a8fbba0a..0000000000000 --- a/HLTrigger/Configuration/python/Tools/dasFileQuery.py +++ /dev/null @@ -1,35 +0,0 @@ -import sys -import json -import das_client - -def dasFileQuery(dataset): - query = 'dataset dataset=%s' % dataset - host = 'https://cmsweb.cern.ch' # default - idx = 0 # default - limit = 0 # unlimited - debug = 0 # default - thr = 300 # default - ckey = "" # default - cert = "" # default - jsondict = das_client.get_data(host, query, idx, limit, debug, thr, ckey, cert) - - # check if the pattern matches none, many, or one dataset - if not jsondict['data'] or not jsondict['data'][0]['dataset']: - sys.stderr.write('Error: the pattern "%s" does not match any dataset\n' % dataset) - sys.exit(1) - return [] - elif len(jsondict['data']) > 1: - sys.stderr.write('Error: the pattern "%s" matches multiple datasets\n' % dataset) - for d in jsondict['data']: - sys.stderr.write(' %s\n' % d['dataset'][0]['name']) - sys.exit(1) - return [] - else: - # expand the dataset name - dataset = jsondict['data'][0]['dataset'][0]['name'] - query = 'file dataset=%s' % dataset - jsondict = das_client.get_data(host, query, idx, limit, debug, thr, ckey, cert) - # parse the results in JSON format, and extract the list of files - files = sorted( f['file'][0]['name'] for f in jsondict['data'] ) - return files - diff --git a/HLTrigger/Configuration/python/Tools/dbsFileQuery.py b/HLTrigger/Configuration/python/Tools/dbsFileQuery.py new file mode 100644 index 0000000000000..29154a6a7efcf --- /dev/null +++ b/HLTrigger/Configuration/python/Tools/dbsFileQuery.py @@ -0,0 +1,25 @@ +def dbsFileQuery(query): + # load the DBS API + import sys, os + dbsapipath = os.environ['DBSCMD_HOME'] + if dbsapipath not in sys.path: + sys.path.append(dbsapipath) + + from dbsApi import DbsApi + api = DbsApi() + + # run the query, which should be of the form 'find file where ...' + results = api.executeQuery(query) + + # parse the results in XML format, and extract the list of files + from xml.dom.minidom import parseString + xml = parseString(results) + + files = [] + + for results in xml.getElementsByTagName('results'): + for row in results.getElementsByTagName('row'): + for file in row.getElementsByTagName('file'): + files.append( file.firstChild.data ) + + return files diff --git a/HLTrigger/Configuration/tables/GRun.txt b/HLTrigger/Configuration/tables/GRun.txt index 29a7d8fd1d7e0..43a6c8355b834 100644 --- a/HLTrigger/Configuration/tables/GRun.txt +++ b/HLTrigger/Configuration/tables/GRun.txt @@ -34,6 +34,7 @@ HLT_LooseIsoPFTau50_Trk30_eta2p1_MET120_v* # JIRA: CMSHLT-99 #HLT_CaloJet260_v* # JIRA: CMSHLT-67 -> TEMPLATE PATH, not for GRun #HLT_HT650_v* # JIRA: CMSHLT-67 -> TEMPLATE PATH, not for GRun +#HLT_PFHT650_v* # JIRA: CMSHLT-67 -> TEMPLATE PATH, not for GRun #HLT_PFJet40_v* # JIRA: CMSHLT-67 -> TEMPLATE PATH, not for GRun, updated by CMSHLT-123 #HLT_PFJet60_v* # JIRA: CMSHLT-123 @@ -147,8 +148,6 @@ HLT_L2DoubleMu38_NoVertex_2Cha_Angle2p5_Mass10_v* # JIRA: CMSHLT-103 #HLT_PFMHT100_SingleCentralJet60_BTagCSV0p6_v* # JIRA: CMSHLT-104 -HLT_PFHT350_v* # JIRA: CMSHLT-127 -HLT_PFHT600_v* # JIRA: CMSHLT-127 HLT_PFHT900_v* # JIRA: CMSHLT-105 HLT_PFHT350_PFMET120_NoiseCleaned_v* # JIRA: CMSHLT-105 HLT_PFMET170_NoiseCleaned_v* # JIRA: CMSHLT-105 @@ -156,7 +155,7 @@ HLT_PFMET120_NoiseCleaned_BTagCSV07_v* # JIRA: CMSHLT-105 #HLT_AK8PFHT850_TrimR0p1PT0p03Mass50_v* # JIRA: CMSHLT-121 -HLT_PFMET120_NoiseCleaned_Mu5_v* # JIRA: CMSHLT-120 +#HLT_PFMET120_NoiseCleaned_Mu5_v* # JIRA: CMSHLT-120 HLT_ZeroBias_v* # JIRA: CMSHLT-117 diff --git a/HLTrigger/Configuration/test/OnData_HLT_FULL.py b/HLTrigger/Configuration/test/OnData_HLT_FULL.py index 680c29b1ac176..73058ccb16767 100644 --- a/HLTrigger/Configuration/test/OnData_HLT_FULL.py +++ b/HLTrigger/Configuration/test/OnData_HLT_FULL.py @@ -1,11 +1,11 @@ -# /dev/CMSSW_7_2_1/HLT/V29 (CMSSW_7_2_0) +# /dev/CMSSW_7_2_1/HLT/V26 (CMSSW_7_2_0_pre8) import FWCore.ParameterSet.Config as cms process = cms.Process( "HLTFULL" ) process.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_7_2_1/HLT/V29') + tableName = cms.string('/dev/CMSSW_7_2_1/HLT/V26') ) process.HLTIter4PSetTrajectoryFilterIT = cms.PSet( @@ -519,9 +519,7 @@ 'HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v1', 'HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1', 'HLT_PFHT350_PFMET120_NoiseCleaned_v1', - 'HLT_PFHT350_v1', 'HLT_PFHT550_4Jet_v1', - 'HLT_PFHT600_v1', 'HLT_PFHT650_4Jet_v1', 'HLT_PFHT750_4Jet_v1', 'HLT_PFHT900_v1', @@ -578,6 +576,7 @@ 'HLT_IsoTkMu24_IterTrk02_v1', 'HLT_IterativeTracking_v1', 'HLT_Mu17_NoFilters_v1', + 'HLT_PFHT650_v1', 'HLT_PFchMET90_NoiseCleaned_v1', 'HLT_Photon20_CaloIdVL_IsoL_v1', 'HLT_ReducedIterativeTracking_v1' ) @@ -1250,11 +1249,11 @@ ) process.hcal_db_producer = cms.ESProducer( "HcalDbProducer" ) process.hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", - categoryVariableName = cms.string( "vertexCategory" ), + trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), + categoryVariableName = cms.string( "vertexCategory" ), trackSelection = cms.PSet( totalHitsMin = cms.uint32( 0 ), jetDeltaRMax = cms.double( 0.3 ), @@ -1276,7 +1275,7 @@ calibrationRecords = cms.vstring( 'CombinedSVRecoVertex', 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), - trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), + correctVertexMass = cms.bool( True ), charmCut = cms.double( 1.5 ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), @@ -3250,7 +3249,6 @@ DT_12 = cms.vdouble( 0.183, 0.054, -0.087, 0.028, 0.002, 0.0 ), DT_14 = cms.vdouble( 0.359, 0.052, -0.107, 0.072, -0.004, 0.0 ), CSC_13_3_scale = cms.vdouble( -1.701268, 0.0 ), - DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23 = cms.vdouble( -0.081, 0.113, -0.029, 0.015, 0.008, 0.0 ), CSC_24 = cms.vdouble( 0.004, 0.021, -0.002, 0.053, 0.0, 0.0 ), OL_2222 = cms.vdouble( 0.107, 0.0, 0.0, 0.04, 0.0, 0.0 ), @@ -3265,14 +3263,14 @@ SME_22_0_scale = cms.vdouble( -3.457901, 0.0 ), DT_24_1_scale = cms.vdouble( -7.490909, 0.0 ), OL_1232_0_scale = cms.vdouble( -5.964634, 0.0 ), - DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), + SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), SME_13_0_scale = cms.vdouble( 0.104905, 0.0 ), SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), - CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), + SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), @@ -3291,7 +3289,7 @@ DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), - SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), + CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), @@ -3299,7 +3297,7 @@ DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), EnableDTMeasurement = cms.bool( True ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), @@ -3309,7 +3307,7 @@ CSC_02 = cms.vdouble( 0.612, -0.207, 0.0, 0.067, -0.001, 0.0 ), CSC_03 = cms.vdouble( 0.787, -0.338, 0.029, 0.101, -0.008, 0.0 ), CSC_01 = cms.vdouble( 0.166, 0.0, 0.0, 0.031, 0.0, 0.0 ), - SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), + DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), crackWindow = cms.double( 0.04 ), @@ -3322,10 +3320,11 @@ DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), - EnableCSCMeasurement = cms.bool( True ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), OL_2222_0_scale = cms.vdouble( -7.667231, 0.0 ), - CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), + EnableCSCMeasurement = cms.bool( True ), CSC_12 = cms.vdouble( -0.161, 0.254, -0.047, 0.042, -0.007, 0.0 ) ) process.hltL2MuonSeeds = cms.EDProducer( "L2MuonSeedGenerator", @@ -6708,16 +6707,12 @@ pvSrc = cms.InputTag( "" ) ) process.hltFastPVJetVertexChecker = cms.EDFilter( "JetVertexChecker", - minPt = cms.double( 0.0 ), - maxTrackPt = cms.double( 20.0 ), + beamSpot = cms.InputTag( "hltOnlineBeamSpot" ), maxNJetsToCheck = cms.int32( 2 ), minPtRatio = cms.double( 0.1 ), doFilter = cms.bool( False ), jetTracks = cms.InputTag( "hltFastPVJetTracksAssociator" ), - maxChi2 = cms.double( 20.0 ), - newMethod = cms.bool( False ), - maxNjetsOutput = cms.int32( 2 ), - beamSpot = cms.InputTag( "hltOnlineBeamSpot" ) + minPt = cms.double( 0.0 ) ) process.hltFastPVPixelTracksRecover = cms.EDProducer( "PixelTrackProducer", FilterPSet = cms.PSet( @@ -20658,7 +20653,6 @@ process.hltL3fL1sMu16Eta2p1f0TkFiltered20Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 2.1 ), minPt = cms.double( 20.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -21433,7 +21427,6 @@ process.hltL3fL1sMu16f0TkFiltered24Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 1.0E99 ), minPt = cms.double( 24.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -21469,7 +21462,6 @@ process.hltL3fL1sMu20Eta2p1f0TkFiltered24Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 2.1 ), minPt = cms.double( 24.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -26141,44 +26133,40 @@ htLabels = cms.VInputTag( 'hltPFHT4Jet' ), minHt = cms.vdouble( 650.0 ) ) -process.hltPrePFHT7504Jet = cms.EDFilter( "HLTPrescaler", - L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), - offset = cms.uint32( 0 ) -) -process.hltPF4JetHT750 = cms.EDFilter( "HLTHtMhtFilter", - saveTags = cms.bool( True ), - mhtLabels = cms.VInputTag( 'hltPFHT4Jet' ), - meffSlope = cms.vdouble( 1.0 ), - minMeff = cms.vdouble( 0.0 ), - minMht = cms.vdouble( 0.0 ), - htLabels = cms.VInputTag( 'hltPFHT4Jet' ), - minHt = cms.vdouble( 750.0 ) -) -process.hltPrePFHT350 = cms.EDFilter( "HLTPrescaler", +process.hltPrePFHT650 = cms.EDFilter( "HLTPrescaler", L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), offset = cms.uint32( 0 ) ) -process.hltPrePFHT600 = cms.EDFilter( "HLTPrescaler", - L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), - offset = cms.uint32( 0 ) -) -process.hltHt500 = cms.EDFilter( "HLTHtMhtFilter", +process.hltHt550 = cms.EDFilter( "HLTHtMhtFilter", saveTags = cms.bool( False ), mhtLabels = cms.VInputTag( 'hltHtMht' ), meffSlope = cms.vdouble( 1.0 ), minMeff = cms.vdouble( 0.0 ), minMht = cms.vdouble( 0.0 ), htLabels = cms.VInputTag( 'hltHtMht' ), - minHt = cms.vdouble( 500.0 ) + minHt = cms.vdouble( 550.0 ) ) -process.hltPFHT600 = cms.EDFilter( "HLTHtMhtFilter", +process.hltPFHT650 = cms.EDFilter( "HLTHtMhtFilter", saveTags = cms.bool( True ), mhtLabels = cms.VInputTag( 'hltPFHT' ), meffSlope = cms.vdouble( 1.0 ), minMeff = cms.vdouble( 0.0 ), minMht = cms.vdouble( 0.0 ), htLabels = cms.VInputTag( 'hltPFHT' ), - minHt = cms.vdouble( 600.0 ) + minHt = cms.vdouble( 650.0 ) +) +process.hltPrePFHT7504Jet = cms.EDFilter( "HLTPrescaler", + L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), + offset = cms.uint32( 0 ) +) +process.hltPF4JetHT750 = cms.EDFilter( "HLTHtMhtFilter", + saveTags = cms.bool( True ), + mhtLabels = cms.VInputTag( 'hltPFHT4Jet' ), + meffSlope = cms.vdouble( 1.0 ), + minMeff = cms.vdouble( 0.0 ), + minMht = cms.vdouble( 0.0 ), + htLabels = cms.VInputTag( 'hltPFHT4Jet' ), + minHt = cms.vdouble( 750.0 ) ) process.hltPrePFHT900 = cms.EDFilter( "HLTPrescaler", L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), @@ -29440,10 +29428,9 @@ 'HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v1', 'HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1', 'HLT_PFHT350_PFMET120_NoiseCleaned_v1', - 'HLT_PFHT350_v1', 'HLT_PFHT550_4Jet_v1', - 'HLT_PFHT600_v1', 'HLT_PFHT650_4Jet_v1', + 'HLT_PFHT650_v1', 'HLT_PFHT750_4Jet_v1', 'HLT_PFHT900_v1', 'HLT_PFJet140_v1', @@ -29779,9 +29766,8 @@ process.HLT_PFHT350_PFMET120_NoiseCleaned_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT350PFMET120NoiseCleaned + process.HLTRecoMETSequence + process.hltMET70 + process.HLTHBHENoiseCleanerSequence + process.hltMetClean + process.hltMETClean60 + process.HLTAK4CaloJetsSequence + process.hltMetCleanUsingJetID + process.hltMETCleanUsingJetID60 + process.hltHtMht + process.hltHt280 + process.HLTAK4PFJetsSequence + process.hltPFMETProducer + process.hltPFMET120Filter + process.hltPFHT + process.hltPFHT350 + process.HLTEndSequence ) process.HLT_PFHT550_4Jet_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT5504Jet + process.HLTAK4CaloJetsSequence + process.hltHtMht4Jet + process.hlt4JetHt450 + process.HLTAK4PFJetsSequence + process.hltPFHT4Jet + process.hltPF4JetHT550 + process.HLTEndSequence ) process.HLT_PFHT650_4Jet_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT6504Jet + process.HLTAK4CaloJetsSequence + process.hltHtMht4Jet + process.hlt4JetHt550 + process.HLTAK4PFJetsSequence + process.hltPFHT4Jet + process.hltPF4JetHT650 + process.HLTEndSequence ) +process.HLT_PFHT650_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT650 + process.HLTAK4CaloJetsSequence + process.hltHtMht + process.hltHt550 + process.HLTAK4PFJetsSequence + process.hltPFHT + process.hltPFHT650 + process.HLTEndSequence ) process.HLT_PFHT750_4Jet_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT7504Jet + process.HLTAK4CaloJetsSequence + process.hltHtMht4Jet + process.hlt4JetHt550 + process.HLTAK4PFJetsSequence + process.hltPFHT4Jet + process.hltPF4JetHT750 + process.HLTEndSequence ) -process.HLT_PFHT350_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT350 + process.HLTAK4CaloJetsSequence + process.hltHtMht + process.hltHt280 + process.HLTAK4PFJetsSequence + process.hltPFHT + process.hltPFHT350 + process.HLTEndSequence ) -process.HLT_PFHT600_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT600 + process.HLTAK4CaloJetsSequence + process.hltHtMht + process.hltHt500 + process.HLTAK4PFJetsSequence + process.hltPFHT + process.hltPFHT600 + process.HLTEndSequence ) process.HLT_PFHT900_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT900 + process.HLTAK4CaloJetsSequence + process.hltHtMht + process.hltHt700 + process.HLTAK4PFJetsSequence + process.hltPFHT + process.hltPFHT900 + process.HLTEndSequence ) process.HLT_PFJet40_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1SingleJet52 + process.hltPrePFJet40 + process.HLTAK4CaloJetsSequence + process.hltSingleCaloJet20 + process.HLTAK4PFJetsSequence + process.hltPFJetsCorrectedMatchedToCaloJets20 + process.hltSinglePFJet40 + process.HLTEndSequence ) process.HLT_PFJet60_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1SingleJet52 + process.hltPrePFJet60 + process.HLTAK4CaloJetsSequence + process.hltSingleCaloJet40 + process.HLTAK4PFJetsSequence + process.hltPFJetsCorrectedMatchedToCaloJets40 + process.hltSinglePFJet60 + process.HLTEndSequence ) diff --git a/HLTrigger/Configuration/test/OnData_HLT_Fake.py b/HLTrigger/Configuration/test/OnData_HLT_Fake.py index 0a5bd86f6b8ed..a4c999bc7f0d4 100644 --- a/HLTrigger/Configuration/test/OnData_HLT_Fake.py +++ b/HLTrigger/Configuration/test/OnData_HLT_Fake.py @@ -1,11 +1,11 @@ -# /dev/CMSSW_7_2_1/Fake/V2 (CMSSW_7_2_0) +# /dev/CMSSW_7_2_1/Fake/V1 (CMSSW_7_2_0_pre8) import FWCore.ParameterSet.Config as cms process = cms.Process( "HLTFake" ) process.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_7_2_1/Fake/V2') + tableName = cms.string('/dev/CMSSW_7_2_1/Fake/V1') ) process.HLTIter4PSetTrajectoryFilterIT = cms.PSet( @@ -1235,11 +1235,11 @@ ) process.hcal_db_producer = cms.ESProducer( "HcalDbProducer" ) process.hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", - categoryVariableName = cms.string( "vertexCategory" ), + trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), + categoryVariableName = cms.string( "vertexCategory" ), trackSelection = cms.PSet( totalHitsMin = cms.uint32( 0 ), jetDeltaRMax = cms.double( 0.3 ), @@ -1261,7 +1261,7 @@ calibrationRecords = cms.vstring( 'CombinedSVRecoVertex', 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), - trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), + correctVertexMass = cms.bool( True ), charmCut = cms.double( 1.5 ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), @@ -2570,7 +2570,6 @@ DT_12 = cms.vdouble( 0.183, 0.054, -0.087, 0.028, 0.002, 0.0 ), DT_14 = cms.vdouble( 0.359, 0.052, -0.107, 0.072, -0.004, 0.0 ), CSC_13_3_scale = cms.vdouble( -1.701268, 0.0 ), - DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23 = cms.vdouble( -0.081, 0.113, -0.029, 0.015, 0.008, 0.0 ), CSC_24 = cms.vdouble( 0.004, 0.021, -0.002, 0.053, 0.0, 0.0 ), OL_2222 = cms.vdouble( 0.107, 0.0, 0.0, 0.04, 0.0, 0.0 ), @@ -2585,14 +2584,14 @@ SME_22_0_scale = cms.vdouble( -3.457901, 0.0 ), DT_24_1_scale = cms.vdouble( -7.490909, 0.0 ), OL_1232_0_scale = cms.vdouble( -5.964634, 0.0 ), - DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), + SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), SME_13_0_scale = cms.vdouble( 0.104905, 0.0 ), SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), - CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), + SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), @@ -2611,7 +2610,7 @@ DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), - SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), + CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), @@ -2619,7 +2618,7 @@ DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), EnableDTMeasurement = cms.bool( True ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), @@ -2629,7 +2628,7 @@ CSC_02 = cms.vdouble( 0.612, -0.207, 0.0, 0.067, -0.001, 0.0 ), CSC_03 = cms.vdouble( 0.787, -0.338, 0.029, 0.101, -0.008, 0.0 ), CSC_01 = cms.vdouble( 0.166, 0.0, 0.0, 0.031, 0.0, 0.0 ), - SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), + DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), crackWindow = cms.double( 0.04 ), @@ -2642,10 +2641,11 @@ DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), - EnableCSCMeasurement = cms.bool( True ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), OL_2222_0_scale = cms.vdouble( -7.667231, 0.0 ), - CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), + EnableCSCMeasurement = cms.bool( True ), CSC_12 = cms.vdouble( -0.161, 0.254, -0.047, 0.042, -0.007, 0.0 ) ) process.hltL2MuonSeeds = cms.EDProducer( "L2MuonSeedGenerator", @@ -6321,7 +6321,6 @@ process.hltL3fL1sMu16f0TkFiltered24Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 1.0E99 ), minPt = cms.double( 24.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -23021,16 +23020,12 @@ pvSrc = cms.InputTag( "" ) ) process.hltFastPVJetVertexChecker = cms.EDFilter( "JetVertexChecker", - minPt = cms.double( 0.0 ), - maxTrackPt = cms.double( 20.0 ), + beamSpot = cms.InputTag( "hltOnlineBeamSpot" ), maxNJetsToCheck = cms.int32( 2 ), minPtRatio = cms.double( 0.1 ), doFilter = cms.bool( False ), jetTracks = cms.InputTag( "hltFastPVJetTracksAssociator" ), - maxChi2 = cms.double( 20.0 ), - newMethod = cms.bool( False ), - maxNjetsOutput = cms.int32( 2 ), - beamSpot = cms.InputTag( "hltOnlineBeamSpot" ) + minPt = cms.double( 0.0 ) ) process.hltFastPVPixelTracksRecover = cms.EDProducer( "PixelTrackProducer", FilterPSet = cms.PSet( diff --git a/HLTrigger/Configuration/test/OnData_HLT_GRun.py b/HLTrigger/Configuration/test/OnData_HLT_GRun.py index 5e7b077da36c9..77eddb6af8396 100644 --- a/HLTrigger/Configuration/test/OnData_HLT_GRun.py +++ b/HLTrigger/Configuration/test/OnData_HLT_GRun.py @@ -1,11 +1,11 @@ -# /dev/CMSSW_7_2_1/GRun/V9 (CMSSW_7_2_0) +# /dev/CMSSW_7_2_1/GRun/V6 (CMSSW_7_2_0_pre8) import FWCore.ParameterSet.Config as cms process = cms.Process( "HLTGRun" ) process.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_7_2_1/GRun/V9') + tableName = cms.string('/dev/CMSSW_7_2_1/GRun/V6') ) process.HLTIter4PSetTrajectoryFilterIT = cms.PSet( @@ -506,12 +506,9 @@ 'HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v1', 'HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1', 'HLT_PFHT350_PFMET120_NoiseCleaned_v1', - 'HLT_PFHT350_v1', - 'HLT_PFHT600_v1', 'HLT_PFHT900_v1', 'HLT_PFJet260_v1', 'HLT_PFMET120_NoiseCleaned_BTagCSV07_v1', - 'HLT_PFMET120_NoiseCleaned_Mu5_v1', 'HLT_PFMET170_NoiseCleaned_v1', 'HLT_Photon135_PFMET40_v1', 'HLT_Photon135_VBF_v1', @@ -1210,11 +1207,11 @@ ) process.hcal_db_producer = cms.ESProducer( "HcalDbProducer" ) process.hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", - categoryVariableName = cms.string( "vertexCategory" ), + trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), + categoryVariableName = cms.string( "vertexCategory" ), trackSelection = cms.PSet( totalHitsMin = cms.uint32( 0 ), jetDeltaRMax = cms.double( 0.3 ), @@ -1236,7 +1233,7 @@ calibrationRecords = cms.vstring( 'CombinedSVRecoVertex', 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), - trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), + correctVertexMass = cms.bool( True ), charmCut = cms.double( 1.5 ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), @@ -3210,7 +3207,6 @@ DT_12 = cms.vdouble( 0.183, 0.054, -0.087, 0.028, 0.002, 0.0 ), DT_14 = cms.vdouble( 0.359, 0.052, -0.107, 0.072, -0.004, 0.0 ), CSC_13_3_scale = cms.vdouble( -1.701268, 0.0 ), - DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23 = cms.vdouble( -0.081, 0.113, -0.029, 0.015, 0.008, 0.0 ), CSC_24 = cms.vdouble( 0.004, 0.021, -0.002, 0.053, 0.0, 0.0 ), OL_2222 = cms.vdouble( 0.107, 0.0, 0.0, 0.04, 0.0, 0.0 ), @@ -3225,14 +3221,14 @@ SME_22_0_scale = cms.vdouble( -3.457901, 0.0 ), DT_24_1_scale = cms.vdouble( -7.490909, 0.0 ), OL_1232_0_scale = cms.vdouble( -5.964634, 0.0 ), - DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), + SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), SME_13_0_scale = cms.vdouble( 0.104905, 0.0 ), SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), - CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), + SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), @@ -3251,7 +3247,7 @@ DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), - SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), + CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), @@ -3259,7 +3255,7 @@ DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), EnableDTMeasurement = cms.bool( True ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), @@ -3269,7 +3265,7 @@ CSC_02 = cms.vdouble( 0.612, -0.207, 0.0, 0.067, -0.001, 0.0 ), CSC_03 = cms.vdouble( 0.787, -0.338, 0.029, 0.101, -0.008, 0.0 ), CSC_01 = cms.vdouble( 0.166, 0.0, 0.0, 0.031, 0.0, 0.0 ), - SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), + DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), crackWindow = cms.double( 0.04 ), @@ -3282,10 +3278,11 @@ DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), - EnableCSCMeasurement = cms.bool( True ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), OL_2222_0_scale = cms.vdouble( -7.667231, 0.0 ), - CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), + EnableCSCMeasurement = cms.bool( True ), CSC_12 = cms.vdouble( -0.161, 0.254, -0.047, 0.042, -0.007, 0.0 ) ) process.hltL2MuonSeeds = cms.EDProducer( "L2MuonSeedGenerator", @@ -18780,7 +18777,6 @@ process.hltL3fL1sMu16Eta2p1f0TkFiltered20Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 2.1 ), minPt = cms.double( 20.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -19555,7 +19551,6 @@ process.hltL3fL1sMu16f0TkFiltered24Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 1.0E99 ), minPt = cms.double( 24.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -19591,7 +19586,6 @@ process.hltL3fL1sMu20Eta2p1f0TkFiltered24Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 2.1 ), minPt = cms.double( 24.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -22908,32 +22902,6 @@ htLabels = cms.VInputTag( 'hltPFHT' ), minHt = cms.vdouble( 350.0 ) ) -process.hltPrePFHT350 = cms.EDFilter( "HLTPrescaler", - L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), - offset = cms.uint32( 0 ) -) -process.hltPrePFHT600 = cms.EDFilter( "HLTPrescaler", - L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), - offset = cms.uint32( 0 ) -) -process.hltHt500 = cms.EDFilter( "HLTHtMhtFilter", - saveTags = cms.bool( False ), - mhtLabels = cms.VInputTag( 'hltHtMht' ), - meffSlope = cms.vdouble( 1.0 ), - minMeff = cms.vdouble( 0.0 ), - minMht = cms.vdouble( 0.0 ), - htLabels = cms.VInputTag( 'hltHtMht' ), - minHt = cms.vdouble( 500.0 ) -) -process.hltPFHT600 = cms.EDFilter( "HLTHtMhtFilter", - saveTags = cms.bool( True ), - mhtLabels = cms.VInputTag( 'hltPFHT' ), - meffSlope = cms.vdouble( 1.0 ), - minMeff = cms.vdouble( 0.0 ), - minMht = cms.vdouble( 0.0 ), - htLabels = cms.VInputTag( 'hltPFHT' ), - minHt = cms.vdouble( 600.0 ) -) process.hltPrePFHT900 = cms.EDFilter( "HLTPrescaler", L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), offset = cms.uint32( 0 ) @@ -23267,16 +23235,12 @@ pvSrc = cms.InputTag( "" ) ) process.hltFastPVJetVertexChecker = cms.EDFilter( "JetVertexChecker", - minPt = cms.double( 0.0 ), - maxTrackPt = cms.double( 20.0 ), + beamSpot = cms.InputTag( "hltOnlineBeamSpot" ), maxNJetsToCheck = cms.int32( 2 ), minPtRatio = cms.double( 0.1 ), doFilter = cms.bool( False ), jetTracks = cms.InputTag( "hltFastPVJetTracksAssociator" ), - maxChi2 = cms.double( 20.0 ), - newMethod = cms.bool( False ), - maxNjetsOutput = cms.int32( 2 ), - beamSpot = cms.InputTag( "hltOnlineBeamSpot" ) + minPt = cms.double( 0.0 ) ) process.hltFastPVPixelTracksRecover = cms.EDProducer( "PixelTrackProducer", FilterPSet = cms.PSet( @@ -24022,73 +23986,6 @@ MinTag = cms.double( 0.7 ), MaxTag = cms.double( 99999.0 ) ) -process.hltPrePFMET120NoiseCleanedMu5 = cms.EDFilter( "HLTPrescaler", - L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), - offset = cms.uint32( 0 ) -) -process.hltL1sL1SingleMuOpenCandidate = cms.EDFilter( "HLTLevel1GTSeed", - L1SeedsLogicalExpression = cms.string( "L1_SingleMuOpen" ), - saveTags = cms.bool( True ), - L1MuonCollectionTag = cms.InputTag( "hltL1extraParticles" ), - L1UseL1TriggerObjectMaps = cms.bool( False ), - L1UseAliasesForSeeding = cms.bool( True ), - L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), - L1CollectionsTag = cms.InputTag( "hltL1extraParticles" ), - L1NrBxInEvent = cms.int32( 1 ), - L1GtObjectMapTag = cms.InputTag( "hltL1GtObjectMap" ), - L1TechTriggerSeeding = cms.bool( False ) -) -process.hltPFMET120Mu5L1MuFiltered = cms.EDFilter( "HLTMuonL1Filter", - saveTags = cms.bool( False ), - CSCTFtag = cms.InputTag( "unused" ), - PreviousCandTag = cms.InputTag( "hltL1sL1SingleMuOpenCandidate" ), - MinPt = cms.double( 0.0 ), - MinN = cms.int32( 1 ), - MaxEta = cms.double( 2.5 ), - SelectQualities = cms.vint32( ), - CandTag = cms.InputTag( "hltL1extraParticles" ), - ExcludeSingleSegmentCSC = cms.bool( False ) -) -process.hltPFMET120Mu5L2PreFiltered = cms.EDFilter( "HLTMuonL2PreFilter", - saveTags = cms.bool( True ), - MaxDr = cms.double( 9999.0 ), - CutOnChambers = cms.bool( False ), - PreviousCandTag = cms.InputTag( "hltPFMET120Mu5L1MuFiltered" ), - MinPt = cms.double( 3.5 ), - MinN = cms.int32( 1 ), - SeedMapTag = cms.InputTag( "hltL2Muons" ), - MaxEta = cms.double( 2.5 ), - MinNhits = cms.vint32( 0, 1, 0, 1 ), - MinDxySig = cms.double( -1.0 ), - MinNchambers = cms.vint32( 0 ), - AbsEtaBins = cms.vdouble( 0.9, 1.5, 2.1, 5.0 ), - MaxDz = cms.double( 9999.0 ), - CandTag = cms.InputTag( "hltL2MuonCandidates" ), - BeamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), - MinDr = cms.double( -1.0 ), - NSigmaPt = cms.double( 0.0 ), - MinNstations = cms.vint32( 0, 2, 0, 2 ) -) -process.hltPFMET120Mu5L3PreFiltered = cms.EDFilter( "HLTMuonL3PreFilter", - MaxNormalizedChi2 = cms.double( 20.0 ), - saveTags = cms.bool( True ), - PreviousCandTag = cms.InputTag( "hltPFMET120Mu5L2PreFiltered" ), - MinNmuonHits = cms.int32( 0 ), - MinN = cms.int32( 1 ), - MinTrackPt = cms.double( 0.0 ), - MaxEta = cms.double( 2.5 ), - MaxDXYBeamSpot = cms.double( 0.1 ), - MinNhits = cms.int32( 0 ), - MinDxySig = cms.double( -1.0 ), - NSigmaPt = cms.double( 0.0 ), - MaxDz = cms.double( 9999.0 ), - MaxPtDifference = cms.double( 9999.0 ), - MaxDr = cms.double( 2.0 ), - CandTag = cms.InputTag( "hltL3MuonCandidates" ), - MinDr = cms.double( -1.0 ), - BeamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), - MinPt = cms.double( 5.0 ) -) process.hltPrePFMET170NoiseCleaned = cms.EDFilter( "HLTPrescaler", L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), offset = cms.uint32( 0 ) @@ -26428,12 +26325,9 @@ 'HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v1', 'HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1', 'HLT_PFHT350_PFMET120_NoiseCleaned_v1', - 'HLT_PFHT350_v1', - 'HLT_PFHT600_v1', 'HLT_PFHT900_v1', 'HLT_PFJet260_v1', 'HLT_PFMET120_NoiseCleaned_BTagCSV07_v1', - 'HLT_PFMET120_NoiseCleaned_Mu5_v1', 'HLT_PFMET170_NoiseCleaned_v1', 'HLT_Photon135_PFMET40_v1', 'HLT_Photon135_VBF_v1', @@ -26728,12 +26622,9 @@ process.HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1Mu5EG20 + process.hltPreMu42NoFiltersNoVtxPhoton42CaloIdL + process.hltL1fL1sMu5EG20L1Filtered5 + process.HLTL2muonrecoSequenceNoVtx + process.HLTL3NoFiltersNoVtxmuonrecoSequence + process.hltL2fL1sMu5EG20L1f5L2NoVtxFiltered16 + process.hltL3fL1Mu5EG20L1f5L2NVf12L3NoFiltersNoVtxFiltered42 + process.HLTDoFullUnpackingEgammaEcalSequence + process.HLTPFClusteringForEgamma + process.hltEgammaCandidates + process.hltEGL1Mu5EG20Filter + process.hltMu42NoFiltersNoVtxPhoton42CaloIdLEtFilter + process.hltEgammaClusterShape + process.hltMu42NoFiltersNoVtxPhoton42CaloIdLClusterShapeFilter + process.HLTDoLocalHcalWithTowerSequence + process.HLTFastJetForEgamma + process.hltEgammaHoverE + process.hltMu42NoFiltersNoVtxPhoton42CaloIdLHEFilter + process.HLTEndSequence ) process.HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1Mu5EG20ORL1Mu5IsoEG18 + process.hltPreMu8TrkIsoVVLEle23GsfCaloIdTrackIdIsoMediumWP + process.hltL1sL1Mu5EG20ORL1Mu5IsoEG18L1Filtered0 + process.HLTL2muonrecoSequence + process.hltL2fL1sL1Mu5EG20ORL1Mu5IsoEG18L1f0L2Filtered5 + process.HLTL3muonrecoSequence + process.hltL3fL1sL1Mu5EG20ORL1Mu5IsoEG18L1f0L2f5L3Filtered8 + process.HLTL3muontrkisovvlSequence + process.hltL1sL1Mu5EG20ORL1Mu5IsoEG18L3IsoFiltered8 + process.HLTMu8Ele23_Gsf + process.HLTEndSequence ) process.HLT_PFHT350_PFMET120_NoiseCleaned_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT350PFMET120NoiseCleaned + process.HLTRecoMETSequence + process.hltMET70 + process.HLTHBHENoiseCleanerSequence + process.hltMetClean + process.hltMETClean60 + process.HLTAK4CaloJetsSequence + process.hltMetCleanUsingJetID + process.hltMETCleanUsingJetID60 + process.hltHtMht + process.hltHt280 + process.HLTAK4PFJetsSequence + process.hltPFMETProducer + process.hltPFMET120Filter + process.hltPFHT + process.hltPFHT350 + process.HLTEndSequence ) -process.HLT_PFHT350_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT350 + process.HLTAK4CaloJetsSequence + process.hltHtMht + process.hltHt280 + process.HLTAK4PFJetsSequence + process.hltPFHT + process.hltPFHT350 + process.HLTEndSequence ) -process.HLT_PFHT600_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT600 + process.HLTAK4CaloJetsSequence + process.hltHtMht + process.hltHt500 + process.HLTAK4PFJetsSequence + process.hltPFHT + process.hltPFHT600 + process.HLTEndSequence ) process.HLT_PFHT900_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT900 + process.HLTAK4CaloJetsSequence + process.hltHtMht + process.hltHt700 + process.HLTAK4PFJetsSequence + process.hltPFHT + process.hltPFHT900 + process.HLTEndSequence ) process.HLT_PFJet260_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1SingleJet200 + process.hltPrePFJet260 + process.HLTAK4CaloJetsSequence + process.hltSingleCaloJet210 + process.HLTAK4PFJetsSequence + process.hltPFJetsCorrectedMatchedToCaloJets210 + process.hltSinglePFJet260 + process.HLTEndSequence ) process.HLT_PFMET120_NoiseCleaned_BTagCSV07_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1ETM60ORETM70 + process.hltPrePFMET120NoiseCleanedBTagCSV07 + process.HLTRecoMETSequence + process.hltMET70 + process.HLTHBHENoiseCleanerSequence + process.hltMetClean + process.hltMETClean70 + process.HLTAK4CaloJetsSequence + process.hltMetCleanUsingJetID + process.hltMETCleanUsingJetID70 + process.hltSusyPreBtagJetFilter + process.HLTFastPrimaryVertexSequence + process.hltFastPVPixelVertexSelector + process.HLTBtagCSVSequenceL3 + process.hltBLifetimeL3FilterCSVsusy + process.HLTAK4PFJetsSequence + process.hltPFMETProducer + process.hltPFMET120Filter + process.HLTEndSequence ) -process.HLT_PFMET120_NoiseCleaned_Mu5_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1ETM60ORETM70 + process.hltPrePFMET120NoiseCleanedMu5 + cms.ignore(process.hltL1sL1SingleMuOpenCandidate) + process.HLTRecoMETSequence + process.hltMET70 + process.HLTHBHENoiseCleanerSequence + process.hltMetClean + process.hltMETClean70 + process.HLTAK4CaloJetsSequence + process.hltMetCleanUsingJetID + process.hltMETCleanUsingJetID70 + process.hltPFMET120Mu5L1MuFiltered + process.HLTL2muonrecoSequence + process.hltPFMET120Mu5L2PreFiltered + process.HLTL3muonrecoSequence + process.hltPFMET120Mu5L3PreFiltered + process.HLTAK4PFJetsSequence + process.hltPFMETProducer + process.hltPFMET120Filter + process.HLTEndSequence ) process.HLT_PFMET170_NoiseCleaned_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1ETM60ORETM70 + process.hltPrePFMET170NoiseCleaned + process.HLTRecoMETSequence + process.hltMET90 + process.HLTHBHENoiseCleanerSequence + process.hltMetClean + process.hltMETClean80 + process.HLTAK4CaloJetsSequence + process.hltMetCleanUsingJetID + process.hltMETCleanUsingJetID80 + process.HLTAK4PFJetsSequence + process.hltPFMETProducer + process.hltPFMET170Filter + process.HLTEndSequence ) process.HLT_Photon135_PFMET40_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1SingleEG35 + process.hltPrePhoton135PFMET40 + process.HLTSinglePhoton135Sequence + process.HLTAK4PFJetsSequence + process.hltPFMETProducer + process.hltPFMET40Filter + process.HLTEndSequence ) process.HLT_Photon135_VBF_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1SingleEG35 + process.hltPrePhoton135VBF + process.HLTSinglePhoton135Sequence + process.HLTAK4CaloJetsSequence + process.hltDiCaloJet20MJJ400AllJetsDEta3Filter + process.HLTEndSequence ) diff --git a/HLTrigger/Configuration/test/OnData_HLT_HIon.py b/HLTrigger/Configuration/test/OnData_HLT_HIon.py index f38a6358a6c8c..6dc5d7afba02e 100644 --- a/HLTrigger/Configuration/test/OnData_HLT_HIon.py +++ b/HLTrigger/Configuration/test/OnData_HLT_HIon.py @@ -1,11 +1,11 @@ -# /dev/CMSSW_7_2_1/HIon/V9 (CMSSW_7_2_0) +# /dev/CMSSW_7_2_1/HIon/V6 (CMSSW_7_2_0_pre8) import FWCore.ParameterSet.Config as cms process = cms.Process( "HLTHIon" ) process.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_7_2_1/HIon/V9') + tableName = cms.string('/dev/CMSSW_7_2_1/HIon/V6') ) process.HLTIter4PSetTrajectoryFilterIT = cms.PSet( @@ -1115,11 +1115,11 @@ ) process.hcal_db_producer = cms.ESProducer( "HcalDbProducer" ) process.hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", - categoryVariableName = cms.string( "vertexCategory" ), + trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), + categoryVariableName = cms.string( "vertexCategory" ), trackSelection = cms.PSet( totalHitsMin = cms.uint32( 0 ), jetDeltaRMax = cms.double( 0.3 ), @@ -1141,7 +1141,7 @@ calibrationRecords = cms.vstring( 'CombinedSVRecoVertex', 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), - trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), + correctVertexMass = cms.bool( True ), charmCut = cms.double( 1.5 ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), @@ -4521,7 +4521,6 @@ DT_12 = cms.vdouble( 0.183, 0.054, -0.087, 0.028, 0.002, 0.0 ), DT_14 = cms.vdouble( 0.359, 0.052, -0.107, 0.072, -0.004, 0.0 ), CSC_13_3_scale = cms.vdouble( -1.701268, 0.0 ), - DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23 = cms.vdouble( -0.081, 0.113, -0.029, 0.015, 0.008, 0.0 ), CSC_24 = cms.vdouble( 0.004, 0.021, -0.002, 0.053, 0.0, 0.0 ), OL_2222 = cms.vdouble( 0.107, 0.0, 0.0, 0.04, 0.0, 0.0 ), @@ -4536,14 +4535,14 @@ SME_22_0_scale = cms.vdouble( -3.457901, 0.0 ), DT_24_1_scale = cms.vdouble( -7.490909, 0.0 ), OL_1232_0_scale = cms.vdouble( -5.964634, 0.0 ), - DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), + SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), SME_13_0_scale = cms.vdouble( 0.104905, 0.0 ), SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), - CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), + SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), @@ -4562,7 +4561,7 @@ DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), - SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), + CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), @@ -4570,7 +4569,7 @@ DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), EnableDTMeasurement = cms.bool( True ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), @@ -4580,7 +4579,7 @@ CSC_02 = cms.vdouble( 0.612, -0.207, 0.0, 0.067, -0.001, 0.0 ), CSC_03 = cms.vdouble( 0.787, -0.338, 0.029, 0.101, -0.008, 0.0 ), CSC_01 = cms.vdouble( 0.166, 0.0, 0.0, 0.031, 0.0, 0.0 ), - SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), + DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), crackWindow = cms.double( 0.04 ), @@ -4593,10 +4592,11 @@ DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), - EnableCSCMeasurement = cms.bool( True ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), OL_2222_0_scale = cms.vdouble( -7.667231, 0.0 ), - CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), + EnableCSCMeasurement = cms.bool( True ), CSC_12 = cms.vdouble( -0.161, 0.254, -0.047, 0.042, -0.007, 0.0 ) ) process.hltL2MuonSeeds = cms.EDProducer( "L2MuonSeedGenerator", diff --git a/HLTrigger/Configuration/test/OnData_HLT_PIon.py b/HLTrigger/Configuration/test/OnData_HLT_PIon.py index 78712fe502ffe..5117fd4c9ca53 100644 --- a/HLTrigger/Configuration/test/OnData_HLT_PIon.py +++ b/HLTrigger/Configuration/test/OnData_HLT_PIon.py @@ -1,11 +1,11 @@ -# /dev/CMSSW_7_2_1/PIon/V9 (CMSSW_7_2_0) +# /dev/CMSSW_7_2_1/PIon/V6 (CMSSW_7_2_0_pre8) import FWCore.ParameterSet.Config as cms process = cms.Process( "HLTPIon" ) process.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_7_2_1/PIon/V9') + tableName = cms.string('/dev/CMSSW_7_2_1/PIon/V6') ) process.HLTIter4PSetTrajectoryFilterIT = cms.PSet( @@ -1115,11 +1115,11 @@ ) process.hcal_db_producer = cms.ESProducer( "HcalDbProducer" ) process.hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", - categoryVariableName = cms.string( "vertexCategory" ), + trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), + categoryVariableName = cms.string( "vertexCategory" ), trackSelection = cms.PSet( totalHitsMin = cms.uint32( 0 ), jetDeltaRMax = cms.double( 0.3 ), @@ -1141,7 +1141,7 @@ calibrationRecords = cms.vstring( 'CombinedSVRecoVertex', 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), - trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), + correctVertexMass = cms.bool( True ), charmCut = cms.double( 1.5 ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), @@ -4521,7 +4521,6 @@ DT_12 = cms.vdouble( 0.183, 0.054, -0.087, 0.028, 0.002, 0.0 ), DT_14 = cms.vdouble( 0.359, 0.052, -0.107, 0.072, -0.004, 0.0 ), CSC_13_3_scale = cms.vdouble( -1.701268, 0.0 ), - DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23 = cms.vdouble( -0.081, 0.113, -0.029, 0.015, 0.008, 0.0 ), CSC_24 = cms.vdouble( 0.004, 0.021, -0.002, 0.053, 0.0, 0.0 ), OL_2222 = cms.vdouble( 0.107, 0.0, 0.0, 0.04, 0.0, 0.0 ), @@ -4536,14 +4535,14 @@ SME_22_0_scale = cms.vdouble( -3.457901, 0.0 ), DT_24_1_scale = cms.vdouble( -7.490909, 0.0 ), OL_1232_0_scale = cms.vdouble( -5.964634, 0.0 ), - DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), + SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), SME_13_0_scale = cms.vdouble( 0.104905, 0.0 ), SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), - CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), + SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), @@ -4562,7 +4561,7 @@ DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), - SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), + CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), @@ -4570,7 +4569,7 @@ DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), EnableDTMeasurement = cms.bool( True ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), @@ -4580,7 +4579,7 @@ CSC_02 = cms.vdouble( 0.612, -0.207, 0.0, 0.067, -0.001, 0.0 ), CSC_03 = cms.vdouble( 0.787, -0.338, 0.029, 0.101, -0.008, 0.0 ), CSC_01 = cms.vdouble( 0.166, 0.0, 0.0, 0.031, 0.0, 0.0 ), - SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), + DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), crackWindow = cms.double( 0.04 ), @@ -4593,10 +4592,11 @@ DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), - EnableCSCMeasurement = cms.bool( True ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), OL_2222_0_scale = cms.vdouble( -7.667231, 0.0 ), - CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), + EnableCSCMeasurement = cms.bool( True ), CSC_12 = cms.vdouble( -0.161, 0.254, -0.047, 0.042, -0.007, 0.0 ) ) process.hltL2MuonSeeds = cms.EDProducer( "L2MuonSeedGenerator", diff --git a/HLTrigger/Configuration/test/OnMc_HLT_FULL.py b/HLTrigger/Configuration/test/OnMc_HLT_FULL.py index 8ca0382fe81f0..ea66eb6a76c4a 100644 --- a/HLTrigger/Configuration/test/OnMc_HLT_FULL.py +++ b/HLTrigger/Configuration/test/OnMc_HLT_FULL.py @@ -1,11 +1,11 @@ -# /dev/CMSSW_7_2_1/HLT/V29 (CMSSW_7_2_0) +# /dev/CMSSW_7_2_1/HLT/V26 (CMSSW_7_2_0_pre8) import FWCore.ParameterSet.Config as cms process = cms.Process( "HLTFULL" ) process.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_7_2_1/HLT/V29') + tableName = cms.string('/dev/CMSSW_7_2_1/HLT/V26') ) process.HLTIter4PSetTrajectoryFilterIT = cms.PSet( @@ -519,9 +519,7 @@ 'HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v1', 'HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1', 'HLT_PFHT350_PFMET120_NoiseCleaned_v1', - 'HLT_PFHT350_v1', 'HLT_PFHT550_4Jet_v1', - 'HLT_PFHT600_v1', 'HLT_PFHT650_4Jet_v1', 'HLT_PFHT750_4Jet_v1', 'HLT_PFHT900_v1', @@ -578,6 +576,7 @@ 'HLT_IsoTkMu24_IterTrk02_v1', 'HLT_IterativeTracking_v1', 'HLT_Mu17_NoFilters_v1', + 'HLT_PFHT650_v1', 'HLT_PFchMET90_NoiseCleaned_v1', 'HLT_Photon20_CaloIdVL_IsoL_v1', 'HLT_ReducedIterativeTracking_v1' ) @@ -1250,11 +1249,11 @@ ) process.hcal_db_producer = cms.ESProducer( "HcalDbProducer" ) process.hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", - categoryVariableName = cms.string( "vertexCategory" ), + trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), + categoryVariableName = cms.string( "vertexCategory" ), trackSelection = cms.PSet( totalHitsMin = cms.uint32( 0 ), jetDeltaRMax = cms.double( 0.3 ), @@ -1276,7 +1275,7 @@ calibrationRecords = cms.vstring( 'CombinedSVRecoVertex', 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), - trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), + correctVertexMass = cms.bool( True ), charmCut = cms.double( 1.5 ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), @@ -3250,7 +3249,6 @@ DT_12 = cms.vdouble( 0.183, 0.054, -0.087, 0.028, 0.002, 0.0 ), DT_14 = cms.vdouble( 0.359, 0.052, -0.107, 0.072, -0.004, 0.0 ), CSC_13_3_scale = cms.vdouble( -1.701268, 0.0 ), - DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23 = cms.vdouble( -0.081, 0.113, -0.029, 0.015, 0.008, 0.0 ), CSC_24 = cms.vdouble( 0.004, 0.021, -0.002, 0.053, 0.0, 0.0 ), OL_2222 = cms.vdouble( 0.107, 0.0, 0.0, 0.04, 0.0, 0.0 ), @@ -3265,14 +3263,14 @@ SME_22_0_scale = cms.vdouble( -3.457901, 0.0 ), DT_24_1_scale = cms.vdouble( -7.490909, 0.0 ), OL_1232_0_scale = cms.vdouble( -5.964634, 0.0 ), - DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), + SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), SME_13_0_scale = cms.vdouble( 0.104905, 0.0 ), SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), - CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), + SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), @@ -3291,7 +3289,7 @@ DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), - SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), + CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), @@ -3299,7 +3297,7 @@ DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), EnableDTMeasurement = cms.bool( True ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), @@ -3309,7 +3307,7 @@ CSC_02 = cms.vdouble( 0.612, -0.207, 0.0, 0.067, -0.001, 0.0 ), CSC_03 = cms.vdouble( 0.787, -0.338, 0.029, 0.101, -0.008, 0.0 ), CSC_01 = cms.vdouble( 0.166, 0.0, 0.0, 0.031, 0.0, 0.0 ), - SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), + DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), crackWindow = cms.double( 0.04 ), @@ -3322,10 +3320,11 @@ DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), - EnableCSCMeasurement = cms.bool( True ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), OL_2222_0_scale = cms.vdouble( -7.667231, 0.0 ), - CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), + EnableCSCMeasurement = cms.bool( True ), CSC_12 = cms.vdouble( -0.161, 0.254, -0.047, 0.042, -0.007, 0.0 ) ) process.hltL2MuonSeeds = cms.EDProducer( "L2MuonSeedGenerator", @@ -6708,16 +6707,12 @@ pvSrc = cms.InputTag( "" ) ) process.hltFastPVJetVertexChecker = cms.EDFilter( "JetVertexChecker", - minPt = cms.double( 0.0 ), - maxTrackPt = cms.double( 20.0 ), + beamSpot = cms.InputTag( "hltOnlineBeamSpot" ), maxNJetsToCheck = cms.int32( 2 ), minPtRatio = cms.double( 0.1 ), doFilter = cms.bool( False ), jetTracks = cms.InputTag( "hltFastPVJetTracksAssociator" ), - maxChi2 = cms.double( 20.0 ), - newMethod = cms.bool( False ), - maxNjetsOutput = cms.int32( 2 ), - beamSpot = cms.InputTag( "hltOnlineBeamSpot" ) + minPt = cms.double( 0.0 ) ) process.hltFastPVPixelTracksRecover = cms.EDProducer( "PixelTrackProducer", FilterPSet = cms.PSet( @@ -20658,7 +20653,6 @@ process.hltL3fL1sMu16Eta2p1f0TkFiltered20Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 2.1 ), minPt = cms.double( 20.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -21433,7 +21427,6 @@ process.hltL3fL1sMu16f0TkFiltered24Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 1.0E99 ), minPt = cms.double( 24.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -21469,7 +21462,6 @@ process.hltL3fL1sMu20Eta2p1f0TkFiltered24Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 2.1 ), minPt = cms.double( 24.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -26141,44 +26133,40 @@ htLabels = cms.VInputTag( 'hltPFHT4Jet' ), minHt = cms.vdouble( 650.0 ) ) -process.hltPrePFHT7504Jet = cms.EDFilter( "HLTPrescaler", - L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), - offset = cms.uint32( 0 ) -) -process.hltPF4JetHT750 = cms.EDFilter( "HLTHtMhtFilter", - saveTags = cms.bool( True ), - mhtLabels = cms.VInputTag( 'hltPFHT4Jet' ), - meffSlope = cms.vdouble( 1.0 ), - minMeff = cms.vdouble( 0.0 ), - minMht = cms.vdouble( 0.0 ), - htLabels = cms.VInputTag( 'hltPFHT4Jet' ), - minHt = cms.vdouble( 750.0 ) -) -process.hltPrePFHT350 = cms.EDFilter( "HLTPrescaler", +process.hltPrePFHT650 = cms.EDFilter( "HLTPrescaler", L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), offset = cms.uint32( 0 ) ) -process.hltPrePFHT600 = cms.EDFilter( "HLTPrescaler", - L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), - offset = cms.uint32( 0 ) -) -process.hltHt500 = cms.EDFilter( "HLTHtMhtFilter", +process.hltHt550 = cms.EDFilter( "HLTHtMhtFilter", saveTags = cms.bool( False ), mhtLabels = cms.VInputTag( 'hltHtMht' ), meffSlope = cms.vdouble( 1.0 ), minMeff = cms.vdouble( 0.0 ), minMht = cms.vdouble( 0.0 ), htLabels = cms.VInputTag( 'hltHtMht' ), - minHt = cms.vdouble( 500.0 ) + minHt = cms.vdouble( 550.0 ) ) -process.hltPFHT600 = cms.EDFilter( "HLTHtMhtFilter", +process.hltPFHT650 = cms.EDFilter( "HLTHtMhtFilter", saveTags = cms.bool( True ), mhtLabels = cms.VInputTag( 'hltPFHT' ), meffSlope = cms.vdouble( 1.0 ), minMeff = cms.vdouble( 0.0 ), minMht = cms.vdouble( 0.0 ), htLabels = cms.VInputTag( 'hltPFHT' ), - minHt = cms.vdouble( 600.0 ) + minHt = cms.vdouble( 650.0 ) +) +process.hltPrePFHT7504Jet = cms.EDFilter( "HLTPrescaler", + L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), + offset = cms.uint32( 0 ) +) +process.hltPF4JetHT750 = cms.EDFilter( "HLTHtMhtFilter", + saveTags = cms.bool( True ), + mhtLabels = cms.VInputTag( 'hltPFHT4Jet' ), + meffSlope = cms.vdouble( 1.0 ), + minMeff = cms.vdouble( 0.0 ), + minMht = cms.vdouble( 0.0 ), + htLabels = cms.VInputTag( 'hltPFHT4Jet' ), + minHt = cms.vdouble( 750.0 ) ) process.hltPrePFHT900 = cms.EDFilter( "HLTPrescaler", L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), @@ -29440,10 +29428,9 @@ 'HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v1', 'HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1', 'HLT_PFHT350_PFMET120_NoiseCleaned_v1', - 'HLT_PFHT350_v1', 'HLT_PFHT550_4Jet_v1', - 'HLT_PFHT600_v1', 'HLT_PFHT650_4Jet_v1', + 'HLT_PFHT650_v1', 'HLT_PFHT750_4Jet_v1', 'HLT_PFHT900_v1', 'HLT_PFJet140_v1', @@ -29779,9 +29766,8 @@ process.HLT_PFHT350_PFMET120_NoiseCleaned_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT350PFMET120NoiseCleaned + process.HLTRecoMETSequence + process.hltMET70 + process.HLTHBHENoiseCleanerSequence + process.hltMetClean + process.hltMETClean60 + process.HLTAK4CaloJetsSequence + process.hltMetCleanUsingJetID + process.hltMETCleanUsingJetID60 + process.hltHtMht + process.hltHt280 + process.HLTAK4PFJetsSequence + process.hltPFMETProducer + process.hltPFMET120Filter + process.hltPFHT + process.hltPFHT350 + process.HLTEndSequence ) process.HLT_PFHT550_4Jet_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT5504Jet + process.HLTAK4CaloJetsSequence + process.hltHtMht4Jet + process.hlt4JetHt450 + process.HLTAK4PFJetsSequence + process.hltPFHT4Jet + process.hltPF4JetHT550 + process.HLTEndSequence ) process.HLT_PFHT650_4Jet_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT6504Jet + process.HLTAK4CaloJetsSequence + process.hltHtMht4Jet + process.hlt4JetHt550 + process.HLTAK4PFJetsSequence + process.hltPFHT4Jet + process.hltPF4JetHT650 + process.HLTEndSequence ) +process.HLT_PFHT650_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT650 + process.HLTAK4CaloJetsSequence + process.hltHtMht + process.hltHt550 + process.HLTAK4PFJetsSequence + process.hltPFHT + process.hltPFHT650 + process.HLTEndSequence ) process.HLT_PFHT750_4Jet_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT7504Jet + process.HLTAK4CaloJetsSequence + process.hltHtMht4Jet + process.hlt4JetHt550 + process.HLTAK4PFJetsSequence + process.hltPFHT4Jet + process.hltPF4JetHT750 + process.HLTEndSequence ) -process.HLT_PFHT350_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT350 + process.HLTAK4CaloJetsSequence + process.hltHtMht + process.hltHt280 + process.HLTAK4PFJetsSequence + process.hltPFHT + process.hltPFHT350 + process.HLTEndSequence ) -process.HLT_PFHT600_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT600 + process.HLTAK4CaloJetsSequence + process.hltHtMht + process.hltHt500 + process.HLTAK4PFJetsSequence + process.hltPFHT + process.hltPFHT600 + process.HLTEndSequence ) process.HLT_PFHT900_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT900 + process.HLTAK4CaloJetsSequence + process.hltHtMht + process.hltHt700 + process.HLTAK4PFJetsSequence + process.hltPFHT + process.hltPFHT900 + process.HLTEndSequence ) process.HLT_PFJet40_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1SingleJet52 + process.hltPrePFJet40 + process.HLTAK4CaloJetsSequence + process.hltSingleCaloJet20 + process.HLTAK4PFJetsSequence + process.hltPFJetsCorrectedMatchedToCaloJets20 + process.hltSinglePFJet40 + process.HLTEndSequence ) process.HLT_PFJet60_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1SingleJet52 + process.hltPrePFJet60 + process.HLTAK4CaloJetsSequence + process.hltSingleCaloJet40 + process.HLTAK4PFJetsSequence + process.hltPFJetsCorrectedMatchedToCaloJets40 + process.hltSinglePFJet60 + process.HLTEndSequence ) diff --git a/HLTrigger/Configuration/test/OnMc_HLT_Fake.py b/HLTrigger/Configuration/test/OnMc_HLT_Fake.py index b733570695de5..f5190660201ac 100644 --- a/HLTrigger/Configuration/test/OnMc_HLT_Fake.py +++ b/HLTrigger/Configuration/test/OnMc_HLT_Fake.py @@ -1,11 +1,11 @@ -# /dev/CMSSW_7_2_1/Fake/V2 (CMSSW_7_2_0) +# /dev/CMSSW_7_2_1/Fake/V1 (CMSSW_7_2_0_pre8) import FWCore.ParameterSet.Config as cms process = cms.Process( "HLTFake" ) process.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_7_2_1/Fake/V2') + tableName = cms.string('/dev/CMSSW_7_2_1/Fake/V1') ) process.HLTIter4PSetTrajectoryFilterIT = cms.PSet( @@ -1235,11 +1235,11 @@ ) process.hcal_db_producer = cms.ESProducer( "HcalDbProducer" ) process.hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", - categoryVariableName = cms.string( "vertexCategory" ), + trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), + categoryVariableName = cms.string( "vertexCategory" ), trackSelection = cms.PSet( totalHitsMin = cms.uint32( 0 ), jetDeltaRMax = cms.double( 0.3 ), @@ -1261,7 +1261,7 @@ calibrationRecords = cms.vstring( 'CombinedSVRecoVertex', 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), - trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), + correctVertexMass = cms.bool( True ), charmCut = cms.double( 1.5 ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), @@ -2570,7 +2570,6 @@ DT_12 = cms.vdouble( 0.183, 0.054, -0.087, 0.028, 0.002, 0.0 ), DT_14 = cms.vdouble( 0.359, 0.052, -0.107, 0.072, -0.004, 0.0 ), CSC_13_3_scale = cms.vdouble( -1.701268, 0.0 ), - DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23 = cms.vdouble( -0.081, 0.113, -0.029, 0.015, 0.008, 0.0 ), CSC_24 = cms.vdouble( 0.004, 0.021, -0.002, 0.053, 0.0, 0.0 ), OL_2222 = cms.vdouble( 0.107, 0.0, 0.0, 0.04, 0.0, 0.0 ), @@ -2585,14 +2584,14 @@ SME_22_0_scale = cms.vdouble( -3.457901, 0.0 ), DT_24_1_scale = cms.vdouble( -7.490909, 0.0 ), OL_1232_0_scale = cms.vdouble( -5.964634, 0.0 ), - DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), + SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), SME_13_0_scale = cms.vdouble( 0.104905, 0.0 ), SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), - CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), + SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), @@ -2611,7 +2610,7 @@ DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), - SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), + CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), @@ -2619,7 +2618,7 @@ DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), EnableDTMeasurement = cms.bool( True ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), @@ -2629,7 +2628,7 @@ CSC_02 = cms.vdouble( 0.612, -0.207, 0.0, 0.067, -0.001, 0.0 ), CSC_03 = cms.vdouble( 0.787, -0.338, 0.029, 0.101, -0.008, 0.0 ), CSC_01 = cms.vdouble( 0.166, 0.0, 0.0, 0.031, 0.0, 0.0 ), - SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), + DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), crackWindow = cms.double( 0.04 ), @@ -2642,10 +2641,11 @@ DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), - EnableCSCMeasurement = cms.bool( True ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), OL_2222_0_scale = cms.vdouble( -7.667231, 0.0 ), - CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), + EnableCSCMeasurement = cms.bool( True ), CSC_12 = cms.vdouble( -0.161, 0.254, -0.047, 0.042, -0.007, 0.0 ) ) process.hltL2MuonSeeds = cms.EDProducer( "L2MuonSeedGenerator", @@ -6321,7 +6321,6 @@ process.hltL3fL1sMu16f0TkFiltered24Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 1.0E99 ), minPt = cms.double( 24.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -23021,16 +23020,12 @@ pvSrc = cms.InputTag( "" ) ) process.hltFastPVJetVertexChecker = cms.EDFilter( "JetVertexChecker", - minPt = cms.double( 0.0 ), - maxTrackPt = cms.double( 20.0 ), + beamSpot = cms.InputTag( "hltOnlineBeamSpot" ), maxNJetsToCheck = cms.int32( 2 ), minPtRatio = cms.double( 0.1 ), doFilter = cms.bool( False ), jetTracks = cms.InputTag( "hltFastPVJetTracksAssociator" ), - maxChi2 = cms.double( 20.0 ), - newMethod = cms.bool( False ), - maxNjetsOutput = cms.int32( 2 ), - beamSpot = cms.InputTag( "hltOnlineBeamSpot" ) + minPt = cms.double( 0.0 ) ) process.hltFastPVPixelTracksRecover = cms.EDProducer( "PixelTrackProducer", FilterPSet = cms.PSet( diff --git a/HLTrigger/Configuration/test/OnMc_HLT_GRun.py b/HLTrigger/Configuration/test/OnMc_HLT_GRun.py index 8b85f38d910d7..737f710674b6e 100644 --- a/HLTrigger/Configuration/test/OnMc_HLT_GRun.py +++ b/HLTrigger/Configuration/test/OnMc_HLT_GRun.py @@ -1,11 +1,11 @@ -# /dev/CMSSW_7_2_1/GRun/V9 (CMSSW_7_2_0) +# /dev/CMSSW_7_2_1/GRun/V6 (CMSSW_7_2_0_pre8) import FWCore.ParameterSet.Config as cms process = cms.Process( "HLTGRun" ) process.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_7_2_1/GRun/V9') + tableName = cms.string('/dev/CMSSW_7_2_1/GRun/V6') ) process.HLTIter4PSetTrajectoryFilterIT = cms.PSet( @@ -506,12 +506,9 @@ 'HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v1', 'HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1', 'HLT_PFHT350_PFMET120_NoiseCleaned_v1', - 'HLT_PFHT350_v1', - 'HLT_PFHT600_v1', 'HLT_PFHT900_v1', 'HLT_PFJet260_v1', 'HLT_PFMET120_NoiseCleaned_BTagCSV07_v1', - 'HLT_PFMET120_NoiseCleaned_Mu5_v1', 'HLT_PFMET170_NoiseCleaned_v1', 'HLT_Photon135_PFMET40_v1', 'HLT_Photon135_VBF_v1', @@ -1210,11 +1207,11 @@ ) process.hcal_db_producer = cms.ESProducer( "HcalDbProducer" ) process.hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", - categoryVariableName = cms.string( "vertexCategory" ), + trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), + categoryVariableName = cms.string( "vertexCategory" ), trackSelection = cms.PSet( totalHitsMin = cms.uint32( 0 ), jetDeltaRMax = cms.double( 0.3 ), @@ -1236,7 +1233,7 @@ calibrationRecords = cms.vstring( 'CombinedSVRecoVertex', 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), - trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), + correctVertexMass = cms.bool( True ), charmCut = cms.double( 1.5 ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), @@ -3210,7 +3207,6 @@ DT_12 = cms.vdouble( 0.183, 0.054, -0.087, 0.028, 0.002, 0.0 ), DT_14 = cms.vdouble( 0.359, 0.052, -0.107, 0.072, -0.004, 0.0 ), CSC_13_3_scale = cms.vdouble( -1.701268, 0.0 ), - DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23 = cms.vdouble( -0.081, 0.113, -0.029, 0.015, 0.008, 0.0 ), CSC_24 = cms.vdouble( 0.004, 0.021, -0.002, 0.053, 0.0, 0.0 ), OL_2222 = cms.vdouble( 0.107, 0.0, 0.0, 0.04, 0.0, 0.0 ), @@ -3225,14 +3221,14 @@ SME_22_0_scale = cms.vdouble( -3.457901, 0.0 ), DT_24_1_scale = cms.vdouble( -7.490909, 0.0 ), OL_1232_0_scale = cms.vdouble( -5.964634, 0.0 ), - DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), + SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), SME_13_0_scale = cms.vdouble( 0.104905, 0.0 ), SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), - CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), + SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), @@ -3251,7 +3247,7 @@ DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), - SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), + CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), @@ -3259,7 +3255,7 @@ DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), EnableDTMeasurement = cms.bool( True ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), @@ -3269,7 +3265,7 @@ CSC_02 = cms.vdouble( 0.612, -0.207, 0.0, 0.067, -0.001, 0.0 ), CSC_03 = cms.vdouble( 0.787, -0.338, 0.029, 0.101, -0.008, 0.0 ), CSC_01 = cms.vdouble( 0.166, 0.0, 0.0, 0.031, 0.0, 0.0 ), - SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), + DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), crackWindow = cms.double( 0.04 ), @@ -3282,10 +3278,11 @@ DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), - EnableCSCMeasurement = cms.bool( True ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), OL_2222_0_scale = cms.vdouble( -7.667231, 0.0 ), - CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), + EnableCSCMeasurement = cms.bool( True ), CSC_12 = cms.vdouble( -0.161, 0.254, -0.047, 0.042, -0.007, 0.0 ) ) process.hltL2MuonSeeds = cms.EDProducer( "L2MuonSeedGenerator", @@ -18780,7 +18777,6 @@ process.hltL3fL1sMu16Eta2p1f0TkFiltered20Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 2.1 ), minPt = cms.double( 20.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -19555,7 +19551,6 @@ process.hltL3fL1sMu16f0TkFiltered24Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 1.0E99 ), minPt = cms.double( 24.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -19591,7 +19586,6 @@ process.hltL3fL1sMu20Eta2p1f0TkFiltered24Q = cms.EDFilter( "HLTMuonTrkFilter", maxNormalizedChi2 = cms.double( 1.0E99 ), saveTags = cms.bool( False ), - maxAbsEta = cms.double( 2.1 ), minPt = cms.double( 24.0 ), inputCandCollection = cms.InputTag( "hltHighPtTkMuonCands" ), minMuonStations = cms.int32( 2 ), @@ -22908,32 +22902,6 @@ htLabels = cms.VInputTag( 'hltPFHT' ), minHt = cms.vdouble( 350.0 ) ) -process.hltPrePFHT350 = cms.EDFilter( "HLTPrescaler", - L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), - offset = cms.uint32( 0 ) -) -process.hltPrePFHT600 = cms.EDFilter( "HLTPrescaler", - L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), - offset = cms.uint32( 0 ) -) -process.hltHt500 = cms.EDFilter( "HLTHtMhtFilter", - saveTags = cms.bool( False ), - mhtLabels = cms.VInputTag( 'hltHtMht' ), - meffSlope = cms.vdouble( 1.0 ), - minMeff = cms.vdouble( 0.0 ), - minMht = cms.vdouble( 0.0 ), - htLabels = cms.VInputTag( 'hltHtMht' ), - minHt = cms.vdouble( 500.0 ) -) -process.hltPFHT600 = cms.EDFilter( "HLTHtMhtFilter", - saveTags = cms.bool( True ), - mhtLabels = cms.VInputTag( 'hltPFHT' ), - meffSlope = cms.vdouble( 1.0 ), - minMeff = cms.vdouble( 0.0 ), - minMht = cms.vdouble( 0.0 ), - htLabels = cms.VInputTag( 'hltPFHT' ), - minHt = cms.vdouble( 600.0 ) -) process.hltPrePFHT900 = cms.EDFilter( "HLTPrescaler", L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), offset = cms.uint32( 0 ) @@ -23267,16 +23235,12 @@ pvSrc = cms.InputTag( "" ) ) process.hltFastPVJetVertexChecker = cms.EDFilter( "JetVertexChecker", - minPt = cms.double( 0.0 ), - maxTrackPt = cms.double( 20.0 ), + beamSpot = cms.InputTag( "hltOnlineBeamSpot" ), maxNJetsToCheck = cms.int32( 2 ), minPtRatio = cms.double( 0.1 ), doFilter = cms.bool( False ), jetTracks = cms.InputTag( "hltFastPVJetTracksAssociator" ), - maxChi2 = cms.double( 20.0 ), - newMethod = cms.bool( False ), - maxNjetsOutput = cms.int32( 2 ), - beamSpot = cms.InputTag( "hltOnlineBeamSpot" ) + minPt = cms.double( 0.0 ) ) process.hltFastPVPixelTracksRecover = cms.EDProducer( "PixelTrackProducer", FilterPSet = cms.PSet( @@ -24022,73 +23986,6 @@ MinTag = cms.double( 0.7 ), MaxTag = cms.double( 99999.0 ) ) -process.hltPrePFMET120NoiseCleanedMu5 = cms.EDFilter( "HLTPrescaler", - L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), - offset = cms.uint32( 0 ) -) -process.hltL1sL1SingleMuOpenCandidate = cms.EDFilter( "HLTLevel1GTSeed", - L1SeedsLogicalExpression = cms.string( "L1_SingleMuOpen" ), - saveTags = cms.bool( True ), - L1MuonCollectionTag = cms.InputTag( "hltL1extraParticles" ), - L1UseL1TriggerObjectMaps = cms.bool( False ), - L1UseAliasesForSeeding = cms.bool( True ), - L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), - L1CollectionsTag = cms.InputTag( "hltL1extraParticles" ), - L1NrBxInEvent = cms.int32( 1 ), - L1GtObjectMapTag = cms.InputTag( "hltL1GtObjectMap" ), - L1TechTriggerSeeding = cms.bool( False ) -) -process.hltPFMET120Mu5L1MuFiltered = cms.EDFilter( "HLTMuonL1Filter", - saveTags = cms.bool( False ), - CSCTFtag = cms.InputTag( "unused" ), - PreviousCandTag = cms.InputTag( "hltL1sL1SingleMuOpenCandidate" ), - MinPt = cms.double( 0.0 ), - MinN = cms.int32( 1 ), - MaxEta = cms.double( 2.5 ), - SelectQualities = cms.vint32( ), - CandTag = cms.InputTag( "hltL1extraParticles" ), - ExcludeSingleSegmentCSC = cms.bool( False ) -) -process.hltPFMET120Mu5L2PreFiltered = cms.EDFilter( "HLTMuonL2PreFilter", - saveTags = cms.bool( True ), - MaxDr = cms.double( 9999.0 ), - CutOnChambers = cms.bool( False ), - PreviousCandTag = cms.InputTag( "hltPFMET120Mu5L1MuFiltered" ), - MinPt = cms.double( 3.5 ), - MinN = cms.int32( 1 ), - SeedMapTag = cms.InputTag( "hltL2Muons" ), - MaxEta = cms.double( 2.5 ), - MinNhits = cms.vint32( 0, 1, 0, 1 ), - MinDxySig = cms.double( -1.0 ), - MinNchambers = cms.vint32( 0 ), - AbsEtaBins = cms.vdouble( 0.9, 1.5, 2.1, 5.0 ), - MaxDz = cms.double( 9999.0 ), - CandTag = cms.InputTag( "hltL2MuonCandidates" ), - BeamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), - MinDr = cms.double( -1.0 ), - NSigmaPt = cms.double( 0.0 ), - MinNstations = cms.vint32( 0, 2, 0, 2 ) -) -process.hltPFMET120Mu5L3PreFiltered = cms.EDFilter( "HLTMuonL3PreFilter", - MaxNormalizedChi2 = cms.double( 20.0 ), - saveTags = cms.bool( True ), - PreviousCandTag = cms.InputTag( "hltPFMET120Mu5L2PreFiltered" ), - MinNmuonHits = cms.int32( 0 ), - MinN = cms.int32( 1 ), - MinTrackPt = cms.double( 0.0 ), - MaxEta = cms.double( 2.5 ), - MaxDXYBeamSpot = cms.double( 0.1 ), - MinNhits = cms.int32( 0 ), - MinDxySig = cms.double( -1.0 ), - NSigmaPt = cms.double( 0.0 ), - MaxDz = cms.double( 9999.0 ), - MaxPtDifference = cms.double( 9999.0 ), - MaxDr = cms.double( 2.0 ), - CandTag = cms.InputTag( "hltL3MuonCandidates" ), - MinDr = cms.double( -1.0 ), - BeamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), - MinPt = cms.double( 5.0 ) -) process.hltPrePFMET170NoiseCleaned = cms.EDFilter( "HLTPrescaler", L1GtReadoutRecordTag = cms.InputTag( "hltGtDigis" ), offset = cms.uint32( 0 ) @@ -26428,12 +26325,9 @@ 'HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v1', 'HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1', 'HLT_PFHT350_PFMET120_NoiseCleaned_v1', - 'HLT_PFHT350_v1', - 'HLT_PFHT600_v1', 'HLT_PFHT900_v1', 'HLT_PFJet260_v1', 'HLT_PFMET120_NoiseCleaned_BTagCSV07_v1', - 'HLT_PFMET120_NoiseCleaned_Mu5_v1', 'HLT_PFMET170_NoiseCleaned_v1', 'HLT_Photon135_PFMET40_v1', 'HLT_Photon135_VBF_v1', @@ -26728,12 +26622,9 @@ process.HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1Mu5EG20 + process.hltPreMu42NoFiltersNoVtxPhoton42CaloIdL + process.hltL1fL1sMu5EG20L1Filtered5 + process.HLTL2muonrecoSequenceNoVtx + process.HLTL3NoFiltersNoVtxmuonrecoSequence + process.hltL2fL1sMu5EG20L1f5L2NoVtxFiltered16 + process.hltL3fL1Mu5EG20L1f5L2NVf12L3NoFiltersNoVtxFiltered42 + process.HLTDoFullUnpackingEgammaEcalSequence + process.HLTPFClusteringForEgamma + process.hltEgammaCandidates + process.hltEGL1Mu5EG20Filter + process.hltMu42NoFiltersNoVtxPhoton42CaloIdLEtFilter + process.hltEgammaClusterShape + process.hltMu42NoFiltersNoVtxPhoton42CaloIdLClusterShapeFilter + process.HLTDoLocalHcalWithTowerSequence + process.HLTFastJetForEgamma + process.hltEgammaHoverE + process.hltMu42NoFiltersNoVtxPhoton42CaloIdLHEFilter + process.HLTEndSequence ) process.HLT_Mu8_TrkIsoVVL_Ele23_Gsf_CaloId_TrackId_Iso_MediumWP_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1Mu5EG20ORL1Mu5IsoEG18 + process.hltPreMu8TrkIsoVVLEle23GsfCaloIdTrackIdIsoMediumWP + process.hltL1sL1Mu5EG20ORL1Mu5IsoEG18L1Filtered0 + process.HLTL2muonrecoSequence + process.hltL2fL1sL1Mu5EG20ORL1Mu5IsoEG18L1f0L2Filtered5 + process.HLTL3muonrecoSequence + process.hltL3fL1sL1Mu5EG20ORL1Mu5IsoEG18L1f0L2f5L3Filtered8 + process.HLTL3muontrkisovvlSequence + process.hltL1sL1Mu5EG20ORL1Mu5IsoEG18L3IsoFiltered8 + process.HLTMu8Ele23_Gsf + process.HLTEndSequence ) process.HLT_PFHT350_PFMET120_NoiseCleaned_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT350PFMET120NoiseCleaned + process.HLTRecoMETSequence + process.hltMET70 + process.HLTHBHENoiseCleanerSequence + process.hltMetClean + process.hltMETClean60 + process.HLTAK4CaloJetsSequence + process.hltMetCleanUsingJetID + process.hltMETCleanUsingJetID60 + process.hltHtMht + process.hltHt280 + process.HLTAK4PFJetsSequence + process.hltPFMETProducer + process.hltPFMET120Filter + process.hltPFHT + process.hltPFHT350 + process.HLTEndSequence ) -process.HLT_PFHT350_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT350 + process.HLTAK4CaloJetsSequence + process.hltHtMht + process.hltHt280 + process.HLTAK4PFJetsSequence + process.hltPFHT + process.hltPFHT350 + process.HLTEndSequence ) -process.HLT_PFHT600_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT600 + process.HLTAK4CaloJetsSequence + process.hltHtMht + process.hltHt500 + process.HLTAK4PFJetsSequence + process.hltPFHT + process.hltPFHT600 + process.HLTEndSequence ) process.HLT_PFHT900_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1HTT150ORHTT175 + process.hltPrePFHT900 + process.HLTAK4CaloJetsSequence + process.hltHtMht + process.hltHt700 + process.HLTAK4PFJetsSequence + process.hltPFHT + process.hltPFHT900 + process.HLTEndSequence ) process.HLT_PFJet260_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1SingleJet200 + process.hltPrePFJet260 + process.HLTAK4CaloJetsSequence + process.hltSingleCaloJet210 + process.HLTAK4PFJetsSequence + process.hltPFJetsCorrectedMatchedToCaloJets210 + process.hltSinglePFJet260 + process.HLTEndSequence ) process.HLT_PFMET120_NoiseCleaned_BTagCSV07_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1ETM60ORETM70 + process.hltPrePFMET120NoiseCleanedBTagCSV07 + process.HLTRecoMETSequence + process.hltMET70 + process.HLTHBHENoiseCleanerSequence + process.hltMetClean + process.hltMETClean70 + process.HLTAK4CaloJetsSequence + process.hltMetCleanUsingJetID + process.hltMETCleanUsingJetID70 + process.hltSusyPreBtagJetFilter + process.HLTFastPrimaryVertexSequence + process.hltFastPVPixelVertexSelector + process.HLTBtagCSVSequenceL3 + process.hltBLifetimeL3FilterCSVsusy + process.HLTAK4PFJetsSequence + process.hltPFMETProducer + process.hltPFMET120Filter + process.HLTEndSequence ) -process.HLT_PFMET120_NoiseCleaned_Mu5_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1ETM60ORETM70 + process.hltPrePFMET120NoiseCleanedMu5 + cms.ignore(process.hltL1sL1SingleMuOpenCandidate) + process.HLTRecoMETSequence + process.hltMET70 + process.HLTHBHENoiseCleanerSequence + process.hltMetClean + process.hltMETClean70 + process.HLTAK4CaloJetsSequence + process.hltMetCleanUsingJetID + process.hltMETCleanUsingJetID70 + process.hltPFMET120Mu5L1MuFiltered + process.HLTL2muonrecoSequence + process.hltPFMET120Mu5L2PreFiltered + process.HLTL3muonrecoSequence + process.hltPFMET120Mu5L3PreFiltered + process.HLTAK4PFJetsSequence + process.hltPFMETProducer + process.hltPFMET120Filter + process.HLTEndSequence ) process.HLT_PFMET170_NoiseCleaned_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1ETM60ORETM70 + process.hltPrePFMET170NoiseCleaned + process.HLTRecoMETSequence + process.hltMET90 + process.HLTHBHENoiseCleanerSequence + process.hltMetClean + process.hltMETClean80 + process.HLTAK4CaloJetsSequence + process.hltMetCleanUsingJetID + process.hltMETCleanUsingJetID80 + process.HLTAK4PFJetsSequence + process.hltPFMETProducer + process.hltPFMET170Filter + process.HLTEndSequence ) process.HLT_Photon135_PFMET40_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1SingleEG35 + process.hltPrePhoton135PFMET40 + process.HLTSinglePhoton135Sequence + process.HLTAK4PFJetsSequence + process.hltPFMETProducer + process.hltPFMET40Filter + process.HLTEndSequence ) process.HLT_Photon135_VBF_v1 = cms.Path( process.HLTBeginSequence + process.hltL1sL1SingleEG35 + process.hltPrePhoton135VBF + process.HLTSinglePhoton135Sequence + process.HLTAK4CaloJetsSequence + process.hltDiCaloJet20MJJ400AllJetsDEta3Filter + process.HLTEndSequence ) diff --git a/HLTrigger/Configuration/test/OnMc_HLT_HIon.py b/HLTrigger/Configuration/test/OnMc_HLT_HIon.py index 523488159d0e8..12e7adc179c3f 100644 --- a/HLTrigger/Configuration/test/OnMc_HLT_HIon.py +++ b/HLTrigger/Configuration/test/OnMc_HLT_HIon.py @@ -1,11 +1,11 @@ -# /dev/CMSSW_7_2_1/HIon/V9 (CMSSW_7_2_0) +# /dev/CMSSW_7_2_1/HIon/V6 (CMSSW_7_2_0_pre8) import FWCore.ParameterSet.Config as cms process = cms.Process( "HLTHIon" ) process.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_7_2_1/HIon/V9') + tableName = cms.string('/dev/CMSSW_7_2_1/HIon/V6') ) process.HLTIter4PSetTrajectoryFilterIT = cms.PSet( @@ -1115,11 +1115,11 @@ ) process.hcal_db_producer = cms.ESProducer( "HcalDbProducer" ) process.hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", - categoryVariableName = cms.string( "vertexCategory" ), + trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), + categoryVariableName = cms.string( "vertexCategory" ), trackSelection = cms.PSet( totalHitsMin = cms.uint32( 0 ), jetDeltaRMax = cms.double( 0.3 ), @@ -1141,7 +1141,7 @@ calibrationRecords = cms.vstring( 'CombinedSVRecoVertex', 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), - trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), + correctVertexMass = cms.bool( True ), charmCut = cms.double( 1.5 ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), @@ -4521,7 +4521,6 @@ DT_12 = cms.vdouble( 0.183, 0.054, -0.087, 0.028, 0.002, 0.0 ), DT_14 = cms.vdouble( 0.359, 0.052, -0.107, 0.072, -0.004, 0.0 ), CSC_13_3_scale = cms.vdouble( -1.701268, 0.0 ), - DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23 = cms.vdouble( -0.081, 0.113, -0.029, 0.015, 0.008, 0.0 ), CSC_24 = cms.vdouble( 0.004, 0.021, -0.002, 0.053, 0.0, 0.0 ), OL_2222 = cms.vdouble( 0.107, 0.0, 0.0, 0.04, 0.0, 0.0 ), @@ -4536,14 +4535,14 @@ SME_22_0_scale = cms.vdouble( -3.457901, 0.0 ), DT_24_1_scale = cms.vdouble( -7.490909, 0.0 ), OL_1232_0_scale = cms.vdouble( -5.964634, 0.0 ), - DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), + SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), SME_13_0_scale = cms.vdouble( 0.104905, 0.0 ), SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), - CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), + SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), @@ -4562,7 +4561,7 @@ DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), - SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), + CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), @@ -4570,7 +4569,7 @@ DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), EnableDTMeasurement = cms.bool( True ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), @@ -4580,7 +4579,7 @@ CSC_02 = cms.vdouble( 0.612, -0.207, 0.0, 0.067, -0.001, 0.0 ), CSC_03 = cms.vdouble( 0.787, -0.338, 0.029, 0.101, -0.008, 0.0 ), CSC_01 = cms.vdouble( 0.166, 0.0, 0.0, 0.031, 0.0, 0.0 ), - SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), + DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), crackWindow = cms.double( 0.04 ), @@ -4593,10 +4592,11 @@ DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), - EnableCSCMeasurement = cms.bool( True ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), OL_2222_0_scale = cms.vdouble( -7.667231, 0.0 ), - CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), + EnableCSCMeasurement = cms.bool( True ), CSC_12 = cms.vdouble( -0.161, 0.254, -0.047, 0.042, -0.007, 0.0 ) ) process.hltL2MuonSeeds = cms.EDProducer( "L2MuonSeedGenerator", diff --git a/HLTrigger/Configuration/test/OnMc_HLT_PIon.py b/HLTrigger/Configuration/test/OnMc_HLT_PIon.py index f68f94c7dc707..bd1fc9e9f97c0 100644 --- a/HLTrigger/Configuration/test/OnMc_HLT_PIon.py +++ b/HLTrigger/Configuration/test/OnMc_HLT_PIon.py @@ -1,11 +1,11 @@ -# /dev/CMSSW_7_2_1/PIon/V9 (CMSSW_7_2_0) +# /dev/CMSSW_7_2_1/PIon/V6 (CMSSW_7_2_0_pre8) import FWCore.ParameterSet.Config as cms process = cms.Process( "HLTPIon" ) process.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_7_2_1/PIon/V9') + tableName = cms.string('/dev/CMSSW_7_2_1/PIon/V6') ) process.HLTIter4PSetTrajectoryFilterIT = cms.PSet( @@ -1115,11 +1115,11 @@ ) process.hcal_db_producer = cms.ESProducer( "HcalDbProducer" ) process.hltCombinedSecondaryVertex = cms.ESProducer( "CombinedSecondaryVertexESProducer", - categoryVariableName = cms.string( "vertexCategory" ), + trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), useTrackWeights = cms.bool( True ), useCategories = cms.bool( True ), pseudoMultiplicityMin = cms.uint32( 2 ), - correctVertexMass = cms.bool( True ), + categoryVariableName = cms.string( "vertexCategory" ), trackSelection = cms.PSet( totalHitsMin = cms.uint32( 0 ), jetDeltaRMax = cms.double( 0.3 ), @@ -1141,7 +1141,7 @@ calibrationRecords = cms.vstring( 'CombinedSVRecoVertex', 'CombinedSVPseudoVertex', 'CombinedSVNoVertex' ), - trackPairV0Filter = cms.PSet( k0sMassWindow = cms.double( 0.03 ) ), + correctVertexMass = cms.bool( True ), charmCut = cms.double( 1.5 ), vertexFlip = cms.bool( False ), minimumTrackWeight = cms.double( 0.5 ), @@ -4521,7 +4521,6 @@ DT_12 = cms.vdouble( 0.183, 0.054, -0.087, 0.028, 0.002, 0.0 ), DT_14 = cms.vdouble( 0.359, 0.052, -0.107, 0.072, -0.004, 0.0 ), CSC_13_3_scale = cms.vdouble( -1.701268, 0.0 ), - DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23 = cms.vdouble( -0.081, 0.113, -0.029, 0.015, 0.008, 0.0 ), CSC_24 = cms.vdouble( 0.004, 0.021, -0.002, 0.053, 0.0, 0.0 ), OL_2222 = cms.vdouble( 0.107, 0.0, 0.0, 0.04, 0.0, 0.0 ), @@ -4536,14 +4535,14 @@ SME_22_0_scale = cms.vdouble( -3.457901, 0.0 ), DT_24_1_scale = cms.vdouble( -7.490909, 0.0 ), OL_1232_0_scale = cms.vdouble( -5.964634, 0.0 ), - DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), + SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), SME_13_0_scale = cms.vdouble( 0.104905, 0.0 ), SMB_22_0_scale = cms.vdouble( 1.346681, 0.0 ), CSC_12_1_scale = cms.vdouble( -6.434242, 0.0 ), DT_34 = cms.vdouble( 0.044, 0.004, -0.013, 0.029, 0.003, 0.0 ), SME_32 = cms.vdouble( -0.901, 1.333, -0.47, 0.41, 0.073, 0.0 ), SME_31 = cms.vdouble( -1.594, 1.482, -0.317, 0.487, 0.097, 0.0 ), - CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), + SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), crackEtas = cms.vdouble( 0.2, 1.6, 1.7 ), SME_11_0_scale = cms.vdouble( 1.325085, 0.0 ), SMB_20_0_scale = cms.vdouble( 1.486168, 0.0 ), @@ -4562,7 +4561,7 @@ DT_34_1_scale = cms.vdouble( -13.783765, 0.0 ), CSC_34_1_scale = cms.vdouble( -11.520507, 0.0 ), OL_2213_0_scale = cms.vdouble( -7.239789, 0.0 ), - SMB_32_0_scale = cms.vdouble( -3.054156, 0.0 ), + CSC_13_2_scale = cms.vdouble( -6.077936, 0.0 ), CSC_12_3_scale = cms.vdouble( -1.63622, 0.0 ), deltaEtaCrackSearchWindow = cms.double( 0.25 ), SME_21_0_scale = cms.vdouble( -0.040862, 0.0 ), @@ -4570,7 +4569,7 @@ DTRecSegmentLabel = cms.InputTag( "hltDt4DSegments" ), SMB_10_0_scale = cms.vdouble( 2.448566, 0.0 ), EnableDTMeasurement = cms.bool( True ), - CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + DT_24_2_scale = cms.vdouble( -6.63094, 0.0 ), CSC_23_2_scale = cms.vdouble( -6.079917, 0.0 ), scaleDT = cms.bool( True ), DT_12_2_scale = cms.vdouble( -3.518165, 0.0 ), @@ -4580,7 +4579,7 @@ CSC_02 = cms.vdouble( 0.612, -0.207, 0.0, 0.067, -0.001, 0.0 ), CSC_03 = cms.vdouble( 0.787, -0.338, 0.029, 0.101, -0.008, 0.0 ), CSC_01 = cms.vdouble( 0.166, 0.0, 0.0, 0.031, 0.0, 0.0 ), - SMB_32 = cms.vdouble( 0.67, -0.327, 0.0, 0.22, 0.0, 0.0 ), + DT_23_1_scale = cms.vdouble( -5.320346, 0.0 ), SMB_30 = cms.vdouble( 0.505, -0.022, 0.0, 0.215, 0.0, 0.0 ), SMB_31 = cms.vdouble( 0.549, -0.145, 0.0, 0.207, 0.0, 0.0 ), crackWindow = cms.double( 0.04 ), @@ -4593,10 +4592,11 @@ DT_14_1_scale = cms.vdouble( -5.644816, 0.0 ), beamSpotTag = cms.InputTag( "hltOnlineBeamSpot" ), SMB_11_0_scale = cms.vdouble( 2.56363, 0.0 ), - EnableCSCMeasurement = cms.bool( True ), + CSCRecSegmentLabel = cms.InputTag( "hltCscSegments" ), + CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), CSC_14 = cms.vdouble( 0.606, -0.181, -0.002, 0.111, -0.003, 0.0 ), OL_2222_0_scale = cms.vdouble( -7.667231, 0.0 ), - CSC_13 = cms.vdouble( 0.901, -1.302, 0.533, 0.045, 0.005, 0.0 ), + EnableCSCMeasurement = cms.bool( True ), CSC_12 = cms.vdouble( -0.161, 0.254, -0.047, 0.042, -0.007, 0.0 ) ) process.hltL2MuonSeeds = cms.EDProducer( "L2MuonSeedGenerator", diff --git a/HLTrigger/JetMET/interface/HLTJetSortedVBFFilter.h b/HLTrigger/JetMET/interface/HLTJetSortedVBFFilter.h index 616e85453ed38..573efd0e8ceaf 100644 --- a/HLTrigger/JetMET/interface/HLTJetSortedVBFFilter.h +++ b/HLTrigger/JetMET/interface/HLTJetSortedVBFFilter.h @@ -19,9 +19,7 @@ #include "DataFormats/HLTReco/interface/TriggerFilterObjectWithRefs.h" #include "HLTrigger/HLTcore/interface/HLTFilter.h" #include -#include -#include "DataFormats/Common/interface/RefToBase.h" -#include "DataFormats/Common/interface/Handle.h" + namespace edm { class ConfigurationDescriptions; } @@ -29,9 +27,12 @@ namespace edm { // // class declaration // + template class HLTJetSortedVBFFilter : public HLTFilter { + public: + typedef std::pair Jpair; static bool comparator ( const Jpair& l, const Jpair& r) { return l.first < r.first; @@ -40,7 +41,6 @@ class HLTJetSortedVBFFilter : public HLTFilter { explicit HLTJetSortedVBFFilter(const edm::ParameterSet&); ~HLTJetSortedVBFFilter(); static void fillDescriptions(edm::ConfigurationDescriptions & descriptions); - static float findCSV(const typename std::vector::const_iterator & jet, const reco::JetTagCollection & jetTags); virtual bool hltFilter(edm::Event&, const edm::EventSetup&,trigger::TriggerFilterObjectWithRefs& filterproduct) const override; private: @@ -51,7 +51,6 @@ class HLTJetSortedVBFFilter : public HLTFilter { double mqq_; double detaqq_; double detabb_; - double dphibb_; double ptsqq_; double ptsbb_; double seta_; diff --git a/HLTrigger/JetMET/src/HLTJetSortedVBFFilter.cc b/HLTrigger/JetMET/src/HLTJetSortedVBFFilter.cc index efc770e2beeca..1454c989cc5fb 100644 --- a/HLTrigger/JetMET/src/HLTJetSortedVBFFilter.cc +++ b/HLTrigger/JetMET/src/HLTJetSortedVBFFilter.cc @@ -13,7 +13,6 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "DataFormats/Common/interface/Handle.h" #include "DataFormats/Math/interface/deltaPhi.h" -#include "DataFormats/Math/interface/deltaR.h" #include "DataFormats/Common/interface/RefToBase.h" #include "HLTrigger/JetMET/interface/HLTJetSortedVBFFilter.h" @@ -25,6 +24,7 @@ #include using namespace std; + // // constructors and destructor// // @@ -35,7 +35,6 @@ HLTJetSortedVBFFilter::HLTJetSortedVBFFilter(const edm::ParameterSet& iConfig ,mqq_ (iConfig.getParameter ("Mqq" )) ,detaqq_ (iConfig.getParameter ("Detaqq" )) ,detabb_ (iConfig.getParameter ("Detabb" )) - ,dphibb_ (iConfig.getParameter ("Dphibb" )) ,ptsqq_ (iConfig.getParameter ("Ptsumqq" )) ,ptsbb_ (iConfig.getParameter ("Ptsumbb" )) ,seta_ (iConfig.getParameter ("Etaq1Etaq2" )) @@ -61,7 +60,6 @@ HLTJetSortedVBFFilter::fillDescriptions(edm::ConfigurationDescriptions& descr desc.add("Mqq",200); desc.add("Detaqq",2.5); desc.add("Detabb",10.); - desc.add("Dphibb",10.); desc.add("Ptsumqq",0.); desc.add("Ptsumbb",0.); desc.add("Etaq1Etaq2",40.); @@ -70,21 +68,7 @@ HLTJetSortedVBFFilter::fillDescriptions(edm::ConfigurationDescriptions& descr descriptions.add(string("hlt")+string(typeid(HLTJetSortedVBFFilter).name()),desc); } -template float HLTJetSortedVBFFilter::findCSV(const typename std::vector::const_iterator & jet, const reco::JetTagCollection & jetTags){ - float minDr = 0.1; - float tmpCSV = -20 ; - for (reco::JetTagCollection::const_iterator jetb = jetTags.begin(); (jetb!=jetTags.end()); ++jetb) { - float tmpDr = reco::deltaR(*jet,*(jetb->first)); - - if (tmpDr < minDr) { - minDr = tmpDr ; - tmpCSV= jetb->second; - } - - } - return tmpCSV; -} // // member functions // @@ -104,10 +88,10 @@ HLTJetSortedVBFFilter::hltFilter(edm::Event& event, const edm::EventSetup& se typedef Ref TRef; bool accept(false); - const unsigned int nMax(4); if (saveTags()) filterproduct.addCollectionTag(inputJets_); + const unsigned int nMax(4); vector sorted(nMax); vector jetRefs(nMax); @@ -145,13 +129,10 @@ HLTJetSortedVBFFilter::hltFilter(edm::Event& event, const edm::EventSetup& se q2 = jetRefs[0]->p4(); } else { event.getByToken(m_theJetTagsToken,jetTags); - - if (jetTags->size()begin(); (jet!=jets->end()&& nJetbegin(); (jet!=jetTags->end()&&nJetsecond; } else { value = 0.0; } @@ -171,7 +152,6 @@ HLTJetSortedVBFFilter::hltFilter(edm::Event& event, const edm::EventSetup& se double mqq_bs = (q1+q2).M(); double deltaetaqq = std::abs(q1.Eta()-q2.Eta()); double deltaetabb = std::abs(b1.Eta()-b2.Eta()); - double deltaphibb = std::abs(reco::deltaPhi(b1.Phi(),b2.Phi())); double ptsqq_bs = (q1+q2).Pt(); double ptsbb_bs = (b1+b2).Pt(); double signeta = q1.Eta()*q2.Eta(); @@ -180,7 +160,6 @@ HLTJetSortedVBFFilter::hltFilter(edm::Event& event, const edm::EventSetup& se (mqq_bs > mqq_ ) && (deltaetaqq > detaqq_ ) && (deltaetabb < detabb_ ) && - (deltaphibb < dphibb_ ) && (ptsqq_bs > ptsqq_ ) && (ptsbb_bs > ptsbb_ ) && (signeta < seta_ ) diff --git a/HLTrigger/Muon/interface/HLTMuonL3PreFilter.h b/HLTrigger/Muon/interface/HLTMuonL3PreFilter.h index d7401eb28769b..1df4b9a325739 100644 --- a/HLTrigger/Muon/interface/HLTMuonL3PreFilter.h +++ b/HLTrigger/Muon/interface/HLTMuonL3PreFilter.h @@ -50,7 +50,6 @@ class HLTMuonL3PreFilter : public HLTFilter { double nsigma_Pt_; // pt uncertainty margin (in number of sigmas) double max_NormalizedChi2_; // cutoff in normalized chi2 double max_DXYBeamSpot_; // cutoff in dxy from the beamspot - double min_DXYBeamSpot_; // minimum cut on dxy from the beamspot int min_NmuonHits_; // cutoff in minumum number of chi2 hits double max_PtDifference_; // cutoff in maximum different between global track and tracker track double min_TrackPt_; //cutoff in tracker track pt diff --git a/HLTrigger/Muon/src/HLTMuonL3PreFilter.cc b/HLTrigger/Muon/src/HLTMuonL3PreFilter.cc index 8a30afb57a375..c0e2db6e7d8a0 100644 --- a/HLTrigger/Muon/src/HLTMuonL3PreFilter.cc +++ b/HLTrigger/Muon/src/HLTMuonL3PreFilter.cc @@ -53,7 +53,6 @@ HLTMuonL3PreFilter::HLTMuonL3PreFilter(const ParameterSet& iConfig) : HLTFilter( nsigma_Pt_ (iConfig.getParameter ("NSigmaPt")), max_NormalizedChi2_ (iConfig.getParameter ("MaxNormalizedChi2")), max_DXYBeamSpot_ (iConfig.getParameter ("MaxDXYBeamSpot")), - min_DXYBeamSpot_ (iConfig.getParameter ("MinDXYBeamSpot")), min_NmuonHits_ (iConfig.getParameter ("MinNmuonHits")), max_PtDifference_ (iConfig.getParameter ("MaxPtDifference")), min_TrackPt_ (iConfig.getParameter ("MinTrackPt")), @@ -96,7 +95,6 @@ HLTMuonL3PreFilter::fillDescriptions(edm::ConfigurationDescriptions& description desc.add("NSigmaPt",0.0); desc.add("MaxNormalizedChi2",9999.0); desc.add("MaxDXYBeamSpot",9999.0); - desc.add("MinDXYBeamSpot",-1.0); desc.add("MinNmuonHits",0); desc.add("MaxPtDifference",9999.0); desc.add("MinTrackPt",0.0); @@ -185,7 +183,7 @@ HLTMuonL3PreFilter::hltFilter(Event& iEvent, const EventSetup& iSetup, trigger:: if (tk->normalizedChi2() > max_NormalizedChi2_ ) continue; //dxy beamspot cut - if (std::abs(tk->dxy(beamSpot.position())) > max_DXYBeamSpot_ || std::abs(tk->dxy(beamSpot.position())) < min_DXYBeamSpot_ ) continue; + if (fabs(tk->dxy(beamSpot.position())) > max_DXYBeamSpot_ ) continue; //min muon hits cut reco::HitPattern trackHits = tk->hitPattern(); diff --git a/HLTrigger/btau/src/HLTmumutktkFilter.cc b/HLTrigger/btau/src/HLTmumutktkFilter.cc deleted file mode 100644 index 225784677ade2..0000000000000 --- a/HLTrigger/btau/src/HLTmumutktkFilter.cc +++ /dev/null @@ -1,201 +0,0 @@ -#include -#include -#include - -#include "FWCore/Framework/interface/ESHandle.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" - -#include "DataFormats/BeamSpot/interface/BeamSpot.h" -#include "DataFormats/HLTReco/interface/TriggerFilterObjectWithRefs.h" -#include "DataFormats/RecoCandidate/interface/RecoCandidate.h" -#include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h" -#include "DataFormats/VertexReco/interface/Vertex.h" -#include "DataFormats/VertexReco/interface/VertexFwd.h" - -#include "RecoVertex/KalmanVertexFit/interface/KalmanVertexFitter.h" -#include "RecoVertex/VertexPrimitives/interface/TransientVertex.h" -#include "TrackingTools/TransientTrack/interface/TransientTrackBuilder.h" -#include "TrackingTools/Records/interface/TransientTrackRecord.h" - -#include "HLTrigger/btau/src/HLTmumutktkFilter.h" -#include "TMath.h" - -using namespace edm; -using namespace reco; -using namespace std; -using namespace trigger; - -// ---------------------------------------------------------------------- -HLTmumutktkFilter::HLTmumutktkFilter(const edm::ParameterSet& iConfig) : HLTFilter(iConfig), - muCandTag_ (iConfig.getParameter("MuonTag")), - muCandToken_(consumes(muCandTag_)), - trkCandTag_ (iConfig.getParameter("TrackTag")), - trkCandToken_(consumes(trkCandTag_)), - MuMuTkVertexTag_ (iConfig.getParameter("MuMuTkVertexTag")), - MuMuTkVertexToken_(consumes(MuMuTkVertexTag_)), - beamSpotTag_ (iConfig.getParameter ("BeamSpotTag")), - beamSpotToken_(consumes(beamSpotTag_)), - maxEta_(iConfig.getParameter("MaxEta")), - minPt_(iConfig.getParameter("MinPt")), - maxNormalisedChi2_(iConfig.getParameter("MaxNormalisedChi2")), - minVtxProbability_(iConfig.getParameter("MinVtxProbability")), - minLxySignificance_(iConfig.getParameter("MinLxySignificance")), - minCosinePointingAngle_(iConfig.getParameter("MinCosinePointingAngle")) -{ -} - -// ---------------------------------------------------------------------- -HLTmumutktkFilter::~HLTmumutktkFilter() {} - -void -HLTmumutktkFilter::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { - edm::ParameterSetDescription desc; - makeHLTFilterDescription(desc); - desc.add("MaxEta",2.5); - desc.add("MinPt" ,0.0); - desc.add("MaxNormalisedChi2" ,10.0); - desc.add("MinVtxProbability" , 0.0); - desc.add("MinLxySignificance",3.0); - desc.add("MinCosinePointingAngle",0.9); - desc.add("MuonTag",edm::InputTag("hltL3MuonCandidates")); - desc.add("TrackTag",edm::InputTag("hltMumukAllConeTracks")); - desc.add("MuMuTkVertexTag",edm::InputTag("hltDisplacedmumuVtxProducerDoubleMu4Jpsi")); - desc.add("BeamSpotTag",edm::InputTag("hltOnineBeamSpot")); - descriptions.add("HLTmumutktkFilter",desc); -} - -// ---------------------------------------------------------------------- -bool HLTmumutktkFilter::hltFilter(edm::Event& iEvent, const edm::EventSetup& iSetup, trigger::TriggerFilterObjectWithRefs & filterproduct) const { - - //get the beamspot position - edm::Handle recoBeamSpotHandle; - iEvent.getByToken(beamSpotToken_,recoBeamSpotHandle); - const reco::BeamSpot& vertexBeamSpot = *recoBeamSpotHandle; - - // get vertices - reco::VertexCollection displacedVertexColl; - edm::Handle displacedVertexCollHandle; - bool foundVertexColl = iEvent.getByToken(MuMuTkVertexToken_, displacedVertexCollHandle); - if(foundVertexColl) displacedVertexColl = *displacedVertexCollHandle; - - // get muon collection - Handle mucands; - iEvent.getByToken(muCandToken_,mucands); - - // get track candidates around displaced muons - Handle trkcands; - iEvent.getByToken(trkCandToken_,trkcands); - - // Ref to Candidate object to be recorded in filter object - RecoChargedCandidateRef refMu1 ; - RecoChargedCandidateRef refMu2 ; - RecoChargedCandidateRef refTrk1; - RecoChargedCandidateRef refTrk2; - - if (saveTags()) { - filterproduct.addCollectionTag(muCandTag_); - filterproduct.addCollectionTag(trkCandTag_); - } - - bool triggered = false; - - // loop over vertex collection - reco::VertexCollection::iterator it; - for(it = displacedVertexColl.begin(); it!= displacedVertexColl.end(); it++){ - reco::Vertex displacedVertex = *it; - - // check if the vertex actually consists of exactly two muon + 1 track, throw exception if not - if(displacedVertex.tracksSize() != 4) throw cms::Exception("BadLogic") << "HLTmumutktkFilter: ERROR: the Jpsi+trk vertex must have " - << "exactly two muons + 2 trk by definition. It now has n trakcs = " - << displacedVertex.tracksSize() << std::endl; - - float normChi2 = displacedVertex.normalizedChi2(); - if (normChi2 > maxNormalisedChi2_) continue; - - double vtxProb = 0.0; - if ((displacedVertex.chi2()>=0.0) && (displacedVertex.ndof()>0) ) - vtxProb = TMath::Prob(displacedVertex.chi2(), displacedVertex.ndof() ); - if (vtxProb < minVtxProbability_) continue; - - // get the four tracks from the vertex - std::vector vertexTrksRefVec; - reco::Vertex::trackRef_iterator trackIt = displacedVertex.tracks_begin(); - for (trackIt = displacedVertex.tracks_begin(); trackIt != displacedVertex.tracks_end(); trackIt++){ - vertexTrksRefVec.push_back((*trackIt).castTo()); - } - - // first find the tracks in the input muon/track collection - std::vector mucandVec; - std::vector trkcandVec; - for (reco::RecoChargedCandidateCollection::const_iterator cand=mucands->begin(); cand!=mucands->end(); cand++) { - reco::TrackRef tkRef = cand->get(); - for (unsigned int iVec=0; iVec < vertexTrksRefVec.size();iVec++){ - if (tkRef == vertexTrksRefVec.at(iVec)) {mucandVec.push_back(cand); break;} - } - } - if(mucandVec.size()!= 2) throw cms::Exception("BadLogic") << "HLTmumutktkFilterr: ERROR: the vertex must have " - << " exactly two muons by definition." << std::endl; - - for (reco::RecoChargedCandidateCollection::const_iterator cand=trkcands->begin(); cand!=trkcands->end(); cand++) { - reco::TrackRef tkRef = cand->get(); - for (unsigned int iVec = 0; iVec < vertexTrksRefVec.size();iVec++){ - if (tkRef == vertexTrksRefVec.at(iVec)) {trkcandVec.push_back(cand); break;} - } - } - if(trkcandVec.size()!= 2 ) throw cms::Exception("BadLogic") << "HLTmumutktkFilterr: ERROR: the vertex must have " - << " exactly two tracks by definition." << std::endl; - - // calculate four-track transverse momentum - math::XYZVector pperp(mucandVec.at(0)->px() + mucandVec.at(1)->px() + trkcandVec.at(0)->px() + trkcandVec.at(1)->px(), - mucandVec.at(0)->py() + mucandVec.at(1)->py() + trkcandVec.at(0)->px() + trkcandVec.at(1)->py(), - 0.); - - // get vertex position and error to calculate the decay length significance - reco::Vertex::Point vpoint=displacedVertex.position(); - reco::Vertex::Error verr = displacedVertex.error(); - GlobalPoint secondaryVertex (vpoint.x(), vpoint.y(), vpoint.z()); - GlobalError err(verr.At(0,0), verr.At(1,0), verr.At(1,1), verr.At(2,0), verr.At(2,1), verr.At(2,2) ); - - GlobalPoint displacementFromBeamspot( -1*((vertexBeamSpot.x0() - secondaryVertex.x()) + (secondaryVertex.z() - vertexBeamSpot.z0()) * vertexBeamSpot.dxdz()), - -1*((vertexBeamSpot.y0() - secondaryVertex.y()) + (secondaryVertex.z() - vertexBeamSpot.z0()) * vertexBeamSpot.dydz()), - 0 ); - float lxy = displacementFromBeamspot.perp(); - float lxyerr = sqrt(err.rerr(displacementFromBeamspot)); - float lxysign = 0; - if (lxyerr != 0) lxysign = lxy/lxyerr; - - //calculate the angle between the decay length and the four-track momentum - Vertex::Point vperp(displacementFromBeamspot.x(),displacementFromBeamspot.y(),0.); - float cosAlpha = vperp.Dot(pperp)/(vperp.Rho()*pperp.Rho()); - - if (pperp.Rho() < minPt_ ) continue; - if (lxysign < minLxySignificance_ ) continue; - if (cosAlpha < minCosinePointingAngle_) continue; - triggered = true; - - refMu1=RecoChargedCandidateRef( Ref (mucands,distance(mucands->begin(), mucandVec.at(0)))); - filterproduct.addObject(TriggerMuon,refMu1); - refMu2=RecoChargedCandidateRef( Ref (mucands,distance(mucands->begin(), mucandVec.at(1)))); - filterproduct.addObject(TriggerMuon,refMu2); - refTrk1=RecoChargedCandidateRef( Ref (trkcands,distance(trkcands->begin(),trkcandVec.at(0)))); - filterproduct.addObject(TriggerTrack,refTrk1); - refTrk2=RecoChargedCandidateRef( Ref (trkcands,distance(trkcands->begin(),trkcandVec.at(1)))); - filterproduct.addObject(TriggerTrack,refTrk2); - - }//end loop vertices - - LogDebug("HLTDisplacedMumuTrkFilter") << " >>>>> Result of HLTDisplacedMuMuTrkFilter is "<< triggered; - return triggered; -} - - - -bool HLTmumutktkFilter::triggerdByPreviousLevel(const reco::RecoChargedCandidateRef & candref, const std::vector& vcands){ - unsigned int i=0; - unsigned int i_max=vcands.size(); - for (;i!=i_max;++i){ - if (candref == vcands[i]) return true; - } - return false; -} \ No newline at end of file diff --git a/HLTrigger/btau/src/HLTmumutktkFilter.h b/HLTrigger/btau/src/HLTmumutktkFilter.h deleted file mode 100644 index e6098d759d35c..0000000000000 --- a/HLTrigger/btau/src/HLTmumutktkFilter.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef HLTmumutktkFilter_h -#define HLTmumutktkFilter_h - -#include "HLTrigger/HLTcore/interface/HLTFilter.h" -#include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h" - -namespace edm { - class ConfigurationDescriptions; -} - -// ---------------------------------------------------------------------- - -class HLTmumutktkFilter : public HLTFilter { - - public: - explicit HLTmumutktkFilter(const edm::ParameterSet&); - ~HLTmumutktkFilter(); - static void fillDescriptions(edm::ConfigurationDescriptions & descriptions); - virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) const override; - - private: - - edm::InputTag muCandTag_; - edm::EDGetTokenT muCandToken_; - edm::InputTag trkCandTag_; - edm::EDGetTokenT trkCandToken_; - edm::InputTag MuMuTkVertexTag_; - edm::EDGetTokenT MuMuTkVertexToken_; - edm::InputTag beamSpotTag_; - edm::EDGetTokenT beamSpotToken_; - - const double maxEta_; - const double minPt_; - const double maxNormalisedChi2_; - const double minVtxProbability_; - const double minLxySignificance_; - const double minCosinePointingAngle_; - - static bool triggerdByPreviousLevel(const reco::RecoChargedCandidateRef &, const std::vector &); - -}; -#endif diff --git a/HLTrigger/btau/src/HLTmumutktkVtxProducer.cc b/HLTrigger/btau/src/HLTmumutktkVtxProducer.cc deleted file mode 100644 index 4e3a917e9e304..0000000000000 --- a/HLTrigger/btau/src/HLTmumutktkVtxProducer.cc +++ /dev/null @@ -1,280 +0,0 @@ -#include -#include -#include - -#include "FWCore/Framework/interface/ESHandle.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" - -#include "DataFormats/BeamSpot/interface/BeamSpot.h" -#include "DataFormats/RecoCandidate/interface/RecoCandidate.h" -#include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h" -#include "DataFormats/VertexReco/interface/Vertex.h" -#include "DataFormats/VertexReco/interface/VertexFwd.h" -#include "TrackingTools/PatternTools/interface/TSCBLBuilderNoMaterial.h" -#include "TrackingTools/Records/interface/TransientTrackRecord.h" -#include "TrackingTools/TrajectoryParametrization/interface/GlobalTrajectoryParameters.h" -#include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h" -#include "TrackingTools/TransientTrack/interface/TransientTrackBuilder.h" -#include "RecoVertex/KalmanVertexFit/interface/KalmanVertexFitter.h" -#include "RecoVertex/VertexPrimitives/interface/TransientVertex.h" - -#include "HLTrigger/btau/src/HLTmumutktkVtxProducer.h" -#include -#include "TMath.h" - -using namespace edm; -using namespace reco; -using namespace std; -using namespace trigger; - -// ---------------------------------------------------------------------- -HLTmumutktkVtxProducer::HLTmumutktkVtxProducer(const edm::ParameterSet& iConfig): - muCandTag_ (iConfig.getParameter("MuCand")), - muCandToken_(consumes(muCandTag_)), - trkCandTag_ (iConfig.getParameter("TrackCand")), - trkCandToken_(consumes(trkCandTag_)), - previousCandTag_(iConfig.getParameter("PreviousCandTag")), - previousCandToken_(consumes(previousCandTag_)), - mfName_(iConfig.getParameter("SimpleMagneticField")), - thirdTrackMass_(iConfig.getParameter("ThirdTrackMass")), - fourthTrackMass_(iConfig.getParameter("FourthTrackMass")), - maxEta_(iConfig.getParameter("MaxEta")), - minPt_(iConfig.getParameter("MinPt")), - minInvMass_(iConfig.getParameter("MinInvMass")), - maxInvMass_(iConfig.getParameter("MaxInvMass")), - minTrkTrkMass_(iConfig.getParameter("MinTrkTrkMass")), - maxTrkTrkMass_(iConfig.getParameter("MaxTrkTrkMass")), - minD0Significance_(iConfig.getParameter("MinD0Significance")), - oppositeSign_(iConfig.getParameter("OppositeSign")), - overlapDR_(iConfig.getParameter("OverlapDR")), - beamSpotTag_ (iConfig.getParameter ("BeamSpotTag")), - beamSpotToken_(consumes(beamSpotTag_)) -{ - produces(); -} - -// ---------------------------------------------------------------------- -HLTmumutktkVtxProducer::~HLTmumutktkVtxProducer() {} - -void -HLTmumutktkVtxProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { - edm::ParameterSetDescription desc; - desc.add("MuCand",edm::InputTag("hltMuTracks")); - desc.add("TrackCand",edm::InputTag("hltMumukAllConeTracks")); - desc.add("PreviousCandTag",edm::InputTag("hltDisplacedmumuFilterDoubleMu4Jpsi")); - desc.add("SimpleMagneticField",""); - desc.add("ThirdTrackMass",0.493677); - desc.add("FourthTrackMass",0.493677); - desc.add("MaxEta",2.5); - desc.add("MinPt",0.0); - desc.add("MinInvMass",0.0); - desc.add("MaxInvMass",99999.); - desc.add("MinTrkTrkMass",0.0); - desc.add("MaxTrkTrkMass",99999.); - desc.add("MinD0Significance",0.0); - desc.add("OppositeSign",false); - desc.add("OverlapDR",0.001); - desc.add("BeamSpotTag",edm::InputTag("hltOfflineBeamSpot")); - descriptions.add("HLTmumutktkVtxProducer",desc); -} - -// ---------------------------------------------------------------------- -void HLTmumutktkVtxProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) -{ - const double MuMass(0.106); - const double MuMass2(MuMass*MuMass); - const double thirdTrackMass2 (thirdTrackMass_ *thirdTrackMass_ ); - const double fourthTrackMass2(fourthTrackMass_*fourthTrackMass_); - - // get hold of muon trks - Handle mucands; - iEvent.getByToken(muCandToken_,mucands); - - //get the transient track builder: - edm::ESHandle theB; - iSetup.get().get("TransientTrackBuilder",theB); - - //get the beamspot position - edm::Handle recoBeamSpotHandle; - iEvent.getByToken(beamSpotToken_,recoBeamSpotHandle); - - //get the b field - ESHandle bFieldHandle; - iSetup.get().get(mfName_, bFieldHandle); - const MagneticField* magField = bFieldHandle.product(); - TSCBLBuilderNoMaterial blsBuilder; - - // get track candidates around displaced muons - Handle trkcands; - iEvent.getByToken(trkCandToken_,trkcands); - - auto_ptr vertexCollection( new VertexCollection() ); - - // Ref to Candidate object to be recorded in filter object - RecoChargedCandidateRef refMu1 ; - RecoChargedCandidateRef refMu2 ; - RecoChargedCandidateRef refTrk1; - RecoChargedCandidateRef refTrk2; - - double e1, e2, e3_m3, e3_m4, e4_m3, e4_m4; - Particle::LorentzVector p, pBar, p1, p2, p3_m3, p3_m4, p4_m3, p4_m4, p_m3m4, p_m4m3; - - if ( mucands->size() < 2 ) return; - if ( trkcands->size() < 2 ) return; - - RecoChargedCandidateCollection::const_iterator mucand1 ; - RecoChargedCandidateCollection::const_iterator mucand2 ; - RecoChargedCandidateCollection::const_iterator trkcand1; - RecoChargedCandidateCollection::const_iterator trkcand2; - - // get the objects passing the previous filter - Handle previousCands; - iEvent.getByToken(previousCandToken_,previousCands); - - vector vPrevCands; - previousCands->getObjects(TriggerMuon,vPrevCands); - - for (mucand1=mucands->begin(); mucand1!=mucands->end(); ++mucand1) { - TrackRef trk1 = mucand1->get(); - LogDebug("HLTmumutktkVtxProducer") << " 1st muon: q*pt= " << trk1->charge()*trk1->pt() - << ", eta= " << trk1->eta() - << ", hits= " << trk1->numberOfValidHits(); - - //first check if this muon passed the previous filter - if( ! checkPreviousCand( trk1, vPrevCands) ) continue; - // eta and pt cut - if (fabs(trk1->eta()) > maxEta_) continue; - if (trk1->pt() < minPt_ ) continue; - - mucand2 = mucand1; ++mucand2; - for (; mucand2!=mucands->end(); mucand2++) { - TrackRef trk2 = mucand2->get(); - if( overlap( trk1, trk2) ) continue; - - LogDebug("HLTDisplacedMumukFilter") << " 2nd muon: q*pt= " << trk2->charge()*trk2->pt() - << ", eta= " << trk2->eta() - << ", hits= " << trk2->numberOfValidHits(); - - //first check if this muon passed the previous filter - if( ! checkPreviousCand( trk2, vPrevCands) ) continue; - // eta and pt cut - if (fabs(trk2->eta()) > maxEta_) continue; - if (trk2->pt() < minPt_ ) continue; - - //loop on track collection - trk1 - for ( trkcand1 = trkcands->begin(); trkcand1 !=trkcands->end(); ++trkcand1) { - TrackRef trk3 = trkcand1->get(); - - if( overlap( trk1, trk3) ) continue; - if( overlap( trk2, trk3) ) continue; - - LogDebug("HLTDisplacedMumukFilter") << " 3rd track: q*pt= " << trk3->charge()*trk3->pt() - << ", eta= " << trk3->eta() - << ", hits= " << trk3->numberOfValidHits(); - - // eta and pt cut - if (fabs(trk3->eta()) > maxEta_) continue; - if (trk3->pt() < minPt_ ) continue; - - FreeTrajectoryState InitialFTS_Trk3 = initialFreeState(*trk3, magField); - TrajectoryStateClosestToBeamLine tscb_Trk3( blsBuilder(InitialFTS_Trk3, *recoBeamSpotHandle) ); - double d0sigTrk3 = tscb_Trk3.transverseImpactParameter().significance(); - if (d0sigTrk3 < minD0Significance_) continue; - - //loop on track collection - trk2 - for ( trkcand2 = trkcands->begin(); trkcand2 !=trkcands->end(); ++trkcand2) { - TrackRef trk4 = trkcand2->get(); - - if (oppositeSign_) { - if (trk3->charge()*trk4->charge() != -1) continue; - } - if( overlap( trk1, trk4) ) continue; - if( overlap( trk2, trk4) ) continue; - if( overlap( trk3, trk4) ) continue; - - - LogDebug("HLTDisplacedMumukFilter") << " 4th track: q*pt= " << trk4->charge()*trk4->pt() - << ", eta= " << trk4->eta() - << ", hits= " << trk4->numberOfValidHits(); - - // eta and pt cut - if (fabs(trk4->eta()) > maxEta_) continue; - if (trk4->pt() < minPt_ ) continue; - - FreeTrajectoryState InitialFTS_Trk4 = initialFreeState(*trk4, magField); - TrajectoryStateClosestToBeamLine tscb_Trk4( blsBuilder(InitialFTS_Trk4, *recoBeamSpotHandle) ); - double d0sigTrk4 = tscb_Trk4.transverseImpactParameter().significance(); - if (d0sigTrk4 < minD0Significance_) continue; - - // Combined system - e1 = sqrt(trk1->momentum().Mag2() + MuMass2 ); - e2 = sqrt(trk2->momentum().Mag2() + MuMass2 ); - e3_m3 = sqrt(trk3->momentum().Mag2() + thirdTrackMass2 ); - e3_m4 = sqrt(trk3->momentum().Mag2() + fourthTrackMass2 ); - e4_m3 = sqrt(trk4->momentum().Mag2() + thirdTrackMass2 ); - e4_m4 = sqrt(trk4->momentum().Mag2() + fourthTrackMass2 ); - - p1 = Particle::LorentzVector(trk1->px(),trk1->py(),trk1->pz(),e1 ); - p2 = Particle::LorentzVector(trk2->px(),trk2->py(),trk2->pz(),e2 ); - p3_m3 = Particle::LorentzVector(trk3->px(),trk3->py(),trk3->pz(),e3_m3); - p3_m4 = Particle::LorentzVector(trk3->px(),trk3->py(),trk3->pz(),e3_m4); - p4_m3 = Particle::LorentzVector(trk4->px(),trk4->py(),trk4->pz(),e4_m3); - p4_m4 = Particle::LorentzVector(trk4->px(),trk4->py(),trk4->pz(),e4_m4); - - p = p1 + p2 + p3_m3 + p4_m4; - pBar = p1 + p2 + p3_m4 + p4_m3; - p_m3m4 = p3_m3 + p4_m4; - p_m4m3 = p3_m4 + p4_m3; - - //invariant mass cut - if (!((p_m3m4.mass() > minTrkTrkMass_ && p_m3m4.mass() < maxTrkTrkMass_) || (p_m4m3.mass() > minTrkTrkMass_ && p_m4m3.mass() < maxTrkTrkMass_))) continue; - if (!((p.mass() > minInvMass_ && p.mass() < maxInvMass_ ) || (pBar.mass() > minInvMass_ && pBar.mass() < maxInvMass_)) ) continue; - - // do the vertex fit - vector t_tks; - t_tks.push_back((*theB).build(&trk1)); - t_tks.push_back((*theB).build(&trk2)); - t_tks.push_back((*theB).build(&trk3)); - t_tks.push_back((*theB).build(&trk4)); - if (t_tks.size()!=4) continue; - - KalmanVertexFitter kvf; - TransientVertex tv = kvf.vertex(t_tks); - if (!tv.isValid()) continue; - Vertex vertex = tv; - - vertexCollection -> push_back(vertex); - } - } - } - } - iEvent.put(vertexCollection); -} - -FreeTrajectoryState HLTmumutktkVtxProducer::initialFreeState( const reco::Track& tk, const MagneticField* field) -{ - Basic3DVector pos( tk.vertex()); - GlobalPoint gpos( pos); - Basic3DVector mom( tk.momentum()); - GlobalVector gmom( mom); - GlobalTrajectoryParameters par( gpos, gmom, tk.charge(), field); - CurvilinearTrajectoryError err( tk.covariance()); - return FreeTrajectoryState( par, err); -} - -bool HLTmumutktkVtxProducer::overlap(const TrackRef& trackref1, const TrackRef& trackref2){ - if (deltaR(trackref1->eta(), trackref1->phi(), trackref2->eta(), trackref2->phi()) < overlapDR_) return 1; - return 0; -} - -bool HLTmumutktkVtxProducer::checkPreviousCand(const TrackRef& trackref, vector & refVect){ - bool ok=false; - for (unsigned int i=0; iget() == trackref ) { - ok=true; - break; - } - } - return ok; -} diff --git a/HLTrigger/btau/src/HLTmumutktkVtxProducer.h b/HLTrigger/btau/src/HLTmumutktkVtxProducer.h deleted file mode 100644 index fa39c70e7a6bc..0000000000000 --- a/HLTrigger/btau/src/HLTmumutktkVtxProducer.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef HLTmumutktkVtxProducer_h -#define HLTmumutktkVtxProducer_h -// -// Package: HLTstaging -// Class: HLTmumutktkVtxProducer -// -/**\class HLTmumutktkVtxProducer -*/ - -// system include files -#include - -#include "FWCore/Framework/interface/EDProducer.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/EventSetup.h" -#include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h" -#include "DataFormats/TrackReco/interface/TrackFwd.h" -#include "DataFormats/HLTReco/interface/TriggerFilterObjectWithRefs.h" -#include "DataFormats/HLTReco/interface/TriggerRefsCollections.h" -#include - -namespace edm { - class ConfigurationDescriptions; -} - -// ---------------------------------------------------------------------- - -namespace reco { - class Candidate; - class Track; -} - -class FreeTrajectoryState; -class MagneticField; - -class HLTmumutktkVtxProducer : public edm::EDProducer { - public: - explicit HLTmumutktkVtxProducer(const edm::ParameterSet&); - ~HLTmumutktkVtxProducer(); - static void fillDescriptions(edm::ConfigurationDescriptions & descriptions); - virtual void produce(edm::Event&, const edm::EventSetup&); - - private: - - bool overlap(const reco::TrackRef& trackref1, const reco::TrackRef& trackref2); - static FreeTrajectoryState initialFreeState( const reco::Track&,const MagneticField*); - bool checkPreviousCand(const reco::TrackRef& trackref, std::vector& ref2); - - edm::InputTag muCandTag_; - edm::EDGetTokenT muCandToken_; - edm::InputTag trkCandTag_; - edm::EDGetTokenT trkCandToken_; - edm::InputTag previousCandTag_; - edm::EDGetTokenT previousCandToken_; - - const std::string mfName_; - const double thirdTrackMass_; - const double fourthTrackMass_; - const double maxEta_; - const double minPt_; - const double minInvMass_; - const double maxInvMass_; - const double minTrkTrkMass_; - const double maxTrkTrkMass_; - const double minD0Significance_; - bool oppositeSign_; - const double overlapDR_; - edm::InputTag beamSpotTag_; - edm::EDGetTokenT beamSpotToken_; - -}; -#endif diff --git a/HLTrigger/btau/src/modules.cc b/HLTrigger/btau/src/modules.cc index 8edbf3f068e13..e25e8a27b4602 100644 --- a/HLTrigger/btau/src/modules.cc +++ b/HLTrigger/btau/src/modules.cc @@ -30,12 +30,6 @@ DEFINE_FWK_MODULE(HLTmumutkVtxProducer); #include "HLTmumutkFilter.h" DEFINE_FWK_MODULE(HLTmumutkFilter); -#include "HLTmumutktkVtxProducer.h" -DEFINE_FWK_MODULE(HLTmumutktkVtxProducer); - -#include "HLTmumutktkFilter.h" -DEFINE_FWK_MODULE(HLTmumutktkFilter); - #include "ConeIsolation.h" DEFINE_FWK_MODULE(ConeIsolation); diff --git a/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidationHarvestingSequence_cff.py b/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidationHarvestingSequence_cff.py index e62920687716b..1b03c2cba4207 100644 --- a/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidationHarvestingSequence_cff.py +++ b/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidationHarvestingSequence_cff.py @@ -33,44 +33,32 @@ Plots = cms.untracked.VPSet( cms.untracked.PSet( InputMEnames = cms.untracked.vstring( - 'HLT_DoubleMu4_3_Bs_v/effPathDiglobAND_recoEtaPtY', - 'HLT_DoubleMu4_3_Jpsi_Displaced_v/effPathDiglobAND_recoEtaPtY', - 'HLT_DoubleMu4_JpsiTrk_Displaced_v/effPathDiglobAND_recoEtaPtY', - 'HLT_DoubleMu4_PsiPrimeTrk_Displaced_v/effPathDiglobAND_recoEtaPtY', - 'HLT_DoubleMu4_LowMassNonResonantTrk_Displaced_v/effPathDiglobAND_recoEtaPtY', + 'HLT_DoubleMu4_3_Bs_v/effPathDiglobAND_recoRapPtY', + 'HLT_DoubleMu4_3_Jpsi_Displaced_v/effPathDiglobAND_recoRapPtY', + 'HLT_Dimuon20_Jpsi_v/effPathDiglobAND_recoRapPtY', + 'HLT_Dimuon13_PsiPrime_v/effPathDiglobAND_recoRapPtY', + 'HLT_Dimuon13_Upsilon_v/effPathDiglobAND_recoRapPtY', + 'HLT_Mu25_TkMu0_dEta18_Onia_v/effPathDiglobAND_recoRapPtY', + 'HLT_DoubleMu4_JpsiTrk_Displaced_v/effPathDiglobAND_recoRapPtY', + 'HLT_DoubleMu4_PsiPrimeTrk_Displaced_v/effPathDiglobAND_recoRapPtY', + 'HLT_DoubleMu4_LowMassNonResonantTrk_Displaced_v/effPathDiglobAND_recoRapPtY', ), InputLabels = cms.untracked.vstring( 'HLT_DoubleMu4_3_Bs_v', 'HLT_DoubleMu4_3_Jpsi_Displaced_v', - 'HLT_DoubleMu4_JpsiTrk_Displaced_v', - 'HLT_DoubleMu4_PsiPrimeTrk_Displaced_v', - 'HLT_DoubleMu4_LowMassNonResonantTrk_Displaced_v', - ), - OutputMEname = cms.untracked.string('effPathGlob_recoLowPt') - ) - ) -) - -combiner2 = combiner.clone( - Plots = cms.untracked.VPSet( - cms.untracked.PSet( - InputMEnames = cms.untracked.vstring( - 'HLT_Dimuon20_Jpsi_v/effPathDiglobAND_recoEtaPtY', - 'HLT_Dimuon13_PsiPrime_v/effPathDiglobAND_recoEtaPtY', - 'HLT_Dimuon13_Upsilon_v/effPathDiglobAND_recoEtaPtY', - 'HLT_Mu25_TkMu0_dEta18_Onia_v/effPathDiglobAND_recoEtaPtY', - ), - InputLabels = cms.untracked.vstring( 'HLT_Dimuon20_Jpsi_v', 'HLT_Dimuon13_PsiPrime_v', 'HLT_Dimuon13_Upsilon_v', 'HLT_Mu25_TkMu0_dEta18_Onia_v', + 'HLT_DoubleMu4_JpsiTrk_Displaced_v', + 'HLT_DoubleMu4_PsiPrimeTrk_Displaced_v', + 'HLT_DoubleMu4_LowMassNonResonantTrk_Displaced_v', ), - OutputMEname = cms.untracked.string('effPathGlob_recoHighPt') + OutputMEname = cms.untracked.string('effPathGlob_recoPt') ) ) ) heavyFlavorValidationHarvestingSequence = cms.Sequence(hfv1+hfv2+hfv3+hfv4+hfv5+hfv6+hfv7+hfv8+hfv9 - +combiner+combiner2) + +combiner) diff --git a/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidationHarvesting_cfi.py b/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidationHarvesting_cfi.py index 00bcc9fe143d1..1fd5aad97d07e 100644 --- a/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidationHarvesting_cfi.py +++ b/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidationHarvesting_cfi.py @@ -56,26 +56,26 @@ cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt5Dimuon_recoEtaPt","diFilt1Dimuon_recoEtaPt","effFilt5Difilt1AND_recoEtaPt") ), ################# DOUBLE RAPIDITY PT ###################### -# cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("globDimuon_genRapPt","genDimuon_genRapPt","effGlobDigenAND_genRapPt") ), + cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("globDimuon_genRapPt","genDimuon_genRapPt","effGlobDigenAND_genRapPt") ), # cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("filt1Dimuon_recoRapPt","globDimuon_recoRapPt","effFilt1DiglobOR_recoRapPt") ), # cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("filt2Dimuon_recoRapPt","globDimuon_recoRapPt","effFilt2DiglobOR_recoRapPt") ), # cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("filt3Dimuon_recoRapPt","globDimuon_recoRapPt","effFilt3DiglobOR_recoRapPt") ), # cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("filt4Dimuon_recoRapPt","globDimuon_recoRapPt","effFilt4DiglobOR_recoRapPt") ), # cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("filt5Dimuon_recoRapPt","globDimuon_recoRapPt","effFilt5DiglobOR_recoRapPt") ), # cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("pathDimuon_recoRapPt","globDimuon_recoRapPt","effPathDiglobOR_recoRapPt") ), -# cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt1Dimuon_recoRapPt","globDimuon_recoRapPt","effFilt1DiglobAND_recoRapPt") ), -# cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt2Dimuon_recoRapPt","globDimuon_recoRapPt","effFilt2DiglobAND_recoRapPt") ), -# cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt3Dimuon_recoRapPt","globDimuon_recoRapPt","effFilt3DiglobAND_recoRapPt") ), -# cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt4Dimuon_recoRapPt","globDimuon_recoRapPt","effFilt4DiglobAND_recoRapPt") ), -# cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt5Dimuon_recoRapPt","globDimuon_recoRapPt","effFilt5DiglobAND_recoRapPt") ), -# cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diPathDimuon_recoRapPt","globDimuon_recoRapPt","effPathDiglobAND_recoRapPt") ), -# cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt2Dimuon_recoRapPt","diFilt1Dimuon_recoRapPt","effFilt2Difilt1AND_recoRapPt") ), -# cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt3Dimuon_recoRapPt","diFilt2Dimuon_recoRapPt","effFilt3Difilt2AND_recoRapPt") ), -# cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt4Dimuon_recoRapPt","diFilt3Dimuon_recoRapPt","effFilt4Difilt3AND_recoRapPt") ), -# cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt5Dimuon_recoRapPt","diFilt4Dimuon_recoRapPt","effFilt5Difilt4AND_recoRapPt") ), -# cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt3Dimuon_recoRapPt","diFilt1Dimuon_recoRapPt","effFilt3Difilt1AND_recoRapPt") ), -# cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt4Dimuon_recoRapPt","diFilt1Dimuon_recoRapPt","effFilt4Difilt1AND_recoRapPt") ), -# cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt5Dimuon_recoRapPt","diFilt1Dimuon_recoRapPt","effFilt5Difilt1AND_recoRapPt") ), + cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt1Dimuon_recoRapPt","globDimuon_recoRapPt","effFilt1DiglobAND_recoRapPt") ), + cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt2Dimuon_recoRapPt","globDimuon_recoRapPt","effFilt2DiglobAND_recoRapPt") ), + cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt3Dimuon_recoRapPt","globDimuon_recoRapPt","effFilt3DiglobAND_recoRapPt") ), + cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt4Dimuon_recoRapPt","globDimuon_recoRapPt","effFilt4DiglobAND_recoRapPt") ), + cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt5Dimuon_recoRapPt","globDimuon_recoRapPt","effFilt5DiglobAND_recoRapPt") ), + cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diPathDimuon_recoRapPt","globDimuon_recoRapPt","effPathDiglobAND_recoRapPt") ), + cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt2Dimuon_recoRapPt","diFilt1Dimuon_recoRapPt","effFilt2Difilt1AND_recoRapPt") ), + cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt3Dimuon_recoRapPt","diFilt2Dimuon_recoRapPt","effFilt3Difilt2AND_recoRapPt") ), + cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt4Dimuon_recoRapPt","diFilt3Dimuon_recoRapPt","effFilt4Difilt3AND_recoRapPt") ), + cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt5Dimuon_recoRapPt","diFilt4Dimuon_recoRapPt","effFilt5Difilt4AND_recoRapPt") ), + cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt3Dimuon_recoRapPt","diFilt1Dimuon_recoRapPt","effFilt3Difilt1AND_recoRapPt") ), + cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt4Dimuon_recoRapPt","diFilt1Dimuon_recoRapPt","effFilt4Difilt1AND_recoRapPt") ), + cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("diFilt5Dimuon_recoRapPt","diFilt1Dimuon_recoRapPt","effFilt5Difilt1AND_recoRapPt") ), ################# DOUBLE PT DR ###################### # cms.untracked.PSet( NumDenEffMEnames = cms.untracked.vstring("globDimuon_genPtDR","genDimuon_genPtDR","effGlobDigenAND_genPtDR") ), diff --git a/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidationSequence_cff.py b/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidationSequence_cff.py index 0d2f3ba68fb5c..59a69d79a811e 100644 --- a/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidationSequence_cff.py +++ b/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidationSequence_cff.py @@ -11,28 +11,25 @@ TriggerPathName = cms.untracked.string("HLT_DoubleMu4_3_Jpsi_Displaced_v") ) hfv3 = hfv1.clone( - TriggerPathName = cms.untracked.string("HLT_DoubleMu4_JpsiTrk_Displaced_v") + TriggerPathName = cms.untracked.string("HLT_Dimuon20_Jpsi_v") ) hfv4 = hfv1.clone( - TriggerPathName = cms.untracked.string("HLT_DoubleMu4_PsiPrimeTrk_Displaced_v") + TriggerPathName = cms.untracked.string("HLT_Dimuon13_PsiPrime_v") ) hfv5 = hfv1.clone( - TriggerPathName = cms.untracked.string("HLT_DoubleMu4_LowMassNonResonantTrk_Displaced_v") + TriggerPathName = cms.untracked.string("HLT_Dimuon13_Upsilon_v") ) - hfv6 = hfv1.clone( - TriggerPathName = cms.untracked.string("HLT_Dimuon20_Jpsi_v"), - MuonPtBins = cms.untracked.vdouble(7.5, 10., 12.5, 15., 17.5, 20., 22.5, 25., 27.5, 30.), - DimuonPtBins = cms.untracked.vdouble(10., 12.5, 15., 17.5, 20., 22.5, 25., 27.5, 30.) + TriggerPathName = cms.untracked.string("HLT_Mu25_TkMu0_dEta18_Onia_v") ) -hfv7 = hfv6.clone( - TriggerPathName = cms.untracked.string("HLT_Dimuon13_PsiPrime_v"), +hfv7 = hfv1.clone( + TriggerPathName = cms.untracked.string("HLT_DoubleMu4_JpsiTrk_Displaced_v") ) -hfv8 = hfv6.clone( - TriggerPathName = cms.untracked.string("HLT_Dimuon13_Upsilon_v"), +hfv8 = hfv1.clone( + TriggerPathName = cms.untracked.string("HLT_DoubleMu4_PsiPrimeTrk_Displaced_v") ) -hfv9 = hfv6.clone( - TriggerPathName = cms.untracked.string("HLT_Mu25_TkMu0_dEta18_Onia_v"), +hfv9 = hfv1.clone( + TriggerPathName = cms.untracked.string("HLT_DoubleMu4_LowMassNonResonantTrk_Displaced_v") ) heavyFlavorValidationSequence = cms.Sequence( hfv1+hfv2+hfv3+hfv4+hfv5+hfv6+hfv7+hfv8+hfv9 diff --git a/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidation_cfi.py b/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidation_cfi.py index 2e3eab949231d..f1dd30cd4eb90 100644 --- a/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidation_cfi.py +++ b/HLTriggerOffline/HeavyFlavor/python/heavyFlavorValidation_cfi.py @@ -9,8 +9,8 @@ TriggerResults = cms.untracked.string("TriggerResults"), RecoMuons = cms.InputTag("muons"), GenParticles = cms.InputTag("genParticles"), -# list IDs of muon mothers, -1:don't check, 0:particle gun, 23:Z, 443:J/psi, 553:Upsilon, 531:Bs - MotherIDs = cms.untracked.vint32(23,443,553,531,0), +# list IDs of muon mothers, -1:don't check, 0:particle gun, 23:Z, 443:J/psi, 553:Upsilon + MotherIDs = cms.untracked.vint32(23,443,553,0), GenGlobDeltaRMatchingCut = cms.untracked.double(0.1), GlobL1DeltaRMatchingCut = cms.untracked.double(0.3), GlobL2DeltaRMatchingCut = cms.untracked.double(0.3), diff --git a/HLTriggerOffline/HeavyFlavor/src/HeavyFlavorValidation.cc b/HLTriggerOffline/HeavyFlavor/src/HeavyFlavorValidation.cc index 6177971944854..56b64776c9603 100755 --- a/HLTriggerOffline/HeavyFlavor/src/HeavyFlavorValidation.cc +++ b/HLTriggerOffline/HeavyFlavor/src/HeavyFlavorValidation.cc @@ -147,18 +147,16 @@ void HeavyFlavorValidation::dqmBeginRun(const edm::Run& iRun, const edm::EventSe vector moduleNames = hltConfig.moduleLabels( triggerNames[i] ); for( size_t j = 0; j < moduleNames.size(); j++) { TString name = moduleNames[j]; - if(name.Contains("Filter")){ + if(name.Contains("Filter")){ int level = 0; if(name.Contains("L1")) level = 1; - if(name.Contains("L2")) + else if(name.Contains("L2")) level = 2; - if(name.Contains("L3")) + else if(name.Contains("L3")) level = 3; - if(name.Contains("mumuFilter") || name.Contains("DiMuon")) + else if(name.Contains("mumuFilter") || name.Contains("JpsiTrackMass")) level = 4; - if(name.Contains("Vertex") || name.Contains("Dz")) - level = 5; filterNamesLevels.push_back( pair(moduleNames[j],level) ); os<<" "< 2){ + }else if( filterNamesLevels[i].second == 3 || filterNamesLevels[i].second == 4){ match( ME[TString::Format("filt%dGlob_deltaEtaDeltaPhi",int(i+1))], globMuons, muonsAtFilter[i] ,globL3DeltaRMatchingCut, filt_glob[i] ); } } @@ -413,7 +411,7 @@ void HeavyFlavorValidation::analyze(const Event& iEvent, const EventSetup& iSetu match( ME["pathGlob_deltaEtaDeltaPhi"], globMuons_position, pathMuons ,globL1DeltaRMatchingCut, path_glob ); }else if( (filterNamesLevels.end()-1)->second == 2 ){ match( ME["pathGlob_deltaEtaDeltaPhi"], globMuons, pathMuons ,globL2DeltaRMatchingCut, path_glob ); - }else if( (filterNamesLevels.end()-1)->second > 2){ + }else if( (filterNamesLevels.end()-1)->second == 3 || (filterNamesLevels.end()-1)->second == 4){ match( ME["pathGlob_deltaEtaDeltaPhi"], globMuons, pathMuons ,globL3DeltaRMatchingCut, path_glob ); } diff --git a/HeavyIonsAnalysis/Configuration/test/SDmaker_3SD_3CS_PDMinBias_cfg.py b/HeavyIonsAnalysis/Configuration/test/SDmaker_3SD_3CS_PDMinBias_cfg.py index 89a2984b690df..eabb9cb938f8e 100644 --- a/HeavyIonsAnalysis/Configuration/test/SDmaker_3SD_3CS_PDMinBias_cfg.py +++ b/HeavyIonsAnalysis/Configuration/test/SDmaker_3SD_3CS_PDMinBias_cfg.py @@ -132,7 +132,7 @@ process.outputCsJetHI.outputCommands.extend([ "keep recoVertexs_hiSelectedVertex__RECO", - "keep recoTracks_hiGeneralTracks__RECO", + "keep recoTracks_hiSelectedTracks__RECO", "keep recoPhotons_*_*_*" , "keep edmTriggerResults_TriggerResults__*" , "keep triggerTriggerEvent_hltTriggerSummaryAOD__*" diff --git a/PhysicsTools/PatAlgos/python/slimming/prunedGenParticles_cfi.py b/PhysicsTools/PatAlgos/python/slimming/prunedGenParticles_cfi.py index 75ac9e1680a93..3dc3fa2b71c11 100644 --- a/PhysicsTools/PatAlgos/python/slimming/prunedGenParticles_cfi.py +++ b/PhysicsTools/PatAlgos/python/slimming/prunedGenParticles_cfi.py @@ -29,7 +29,7 @@ "keep (1000001 <= abs(pdgId) <= 1000039 ) || ( 2000001 <= abs(pdgId) <= 2000015)", # keep protons "keep pdgId = 2212", - "keep status == 3 || ( 21 <= status <= 29) || ( 11 <= status <= 19)", #keep event summary (status=3 for pythia6, 21 <= status <= 29 for pythia8) + "keep status == 3 || status == 22 || status == 23 || ( 11 <= status <= 19)", #keep event summary status3 (for pythia), 22,23 (pythia8) ) ) diff --git a/RecoBTag/ImpactParameter/interface/TrackCountingComputer.h b/RecoBTag/ImpactParameter/interface/TrackCountingComputer.h index 774db0de0f479..a0c94a20a4e03 100644 --- a/RecoBTag/ImpactParameter/interface/TrackCountingComputer.h +++ b/RecoBTag/ImpactParameter/interface/TrackCountingComputer.h @@ -15,8 +15,6 @@ class TrackCountingComputer : public JetTagComputer public: TrackCountingComputer(const edm::ParameterSet & parameters ) { - m_minIP = parameters.existsAs("minimumImpactParameter") ? parameters.getParameter("minimumImpactParameter") : -1; - m_useSignedIPSig = parameters.existsAs("useSignedImpactParameterSig") ? parameters.getParameter("useSignedImpactParameterSig") : true; m_nthTrack = parameters.getParameter("nthTrack"); m_ipType = parameters.getParameter("impactParameterType"); m_deltaR = parameters.getParameter("deltaR"); @@ -74,21 +72,14 @@ class TrackCountingComputer : public JetTagComputer for(std::vector::const_iterator it = impactParameters.begin(); it!=impactParameters.end(); ++it, i++) { if( fabs(impactParameters[i].distanceToJetAxis.value()) < m_cutMaxDistToAxis && // distance to JetAxis (impactParameters[i].closestToJetAxis - pv).mag() < m_cutMaxDecayLen && // max decay len - (m_useAllQualities == true || (*tracks[i]).quality(m_trackQuality)) && // use selected track qualities - (fabs(((m_ipType==0) ? it->ip3d:it->ip2d).value()) > m_minIP) // minimum impact parameter + (m_useAllQualities == true || (*tracks[i]).quality(m_trackQuality)) // use selected track qualities ) { - - //calculate the signed or un-signed significance - float signed_sig = ((m_ipType == 0) ? it->ip3d : it->ip2d).significance(); - float unsigned_sig = fabs(signed_sig); - float significance = (m_useSignedIPSig) ? signed_sig : unsigned_sig; - if (useVariableJTA_) { - if (tkip.variableJTA( varJTApars )[i]) significances.insert( significance ); + if (tkip.variableJTA( varJTApars )[i]) significances.insert( ((m_ipType==0)?it->ip3d:it->ip2d).significance() ); } else // no using variable JTA, use the default method if(m_deltaR <=0 || ROOT::Math::VectorUtil::DeltaR((*tkip.jet()).p4().Vect(), (*tracks[i]).momentum()) < m_deltaR) - significances.insert( significance ); + significances.insert( ((m_ipType==0)?it->ip3d:it->ip2d).significance() ); } } @@ -98,10 +89,7 @@ class TrackCountingComputer : public JetTagComputer bool useVariableJTA_; reco::btag::variableJTAParameters varJTApars; - - double m_minIP; - bool m_useSignedIPSig; - + int m_nthTrack; int m_ipType; double m_deltaR; diff --git a/RecoBTag/ImpactParameter/python/promptTrackCountingComputer_cfi.py b/RecoBTag/ImpactParameter/python/promptTrackCountingComputer_cfi.py index 1db07a023b889..de1f750a6e710 100644 --- a/RecoBTag/ImpactParameter/python/promptTrackCountingComputer_cfi.py +++ b/RecoBTag/ImpactParameter/python/promptTrackCountingComputer_cfi.py @@ -9,8 +9,7 @@ promptTrackCounting = cms.ESProducer("PromptTrackCountingESProducer", impactParameterType = cms.int32(0), ## 0 = 3D, 1 = 2D - minimumImpactParameter = cms.double(-1), - useSignedImpactParameterSig = cms.bool(True), + maximumDistanceToJetAxis = cms.double(999999.0), deltaR = cms.double(-1.0), ## maximum deltaR of track to jet. If -ve just use cut from JTA deltaRmin = cms.double(0.0), ## minimum deltaR of track to jet. diff --git a/RecoBTag/ImpactParameter/python/trackCounting3D1stComputer_cfi.py b/RecoBTag/ImpactParameter/python/trackCounting3D1stComputer_cfi.py index 080a1499ec581..737307d9bd9ea 100644 --- a/RecoBTag/ImpactParameter/python/trackCounting3D1stComputer_cfi.py +++ b/RecoBTag/ImpactParameter/python/trackCounting3D1stComputer_cfi.py @@ -5,9 +5,8 @@ # trackCounting3D1st btag computer trackCounting3D1st = cms.ESProducer("TrackCountingESProducer", variableJTAPars, - minimumImpactParameter = cms.double(-1), - useSignedImpactParameterSig = cms.bool(True), - impactParameterType = cms.int32(0), ## 0 = 3D, 1 = 2D + impactParameterType = cms.int32(0), ## 0 = 3D, 1 = 2D + maximumDistanceToJetAxis = cms.double(0.07), deltaR = cms.double(-1.0), ## use cut from JTA diff --git a/RecoBTag/ImpactParameter/python/trackCounting3D2ndComputer_cfi.py b/RecoBTag/ImpactParameter/python/trackCounting3D2ndComputer_cfi.py index 3577ae0b02322..8a060c1006896 100644 --- a/RecoBTag/ImpactParameter/python/trackCounting3D2ndComputer_cfi.py +++ b/RecoBTag/ImpactParameter/python/trackCounting3D2ndComputer_cfi.py @@ -5,11 +5,11 @@ # trackCounting3D2nd btag computer trackCounting3D2nd = cms.ESProducer("TrackCountingESProducer", variableJTAPars, - minimumImpactParameter = cms.double(-1), - useSignedImpactParameterSig = cms.bool(True), impactParameterType = cms.int32(0), ## 0 = 3D, 1 = 2D + maximumDistanceToJetAxis = cms.double(0.07), - deltaR = cms.double(-1.0), ## use cut from JTA + deltaR = cms.double(-1.0), ## use cut from JTA + maximumDecayLength = cms.double(5.0), nthTrack = cms.int32(2), trackQualityClass = cms.string("any"), diff --git a/RecoBTag/ImpactParameter/python/trackCounting3D3rdComputer_cfi.py b/RecoBTag/ImpactParameter/python/trackCounting3D3rdComputer_cfi.py index df798434f7fbd..2b681a43d9743 100644 --- a/RecoBTag/ImpactParameter/python/trackCounting3D3rdComputer_cfi.py +++ b/RecoBTag/ImpactParameter/python/trackCounting3D3rdComputer_cfi.py @@ -5,8 +5,6 @@ # trackCounting3D3rd btag computer trackCounting3D3rd = cms.ESProducer("TrackCountingESProducer", variableJTAPars, - minimumImpactParameter = cms.double(-1), - useSignedImpactParameterSig = cms.bool(True), impactParameterType = cms.int32(0), ## 0 = 3D, 1 = 2D maximumDistanceToJetAxis = cms.double(0.07), diff --git a/RecoEcal/EgammaClusterAlgos/src/Multi5x5BremRecoveryClusterAlgo.cc b/RecoEcal/EgammaClusterAlgos/src/Multi5x5BremRecoveryClusterAlgo.cc index bfec035350036..61156617c85d2 100644 --- a/RecoEcal/EgammaClusterAlgos/src/Multi5x5BremRecoveryClusterAlgo.cc +++ b/RecoEcal/EgammaClusterAlgos/src/Multi5x5BremRecoveryClusterAlgo.cc @@ -47,11 +47,7 @@ void Multi5x5BremRecoveryClusterAlgo::makeIslandSuperClusters(reco::CaloClusterP bool usedSeed[clusters_v.size()]; for (auto ic=0U; ic eta(clusters_v.size()), phi(clusters_v.size()), et(clusters_v.size()); - #else float eta[clusters_v.size()], phi[clusters_v.size()], et[clusters_v.size()]; - #endif for (auto ic=0U; iceta(); phi[ic]=clusters_v[ic]->phi(); diff --git a/RecoEgamma/EgammaIsolationAlgos/interface/EgammaTowerIsolation.h b/RecoEgamma/EgammaIsolationAlgos/interface/EgammaTowerIsolation.h index 4a5c085056a32..3d8d01b27d14f 100644 --- a/RecoEgamma/EgammaIsolationAlgos/interface/EgammaTowerIsolation.h +++ b/RecoEgamma/EgammaIsolationAlgos/interface/EgammaTowerIsolation.h @@ -136,11 +136,7 @@ EgammaTowerIsolationNew::EgammaTowerIsolationNew(float extRadius[NC], // sort in eta (kd-tree anoverkill,does not vectorize...) uint32_t index[nt]; - #ifdef __clang__ - std::vector e(nt); - #else float e[nt]; - #endif for (std::size_t k=0; k!=nt; ++k) { e[k]=towers[k].eta(); index[k]=k; diff --git a/RecoEgamma/EgammaPhotonProducers/python/conversionTrackSequenceForReReco_cff.py b/RecoEgamma/EgammaPhotonProducers/python/conversionTrackSequenceForReReco_cff.py index a49f10f92eadc..929b283fa3827 100644 --- a/RecoEgamma/EgammaPhotonProducers/python/conversionTrackSequenceForReReco_cff.py +++ b/RecoEgamma/EgammaPhotonProducers/python/conversionTrackSequenceForReReco_cff.py @@ -18,7 +18,7 @@ useTrajectory = cms.bool(False), ) -#producer from conversionStep tracks collection, set tracker only, merged arbitrated, merged arbitrated ecal/general flags +#producer from iter8 tracks collection, set tracker only, merged arbitrated, merged arbitrated ecal/general flags conversionStepConversionTrackProducerReReco = RecoEgamma.EgammaPhotonProducers.conversionTrackProducer_cfi.conversionTrackProducer.clone( TrackProducer = cms.string('conversionStepTracks'), setTrackerOnly = cms.bool(True), diff --git a/RecoEgamma/EgammaPhotonProducers/python/conversionTrackSequence_cff.py b/RecoEgamma/EgammaPhotonProducers/python/conversionTrackSequence_cff.py index a46b515b1396c..80b8be93434bd 100644 --- a/RecoEgamma/EgammaPhotonProducers/python/conversionTrackSequence_cff.py +++ b/RecoEgamma/EgammaPhotonProducers/python/conversionTrackSequence_cff.py @@ -36,7 +36,7 @@ setArbitratedMergedEcalGeneral = cms.bool(True), ) -#producer from conversionStep tracks collection, set tracker only, merged arbitrated, merged arbitrated ecal/general flags +#producer from iter8 tracks collection, set tracker only, merged arbitrated, merged arbitrated ecal/general flags conversionStepConversionTrackProducer = RecoEgamma.EgammaPhotonProducers.conversionTrackProducer_cfi.conversionTrackProducer.clone( TrackProducer = cms.string('conversionStepTracks'), setTrackerOnly = cms.bool(True), diff --git a/RecoEgamma/EgammaPhotonProducers/src/GEDPhotonProducer.cc b/RecoEgamma/EgammaPhotonProducers/src/GEDPhotonProducer.cc index 3e1a4dd03c1a4..e3eda23d857bb 100644 --- a/RecoEgamma/EgammaPhotonProducers/src/GEDPhotonProducer.cc +++ b/RecoEgamma/EgammaPhotonProducers/src/GEDPhotonProducer.cc @@ -498,20 +498,6 @@ void GEDPhotonProducer::fillPhotonCollection(edm::Event& evt, float sigmaEtaEta = sqrt(cov[0]); float sigmaIetaIeta = sqrt(locCov[0]); - - float full5x5_maxXtal = noZS::EcalClusterTools::eMax( *(scRef->seed()), &(*hits) ); - //AA - //Change these to consider severity level of hits - float full5x5_e1x5 = noZS::EcalClusterTools::e1x5( *(scRef->seed()), &(*hits), &(*topology)); - float full5x5_e2x5 = noZS::EcalClusterTools::e2x5Max( *(scRef->seed()), &(*hits), &(*topology)); - float full5x5_e3x3 = noZS::EcalClusterTools::e3x3( *(scRef->seed()), &(*hits), &(*topology)); - float full5x5_e5x5 = noZS::EcalClusterTools::e5x5( *(scRef->seed()), &(*hits), &(*topology)); - std::vector full5x5_cov = noZS::EcalClusterTools::covariances( *(scRef->seed()), &(*hits), &(*topology), geometry); - std::vector full5x5_locCov = noZS::EcalClusterTools::localCovariances( *(scRef->seed()), &(*hits), &(*topology)); - - float full5x5_sigmaEtaEta = sqrt(full5x5_cov[0]); - float full5x5_sigmaIetaIeta = sqrt(full5x5_locCov[0]); - // compute position of ECAL shower math::XYZPoint caloPosition = scRef->position(); @@ -556,17 +542,6 @@ void GEDPhotonProducer::fillPhotonCollection(edm::Event& evt, showerShape.hcalTowersBehindClusters = TowersBehindClus; newCandidate.setShowerShapeVariables ( showerShape ); - /// fill full5x5 shower shape block - reco::Photon::ShowerShape full5x5_showerShape; - full5x5_showerShape.e1x5= full5x5_e1x5; - full5x5_showerShape.e2x5= full5x5_e2x5; - full5x5_showerShape.e3x3= full5x5_e3x3; - full5x5_showerShape.e5x5= full5x5_e5x5; - full5x5_showerShape.maxEnergyXtal = full5x5_maxXtal; - full5x5_showerShape.sigmaEtaEta = full5x5_sigmaEtaEta; - full5x5_showerShape.sigmaIetaIeta = full5x5_sigmaIetaIeta; - newCandidate.full5x5_setShowerShapeVariables ( full5x5_showerShape ); - /// get ecal photon specific corrected energy /// plus values from regressions and store them in the Photon // Photon candidate takes by default (set in photons_cfi.py) diff --git a/RecoHI/Configuration/python/Reconstruction_HI_cff.py b/RecoHI/Configuration/python/Reconstruction_HI_cff.py index a9fa0c9393414..0a4d246dbd810 100644 --- a/RecoHI/Configuration/python/Reconstruction_HI_cff.py +++ b/RecoHI/Configuration/python/Reconstruction_HI_cff.py @@ -4,21 +4,20 @@ # HIGH LEVEL RECO # Tracking -from RecoHI.HiTracking.HiTracking_cff import * # two additional steps +#from RecoHI.HiTracking.HighPtTracking_PbPb_cff import * # above 1.5 GeV +from RecoHI.HiTracking.LowPtTracking_PbPb_cff import * # above 0.9 GeV # Egamma from RecoHI.HiEgammaAlgos.HiEgamma_cff import * -from RecoHI.HiEgammaAlgos.HiElectronSequence_cff import * # Jet Reconstruction from RecoHI.HiJetAlgos.HiRecoJets_cff import * # Muon Reco from RecoHI.HiMuonAlgos.HiRecoMuon_cff import * -# keep regit seperate for the moment -from RecoHI.HiMuonAlgos.HiRegionalRecoMuon_cff import * -from RecoHI.Configuration.Reconstruction_hiPF_cff import * +# Regit Muon Reco +from RecoHI.HiMuonAlgos.HiReRecoMuon_cff import * # Heavy Ion Event Characterization from RecoHI.HiCentralityAlgos.HiCentrality_cfi import * @@ -26,34 +25,19 @@ # HCAL noise producer from RecoMET.METProducers.hcalnoiseinfoproducer_cfi import * -hcalnoise.trackCollName = 'hiGeneralTracks' +hcalnoise.trackCollName = 'hiSelectedTracks' # Global + High-Level Reco Sequence -globalRecoPbPb = cms.Sequence(hiTracking - * hiParticleFlowLocalReco +globalRecoPbPb = cms.Sequence(heavyIonTracking * hiEcalClusters * hiRecoJets * muonRecoPbPb - * hiElectronSequence * hiEgammaSequence - * hiParticleFlowReco * hiCentrality * hiEvtPlane * hcalnoise ) -globalRecoPbPb_wConformalPixel = cms.Sequence(hiTracking_wConformalPixel - * hiParticleFlowLocalReco - * hiEcalClusters - * hiRecoJets - * muonRecoPbPb - * hiElectronSequence - * hiEgammaSequence - * hiParticleFlowReco - * hiCentrality - * hiEvtPlane - * hcalnoise - ) #-------------------------------------------------------------------------- # Full sequence (LOCAL RECO + HIGH LEVEL RECO) diff --git a/RecoHI/Configuration/python/Reconstruction_hiPF_cff.py b/RecoHI/Configuration/python/Reconstruction_hiPF_cff.py index 0311fc1f2147a..2aa7ec7392fb6 100644 --- a/RecoHI/Configuration/python/Reconstruction_hiPF_cff.py +++ b/RecoHI/Configuration/python/Reconstruction_hiPF_cff.py @@ -2,28 +2,17 @@ # include particle flow local reconstruction from RecoParticleFlow.PFClusterProducer.particleFlowCluster_cff import * +particleFlowClusterPS.thresh_Pt_Seed_Endcap = cms.double(99999.) -# run a trimmed down PF sequence with heavy-ion vertex, no conversions, nucl int, etc. - -from RecoParticleFlow.PFProducer.particleFlowEGamma_cff import * -particleFlowEGamma.vertexCollection = cms.InputTag("hiSelectedVertex") -gedGsfElectronCores.ctfTracks = cms.InputTag("hiGeneralTracks") -gedGsfElectronsTmp.ctfTracksTag = cms.InputTag("hiGeneralTracks") -gedGsfElectronsTmp.vtxTag = cms.InputTag("hiSelectedVertex") -gedPhotonsTmp.primaryVertexProducer = cms.InputTag("hiSelectedVertex") -gedPhotonsTmp.regressionConfig.vertexCollection = cms.InputTag("hiSelectedVertex") -gedPhotonsTmp.isolationSumsCalculatorSet.trackProducer = cms.InputTag("hiGeneralTracks") - - -#These are set for consistency w/ HiElectronSequence, but these cuts need to be studied -gedGsfElectronsTmp.maxHOverEBarrel = cms.double(0.25) -gedGsfElectronsTmp.maxHOverEEndcaps = cms.double(0.25) - +from RecoParticleFlow.PFTracking.pfTrack_cfi import * +pfTrack.UseQuality = cms.bool(True) +pfTrack.TrackQuality = cms.string('highPurity') +pfTrack.TkColList = cms.VInputTag("hiSelectedTracks") +pfTrack.PrimaryVertexLabel = cms.InputTag("hiSelectedVertex") +pfTrack.MuColl = cms.InputTag("muons") +# run a trimmed down PF sequence with heavy-ion vertex, no conversions, nucl int, etc. from RecoParticleFlow.Configuration.RecoParticleFlow_cff import * - -mvaElectrons.vertexTag = cms.InputTag("hiSelectedVertex") - particleFlowBlock.elementImporters = cms.VPSet( cms.PSet( importerName = cms.string("GSFTrackImporter"), source = cms.InputTag("pfTrackElec"), @@ -67,17 +56,20 @@ particleFlowTmp.muons = cms.InputTag("muons") particleFlowTmp.usePFConversions = cms.bool(False) +from RecoParticleFlow.PFTracking.pfTrackElec_cfi import * +pfTrackElec.applyGsfTrackCleaning = cms.bool(True) +pfTrackElec.PrimaryVertexLabel = cms.InputTag("hiSelectedVertex") -from RecoHI.HiJetAlgos.HiRecoPFJets_cff import * +mvaElectrons.vertexTag = cms.InputTag("hiSelectedVertex") # local reco must run before electrons (RecoHI/HiEgammaAlgos), due to PF integration -hiParticleFlowLocalReco = cms.Sequence(particleFlowCluster) - +HiParticleFlowLocalReco = cms.Sequence(particleFlowCluster + * pfTrack + * pfTrackElec + ) #PF Reco runs after electrons -hiParticleFlowReco = cms.Sequence( pfGsfElectronMVASelectionSequence - * particleFlowBlock - * particleFlowEGammaFull - * particleFlowTmp - * hiRecoPFJets - ) +HiParticleFlowReco = cms.Sequence(pfGsfElectronMVASelectionSequence + * particleFlowBlock + * particleFlowTmp + ) diff --git a/RecoHI/Configuration/python/customise_PF.py b/RecoHI/Configuration/python/customise_PF.py index f8dc68c0d61b3..03c0dca6d1676 100644 --- a/RecoHI/Configuration/python/customise_PF.py +++ b/RecoHI/Configuration/python/customise_PF.py @@ -11,7 +11,7 @@ def customise(process): process.load("RecoParticleFlow.PFTracking.pfTrack_cfi") process.pfTrack.UseQuality = cms.bool(True) process.pfTrack.TrackQuality = cms.string('highPurity') - process.pfTrack.TkColList = cms.VInputTag("hiGeneralTracks") + process.pfTrack.TkColList = cms.VInputTag("hiSelectedTracks") process.pfTrack.PrimaryVertexLabel = cms.InputTag("hiSelectedVertex") process.pfTrack.MuColl = cms.InputTag("muons") process.pfTrack.GsfTracksInEvents = cms.bool(False) diff --git a/RecoHI/Configuration/test/test_PF_rereco_cfg.py b/RecoHI/Configuration/test/test_PF_rereco_cfg.py index be4f9b4139b41..bcbb4951053f6 100644 --- a/RecoHI/Configuration/test/test_PF_rereco_cfg.py +++ b/RecoHI/Configuration/test/test_PF_rereco_cfg.py @@ -43,7 +43,7 @@ # Path and EndPath definitions process.trkreco_step = cms.Path(process.rechits * process.heavyIonTracking) -process.pfreco_step = cms.Path(process.hiParticleFlowReco) +process.pfreco_step = cms.Path(process.HiParticleFlowReco) process.out_step = cms.EndPath(process.output) # Schedule definition diff --git a/RecoHI/HiCentralityAlgos/BuildFile.xml b/RecoHI/HiCentralityAlgos/BuildFile.xml index d035747489468..cbeecb47aca31 100644 --- a/RecoHI/HiCentralityAlgos/BuildFile.xml +++ b/RecoHI/HiCentralityAlgos/BuildFile.xml @@ -12,7 +12,6 @@ - @@ -20,9 +19,5 @@ - - - - - + diff --git a/RecoHI/HiCentralityAlgos/macros/plotBinsAgainstMXS.C b/RecoHI/HiCentralityAlgos/macros/plotBinsAgainstMXS.C new file mode 100644 index 0000000000000..be5698fcaa5c7 --- /dev/null +++ b/RecoHI/HiCentralityAlgos/macros/plotBinsAgainstMXS.C @@ -0,0 +1,80 @@ + + +static const int maxtables = 25; + +void plotBinsAgainstMXS(){ + + int nTables = 16; + int nBins = 18; + + CentralityBins* tables[maxtables]; + TGraph * graphs[40]; + + TFile* inf = new TFile("tables.root","read"); + TFile* outf = new TFile("ErrorMap.root","recreate"); + + for(int i = 0 ; i < nTables; ++i){ + tables[i] = (CentralityBins*)inf->Get(Form("HFhits20_MXS%d_Hydjet4TeV_MC_3XY_V21_v0",i)); + } + + for(int j = 0; j< nBins; ++j){ + graphs[j] = new TGraph(nTables); + graphs[j]->SetName(Form("Bin%d",j)); + graphs[j]->SetMarkerColor(nBins-j); + graphs[j]->SetMarkerSize(1.); + graphs[j]->SetMarkerStyle(20); + + for(int i = 0 ; i < nTables; ++i){ + double reference = tables[0]->NpartMeanOfBin(j); + if(reference <= 0) reference = 0.001; + graphs[j]->SetPoint(i,((double)i)/100,tables[i]->NpartMeanOfBin(j)/reference); + } + } + + graphs[0]->SetMarkerColor(49); + + TGraph* g1 = new TGraph(nBins); + g1->SetName("g1"); + g1->SetMarkerSize(1.); + g1->SetMarkerStyle(20); + + TH2D* hPad1 = new TH2D("hPad1",";Fraction of Missing XS;[N_{part}]/[N_{part}(100%)]",100,-0.02,0.2,450,0,7); + TH2D* hPad2 = new TH2D("hPad2",";bin;#Delta N_{part}/N_{part} per unit efficiency",nBins+1,-0.5,nBins+0.5,450,0,35); + + TCanvas* c1 = new TCanvas("c1","c1",400,400); + TLegend* leg3 = new TLegend(0.2,0.65,0.55,0.92,NULL,"brNDC"); + leg3->SetFillColor(0); + leg3->SetTextSize(0.06); + leg3->SetBorderSize(0); + + hPad1->Draw(); + for(int j = 0; j< nBins; ++j){ + + graphs[j]->Fit("pol1"); + if(j > 3) graphs[j]->Draw("p"); + TF1* f = graphs[j]->GetFunction("pol1"); + f->SetLineColor(graphs[j]->GetMarkerColor()); + if(j % 5 == 0) leg3->AddEntry(graphs[j],Form("Bin %d",j),"pl"); + + double slope = f->GetParameter(1); + g1->SetPoint(j,j,slope); + } + + leg3->Draw(); + c1->Print("NpartMean_vs_MXS.gif"); + + TCanvas* c2 = new TCanvas("c2","c2",400,400); + hPad2->Draw(); + g1->Draw("p"); + + c2->Print("delta_vs_bins.gif"); + + + hPad2->Write(); + g1->Write(); + outf->Write(); + + +} + + diff --git a/RecoHI/HiCentralityAlgos/macros/rootlogon.C b/RecoHI/HiCentralityAlgos/macros/rootlogon.C new file mode 100644 index 0000000000000..7476e12c21dbe --- /dev/null +++ b/RecoHI/HiCentralityAlgos/macros/rootlogon.C @@ -0,0 +1,12 @@ +{ + gSystem->Load( "libFWCoreFWLite" ); + gSystem->Load("libDataFormatsFWLite"); + gSystem->Load("libDataFormatsCommon"); + gSystem->Load("libDataFormatsCaloTowers"); + gSystem->Load("libDataFormatsHeavyIonEvent"); + gSystem->Load("libSimDataFormatsHiGenData"); + gSystem->AddIncludePath("-I$CMSSW_BASE/src/"); + gSystem->AddIncludePath("-I$CMSSW_RELEASE_BASE/src/"); + AutoLibraryLoader::enable(); + +} diff --git a/RecoHI/HiCentralityAlgos/macros/rootlogonBareRoot.C b/RecoHI/HiCentralityAlgos/macros/rootlogonBareRoot.C new file mode 100644 index 0000000000000..08178daea6bed --- /dev/null +++ b/RecoHI/HiCentralityAlgos/macros/rootlogonBareRoot.C @@ -0,0 +1,6 @@ +{ + gSystem->Load("libDataFormatsHeavyIonEvent"); + gSystem->AddIncludePath("-I$CMSSW_BASE/src/"); + gSystem->AddIncludePath("-I$CMSSW_RELEASE_BASE/src/"); + +} diff --git a/RecoHI/HiCentralityAlgos/macros/testCentralityBareRoot.C b/RecoHI/HiCentralityAlgos/macros/testCentralityBareRoot.C new file mode 100644 index 0000000000000..4200048d23c5e --- /dev/null +++ b/RecoHI/HiCentralityAlgos/macros/testCentralityBareRoot.C @@ -0,0 +1,19 @@ +#include "DataFormats/HeavyIonEvent/interface/CentralityBins.h" +#include "TFile.h" +#include +using namespace std; + +void testCentralityBareRoot(){ + + TFile* inf = new TFile("centralityfile.root"); + + CentralityBins::RunMap cmap = getCentralityFromFile(inf, "makeCentralityTableTFile", "HFhitsAMPT_2760GeV", 0, 2); + // or, alternatively: + // TDirectoryFile* dir = (TDirectoryFile*) inf->Get("makeCentralityTableTFile"); + // CentralityBins::RunMap cmap = getCentralityFromFile(dir, "HFhitsAMPT_2760GeV", 0, 2); + + cout<<"map size "<getBin(23000); + cout< +#include +#include + +#include +#include +#include +#include + + + +#if !defined(__CINT__) && !defined(__MAKECINT__) + +#include "DataFormats/Common/interface/Handle.h" +#include "DataFormats/FWLite/interface/Event.h" +#include "FWCore/Utilities/interface/InputTag.h" +#include "DataFormats/HeavyIonEvent/interface/CentralityBins.h" +#include "DataFormats/CaloTowers/interface/CaloTower.h" +#include "DataFormats/HeavyIonEvent/interface/Centrality.h" +#include "SimDataFormats/HiGenData/interface/GenHIEvent.h" + +#endif + +using namespace std; + + +void testCentralityFWLite(){ + + TFile * centFile = new TFile("../data/CentralityTables.root"); + TFile* infile = new TFile("/net/hisrv0001/home/yetkin/pstore02/ana/Hydjet_MinBias_d20100222/DEF33D38-12E8-DE11-BA8F-0019B9CACF1A.root"); + fwlite::Event event(infile); + TFile* outFile = new TFile("test.root","recreate"); + + TH1D::SetDefaultSumw2(); + TH2D* hNpart = new TH2D("hNpart",";Npart Truth;Npart RECO",50,0,500,50,0,500); + TH1D* hBins = new TH1D("hBins",";bins;events",44,-1,21); + + CentralityBins::RunMap HFhitBinMap = getCentralityFromFile(centFile,"makeCentralityTableTFile", "HFhitsAMPT_2760GeV", 149500, 155000); + + // loop the events + unsigned int iEvent=0; + for(event.toBegin(); !event.atEnd(); ++event, ++iEvent){ + edm::EventBase const & ev = event; + if( iEvent % 10 == 0 ) cout<<"Processing event : "< mc; + ev.getByLabel(edm::InputTag("heavyIon"),mc); + edm::Handle cent; + ev.getByLabel(edm::InputTag("hiCentrality"),cent); + + double b = mc->b(); + double npart = mc->Npart(); + double ncoll = mc->Ncoll(); + double nhard = mc->Nhard(); + + double hf = cent->EtHFhitSum(); + double hftp = cent->EtHFtowerSumPlus(); + double hftm = cent->EtHFtowerSumMinus(); + double eb = cent->EtEBSum(); + double eep = cent->EtEESumPlus(); + double eem = cent->EtEESumMinus(); + + int run = ev.id().run(); + + int bin = HFhitBinMap[run]->getBin(hf); + hBins->Fill(bin); + + double npartMean = HFhitBinMap[run]->NpartMean(hf); + double npartSigma = HFhitBinMap[run]->NpartSigma(hf); + hNpart->Fill(npart,npartMean); + } + + outFile->cd(); + hBins->Write(); + hNpart->Write(); + outFile->Write(); + +} diff --git a/RecoHI/HiCentralityAlgos/plugins/BuildFile.xml b/RecoHI/HiCentralityAlgos/plugins/BuildFile.xml deleted file mode 100644 index eee1eb4fe7d60..0000000000000 --- a/RecoHI/HiCentralityAlgos/plugins/BuildFile.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/RecoHI/HiCentralityAlgos/python/HiCentrality_cfi.py b/RecoHI/HiCentralityAlgos/python/HiCentrality_cfi.py index f87fee2b1c687..aa9d6309e435d 100644 --- a/RecoHI/HiCentralityAlgos/python/HiCentrality_cfi.py +++ b/RecoHI/HiCentralityAlgos/python/HiCentrality_cfi.py @@ -1,35 +1,37 @@ import FWCore.ParameterSet.Config as cms -hiCentrality = cms.EDProducer("CentralityProducer", +hiCentrality = cms.EDFilter("reco::CentralityProducer", + doFilter = cms.bool(False), + produceHFhits = cms.bool(True), produceHFtowers = cms.bool(True), - produceEcalhits = cms.bool(True), + produceEcalhits = cms.bool(False), + produceBasicClusters = cms.bool(True), produceZDChits = cms.bool(True), produceETmidRapidity = cms.bool(True), producePixelhits = cms.bool(True), produceTracks = cms.bool(True), producePixelTracks = cms.bool(True), - reUseCentrality = cms.bool(False), + trackEtaCut = cms.double(2), + trackPtCut = cms.double(1), + + midRapidityRange = cms.double(1), srcHFhits = cms.InputTag("hfreco"), srcTowers = cms.InputTag("towerMaker"), - srcEBhits = cms.InputTag("ecalRecHit","EcalRecHitsEB"), - srcEEhits = cms.InputTag("ecalRecHit","EcalRecHitsEE"), + srcEBhits = cms.InputTag("EcalRecHitsEB"), + srcEEhits = cms.InputTag("EcalRecHitsEE"), + srcBasicClustersEB = cms.InputTag("hybridSuperClusters","hybridBarrelBasicClusters"), + srcBasicClustersEE = cms.InputTag("multi5x5SuperClusters","multi5x5EndcapBasicClusters"), srcZDChits = cms.InputTag("zdcreco"), srcPixelhits = cms.InputTag("siPixelRecHits"), - srcTracks = cms.InputTag("hiGeneralTracks"), - srcVertex= cms.InputTag("hiSelectedVertex"), - srcReUse = cms.InputTag("hiCentrality"), - srcPixelTracks = cms.InputTag("hiPixel3PrimTracks"), - - doPixelCut = cms.bool(True), + doPixelCut = cms.bool(False), + srcTracks = cms.InputTag("hiSelectedTracks"), UseQuality = cms.bool(True), TrackQuality = cms.string('highPurity'), - trackEtaCut = cms.double(2), - trackPtCut = cms.double(1), - hfEtaCut = cms.double(4), #hf above the absolute value of this cut is used - midRapidityRange = cms.double(1), - lowGainZDC = cms.bool(True), + srcReUse = cms.InputTag("hiCentrality"), + srcPixelTracks = cms.InputTag("hiPixel3PrimTracks") + ) + - ) diff --git a/RecoHI/HiCentralityAlgos/python/pACentrality_cfi.py b/RecoHI/HiCentralityAlgos/python/pACentrality_cfi.py deleted file mode 100644 index 88df31b77e28b..0000000000000 --- a/RecoHI/HiCentralityAlgos/python/pACentrality_cfi.py +++ /dev/null @@ -1,37 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -pACentrality = cms.EDProducer("CentralityProducer", - - produceHFhits = cms.bool(True), - produceHFtowers = cms.bool(True), - produceEcalhits = cms.bool(True), - produceZDChits = cms.bool(True), - produceETmidRapidity = cms.bool(True), - producePixelhits = cms.bool(True), - produceTracks = cms.bool(True), - producePixelTracks = cms.bool(True), - reUseCentrality = cms.bool(False), - - srcHFhits = cms.InputTag("hfreco"), - srcTowers = cms.InputTag("towerMaker"), - srcEBhits = cms.InputTag("ecalRecHit","EcalRecHitsEB"), - srcEEhits = cms.InputTag("ecalRecHit","EcalRecHitsEE"), - srcZDChits = cms.InputTag("zdcreco"), - srcPixelhits = cms.InputTag("siPixelRecHits"), - srcTracks = cms.InputTag("generalTracks"), - srcVertex= cms.InputTag("offlinePrimaryVertices"), - srcReUse = cms.InputTag("pACentrality"), - srcPixelTracks = cms.InputTag("pixelTracks"), - - doPixelCut = cms.bool(True), - UseQuality = cms.bool(True), - TrackQuality = cms.string('highPurity'), - trackEtaCut = cms.double(2), - trackPtCut = cms.double(1), - hfEtaCut = cms.double(4), #hf above the absolute value of this cut is used - midRapidityRange = cms.double(1), - lowGainZDC = cms.bool(True), - - ) - - diff --git a/RecoHI/HiCentralityAlgos/plugins/CentralityBinProducer.cc b/RecoHI/HiCentralityAlgos/src/CentralityBinProducer.cc similarity index 84% rename from RecoHI/HiCentralityAlgos/plugins/CentralityBinProducer.cc rename to RecoHI/HiCentralityAlgos/src/CentralityBinProducer.cc index afb152a5f0dcd..874bf40b6ddad 100644 --- a/RecoHI/HiCentralityAlgos/plugins/CentralityBinProducer.cc +++ b/RecoHI/HiCentralityAlgos/src/CentralityBinProducer.cc @@ -31,7 +31,7 @@ #include "FWCore/Utilities/interface/InputTag.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "RecoHI/HiCentralityAlgos/interface/CentralityProvider.h" +#include "DataFormats/HeavyIonEvent/interface/CentralityProvider.h" // @@ -41,7 +41,6 @@ class CentralityBinProducer : public edm::EDProducer { public: explicit CentralityBinProducer(const edm::ParameterSet&); - explicit CentralityBinProducer(const edm::ParameterSet&, const edm::EventSetup&, edm::ConsumesCollector &&); ~CentralityBinProducer(); private: @@ -67,14 +66,9 @@ class CentralityBinProducer : public edm::EDProducer { // // constructors and destructor // -CentralityBinProducer::CentralityBinProducer(const edm::ParameterSet& iConfig){} - -CentralityBinProducer::CentralityBinProducer(const edm::ParameterSet& iConfig, const edm::EventSetup& iSetup, edm::ConsumesCollector && iC) : +CentralityBinProducer::CentralityBinProducer(const edm::ParameterSet& iConfig) : centrality_(0) { - using namespace edm; - if(!centrality_) centrality_ = new CentralityProvider(iSetup, std::move(iC)); - produces(); } @@ -96,6 +90,8 @@ CentralityBinProducer::~CentralityBinProducer() void CentralityBinProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { + using namespace edm; + if(!centrality_) centrality_ = new CentralityProvider(iSetup); centrality_->newEvent(iEvent,iSetup); int bin = centrality_->getBin(); diff --git a/RecoHI/HiCentralityAlgos/plugins/CentralityFilter.cc b/RecoHI/HiCentralityAlgos/src/CentralityFilter.cc similarity index 78% rename from RecoHI/HiCentralityAlgos/plugins/CentralityFilter.cc rename to RecoHI/HiCentralityAlgos/src/CentralityFilter.cc index faf1e89175664..4e4781368abc4 100644 --- a/RecoHI/HiCentralityAlgos/plugins/CentralityFilter.cc +++ b/RecoHI/HiCentralityAlgos/src/CentralityFilter.cc @@ -1,3 +1,15 @@ +// -*- C++ -*- +// +// Package: CentralityFilter +// Class: CentralityFilter +// +/**\class CentralityFilter CentralityFilter.cc CmsHi/CentralityFilter/src/CentralityFilter.cc + + Description: [one line class summary] + + Implementation: + [Notes on implementation] +*/ // // Original Author: Yetkin Yilmaz,32 4-A08,+41227673039, // Created: Tue Jun 29 12:19:49 CEST 2010 @@ -17,7 +29,7 @@ #include "FWCore/Framework/interface/MakerMacros.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Utilities/interface/Exception.h" -#include "RecoHI/HiCentralityAlgos/interface/CentralityProvider.h" +#include "DataFormats/HeavyIonEvent/interface/CentralityProvider.h" // // class declaration @@ -25,14 +37,13 @@ class CentralityFilter : public edm::EDFilter { public: - explicit CentralityFilter(const edm::ParameterSet&, const edm::EventSetup&, edm::ConsumesCollector &&); explicit CentralityFilter(const edm::ParameterSet&); ~CentralityFilter(); private: - virtual void beginJob() ; - virtual bool filter(edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + virtual void beginJob() override ; + virtual bool filter(edm::Event&, const edm::EventSetup&) override; + virtual void endJob() override ; // ----------member data --------------------------- CentralityProvider * centrality_; @@ -50,15 +61,11 @@ class CentralityFilter : public edm::EDFilter { // // constructors and destructor // -CentralityFilter::CentralityFilter(const edm::ParameterSet& iConfig){} - -CentralityFilter::CentralityFilter(const edm::ParameterSet& iConfig, const edm::EventSetup& iSetup, edm::ConsumesCollector && iC): +CentralityFilter::CentralityFilter(const edm::ParameterSet& iConfig) : centrality_(0), selectedBins_(iConfig.getParameter >("selectedBins")) { //now do what ever initialization is needed - using namespace edm; - if(!centrality_) centrality_ = new CentralityProvider(iSetup, std::move(iC)); } @@ -83,6 +90,7 @@ CentralityFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) bool result = false; using namespace edm; + if(!centrality_) centrality_ = new CentralityProvider(iSetup); centrality_->newEvent(iEvent,iSetup); int bin = centrality_->getBin(); diff --git a/RecoHI/HiCentralityAlgos/plugins/CentralityProducer.cc b/RecoHI/HiCentralityAlgos/src/CentralityProducer.cc similarity index 57% rename from RecoHI/HiCentralityAlgos/plugins/CentralityProducer.cc rename to RecoHI/HiCentralityAlgos/src/CentralityProducer.cc index 3f1d2c5d0671f..9db0618bf061d 100644 --- a/RecoHI/HiCentralityAlgos/plugins/CentralityProducer.cc +++ b/RecoHI/HiCentralityAlgos/src/CentralityProducer.cc @@ -1,3 +1,15 @@ +// -*- C++ -*- +// +// Package: CentralityProducer +// Class: CentralityProducer +// +/**\class CentralityProducer CentralityProducer.cc RecoHI/CentralityProducer/src/CentralityProducer.cc + + Description: + + Implementation: + +*/ // // Original Author: Yetkin Yilmaz, Young Soo Park // Created: Wed Jun 11 15:31:41 CEST 2008 @@ -11,7 +23,7 @@ // user include files #include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/EDProducer.h" +#include "FWCore/Framework/interface/EDFilter.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/EventSetup.h" @@ -26,15 +38,11 @@ #include "DataFormats/CaloTowers/interface/CaloTowerCollection.h" #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h" #include "DataFormats/EgammaReco/interface/BasicClusterFwd.h" - #include "DataFormats/Common/interface/Ref.h" #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h" #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h" -#include "DataFormats/SiPixelDetId/interface/PXBDetId.h" #include "DataFormats/TrackReco/interface/TrackFwd.h" #include "DataFormats/TrackReco/interface/Track.h" -#include "DataFormats/VertexReco/interface/Vertex.h" -#include "DataFormats/VertexReco/interface/VertexFwd.h" #include "Geometry/Records/interface/CaloGeometryRecord.h" #include "Geometry/CaloGeometry/interface/CaloGeometry.h" @@ -43,31 +51,31 @@ #include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetUnit.h" using namespace std; -using namespace edm; -using namespace reco; // // class declaration // +namespace reco{ -namespace reco { -class CentralityProducer : public edm::EDProducer { +class CentralityProducer : public edm::EDFilter { public: explicit CentralityProducer(const edm::ParameterSet&); ~CentralityProducer(); private: virtual void beginJob() override ; - virtual void produce(edm::Event&, const edm::EventSetup&) override; + virtual bool filter(edm::Event&, const edm::EventSetup&) override; virtual void endJob() override ; // ----------member data --------------------------- bool recoLevel_; + bool doFilter_; bool produceHFhits_; bool produceHFtowers_; bool produceEcalhits_; + bool produceBasicClusters_; bool produceZDChits_; bool produceETmidRap_; bool producePixelhits_; @@ -80,26 +88,25 @@ class CentralityProducer : public edm::EDProducer { double midRapidityRange_; double trackPtCut_; double trackEtaCut_; - double hfEtaCut_; - - bool lowGainZDC_; - - edm::EDGetTokenT srcHFhits_; - edm::EDGetTokenT srcTowers_; - edm::EDGetTokenT srcEEhits_; - edm::EDGetTokenT srcEBhits_; - edm::EDGetTokenT srcZDChits_; - edm::EDGetTokenT srcPixelhits_; - edm::EDGetTokenT srcTracks_; - edm::EDGetTokenT srcPixelTracks_; - edm::EDGetTokenT srcVertex_; - edm::EDGetTokenT reuseTag_; - + + edm::InputTag srcHFhits_; + edm::InputTag srcTowers_; + edm::InputTag srcEEhits_; + edm::InputTag srcEBhits_; + edm::InputTag srcBasicClustersEE_; + edm::InputTag srcBasicClustersEB_; + edm::InputTag srcZDChits_; + edm::InputTag srcPixelhits_; + edm::InputTag srcTracks_; + edm::InputTag srcPixelTracks_; + + edm::InputTag reuseTag_; + bool useQuality_; reco::TrackBase::TrackQuality trackQuality_; - edm::ESHandle tGeo; - edm::ESHandle cGeo; + const TrackerGeometry* trackGeo_; + const CaloGeometry* caloGeo_; }; @@ -115,10 +122,15 @@ class CentralityProducer : public edm::EDProducer { // // constructors and destructor // - CentralityProducer::CentralityProducer(const edm::ParameterSet& iConfig) { + CentralityProducer::CentralityProducer(const edm::ParameterSet& iConfig) : + trackGeo_(0), + caloGeo_(0) +{ //register your products + doFilter_ = iConfig.getParameter("doFilter"); produceHFhits_ = iConfig.getParameter("produceHFhits"); produceHFtowers_ = iConfig.getParameter("produceHFtowers"); + produceBasicClusters_ = iConfig.getParameter("produceBasicClusters"); produceEcalhits_ = iConfig.getParameter("produceEcalhits"); produceZDChits_ = iConfig.getParameter("produceZDChits"); produceETmidRap_ = iConfig.getParameter("produceETmidRapidity"); @@ -130,37 +142,32 @@ class CentralityProducer : public edm::EDProducer { trackPtCut_ = iConfig.getParameter("trackPtCut"); trackEtaCut_ = iConfig.getParameter("trackEtaCut"); - hfEtaCut_ = iConfig.getParameter("hfEtaCut"); - - if(produceHFhits_) srcHFhits_ = consumes(iConfig.getParameter("srcHFhits")); - if(produceHFtowers_ || produceETmidRap_) srcTowers_ = consumes(iConfig.getParameter("srcTowers")); + if(produceHFhits_) srcHFhits_ = iConfig.getParameter("srcHFhits"); + if(produceHFtowers_ || produceETmidRap_) srcTowers_ = iConfig.getParameter("srcTowers"); if(produceEcalhits_){ - srcEBhits_ = consumes(iConfig.getParameter("srcEBhits")); - srcEEhits_ = consumes(iConfig.getParameter("srcEEhits")); + srcEBhits_ = iConfig.getParameter("srcEBhits"); + srcEEhits_ = iConfig.getParameter("srcEEhits"); } - if(produceZDChits_){ - srcZDChits_ = consumes(iConfig.getParameter("srcZDChits")); - lowGainZDC_ = iConfig.getParameter("lowGainZDC"); + if(produceBasicClusters_){ + srcBasicClustersEE_ = iConfig.getParameter("srcBasicClustersEE"); + srcBasicClustersEB_ = iConfig.getParameter("srcBasicClustersEB"); } + if(produceZDChits_) srcZDChits_ = iConfig.getParameter("srcZDChits"); if(producePixelhits_){ - srcPixelhits_ = consumes(iConfig.getParameter("srcPixelhits")); + srcPixelhits_ = iConfig.getParameter("srcPixelhits"); doPixelCut_ = iConfig.getParameter("doPixelCut"); - srcVertex_ = consumes(iConfig.getParameter("srcVertex")); - } - if(produceTracks_) { - srcTracks_ = consumes(iConfig.getParameter("srcTracks")); - srcVertex_ = consumes(iConfig.getParameter("srcVertex")); } - if(producePixelTracks_) srcPixelTracks_ = consumes(iConfig.getParameter("srcPixelTracks")); + if(produceTracks_) srcTracks_ = iConfig.getParameter("srcTracks"); + if(producePixelTracks_) srcPixelTracks_ = iConfig.getParameter("srcPixelTracks"); - reuseAny_ = iConfig.getParameter("reUseCentrality"); - if(reuseAny_) reuseTag_ = consumes(iConfig.getParameter("srcReUse")); + reuseAny_ = !produceHFhits_ || !produceHFtowers_ || !produceBasicClusters_ || !produceEcalhits_ || !produceZDChits_; + if(reuseAny_) reuseTag_ = iConfig.getParameter("srcReUse"); useQuality_ = iConfig.getParameter("UseQuality"); trackQuality_ = TrackBase::qualityByName(iConfig.getParameter("TrackQuality")); - produces(); + produces(); } @@ -179,24 +186,35 @@ CentralityProducer::~CentralityProducer() // // ------------ method called to produce the data ------------ -void -CentralityProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) +bool +CentralityProducer::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) { + using namespace edm; + using namespace reco; - if(producePixelhits_) iSetup.get().get(tGeo); - if(produceEcalhits_) iSetup.get().get(cGeo); + if(!trackGeo_ && doPixelCut_){ + edm::ESHandle tGeo; + iSetup.get().get(tGeo); + trackGeo_ = tGeo.product(); + } + + if(!caloGeo_ && 0){ + edm::ESHandle cGeo; + iSetup.get().get(cGeo); + caloGeo_ = cGeo.product(); + } std::auto_ptr creco(new Centrality()); Handle inputCentrality; - if(reuseAny_) iEvent.getByToken(reuseTag_,inputCentrality); + if(reuseAny_) iEvent.getByLabel(reuseTag_,inputCentrality); if(produceHFhits_){ creco->etHFhitSumPlus_ = 0; creco->etHFhitSumMinus_ = 0; Handle hits; - iEvent.getByToken(srcHFhits_,hits); + iEvent.getByLabel(srcHFhits_,hits); for( size_t ihit = 0; ihitsize(); ++ ihit){ const HFRecHit & rechit = (*hits)[ ihit ]; if(rechit.id().ieta() > 0 ) @@ -205,10 +223,8 @@ CentralityProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) creco->etHFhitSumMinus_ += rechit.energy(); } }else{ - if(reuseAny_){ creco->etHFhitSumMinus_ = inputCentrality->EtHFhitSumMinus(); creco->etHFhitSumPlus_ = inputCentrality->EtHFhitSumPlus(); - } } if(produceHFtowers_ || produceETmidRap_){ @@ -218,7 +234,7 @@ CentralityProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) Handle towers; - iEvent.getByToken(srcTowers_,towers); + iEvent.getByLabel(srcTowers_,towers); for( size_t i = 0; isize(); ++ i){ const CaloTower & tower = (*towers)[ i ]; @@ -227,73 +243,60 @@ CentralityProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) if(produceHFtowers_){ if(isHF && eta > 0){ creco->etHFtowerSumPlus_ += tower.pt(); - if(eta > hfEtaCut_) creco->etHFtruncatedPlus_ += tower.pt(); } if(isHF && eta < 0){ creco->etHFtowerSumMinus_ += tower.pt(); - if(eta < -hfEtaCut_) creco->etHFtruncatedMinus_ += tower.pt(); } }else{ - if(reuseAny_){ creco->etHFtowerSumMinus_ = inputCentrality->EtHFtowerSumMinus(); creco->etHFtowerSumPlus_ = inputCentrality->EtHFtowerSumPlus(); - creco->etHFtruncatedMinus_ = inputCentrality->EtHFtruncatedMinus(); - creco->etHFtruncatedPlus_ = inputCentrality->EtHFtruncatedPlus(); - } } if(produceETmidRap_){ if(fabs(eta) < midRapidityRange_) creco->etMidRapiditySum_ += tower.pt()/(midRapidityRange_*2.); - }else if(reuseAny_) creco->etMidRapiditySum_ = inputCentrality->EtMidRapiditySum(); + }else creco->etMidRapiditySum_ = inputCentrality->EtMidRapiditySum(); } }else{ - if(reuseAny_){ creco->etHFtowerSumMinus_ = inputCentrality->EtHFtowerSumMinus(); creco->etHFtowerSumPlus_ = inputCentrality->EtHFtowerSumPlus(); creco->etMidRapiditySum_ = inputCentrality->EtMidRapiditySum(); - } } - if(produceEcalhits_){ + if(produceBasicClusters_){ creco->etEESumPlus_ = 0; creco->etEESumMinus_ = 0; creco->etEBSum_ = 0; - - Handle ebHits; - Handle eeHits; - - iEvent.getByToken(srcEBhits_,ebHits); - iEvent.getByToken(srcEEhits_,eeHits); - - for(unsigned int i = 0; i < ebHits->size(); ++i){ - const EcalRecHit & hit= (*ebHits)[i]; - const GlobalPoint& pos=cGeo->getPosition(hit.id()); - double et = hit.energy()*sin(pos.theta()); - creco->etEBSum_ += et; + + Handle clusters; + iEvent.getByLabel(srcBasicClustersEE_, clusters); + for( size_t i = 0; isize(); ++ i){ + const BasicCluster & cluster = (*clusters)[ i ]; + double eta = cluster.eta(); + double tg = cluster.position().rho()/cluster.position().r(); + double et = cluster.energy()*tg; + if(eta > 0) + creco->etEESumPlus_ += et; + if(eta < 0) + creco->etEESumMinus_ += et; } - - for(unsigned int i = 0; i < eeHits->size(); ++i){ - const EcalRecHit & hit= (*eeHits)[i]; - const GlobalPoint& pos=cGeo->getPosition(hit.id()); - double et = hit.energy()*sin(pos.theta()); - if(pos.z() > 0){ - creco->etEESumPlus_ += et; - }else{ - creco->etEESumMinus_ += et; - } + + iEvent.getByLabel(srcBasicClustersEB_, clusters); + for( size_t i = 0; isize(); ++ i){ + const BasicCluster & cluster = (*clusters)[ i ]; + double tg = cluster.position().rho()/cluster.position().r(); + double et = cluster.energy()*tg; + creco->etEBSum_ += et; } }else{ - if(reuseAny_){ - creco->etEESumMinus_ = inputCentrality->EtEESumMinus(); - creco->etEESumPlus_ = inputCentrality->EtEESumPlus(); - creco->etEBSum_ = inputCentrality->EtEBSum(); - } + creco->etEESumMinus_ = inputCentrality->EtEESumMinus(); + creco->etEESumPlus_ = inputCentrality->EtEESumPlus(); + creco->etEBSum_ = inputCentrality->EtEBSum(); } if(producePixelhits_){ creco->pixelMultiplicity_ = 0; const SiPixelRecHitCollection* rechits; Handle rchts; - iEvent.getByToken(srcPixelhits_,rchts); + iEvent.getByLabel(srcPixelhits_,rchts); rechits = rchts.product(); int nPixel =0 ; for (SiPixelRecHitCollection::const_iterator it = rechits->begin(); it!=rechits->end();it++) @@ -307,7 +310,7 @@ CentralityProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) // add selection if needed, now all hits. if(doPixelCut_){ const SiPixelRecHit * recHit = &(*recHitIterator); - const PixelGeomDetUnit* pixelLayer = dynamic_cast (tGeo->idToDet(recHit->geographicalId())); + const PixelGeomDetUnit* pixelLayer = dynamic_cast (trackGeo_->idToDet(recHit->geographicalId())); GlobalPoint gpos = pixelLayer->toGlobal(recHit->localPosition()); math::XYZVector rechitPos(gpos.x(),gpos.y(),gpos.z()); double abeta = fabs(rechitPos.eta()); @@ -324,44 +327,12 @@ CentralityProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) } creco->pixelMultiplicity_ = nPixel; }else{ - if(reuseAny_){ creco->pixelMultiplicity_ = inputCentrality->multiplicityPixel(); - } } if(produceTracks_){ - - double vx=-999.; - double vy=-999.; - double vz=-999.; - double vxError=-999.; - double vyError=-999.; - double vzError=-999.; - math::XYZVector vtxPos(0,0,0); - - Handle recoVertices; - iEvent.getByToken(srcVertex_,recoVertices); - unsigned int daughter = 0; - int greatestvtx = 0; - - for (unsigned int i = 0 ; i< recoVertices->size(); ++i){ - daughter = (*recoVertices)[i].tracksSize(); - if( daughter > (*recoVertices)[greatestvtx].tracksSize()) greatestvtx = i; - } - - if(recoVertices->size()>0){ - vx = (*recoVertices)[greatestvtx].position().x(); - vy = (*recoVertices)[greatestvtx].position().y(); - vz = (*recoVertices)[greatestvtx].position().z(); - vxError = (*recoVertices)[greatestvtx].xError(); - vyError = (*recoVertices)[greatestvtx].yError(); - vzError = (*recoVertices)[greatestvtx].zError(); - } - - vtxPos = math::XYZVector(vx,vy,vz); - - Handle tracks; - iEvent.getByToken(srcTracks_,tracks); + edm::Handle tracks; + iEvent.getByLabel(srcTracks_,tracks); int nTracks = 0; double trackCounter = 0; @@ -371,24 +342,13 @@ CentralityProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) for(unsigned int i = 0 ; i < tracks->size(); ++i){ const Track& track = (*tracks)[i]; if(useQuality_ && !track.quality(trackQuality_)) continue; + nTracks++; if( track.pt() > trackPtCut_) trackCounter++; if(fabs(track.eta()) trackPtCut_) trackCounterEtaPt++; } - - math::XYZPoint v1(vx,vy, vz); - double dz= track.dz(v1); - double dzsigma = sqrt(track.dzError()*track.dzError()+vzError*vzError); - double dxy= track.dxy(v1); - double dxysigma = sqrt(track.dxyError()*track.dxyError()+vxError*vyError); - if( track.quality(trackQuality_) && - track.pt()>0.4 && fabs(track.eta())<2.4 && - track.ptError()/track.pt()<0.1 && fabs(dz/dzsigma)<3.0 && - fabs(dxy/dxysigma)<3.0){ - nTracks++; - } } creco->trackMultiplicity_ = nTracks; @@ -397,24 +357,20 @@ CentralityProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) creco->ntracksEtaPtCut_ = trackCounterEtaPt; }else{ - if(reuseAny_){ creco->trackMultiplicity_ = inputCentrality->Ntracks(); creco->ntracksPtCut_= inputCentrality->NtracksPtCut(); creco->ntracksEtaCut_= inputCentrality->NtracksEtaCut(); creco->ntracksEtaPtCut_= inputCentrality->NtracksEtaPtCut(); - } } if(producePixelTracks_){ - Handle pixeltracks; - iEvent.getByToken(srcPixelTracks_,pixeltracks); + edm::Handle pixeltracks; + iEvent.getByLabel(srcPixelTracks_,pixeltracks); int nPixelTracks = pixeltracks->size(); creco->nPixelTracks_ = nPixelTracks; } else{ - if(reuseAny_){ - creco->nPixelTracks_ = inputCentrality->NpixelTracks(); - } + creco->nPixelTracks_ = inputCentrality->NpixelTracks(); } if(produceZDChits_){ @@ -422,38 +378,26 @@ CentralityProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) creco->zdcSumMinus_ = 0; Handle hits; - bool zdcAvailable = iEvent.getByToken(srcZDChits_,hits); + bool zdcAvailable = iEvent.getByLabel(srcZDChits_,hits); if(zdcAvailable){ for( size_t ihit = 0; ihitsize(); ++ ihit){ const ZDCRecHit & rechit = (*hits)[ ihit ]; - if(rechit.id().zside() > 0 ) { - if(lowGainZDC_){ - creco->zdcSumPlus_ += rechit.lowGainEnergy(); - }else{ - creco->zdcSumPlus_ += rechit.energy(); - } - } - if(rechit.id().zside() < 0) { - if(lowGainZDC_){ - creco->zdcSumMinus_ += rechit.lowGainEnergy(); - }else{ - creco->zdcSumMinus_ += rechit.energy(); - } - } + if(rechit.id().zside() > 0 ) + creco->zdcSumPlus_ += rechit.energy(); + if(rechit.id().zside() < 0) + creco->zdcSumMinus_ += rechit.energy(); } }else{ creco->zdcSumPlus_ = -9; creco->zdcSumMinus_ = -9; } }else{ - if(reuseAny_){ creco->zdcSumMinus_ = inputCentrality->zdcSumMinus(); creco->zdcSumPlus_ = inputCentrality->zdcSumPlus(); - } } iEvent.put(creco); - + return true; } // ------------ method called once each job just before starting event loop ------------ @@ -464,12 +408,9 @@ CentralityProducer::beginJob() // ------------ method called once each job just after ending the event loop ------------ void -CentralityProducer::endJob() -{ +CentralityProducer::endJob() { +} } - //define this as a plug-in -DEFINE_FWK_MODULE(CentralityProducer); - -} +DEFINE_FWK_MODULE(reco::CentralityProducer); diff --git a/RecoHI/HiCentralityAlgos/plugins/CentralityTableProducer.cc b/RecoHI/HiCentralityAlgos/src/CentralityTableProducer.cc similarity index 90% rename from RecoHI/HiCentralityAlgos/plugins/CentralityTableProducer.cc rename to RecoHI/HiCentralityAlgos/src/CentralityTableProducer.cc index 99d5705e81067..378a7c4306e87 100644 --- a/RecoHI/HiCentralityAlgos/plugins/CentralityTableProducer.cc +++ b/RecoHI/HiCentralityAlgos/src/CentralityTableProducer.cc @@ -1,3 +1,21 @@ +// -*- C++ -*- +// +// Package: CentralityTableProducer +// Class: CentralityTableProducer +// +/**\class CentralityTableProducer CentralityTableProducer.cc yetkin/CentralityTableProducer/src/CentralityTableProducer.cc + + Description: + + Implementation: + +*/ +// +// Original Author: Yetkin Yilmaz +// Created: Wed May 2 21:41:30 EDT 2007 +// +// + // system include files #include @@ -21,14 +39,13 @@ #include "DataFormats/Candidate/interface/Candidate.h" #include "DataFormats/RecoCandidate/interface/RecoCaloTowerCandidate.h" #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h" - #include "DataFormats/Common/interface/Ref.h" #include "CondFormats/DataRecord/interface/HeavyIonRcd.h" #include "CondFormats/HIObjects/interface/CentralityTable.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" -#include "RecoHI/HiCentralityAlgos/interface/CentralityProvider.h" +#include "DataFormats/HeavyIonEvent/interface/CentralityProvider.h" #include @@ -40,7 +57,6 @@ using namespace std; class CentralityTableProducer : public edm::EDAnalyzer { public: explicit CentralityTableProducer(const edm::ParameterSet&); - explicit CentralityTableProducer(const edm::ParameterSet&, const edm::EventSetup&, edm::ConsumesCollector &&); ~CentralityTableProducer(); private: @@ -52,8 +68,8 @@ class CentralityTableProducer : public edm::EDAnalyzer { bool makeDBFromTFile_; bool makeTFileFromDB_; - bool firstRunOnly_; - bool debug_; + bool firstRunOnly_; + bool debug_; edm::ESHandle inputDB_; TFile* inputTFile_; @@ -63,7 +79,6 @@ class CentralityTableProducer : public edm::EDAnalyzer { string rootTag_; ofstream text_; - CentralityProvider *cent; CentralityTable* CT; const CentralityBins* CB; @@ -82,9 +97,7 @@ class CentralityTableProducer : public edm::EDAnalyzer { // // constructors and destructor // -CentralityTableProducer::CentralityTableProducer(const edm::ParameterSet& iConfig){} - -CentralityTableProducer::CentralityTableProducer(const edm::ParameterSet& iConfig, const edm::EventSetup& iSetup, edm::ConsumesCollector && iC): +CentralityTableProducer::CentralityTableProducer(const edm::ParameterSet& iConfig): text_("bins.txt"), runnum_(0) { @@ -99,7 +112,6 @@ CentralityTableProducer::CentralityTableProducer(const edm::ParameterSet& iConfi inputTFile_ = new TFile(inputTFileName_.data(),"read"); cout<newRun(iSetup); - if(debug_) cent->print(); + CentralityProvider cent(iSetup); + if(debug_) cent.print(); TFileDirectory subDir = fs->mkdir(Form("run%d",runnum_)); - CB = subDir.make((CentralityBins) *cent); + CB = subDir.make((CentralityBins)cent); } } diff --git a/RecoHI/HiCentralityAlgos/plugins/HiTrivialConditionRetriever.cc b/RecoHI/HiCentralityAlgos/src/HiTrivialConditionRetriever.cc similarity index 90% rename from RecoHI/HiCentralityAlgos/plugins/HiTrivialConditionRetriever.cc rename to RecoHI/HiCentralityAlgos/src/HiTrivialConditionRetriever.cc index 1316ff4c8d063..a4541f128264f 100644 --- a/RecoHI/HiCentralityAlgos/plugins/HiTrivialConditionRetriever.cc +++ b/RecoHI/HiCentralityAlgos/src/HiTrivialConditionRetriever.cc @@ -1,3 +1,15 @@ +// -*- C++ -*- +// +// Package: HiTrivialConditionRetriever +// Class: HiTrivialConditionRetriever +// +/**\class HiTrivialConditionRetriever HiTrivialConditionRetriever.cc yetkin/HiTrivialConditionRetriever/src/HiTrivialConditionRetriever.cc + + Description: + + Implementation: + +*/ // // Original Author: Yetkin Yilmaz // Created: Wed May 2 21:41:30 EDT 2007 @@ -38,7 +50,7 @@ class HiTrivialConditionRetriever : public edm::ESProducer, //overriding from ContextRecordIntervalFinder virtual void setIntervalFor( const edm::eventsetup::EventSetupRecordKey&, const edm::IOVSyncValue& , - edm::ValidityInterval& ) ; + edm::ValidityInterval& ) override ; private: virtual std::auto_ptr produceTable( const HeavyIonRcd& ); diff --git a/RecoHI/HiCentralityAlgos/test/AnalyzerWithCentrality.cc b/RecoHI/HiCentralityAlgos/test/AnalyzerWithCentrality.cc new file mode 100644 index 0000000000000..8a014e61de334 --- /dev/null +++ b/RecoHI/HiCentralityAlgos/test/AnalyzerWithCentrality.cc @@ -0,0 +1,187 @@ +// -*- C++ -*- +// +// Package: AnalyzerWithCentrality +// Class: AnalyzerWithCentrality +// +/**\class AnalyzerWithCentrality AnalyzerWithCentrality.cc RecoHI/AnalyzerWithCentrality/src/AnalyzerWithCentrality.cc + + Description: [one line class summary] + + Implementation: + [Notes on implementation] +*/ +// +// Original Author: Yetkin Yilmaz +// Created: Mon Mar 1 17:18:04 EST 2010 +// +// + + +// system include files +#include +#include + +// user include files +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/EDAnalyzer.h" + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/MakerMacros.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "DataFormats/HeavyIonEvent/interface/CentralityProvider.h" +#include "CommonTools/UtilAlgos/interface/TFileService.h" +#include "FWCore/ServiceRegistry/interface/Service.h" + +#include "TNtuple.h" +#include "TH1D.h" +using namespace std; + +// +// class declaration +// + +class AnalyzerWithCentrality : public edm::EDAnalyzer { + public: + explicit AnalyzerWithCentrality(const edm::ParameterSet&); + ~AnalyzerWithCentrality(); + + + private: + virtual void beginJob() ; + virtual void analyze(const edm::Event&, const edm::EventSetup&); + virtual void endJob() ; + + // ----------member data --------------------------- + + CentralityProvider * centrality_; + edm::Service fs; + TH1D* h1; + TNtuple* nt; +}; + +// +// constants, enums and typedefs +// + +// +// static data member definitions +// + +// +// constructors and destructor +// +AnalyzerWithCentrality::AnalyzerWithCentrality(const edm::ParameterSet& iConfig) : +centrality_(0) +{ + //now do what ever initialization is needed + h1 = fs->make("h1","histogram",100,0,100); + nt = fs->make("hi","hi","hf:hft:hftp:hftm:eb:ee:eep:eem:npix:et:zdc:zdcp:zdcm:bin:trig"); +} + +AnalyzerWithCentrality::~AnalyzerWithCentrality() +{ + + // do anything here that needs to be done at desctruction time + // (e.g. close files, deallocate resources etc.) + +} + + +// +// member functions +// + +// ------------ method called to for each event ------------ +void +AnalyzerWithCentrality::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) +{ + using namespace edm; + if(!centrality_) centrality_ = new CentralityProvider(iSetup); + centrality_->newEvent(iEvent,iSetup); + + double hf = centrality_->raw()->EtHFhitSum(); + double hft = centrality_->raw()->EtHFtowerSum(); + double hftp = centrality_->raw()->EtHFtowerSumPlus(); + double hftm = centrality_->raw()->EtHFtowerSumMinus(); + double eb = centrality_->raw()->EtEBSum(); + double ee = centrality_->raw()->EtEESum(); + double eep = centrality_->raw()->EtEESumPlus(); + double eem = centrality_->raw()->EtEESumMinus(); + double zdc = centrality_->raw()->zdcSum(); + double zdcm = centrality_->raw()->zdcSumMinus(); + double zdcp = centrality_->raw()->zdcSumPlus(); + double npix = centrality_->raw()->multiplicityPixel(); + double et = centrality_->raw()->EtMidRapiditySum(); + + cout<<"Centrality variables in the event:"<print(); + + cout<<"Centrality of the event : "<centralityValue()<getBin(); + cout<<"a"<Fill(hf,hft,hftp,hftm,eb,ee,eep,eem,npix,et,zdc,zdcp,zdcm,bin,1); + cout<<"b"<Fill(bin); + cout<<"c"<getNbins(); + cout<<"d"<NpartMean(); + double npartSigma = centrality_->NpartSigma(); + cout<<"Npart Mean : "<NpartMeanOfBin(bin); + npartSigma = centrality_->NpartSigmaOfBin(bin); + + double ncollMean = centrality_->NcollMean(); + double ncollSigma = centrality_->NcollSigma(); + cout<<"Ncoll Mean : "<NcollMeanOfBin(bin); + ncollSigma = centrality_->NcollSigmaOfBin(bin); + + + double nhardMean = centrality_->NhardMean(); + double nhardSigma = centrality_->NhardSigma(); + cout<<"Nhard Mean : "<bMean(); + double bSigma = centrality_->bSigma(); + cout<<"b Mean : "<bMeanOfBin(bin); + bSigma = centrality_->bSigmaOfBin(bin); + + +} + + +// ------------ method called once each job just before starting event loop ------------ +void +AnalyzerWithCentrality::beginJob() +{ +} + +// ------------ method called once each job just after ending the event loop ------------ +void +AnalyzerWithCentrality::endJob() { +} + +//define this as a plug-in +DEFINE_FWK_MODULE(AnalyzerWithCentrality); diff --git a/RecoHI/HiCentralityAlgos/test/printCentralityTable.py b/RecoHI/HiCentralityAlgos/test/printCentralityTable.py deleted file mode 100644 index c1ac759870869..0000000000000 --- a/RecoHI/HiCentralityAlgos/test/printCentralityTable.py +++ /dev/null @@ -1,32 +0,0 @@ - -import FWCore.ParameterSet.Config as cms - -process = cms.Process("TESTC") - -process.HeavyIonGlobalParameters = cms.PSet( - centralitySrc = cms.InputTag("hiCentrality"), - centralityVariable = cms.string("HFhits"), - nonDefaultGlauberModel = cms.string("") - ) - -process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') -process.GlobalTag.globaltag = 'GR_R_39X_V1::All' - -from CmsHi.Analysis2010.CommonFunctions_cff import * -overrideCentrality(process) - -process.source = cms.Source("EmptyIOVSource", - timetype = cms.string("runnumber"), - firstValue = cms.uint64(151076), - lastValue = cms.uint64(151076), - interval = cms.uint64(1) - ) - -process.analyze = cms.EDAnalyzer("AnalyzerWithCentrality") - -process.TFileService = cms.Service('TFileService', - fileName = cms.string("histogramsAndTable.root") - ) - -process.p = cms.Path(process.analyze) - diff --git a/RecoHI/HiCentralityAlgos/tools/makeCentralityTable.C b/RecoHI/HiCentralityAlgos/tools/makeCentralityTable.C new file mode 100644 index 0000000000000..b7ea8bf6ef7da --- /dev/null +++ b/RecoHI/HiCentralityAlgos/tools/makeCentralityTable.C @@ -0,0 +1,301 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(__CINT__) && !defined(__MAKECINT__) + + +#include "DataFormats/Common/interface/Handle.h" +#include "DataFormats/FWLite/interface/Event.h" +#include "DataFormats/HeavyIonEvent/interface/CentralityBins.h" +#include "FWCore/Utilities/interface/InputTag.h" +#include "DataFormats/FWLite/interface/ChainEvent.h" + +#include "DataFormats/CaloTowers/interface/CaloTower.h" +#include "DataFormats/HeavyIonEvent/interface/Centrality.h" +#include "SimDataFormats/HiGenData/interface/GenHIEvent.h" + +#endif + +void fitSlices(TH2*, TF1*); + +static bool onlySaveTable = false; +static const int nbinsMax = 40; + +using namespace std; +bool descend(float i,float j) { return (i infiles; + // TFile* infile = new TFile("/net/hisrv0001/home/yetkin/pstore02/ana/Hydjet_MinBias_d20100222/Hydjet_MinBias_4TeV_runs1to300.root"); + // fwlite::Event event(infile); + infiles.push_back("~/hibat0007/aod/JulyExercise/MinBias0707/MinBias0707_runs1to10.root"); + // infiles.push_back("~/hibat0007/aod/JulyExercise/MinBias0707/MinBias0707_runs11to20.root"); + infiles.push_back("~/hibat0007/aod/JulyExercise/MinBias0707/MinBias0707_runs21to30.root"); + infiles.push_back("~/hibat0007/aod/JulyExercise/MinBias0707/MinBias0707_runs31to40.root"); + infiles.push_back("~/hibat0007/aod/JulyExercise/MinBias0707/MinBias0707_runs41to50.root"); + infiles.push_back("~/hibat0007/aod/JulyExercise/MinBias0707/MinBias0707_runs51to60.root"); + // infiles.push_back("~/hibat0007/aod/JulyExercise/MinBias0707/MinBias0707_runs61to70.root"); + // infiles.push_back("~/hibat0007/aod/JulyExercise/MinBias0707/MinBias0707_runs71to80.root"); + // infiles.push_back("~/hibat0007/aod/JulyExercise/MinBias0707/MinBias0707_runs81to90.root") + // infiles.push_back("~/hibat0007/aod/JulyExercise/MinBias0707/MinBias0707_runs91to100.root"); + + fwlite::ChainEvent event(infiles); + + vector runnums; + + // Creating output table + TFile* outFile = new TFile("tables.root","update"); + TDirectory* dir = outFile->mkdir(tag); + dir->cd(); + + TH1D::SetDefaultSumw2(); + CentralityBins* bins = new CentralityBins("noname","Test tag", nbins); + bins->table_.reserve(nbins); + + // Setting up variables & branches + double binboundaries[nbinsMax+1]; + vector values; + + // Determining bins of cross section + // loop over events + unsigned int events=0; + for(event.toBegin(); !event.atEnd(); ++event, ++events){ + edm::EventBase const & ev = event; + if( events % 100 == 0 ) cout<<"Processing event : "< mc; + ev.getByLabel(edm::InputTag("heavyIon"),mc); + edm::Handle cent; + ev.getByLabel(edm::InputTag("hiCentrality"),cent); + + double b = mc->b(); + double npart = mc->Npart(); + double ncoll = mc->Ncoll(); + double nhard = mc->Nhard(); + + double hf = cent->EtHFhitSum(); + double hftp = cent->EtHFtowerSumPlus(); + double hftm = cent->EtHFtowerSumMinus(); + double eb = cent->EtEBSum(); + double eep = cent->EtEESumPlus(); + double eem = cent->EtEESumMinus(); + + double parameter = 0; + if(label.compare("npart") == 0) parameter = npart; + if(label.compare("ncoll") == 0) parameter = ncoll; + if(label.compare("nhard") == 0) parameter = nhard; + if(label.compare("b") == 0) parameter = b; + if(label.compare("hf") == 0) parameter = hf; + if(label.compare("hft") == 0) parameter = hftp + hftm; + if(label.compare("eb") == 0) parameter = eb; + if(label.compare("ee") == 0) parameter = eep+eem; + + values.push_back(parameter); + + int run = event.id().run(); + if(runnums.size() == 0 || runnums[runnums.size()-1] != run) runnums.push_back(run); + } + + if(label.compare("b") == 0) sort(values.begin(),values.end(),descend); + else sort(values.begin(),values.end()); + + double max = values[events-1]; + binboundaries[nbins] = max; + + cout<<"-------------------------------------"< mc; + ev.getByLabel(edm::InputTag("heavyIon"),mc); + edm::Handle cent; + ev.getByLabel(edm::InputTag("hiCentrality"),cent); + + double b = mc->b(); + double npart = mc->Npart(); + double ncoll = mc->Ncoll(); + double nhard = mc->Nhard(); + + double hf = cent->EtHFhitSum(); + double hftp = cent->EtHFtowerSumPlus(); + double hftm = cent->EtHFtowerSumMinus(); + double eb = cent->EtEBSum(); + double eep = cent->EtEESumPlus(); + double eem = cent->EtEESumMinus(); + + double parameter = 0; + + if(label.compare("npart") == 0) parameter = npart; + if(label.compare("ncoll") == 0) parameter = ncoll; + if(label.compare("nhard") == 0) parameter = nhard; + if(label.compare("b") == 0) parameter = b; + if(label.compare("hf") == 0) parameter = hf; + if(label.compare("hft") == 0) parameter = hftp + hftm; + if(label.compare("eb") == 0) parameter = eb; + if(label.compare("ee") == 0) parameter = eep+eem; + + hNpart->Fill(parameter,npart); + hNcoll->Fill(parameter,ncoll); + hNhard->Fill(parameter,nhard); + hb->Fill(parameter,b); + } + + // Fitting Glauber distributions in bins to get mean and sigma values + + + TF1* fGaus = new TF1("fb","gaus(0)",0,2); + fGaus->SetParameter(0,1); + fGaus->SetParameter(1,0.04); + fGaus->SetParameter(2,0.02); + + fitSlices(hNpart,fGaus); + fitSlices(hNcoll,fGaus); + fitSlices(hNhard,fGaus); + fitSlices(hb,fGaus); + + /* + hNpart->FitSlicesY(); + hNcoll->FitSlicesY(); + hNhard->FitSlicesY(); + hb->FitSlicesY(); + */ + + TH1D* hNpartMean = (TH1D*)gDirectory->Get("hNpart_1"); + TH1D* hNpartSigma = (TH1D*)gDirectory->Get("hNpart_2"); + TH1D* hNcollMean = (TH1D*)gDirectory->Get("hNcoll_1"); + TH1D* hNcollSigma = (TH1D*)gDirectory->Get("hNcoll_2"); + TH1D* hNhardMean = (TH1D*)gDirectory->Get("hNhard_1"); + TH1D* hNhardSigma = (TH1D*)gDirectory->Get("hNhard_2"); + TH1D* hbMean = (TH1D*)gDirectory->Get("hb_1"); + TH1D* hbSigma = (TH1D*)gDirectory->Get("hb_2"); + + cout<<"-------------------------------------"<table_[nbins-i-1].n_part_mean = hNpartMean->GetBinContent(i); + bins->table_[nbins-i-1].n_part_var = hNpartSigma->GetBinContent(i); + bins->table_[nbins-i-1].n_coll_mean = hNcollMean->GetBinContent(i); + bins->table_[nbins-i-1].n_coll_var = hNcollSigma->GetBinContent(i); + bins->table_[nbins-i-1].b_mean = hbMean->GetBinContent(i); + bins->table_[nbins-i-1].b_var = hbSigma->GetBinContent(i); + bins->table_[nbins-i-1].n_hard_mean = hNhardMean->GetBinContent(i); + bins->table_[nbins-i-1].n_hard_var = hNhardSigma->GetBinContent(i); + bins->table_[nbins-i-1].bin_edge = binboundaries[i]; + + cout<GetBinContent(i)<<" " + <GetBinContent(i)<<" " + <GetBinContent(i)<<" " + <GetBinContent(i)<<" " + <GetBinContent(i)<<" " + <GetBinContent(i)<<" " + <Get("hNpart_0"); + hh->Delete(); + hh = (TH1D*)gDirectory->Get("hNcoll_0"); + hh->Delete(); + hh = (TH1D*)gDirectory->Get("hNhard_0"); + hh->Delete(); + hh = (TH1D*)gDirectory->Get("hb_0"); + hh->Delete(); + + hNpart->Delete(); + hNpartMean->Delete(); + hNpartSigma->Delete(); + hNcoll->Delete(); + hNcollMean->Delete(); + hNcollSigma->Delete(); + hNhard->Delete(); + hNhardMean->Delete(); + hNhardSigma->Delete(); + hb->Delete(); + hbMean->Delete(); + hbSigma->Delete(); + } + + for(int i = 0; i < runnums.size(); ++i){ + CentralityBins* binsForRun = (CentralityBins*) bins->Clone(); + binsForRun->SetName(Form("run%d",runnums[i])); + binsForRun->Write(); + } + + bins->Delete(); + outFile->Write(); + +} + +void fitSlices(TH2* hCorr, TF1* func){ + + int nBins = hCorr->GetNbinsX(); + + TH1D* hMean = new TH1D(Form("%s_1",hCorr->GetName()),"",nBins,hCorr->GetXaxis()->GetXmin(),hCorr->GetXaxis()->GetXmax()); + TH1D* hSigma = new TH1D(Form("%s_2",hCorr->GetName()),"",nBins,hCorr->GetXaxis()->GetXmin(),hCorr->GetXaxis()->GetXmax()); + + for(int i = 1; i < nBins; ++i){ + TH1D* h = hCorr->ProjectionY(Form("%s_bin%d",hCorr->GetName(),i),i-1,i); + h->Fit(func); + hMean->SetBinContent(i,func->GetParameter(1)); + hMean->SetBinError(i,func->GetParError(1)); + hSigma->SetBinContent(i,func->GetParameter(2)); + hSigma->SetBinError(i,func->GetParError(2)); + if(onlySaveTable){ + h->Delete(); + } + } +} + + + + + diff --git a/RecoHI/HiCentralityAlgos/tools/makeDBFromTFile.py b/RecoHI/HiCentralityAlgos/tools/makeDBFromTFile.py new file mode 100644 index 0000000000000..a6c5d8c3c32e9 --- /dev/null +++ b/RecoHI/HiCentralityAlgos/tools/makeDBFromTFile.py @@ -0,0 +1,61 @@ +import FWCore.ParameterSet.VarParsing as VarParsing + +ivars = VarParsing.VarParsing('standard') + +ivars.register ('outputTag', + mult=ivars.multiplicity.singleton, + mytype=ivars.varType.string, + info="for testing") +ivars.outputTag="demo" + +ivars.register ('inputFile', + mult=ivars.multiplicity.singleton, + mytype=ivars.varType.string, + info="for testing") + +ivars.register ('outputFile', + mult=ivars.multiplicity.singleton, + mytype=ivars.varType.string, + info="for testing") + +ivars.inputFile="./input.root" +ivars.outputFile="./output.db" + +ivars.parseArguments() + +import FWCore.ParameterSet.Config as cms + +process = cms.Process('DUMMY') + +process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(-1)) +process.source = cms.Source("EmptyIOVSource", + timetype = cms.string("runnumber"), + firstValue = cms.uint64(1), + lastValue = cms.uint64(200), + interval = cms.uint64(1) + ) + +process.load("CondCore.DBCommon.CondDBCommon_cfi") +process.CondDBCommon.connect = "sqlite_file:" + ivars.outputFile + +process.PoolDBOutputService = cms.Service("PoolDBOutputService", + process.CondDBCommon, + timetype = cms.untracked.string("runnumber"), + toPut = cms.VPSet(cms.PSet(record = cms.string('HeavyIonRcd'), + tag = cms.string(ivars.outputTag) + ) + ) + ) + +process.makeCentralityTableDB = cms.EDAnalyzer('CentralityTableProducer', + makeDBFromTFile = cms.untracked.bool(True), + inputTFile = cms.string(ivars.inputFile), + rootTag = cms.string(ivars.outputTag) + ) + +process.step = cms.Path(process.makeCentralityTableDB) + + + + + diff --git a/RecoHI/HiCentralityAlgos/tools/makeDataCentralityTable.C b/RecoHI/HiCentralityAlgos/tools/makeDataCentralityTable.C new file mode 100644 index 0000000000000..5853b87fa31f9 --- /dev/null +++ b/RecoHI/HiCentralityAlgos/tools/makeDataCentralityTable.C @@ -0,0 +1,223 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(__CINT__) && !defined(__MAKECINT__) + + +#include "DataFormats/Common/interface/Handle.h" +#include "DataFormats/FWLite/interface/Event.h" +#include "DataFormats/FWLite/interface/ChainEvent.h" + +#include "DataFormats/HeavyIonEvent/interface/CentralityBins.h" +#include "FWCore/Utilities/interface/InputTag.h" + +#include "DataFormats/Common/interface/TriggerResults.h" + +#include "DataFormats/CaloTowers/interface/CaloTower.h" +#include "DataFormats/HeavyIonEvent/interface/Centrality.h" +#include "SimDataFormats/HiGenData/interface/GenHIEvent.h" + +#endif + +void fitSlices(TH2*, TF1*); + +static bool useEfficiencyHistogram = false; +static bool onlySaveTable = false; +static const int nbinsMax = 40; +static bool doTrigger = false; +static int trigNum = 1; // 6 for Hydjet 2.8 TeV sample + +using namespace std; +bool descend(float i,float j) { return (i>j); } + +void makeDataCentralityTable(int nbins = 40, const string label = "hf", const char * datatag = "HFhitBins",const char * mctag = "HFhitBinsMC", double EFF = 1){ + + // This macro assumes all inefficiency is in the most peripheral bin. + double MXS = 1. - EFF; + int nFiles = 1; + vector infiles; + // TFile* infile = new TFile("../data/Centrality0705_merged_runs1to10.root"); + + // fwlite::Event event(infile); + infiles.push_back("~/hibat0007/aod/JulyExercise/MinBias0707/MinBias0707_runs1to10.root"); + // infiles.push_back("~/hibat0007/aod/JulyExercise/MinBias0707/MinBias0707_runs11to20.root"); + infiles.push_back("~/hibat0007/aod/JulyExercise/MinBias0707/MinBias0707_runs21to30.root"); + infiles.push_back("~/hibat0007/aod/JulyExercise/MinBias0707/MinBias0707_runs31to40.root"); + infiles.push_back("~/hibat0007/aod/JulyExercise/MinBias0707/MinBias0707_runs41to50.root"); + infiles.push_back("~/hibat0007/aod/JulyExercise/MinBias0707/MinBias0707_runs51to60.root"); + // infiles.push_back("~/hibat0007/aod/JulyExercise/MinBias0707/MinBias0707_runs61to70.root"); + // infiles.push_back("~/hibat0007/aod/JulyExercise/MinBias0707/MinBias0707_runs71to80.root"); + // infiles.push_back("~/hibat0007/aod/JulyExercise/MinBias0707/MinBias0707_runs81to90.root") + // infiles.push_back("~/hibat0007/aod/JulyExercise/MinBias0707/MinBias0707_runs91to100.root"); + + fwlite::ChainEvent event(infiles); + vector runnums; + + // Retrieving data + // Creating output table + TFile * centFile = new TFile("../data/CentralityTables.root","update"); + TH1* hEff; + if(useEfficiencyHistogram) hEff = (TH1*)centFile->Get(Form("%s/hEff",mctag)); + TDirectory* dir = centFile->mkdir(datatag); + dir->cd(); + + TH1D::SetDefaultSumw2(); + int runMC = 1; + + CentralityBins::RunMap HFhitBinMap = getCentralityFromFile(centFile,mctag,0,20); + nbins = HFhitBinMap[runMC]->getNbins(); + + CentralityBins* bins = new CentralityBins("noname","Test tag", nbins); + bins->table_.reserve(nbins); + + // Setting up variables & branches + double binboundaries[nbinsMax+1]; + vector values; + + // Determining bins of cross section + // loop over events + unsigned int events=0; + double xsec = 0; + + for(event.toBegin(); !event.atEnd(); ++event, ++events){ + edm::EventBase const & ev = event; + if( events % 100 == 0 ) cout<<"Processing event : "< cent; + ev.getByLabel(edm::InputTag("hiCentrality"),cent); + edm::Handle trig; + if(doTrigger){ + ev.getByLabel(edm::InputTag("TriggerResults","","HLT"),trig); + bool t = trig->at(trigNum).accept(); + if(!t) continue; + } + + double hf = cent->EtHFhitSum(); + double hftp = cent->EtHFtowerSumPlus(); + double hftm = cent->EtHFtowerSumMinus(); + double eb = cent->EtEBSum(); + double eep = cent->EtEESumPlus(); + double eem = cent->EtEESumMinus(); + double parameter = 0; + if(label.compare("hf") == 0) parameter = hf; + if(label.compare("hft") == 0) parameter = hftp + hftm; + if(label.compare("eb") == 0) parameter = eb; + if(label.compare("ee") == 0) parameter = eep+eem; + values.push_back(parameter); + + // Calculate corrected cross section + if(useEfficiencyHistogram){ + xsec += 1. / hEff->GetBinContent(hEff->FindBin(parameter)); + }else{ + xsec += 1.; + } + + int run = event.id().run(); + if(runnums.size() == 0 || runnums[runnums.size()-1] != run) runnums.push_back(run); + } + + if(label.compare("b") == 0) sort(values.begin(),values.end()); + else sort(values.begin(),values.end(),descend); + + double max = values[events-1]; + binboundaries[nbins] = max; + + cout<<"-------------------------------------"<GetBinContent(hEff->FindBin(val)); + }else{ + integral += 1; + } + if(integral > (int)((currentbin+1)*(xsec/nbins))){ + binboundaries[currentbin] = val; + cout<<" "<table_[i].n_part_mean = HFhitBinMap[runMC]->NpartMeanOfBin(i); + bins->table_[i].n_part_var = HFhitBinMap[runMC]->NpartSigmaOfBin(i); + bins->table_[i].n_coll_mean = HFhitBinMap[runMC]->NcollMeanOfBin(i); + bins->table_[i].n_coll_var = HFhitBinMap[runMC]->NcollSigmaOfBin(i); + bins->table_[i].b_mean = HFhitBinMap[runMC]->bMeanOfBin(i); + bins->table_[i].b_var = HFhitBinMap[runMC]->bSigmaOfBin(i); + bins->table_[i].n_hard_mean = HFhitBinMap[runMC]->NhardMeanOfBin(i); + bins->table_[i].n_hard_var = HFhitBinMap[runMC]->NhardSigmaOfBin(i); + bins->table_[i].bin_edge = binboundaries[i]; + + cout<NpartMeanOfBin(i)<<" " + <NpartSigmaOfBin(i)<<" " + <NcollMeanOfBin(i)<<" " + <NcollSigmaOfBin(i)<<" " + <bMeanOfBin(i)<<" " + <bSigmaOfBin(i)<<" " + <cd(); + dir->cd(); + for(int i = 0; i < runnums.size(); ++i){ + CentralityBins* binsForRun = (CentralityBins*) bins->Clone(); + binsForRun->SetName(Form("run%d",runnums[i])); + binsForRun->Write(); + } + + bins->Delete(); + centFile->Write(); + +} + +void fitSlices(TH2* hCorr, TF1* func){ + + int nBins = hCorr->GetNbinsX(); + + TH1D* hMean = new TH1D(Form("%s_1",hCorr->GetName()),"",nBins,hCorr->GetXaxis()->GetXmin(),hCorr->GetXaxis()->GetXmax()); + TH1D* hSigma = new TH1D(Form("%s_2",hCorr->GetName()),"",nBins,hCorr->GetXaxis()->GetXmin(),hCorr->GetXaxis()->GetXmax()); + + for(int i = 1; i < nBins; ++i){ + TH1D* h = hCorr->ProjectionY(Form("%s_bin%d",hCorr->GetName(),i),i-1,i); + h->Fit(func); + hMean->SetBinContent(i,func->GetParameter(1)); + hMean->SetBinError(i,func->GetParError(1)); + hSigma->SetBinContent(i,func->GetParameter(2)); + hSigma->SetBinError(i,func->GetParError(2)); + if(onlySaveTable){ + h->Delete(); + } + } +} + + + + + diff --git a/RecoHI/HiCentralityAlgos/tools/makeMCCentralityTable.C b/RecoHI/HiCentralityAlgos/tools/makeMCCentralityTable.C new file mode 100644 index 0000000000000..156418c9620d3 --- /dev/null +++ b/RecoHI/HiCentralityAlgos/tools/makeMCCentralityTable.C @@ -0,0 +1,308 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(__CINT__) && !defined(__MAKECINT__) + + +#include "DataFormats/Common/interface/Handle.h" +#include "DataFormats/FWLite/interface/Event.h" +#include "DataFormats/FWLite/interface/ChainEvent.h" +#include "DataFormats/HeavyIonEvent/interface/CentralityBins.h" +#include "FWCore/Utilities/interface/InputTag.h" + +#include "DataFormats/CaloTowers/interface/CaloTower.h" +#include "DataFormats/HeavyIonEvent/interface/Centrality.h" +#include "SimDataFormats/HiGenData/interface/GenHIEvent.h" + +#endif + +void fitSlices(TH2*, TF1*); + +static bool ZS = false; +static bool useFits = false; +static bool onlySaveTable = false; +static const int nbinsMax = 40; + +using namespace std; +bool descend(float i,float j) { return (i infiles; + + if(ZS){ + infiles.push_back("/net/hisrv0001/home/yetkin/hidsk0001/aod/JulyExercise/AMPT_ZS_01/AMPT_MB_ZS_0711_runs1to50.root"); + infiles.push_back("/net/hisrv0001/home/yetkin/hidsk0001/aod/JulyExercise/AMPT_ZS_01/AMPT_MB_ZS_0711_runs51to100.root"); + infiles.push_back("/net/hisrv0001/home/yetkin/hidsk0001/aod/JulyExercise/AMPT_ZS_01/AMPT_MB_ZS_0711_runs101to150.root"); + }else{ + // infiles.push_back("/net/hisrv0001/home/yetkin/hidsk0001/aod/JulyExercise/AMPT_NZS_02/AMPT_MB_ZS_0711_runs1to20.root"); + infiles.push_back("/net/hisrv0001/home/yetkin/hidsk0001/aod/JulyExercise/AMPT_NZS_02/AMPT_MB_ZS_0711_runs21to40.root"); + // infiles.push_back("/net/hisrv0001/home/yetkin/hidsk0001/aod/JulyExercise/AMPT_NZS_02/AMPT_MB_ZS_0711_runs41to60.root"); + infiles.push_back("/net/hisrv0001/home/yetkin/hidsk0001/aod/JulyExercise/AMPT_NZS_02/AMPT_MB_ZS_0711_runs61to80.root"); + // infiles.push_back("/net/hisrv0001/home/yetkin/hidsk0001/aod/JulyExercise/AMPT_NZS_02/AMPT_MB_ZS_0711_runs81to100.root"); + infiles.push_back("/net/hisrv0001/home/yetkin/hidsk0001/aod/JulyExercise/AMPT_NZS_02/AMPT_MB_ZS_0711_runs101to120.root"); + // infiles.push_back("/net/hisrv0001/home/yetkin/hidsk0001/aod/JulyExercise/AMPT_NZS_02/AMPT_MB_ZS_0711_runs121to140.root"); + infiles.push_back("/net/hisrv0001/home/yetkin/hidsk0001/aod/JulyExercise/AMPT_NZS_02/AMPT_MB_ZS_0711_runs141to160.root"); + } + + fwlite::ChainEvent event(infiles); + + // TFile* infile = new TFile("/net/hisrv0001/home/yetkin/pstore02/ana/Hydjet_MinBias_2760GeV_d20100305/Hydjet_MinBias_2760GeV_runs1to1000.root"); + // TFile* infile = new TFile("/net/hisrv0001/home/yetkin/pstore02/ana/Hydjet_MinBias_4TeV_d20100305/Hydjet_MinBias_4TeV_runs1to500.root"); + // fwlite::Event event(infile); + vector runnums; + + // Creating output table + TFile* outFile = new TFile("tables10binsHalfEvents.root","update"); + TDirectory* dir = outFile->mkdir(tag); + dir->cd(); + TNtuple* nt = new TNtuple("nt","","hf:bin:b:npart:ncoll:nhard"); + + TH1D::SetDefaultSumw2(); + CentralityBins* bins = new CentralityBins("noname","Test tag", nbins); + bins->table_.reserve(nbins); + + // Setting up variables & branches + double binboundaries[nbinsMax+1]; + vector values; + + // Determining bins of cross section + // loop over events + unsigned int events=0; + for(event.toBegin(); !event.atEnd() && (maxEvents < 0 || events< maxEvents); ++event, ++events){ + edm::EventBase const & ev = event; + if( events % 100 == 0 ) cout<<"Processing event : "< mc; + ev.getByLabel(edm::InputTag("heavyIon"),mc); + edm::Handle cent; + ev.getByLabel(edm::InputTag("hiCentrality"),cent); + + double b = mc->b(); + double npart = mc->Npart(); + double ncoll = mc->Ncoll(); + double nhard = mc->Nhard(); + + double hf = cent->EtHFhitSum(); + double hftp = cent->EtHFtowerSumPlus(); + double hftm = cent->EtHFtowerSumMinus(); + double eb = cent->EtEBSum(); + double eep = cent->EtEESumPlus(); + double eem = cent->EtEESumMinus(); + double etmr = cent->EtMidRapiditySum(); + double npix = cent->multiplicityPixel(); + + double parameter = 0; + if(label.compare("npart") == 0) parameter = npart; + if(label.compare("ncoll") == 0) parameter = ncoll; + if(label.compare("nhard") == 0) parameter = nhard; + if(label.compare("b") == 0) parameter = b; + if(label.compare("hf") == 0) parameter = hf; + if(label.compare("hft") == 0) parameter = hftp + hftm; + if(label.compare("eb") == 0) parameter = eb; + if(label.compare("ee") == 0) parameter = eep+eem; + if(label.compare("etmr") == 0) parameter = etmr; + if(label.compare("npix") == 0) parameter = npix; + + values.push_back(parameter); + + int run = event.id().run(); + if(runnums.size() == 0 || runnums[runnums.size()-1] != run) runnums.push_back(run); + } + + if(label.compare("b") == 0) sort(values.begin(),values.end(),descend); + else sort(values.begin(),values.end()); + + double max = values[events-1]; + binboundaries[nbins] = max; + + cout<<"-------------------------------------"<cd(); + TH2D* hNpart = new TH2D("hNpart","",nbins,binboundaries,500,0,500); + TH2D* hNcoll = new TH2D("hNcoll","",nbins,binboundaries,2000,0,2000); + TH2D* hNhard = new TH2D("hNhard","",nbins,binboundaries,250,0,250); + TH2D* hb = new TH2D("hb","",nbins,binboundaries,300,0,30); + + for(event.toBegin(); !event.atEnd(); ++event){ + edm::EventBase const & ev = event; + edm::Handle mc; + ev.getByLabel(edm::InputTag("heavyIon"),mc); + edm::Handle cent; + ev.getByLabel(edm::InputTag("hiCentrality"),cent); + + double b = mc->b(); + double npart = mc->Npart(); + double ncoll = mc->Ncoll(); + double nhard = mc->Nhard(); + + double hf = cent->EtHFhitSum(); + double hftp = cent->EtHFtowerSumPlus(); + double hftm = cent->EtHFtowerSumMinus(); + double eb = cent->EtEBSum(); + double eep = cent->EtEESumPlus(); + double eem = cent->EtEESumMinus(); + double etmr = cent->EtMidRapiditySum(); + double npix = cent->multiplicityPixel(); + + double parameter = 0; + + if(label.compare("npart") == 0) parameter = npart; + if(label.compare("ncoll") == 0) parameter = ncoll; + if(label.compare("nhard") == 0) parameter = nhard; + if(label.compare("b") == 0) parameter = b; + if(label.compare("hf") == 0) parameter = hf; + if(label.compare("hft") == 0) parameter = hftp + hftm; + if(label.compare("eb") == 0) parameter = eb; + if(label.compare("ee") == 0) parameter = eep+eem; + if(label.compare("etmr") == 0) parameter = etmr; + if(label.compare("npix") == 0) parameter = npix; + + hNpart->Fill(parameter,npart); + hNcoll->Fill(parameter,ncoll); + hNhard->Fill(parameter,nhard); + hb->Fill(parameter,b); + int bin = hNpart->GetXaxis()->FindBin(parameter) - 1; + if(bin < 0) bin = 0; + if(bin >= nbins) bin = nbins - 1; + nt->Fill(hf,bin,b,npart,ncoll,nhard); + } + + // Fitting Glauber distributions in bins to get mean and sigma values + + dir->cd(); + TF1* fGaus = new TF1("fb","gaus(0)",0,2); + fGaus->SetParameter(0,1); + fGaus->SetParameter(1,0.04); + fGaus->SetParameter(2,0.02); + + fitSlices(hNpart,fGaus); + fitSlices(hNcoll,fGaus); + fitSlices(hNhard,fGaus); + fitSlices(hb,fGaus); + + TH1D* hNpartMean = (TH1D*)gDirectory->Get("hNpart_1"); + TH1D* hNpartSigma = (TH1D*)gDirectory->Get("hNpart_2"); + TH1D* hNcollMean = (TH1D*)gDirectory->Get("hNcoll_1"); + TH1D* hNcollSigma = (TH1D*)gDirectory->Get("hNcoll_2"); + TH1D* hNhardMean = (TH1D*)gDirectory->Get("hNhard_1"); + TH1D* hNhardSigma = (TH1D*)gDirectory->Get("hNhard_2"); + TH1D* hbMean = (TH1D*)gDirectory->Get("hb_1"); + TH1D* hbSigma = (TH1D*)gDirectory->Get("hb_2"); + + cout<<"-------------------------------------"<table_[i].n_part_mean = hNpartMean->GetBinContent(ii); + bins->table_[i].n_part_var = hNpartSigma->GetBinContent(ii); + bins->table_[i].n_coll_mean = hNcollMean->GetBinContent(ii); + bins->table_[i].n_coll_var = hNcollSigma->GetBinContent(ii); + bins->table_[i].b_mean = hbMean->GetBinContent(ii); + bins->table_[i].b_var = hbSigma->GetBinContent(ii); + bins->table_[i].n_hard_mean = hNhardMean->GetBinContent(ii); + bins->table_[i].n_hard_var = hNhardSigma->GetBinContent(ii); + bins->table_[i].bin_edge = binboundaries[ii]; + + cout<GetBinContent(ii)<<" " + <GetBinContent(ii)<<" " + <GetBinContent(ii)<<" " + <GetBinContent(ii)<<" " + <GetBinContent(ii)<<" " + <GetBinContent(ii)<<" " + <Delete(); + hNpartMean->Delete(); + hNpartSigma->Delete(); + hNcoll->Delete(); + hNcollMean->Delete(); + hNcollSigma->Delete(); + hNhard->Delete(); + hNhardMean->Delete(); + hNhardSigma->Delete(); + hb->Delete(); + hbMean->Delete(); + hbSigma->Delete(); + } + + // for(int i = 0; i < runnums.size(); ++i){ + CentralityBins* binsForRun = (CentralityBins*) bins->Clone(); + binsForRun->SetName(Form("run%d",1)); + // binsForRun->SetName(Form("run%d",runnums[i])); + binsForRun->Write(); + // } + nt->Write(); + bins->Delete(); + outFile->Write(); + +} + +void fitSlices(TH2* hCorr, TF1* func){ + + int nBins = hCorr->GetNbinsX(); + + TH1D* hMean = new TH1D(Form("%s_1",hCorr->GetName()),"",nBins,hCorr->GetXaxis()->GetXmin(),hCorr->GetXaxis()->GetXmax()); + TH1D* hSigma = new TH1D(Form("%s_2",hCorr->GetName()),"",nBins,hCorr->GetXaxis()->GetXmin(),hCorr->GetXaxis()->GetXmax()); + + for(int i = 0; i < nBins; ++i){ + TH1D* h = hCorr->ProjectionY(Form("%s_bin%d",hCorr->GetName(),i),i,i+1); + + func->SetParameter(0,h->GetMaximum()); + func->SetParameter(1,h->GetMean()); + func->SetParameter(2,h->GetRMS()); + + if(useFits) h->Fit(func); + + hMean->SetBinContent(i,func->GetParameter(1)); + hMean->SetBinError(i,func->GetParError(1)); + hSigma->SetBinContent(i,func->GetParameter(2)); + hSigma->SetBinError(i,func->GetParError(2)); + + if(onlySaveTable){ + h->Delete(); + } + } +} + + + + + diff --git a/RecoHI/HiCentralityAlgos/tools/makeMCtableFromPAT.C b/RecoHI/HiCentralityAlgos/tools/makeMCtableFromPAT.C new file mode 100644 index 0000000000000..548efcb72bc80 --- /dev/null +++ b/RecoHI/HiCentralityAlgos/tools/makeMCtableFromPAT.C @@ -0,0 +1,308 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(__CINT__) && !defined(__MAKECINT__) + +#include "DataFormats/Common/interface/Handle.h" +#include "DataFormats/FWLite/interface/Event.h" +#include "DataFormats/FWLite/interface/ChainEvent.h" +#include "DataFormats/HeavyIonEvent/interface/CentralityBins.h" +#include "FWCore/Utilities/interface/InputTag.h" + +#include "DataFormats/CaloTowers/interface/CaloTower.h" +#include "DataFormats/HeavyIonEvent/interface/Centrality.h" +#include "SimDataFormats/HiGenData/interface/GenHIEvent.h" + +#endif + +void fitSlices(TH2*, TF1*); + +static bool ZS = false; +static bool useFits = false; +static bool onlySaveTable = false; +static const int nbinsMax = 40; + +using namespace std; +bool descend(float i,float j) { return (i infiles; + + infiles.push_back("dcache:/pnfs/cmsaf.mit.edu/t2bat/cms/store/himc/Fall10/AMPT_Default_MinBias_2760GeV/GEN-SIM-RECO/MC_38Y_V12-v1/0002/F8E134B2-77D6-DF11-BFE1-001B243DE10F.root"); + + fwlite::ChainEvent event(infiles); + // TFile* infile = new TFile("/net/hisrv0001/home/yetkin/pstore02/ana/Hydjet_MinBias_2760GeV_d20100305/Hydjet_MinBias_2760GeV_runs1to1000.root"); + // TFile* infile = new TFile("/net/hisrv0001/home/yetkin/pstore02/ana/Hydjet_MinBias_4TeV_d20100305/Hydjet_MinBias_4TeV_runs1to500.root"); + // fwlite::Event event(infile); + vector runnums; + + // Creating output table + TFile* outFile = new TFile("tables10binsHalfEvents.root","update"); + TDirectory* dir = outFile->mkdir(tag); + dir->cd(); + TNtuple* nt = new TNtuple("nt","","hf:bin:b:npart:ncoll:nhard"); + + TH1D::SetDefaultSumw2(); + CentralityBins* bins = new CentralityBins("noname","Test tag", nbins); + bins->table_.reserve(nbins); + + // Setting up variables & branches + double binboundaries[nbinsMax+1]; + vector values; + + bool binNpart = label.compare("Npart") == 0; + bool binNcoll = label.compare("Ncoll") == 0; + bool binNhard = label.compare("Nhard") == 0; + bool binB = label.compare("b") == 0; + bool binHF = label.compare("HFtowers") == 0; + bool binHFhit = label.compare("HFhits") == 0; + bool binEB = label.compare("EB") == 0; + bool binEE = label.compare("EE") == 0; + bool binETMR = label.compare("ETMR") == 0; + bool binNpix = label.compare("PixelHits") == 0; + bool binNtrks = label.compare("Ntracks") == 0; + + // Determining bins of cross section + // loop over events + unsigned int events=0; + for(event.toBegin(); !event.atEnd() && (maxEvents < 0 || events< maxEvents); ++event, ++events){ + edm::EventBase const & ev = event; + if( events % 100 == 0 ) cout<<"Processing event : "< mc; + ev.getByLabel(edm::InputTag("heavyIon"),mc); + edm::Handle cent; + ev.getByLabel(edm::InputTag("hiCentrality"),cent); + + double b = mc->b(); + double npart = mc->Npart(); + double ncoll = mc->Ncoll(); + double nhard = mc->Nhard(); + + double hf = cent->EtHFtowerSum(); + double hfhit = cent->EtHFhitSum(); + double eb = cent->EtEBSum(); + double eep = cent->EtEESumPlus(); + double eem = cent->EtEESumMinus(); + double ee = cent->EtEESum(); + double etmr = cent->EtMidRapiditySum(); + double npix = cent->multiplicityPixel(); + double ntrks = cent->Ntracks(); + + double parameter = 0; + if(binNpart) parameter = npart; + if(binNcoll) parameter = ncoll; + if(binNhard) parameter = nhard; + if(binB) parameter = b; + if(binHF) parameter = hf; + if(binHFhit) parameter = hfhit; + if(binEB) parameter = eb; + if(binEE) parameter = ee; + if(binETMR) parameter = etmr; + if(binNpix) parameter = npix; + if(binNtrks) parameter = ntrks; + + values.push_back(parameter); + + int run = event.id().run(); + if(runnums.size() == 0 || runnums[runnums.size()-1] != run) runnums.push_back(run); + } + + if(label.compare("b") == 0) sort(values.begin(),values.end(),descend); + else sort(values.begin(),values.end()); + + double max = values[events-1]; + binboundaries[nbins] = max; + + cout<<"-------------------------------------"<cd(); + TH2D* hNpart = new TH2D("hNpart","",nbins,binboundaries,500,0,500); + TH2D* hNcoll = new TH2D("hNcoll","",nbins,binboundaries,2000,0,2000); + TH2D* hNhard = new TH2D("hNhard","",nbins,binboundaries,250,0,250); + TH2D* hb = new TH2D("hb","",nbins,binboundaries,300,0,30); + + for(event.toBegin(); !event.atEnd(); ++event){ + edm::EventBase const & ev = event; + edm::Handle mc; + ev.getByLabel(edm::InputTag("heavyIon"),mc); + edm::Handle cent; + ev.getByLabel(edm::InputTag("hiCentrality"),cent); + + double b = mc->b(); + double npart = mc->Npart(); + double ncoll = mc->Ncoll(); + double nhard = mc->Nhard(); + + double hf = cent->EtHFtowerSum(); + double hfhit = cent->EtHFhitSum(); + double eb = cent->EtEBSum(); + double eep = cent->EtEESumPlus(); + double eem = cent->EtEESumMinus(); + double ee = cent->EtEESum(); + double etmr = cent->EtMidRapiditySum(); + double npix = cent->multiplicityPixel(); + double ntrks = cent->Ntracks(); + + double parameter = 0; + if(binNpart) parameter = npart; + if(binNcoll) parameter = ncoll; + if(binNhard) parameter = nhard; + if(binB) parameter = b; + if(binHF) parameter = hf; + if(binHFhit) parameter = hfhit; + if(binEB) parameter = eb; + if(binEE) parameter = ee; + if(binETMR) parameter = etmr; + if(binNpix) parameter = npix; + if(binNtrks) parameter = ntrks; + + hNpart->Fill(parameter,npart); + hNcoll->Fill(parameter,ncoll); + hNhard->Fill(parameter,nhard); + hb->Fill(parameter,b); + int bin = hNpart->GetXaxis()->FindBin(parameter) - 1; + if(bin < 0) bin = 0; + if(bin >= nbins) bin = nbins - 1; + nt->Fill(hf,bin,b,npart,ncoll,nhard); + } + + // Fitting Glauber distributions in bins to get mean and sigma values + + dir->cd(); + TF1* fGaus = new TF1("fb","gaus(0)",0,2); + fGaus->SetParameter(0,1); + fGaus->SetParameter(1,0.04); + fGaus->SetParameter(2,0.02); + + fitSlices(hNpart,fGaus); + fitSlices(hNcoll,fGaus); + fitSlices(hNhard,fGaus); + fitSlices(hb,fGaus); + + TH1D* hNpartMean = (TH1D*)gDirectory->Get("hNpart_1"); + TH1D* hNpartSigma = (TH1D*)gDirectory->Get("hNpart_2"); + TH1D* hNcollMean = (TH1D*)gDirectory->Get("hNcoll_1"); + TH1D* hNcollSigma = (TH1D*)gDirectory->Get("hNcoll_2"); + TH1D* hNhardMean = (TH1D*)gDirectory->Get("hNhard_1"); + TH1D* hNhardSigma = (TH1D*)gDirectory->Get("hNhard_2"); + TH1D* hbMean = (TH1D*)gDirectory->Get("hb_1"); + TH1D* hbSigma = (TH1D*)gDirectory->Get("hb_2"); + + cout<<"-------------------------------------"<table_[i].n_part_mean = hNpartMean->GetBinContent(ii); + bins->table_[i].n_part_var = hNpartSigma->GetBinContent(ii); + bins->table_[i].n_coll_mean = hNcollMean->GetBinContent(ii); + bins->table_[i].n_coll_var = hNcollSigma->GetBinContent(ii); + bins->table_[i].b_mean = hbMean->GetBinContent(ii); + bins->table_[i].b_var = hbSigma->GetBinContent(ii); + bins->table_[i].n_hard_mean = hNhardMean->GetBinContent(ii); + bins->table_[i].n_hard_var = hNhardSigma->GetBinContent(ii); + bins->table_[i].bin_edge = binboundaries[ii]; + + cout<GetBinContent(ii)<<" " + <GetBinContent(ii)<<" " + <GetBinContent(ii)<<" " + <GetBinContent(ii)<<" " + <GetBinContent(ii)<<" " + <GetBinContent(ii)<<" " + <Delete(); + hNpartMean->Delete(); + hNpartSigma->Delete(); + hNcoll->Delete(); + hNcollMean->Delete(); + hNcollSigma->Delete(); + hNhard->Delete(); + hNhardMean->Delete(); + hNhardSigma->Delete(); + hb->Delete(); + hbMean->Delete(); + hbSigma->Delete(); + } + + // for(int i = 0; i < runnums.size(); ++i){ + CentralityBins* binsForRun = (CentralityBins*) bins->Clone(); + binsForRun->SetName(Form("run%d",1)); + // binsForRun->SetName(Form("run%d",runnums[i])); + binsForRun->Write(); + // } + nt->Write(); + bins->Delete(); + outFile->Write(); + +} + +void fitSlices(TH2* hCorr, TF1* func){ + + int nBins = hCorr->GetNbinsX(); + + TH1D* hMean = new TH1D(Form("%s_1",hCorr->GetName()),"",nBins,hCorr->GetXaxis()->GetXmin(),hCorr->GetXaxis()->GetXmax()); + TH1D* hSigma = new TH1D(Form("%s_2",hCorr->GetName()),"",nBins,hCorr->GetXaxis()->GetXmin(),hCorr->GetXaxis()->GetXmax()); + + for(int i = 1; i < nBins+1; ++i){ + int bin = nBins - i; + TH1D* h = hCorr->ProjectionY(Form("%s_bin%d",hCorr->GetName(),bin),i,i); + + func->SetParameter(0,h->GetMaximum()); + func->SetParameter(1,h->GetMean()); + func->SetParameter(2,h->GetRMS()); + + if(useFits) h->Fit(func); + + hMean->SetBinContent(i,func->GetParameter(1)); + hMean->SetBinError(i,func->GetParError(1)); + hSigma->SetBinContent(i,func->GetParameter(2)); + hSigma->SetBinError(i,func->GetParError(2)); + + if(onlySaveTable){ + h->Delete(); + } + } +} + + + + diff --git a/RecoHI/HiCentralityAlgos/tools/makeTFileFromDB.py b/RecoHI/HiCentralityAlgos/tools/makeTFileFromDB.py new file mode 100644 index 0000000000000..5566a5ef4f5b1 --- /dev/null +++ b/RecoHI/HiCentralityAlgos/tools/makeTFileFromDB.py @@ -0,0 +1,47 @@ +import FWCore.ParameterSet.VarParsing as VarParsing + +ivars = VarParsing.VarParsing('standard') +ivars.files = 'dcache:/pnfs/cmsaf.mit.edu/t2bat/cms/store/user/yetkin/sim/CMSSW_3_3_5/Pythia_MinBias_D6T_900GeV_d20091208/Vertex1207/Pythia_MinBias_D6T_900GeV_d20091208_000005.root' + +ivars.output = 'bambu.root' +ivars.maxEvents = -1 + +ivars.parseArguments() + +import FWCore.ParameterSet.Config as cms + +process = cms.Process('DUMMY') + +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') +process.GlobalTag.globaltag = 'MC_38Y_V13::All' + +process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(13)) +process.source = cms.Source("EmptyIOVSource", + timetype = cms.string("runnumber"), + firstValue = cms.uint64(1), + lastValue = cms.uint64(3), + interval = cms.uint64(3) + ) + +process.TFileService = cms.Service('TFileService', + fileName = cms.string('centralityfile.root') + ) + +process.HeavyIonGlobalParameters = cms.PSet( + centralityVariable = cms.string("HFhits"), + nonDefaultGlauberModel = cms.string("AMPT_2760GeV"), + centralitySrc = cms.InputTag("hiCentrality") + ) + +process.makeCentralityTableTFile = cms.EDAnalyzer('CentralityTableProducer', + isMC = cms.untracked.bool(True), + makeDBFromTFile = cms.untracked.bool(False), + makeTFileFromDB = cms.untracked.bool(True) + ) + +process.step = cms.Path(process.makeCentralityTableTFile) + + + + + diff --git a/RecoHI/HiCentralityAlgos/tools/makeTFileFromText.C b/RecoHI/HiCentralityAlgos/tools/makeTFileFromText.C new file mode 100644 index 0000000000000..e21d3f1cfafd0 --- /dev/null +++ b/RecoHI/HiCentralityAlgos/tools/makeTFileFromText.C @@ -0,0 +1,45 @@ +#include "TFile.h" +#include "DataFormats/HeavyIonEvent/interface/CentralityBins.h" +#include +#include +#include + +using namespace std; + +void makeTFileFromText(char* fname = "bins20_4TeV_CMSSW_3_5_2.root", char* tag = "tag", int nbins = 20){ + + TFile * outf = new TFile(fname,"update"); + TDirectoryFile* dir = (TDirectoryFile*)outf->mkdir(tag); + CentralityBins* bins = new CentralityBins("HFhitBins","Test tag", nbins); + bins->table_.reserve(nbins); + + string file = "./bins20_4TeV_CMSSW_3_5_2.txt"; + ifstream in( file.c_str() ); + string line; + + int i = 0; + while ( getline( in, line ) ) { + if ( !line.size() || line[0]=='#' ) { continue; } + istringstream ss(line); + string binLabel; + ss>>binLabel + >>bins->table_[i].n_part_mean + >>bins->table_[i].n_part_var + >>bins->table_[i].n_coll_mean + >>bins->table_[i].n_coll_var + >>bins->table_[i].b_mean + >>bins->table_[i].b_var + >>bins->table_[i].bin_edge; + bins->table_[i].n_hard_mean = 0; + bins->table_[i].n_hard_var = 0; + + i++; + } + + bins->Write(); + outf->Write(); + +} + + + diff --git a/RecoHI/HiCentralityAlgos/tools/makeTable.C b/RecoHI/HiCentralityAlgos/tools/makeTable.C new file mode 100644 index 0000000000000..b47e65ef72bdf --- /dev/null +++ b/RecoHI/HiCentralityAlgos/tools/makeTable.C @@ -0,0 +1,330 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(__CINT__) && !defined(__MAKECINT__) +#include "DataFormats/HeavyIonEvent/interface/CentralityBins.h" +#endif + +void fitSlices(TH2*, TF1*); + +static bool ZS = false; +static bool useFits = false; +static bool onlySaveTable = false; +static const int nbinsMax = 40; + +using namespace std; +bool descend(float i,float j) { return (i runnums; + + // const char* infileName = Form("/net/hisrv0001/home/yetkin/hidsk0001/analysis/prod/%s_RECO_391/test.root",dataset); + const char* infileName = Form("/net/hisrv0001/home/yetkin/hidsk0001/centrality/prod/%s/test.root",dataset); + + // TFile* infile = new TFile(infileName,"read"); + TChain* t = new TChain("HltTree"); + // TChain* t = new TChain("hltanalysis/HltTree"); + + t->Add(infileName); + + // Creating output table + TFile* outFile = new TFile("tables_d1108.root","update"); + TDirectory* dir = outFile->mkdir(tag); + dir->cd(); + TNtuple* nt = new TNtuple("nt","","hf:bin:b:npart:ncoll:nhard"); + CentralityBins* bins = new CentralityBins("noname","Test tag", nbins); + bins->table_.reserve(nbins); + + TH1D::SetDefaultSumw2(); + + int runMC = 1; + TFile * inputMCfile; + CentralityBins* inputMCtable; + + if(DATA){ + inputMCfile = new TFile("tables_d1103.root","read"); + inputMCtable = (CentralityBins*)inputMCfile->Get("CentralityTable_HFhits40_AMPT2760GeV_v1_mc_MC_38Y_V12/run1"); + } + + // Setting up variables & branches + double binboundaries[nbinsMax+1]; + vector values; + + float b,npart,ncoll,nhard,hf,hfhit,eb,ee,etmr,parameter; + int npix,ntrks; + // TTree* t = (TTree*)infile->Get("HltTree"); + int run; + + if(SIM){ + t->SetBranchAddress("b",&b); + t->SetBranchAddress("Npart",&npart); + t->SetBranchAddress("Ncoll",&ncoll); + t->SetBranchAddress("Nhard",&nhard); + } + + t->SetBranchAddress("hiHFhit",&hfhit); + t->SetBranchAddress("hiHF",&hf); + t->SetBranchAddress("hiEB",&eb); + t->SetBranchAddress("hiEE",&ee); + t->SetBranchAddress("hiET",&etmr); + t->SetBranchAddress("hiNpix",&npix); + t->SetBranchAddress("hiNtracks",&ntrks); + t->SetBranchAddress("Run",&run); + + bool binNpart = label.compare("Npart") == 0; + bool binNcoll = label.compare("Ncoll") == 0; + bool binNhard = label.compare("Nhard") == 0; + bool binB = label.compare("b") == 0; + bool binHF = label.compare("HFtowers") == 0; + bool binHFhit = label.compare("HFhits") == 0; + bool binEB = label.compare("EB") == 0; + bool binEE = label.compare("EE") == 0; + bool binETMR = label.compare("ETMR") == 0; + bool binNpix = label.compare("PixelHits") == 0; + bool binNtrks = label.compare("Ntracks") == 0; + + // Determining bins of cross section + // loop over events + unsigned int events=t->GetEntries(); + for(unsigned int iev = 0; iev < events && (maxEvents < 0 || iev< maxEvents); ++iev){ + if( iev % 100 == 0 ) cout<<"Processing event : "<GetEntry(iev); + + if(binNpart) parameter = npart; + if(binNcoll) parameter = ncoll; + if(binNhard) parameter = nhard; + if(binB) parameter = b; + if(binHF) parameter = hf; + if(binHFhit) parameter = hfhit; + if(binEB) parameter = eb; + if(binEE) parameter = ee; + if(binETMR) parameter = etmr; + if(binNpix) parameter = npix; + if(binNtrks) parameter = ntrks; + + values.push_back(parameter); + if(runnums.size() == 0 || runnums[runnums.size()-1] != run) runnums.push_back(run); + } + + if(label.compare("b") == 0) sort(values.begin(),values.end(),descend); + else sort(values.begin(),values.end()); + + double max = values[events-1]; + binboundaries[nbins] = max; + + cout<<"-------------------------------------"<cd(); + TH2D* hNpart = new TH2D("hNpart","",nbins,binboundaries,500,0,500); + TH2D* hNcoll = new TH2D("hNcoll","",nbins,binboundaries,2000,0,2000); + TH2D* hNhard = new TH2D("hNhard","",nbins,binboundaries,250,0,250); + TH2D* hb = new TH2D("hb","",nbins,binboundaries,300,0,30); + + for(unsigned int iev = 0; iev < events && (maxEvents < 0 || iev< maxEvents); ++iev){ + if( iev % 100 == 0 ) cout<<"Processing event : "<GetEntry(iev); + if(binNpart) parameter = npart; + if(binNcoll) parameter = ncoll; + if(binNhard) parameter = nhard; + if(binB) parameter = b; + if(binHF) parameter = hf; + if(binHFhit) parameter = hfhit; + if(binEB) parameter = eb; + if(binEE) parameter = ee; + if(binETMR) parameter = etmr; + if(binNpix) parameter = npix; + if(binNtrks) parameter = ntrks; + + hNpart->Fill(parameter,npart); + hNcoll->Fill(parameter,ncoll); + hNhard->Fill(parameter,nhard); + hb->Fill(parameter,b); + int bin = hNpart->GetXaxis()->FindBin(parameter) - 1; + if(bin < 0) bin = 0; + if(bin >= nbins) bin = nbins - 1; + nt->Fill(hf,bin,b,npart,ncoll,nhard); + } + + // Fitting Glauber distributions in bins to get mean and sigma values + + dir->cd(); + TF1* fGaus = new TF1("fb","gaus(0)",0,2); + fGaus->SetParameter(0,1); + fGaus->SetParameter(1,0.04); + fGaus->SetParameter(2,0.02); + + fitSlices(hNpart,fGaus); + fitSlices(hNcoll,fGaus); + fitSlices(hNhard,fGaus); + fitSlices(hb,fGaus); + + TH1D* hNpartMean = (TH1D*)gDirectory->Get("hNpart_1"); + TH1D* hNpartSigma = (TH1D*)gDirectory->Get("hNpart_2"); + TH1D* hNcollMean = (TH1D*)gDirectory->Get("hNcoll_1"); + TH1D* hNcollSigma = (TH1D*)gDirectory->Get("hNcoll_2"); + TH1D* hNhardMean = (TH1D*)gDirectory->Get("hNhard_1"); + TH1D* hNhardSigma = (TH1D*)gDirectory->Get("hNhard_2"); + TH1D* hbMean = (TH1D*)gDirectory->Get("hb_1"); + TH1D* hbSigma = (TH1D*)gDirectory->Get("hb_2"); + + cout<<"-------------------------------------"<table_[i].n_part_mean = hNpartMean->GetBinContent(ii); + bins->table_[i].n_part_var = hNpartSigma->GetBinContent(ii); + bins->table_[i].n_coll_mean = hNcollMean->GetBinContent(ii); + bins->table_[i].n_coll_var = hNcollSigma->GetBinContent(ii); + bins->table_[i].b_mean = hbMean->GetBinContent(ii); + bins->table_[i].b_var = hbSigma->GetBinContent(ii); + bins->table_[i].n_hard_mean = hNhardMean->GetBinContent(ii); + bins->table_[i].n_hard_var = hNhardSigma->GetBinContent(ii); + bins->table_[i].bin_edge = binboundaries[ii-1]; + + cout<GetBinContent(ii)<<" " + <GetBinContent(ii)<<" " + <GetBinContent(ii)<<" " + <GetBinContent(ii)<<" " + <GetBinContent(ii)<<" " + <GetBinContent(ii)<<" " + <Delete(); + hNpartMean->Delete(); + hNpartSigma->Delete(); + hNcoll->Delete(); + hNcollMean->Delete(); + hNcollSigma->Delete(); + hNhard->Delete(); + hNhardMean->Delete(); + hNhardSigma->Delete(); + hb->Delete(); + hbMean->Delete(); + hbSigma->Delete(); + } + + }else{ + cout<<"-------------------------------------"<table_[i].n_part_mean = inputMCtable->NpartMeanOfBin(i); + bins->table_[i].n_part_var = inputMCtable->NpartSigmaOfBin(i); + bins->table_[i].n_coll_mean = inputMCtable->NcollMeanOfBin(i); + bins->table_[i].n_coll_var = inputMCtable->NcollSigmaOfBin(i); + bins->table_[i].b_mean = inputMCtable->bMeanOfBin(i); + bins->table_[i].b_var = inputMCtable->bSigmaOfBin(i); + bins->table_[i].n_hard_mean = inputMCtable->NhardMeanOfBin(i); + bins->table_[i].n_hard_var = inputMCtable->NhardSigmaOfBin(i); + bins->table_[i].bin_edge = binboundaries[ii-1]; + + cout<table_[i].n_part_mean<<" " + <table_[i].n_part_var<<" " + <table_[i].n_coll_mean<<" " + <table_[i].n_coll_var<<" " + <table_[i].b_mean<<" " + <table_[i].b_var<<" " + <table_[i].n_hard_mean<<" " + <table_[i].n_hard_var<<" " + <table_[i].bin_edge<<" "<cd(); + dir->cd(); + + bins->SetName(Form("run%d",1)); + bins->Write(); + nt->Write(); + bins->Delete(); + outFile->Write(); + +} + +void fitSlices(TH2* hCorr, TF1* func){ + + int nBins = hCorr->GetNbinsX(); + + TH1D* hMean = new TH1D(Form("%s_1",hCorr->GetName()),"",nBins,hCorr->GetXaxis()->GetXmin(),hCorr->GetXaxis()->GetXmax()); + TH1D* hSigma = new TH1D(Form("%s_2",hCorr->GetName()),"",nBins,hCorr->GetXaxis()->GetXmin(),hCorr->GetXaxis()->GetXmax()); + + for(int i = 1; i < nBins+1; ++i){ + int bin = nBins - i; + TH1D* h = hCorr->ProjectionY(Form("%s_bin%d",hCorr->GetName(),bin),i,i); + + func->SetParameter(0,h->GetMaximum()); + func->SetParameter(1,h->GetMean()); + func->SetParameter(2,h->GetRMS()); + + if(useFits) h->Fit(func); + + hMean->SetBinContent(i,func->GetParameter(1)); + hMean->SetBinError(i,func->GetParError(1)); + hSigma->SetBinContent(i,func->GetParameter(2)); + hSigma->SetBinError(i,func->GetParError(2)); + + if(onlySaveTable){ + h->Delete(); + } + } +} + + + + + diff --git a/RecoHI/HiCentralityAlgos/tools/publishTables.sh b/RecoHI/HiCentralityAlgos/tools/publishTables.sh new file mode 100755 index 0000000000000..ce9c2202049b6 --- /dev/null +++ b/RecoHI/HiCentralityAlgos/tools/publishTables.sh @@ -0,0 +1,57 @@ + +datadir=$CMSSW_BASE/src/RecoHI/HiCentralityAlgos/data + +input=../data/CentralityTables.root +output=$datadir/CentralityTables.db + +for tag in \ +HFhits40_MC_Hydjet4TeV_MC_3XY_V24_v0 \ +EEbcs40_MC_Hydjet4TeV_MC_3XY_V24_v0 \ +HFhits20_MC_Hydjet4TeV_MC_3XY_V24_v0 \ +EEbcs20_MC_Hydjet4TeV_MC_3XY_V24_v0 \ +HFhits10_MC_Hydjet4TeV_MC_3XY_V24_v0 \ +EEbcs10_MC_Hydjet4TeV_MC_3XY_V24_v0 \ +HFhits5_MC_Hydjet4TeV_MC_3XY_V24_v0 \ +EEbcs5_MC_Hydjet4TeV_MC_3XY_V24_v0 \ +HFhits40_MC_Hydjet2760GeV_MC_3XY_V24_v0 \ +EEbcs40_MC_Hydjet2760GeV_MC_3XY_V24_v0 \ +HFhits20_MC_Hydjet2760GeV_MC_3XY_V24_v0 \ +EEbcs20_MC_Hydjet2760GeV_MC_3XY_V24_v0 \ +HFhits10_MC_Hydjet2760GeV_MC_3XY_V24_v0 \ +EEbcs10_MC_Hydjet2760GeV_MC_3XY_V24_v0 \ +HFhits5_MC_Hydjet2760GeV_MC_3XY_V24_v0 \ +EEbcs5_MC_Hydjet2760GeV_MC_3XY_V24_v0 \ +HFhits40_MC_Hydjet2760GeV_MC_3XY_V24_NoZS_v0 \ +EEbcs40_MC_Hydjet2760GeV_MC_3XY_V24_NoZS_v0 \ +HFhits20_MC_Hydjet2760GeV_MC_3XY_V24_NoZS_v0 \ +EEbcs20_MC_Hydjet2760GeV_MC_3XY_V24_NoZS_v0 \ +HFhits10_MC_Hydjet2760GeV_MC_3XY_V24_NoZS_v0 \ +EEbcs10_MC_Hydjet2760GeV_MC_3XY_V24_NoZS_v0 \ +HFhits5_MC_Hydjet2760GeV_MC_3XY_V24_NoZS_v0 \ +EEbcs5_MC_Hydjet2760GeV_MC_3XY_V24_NoZS_v0 \ +HFhits40_MC_AMPT2760GeV_MC_3XY_V24_v0 \ +EEbcs40_MC_AMPT2760GeV_MC_3XY_V24_v0 \ +HFhits20_MC_AMPT2760GeV_MC_3XY_V24_v0 \ +EEbcs20_MC_AMPT2760GeV_MC_3XY_V24_v0 \ +HFhits10_MC_AMPT2760GeV_MC_3XY_V24_v0 \ +EEbcs10_MC_AMPT2760GeV_MC_3XY_V24_v0 \ +HFhits5_MC_AMPT2760GeV_MC_3XY_V24_v0 \ +EEbcs5_MC_AMPT2760GeV_MC_3XY_V24_v0 \ +HFhits40_MC_AMPT2760GeV_MC_3XY_V25_NoZS_v0 \ +EEbcs40_MC_AMPT2760GeV_MC_3XY_V25_NoZS_v0 \ +HFhits20_MC_AMPT2760GeV_MC_3XY_V25_NoZS_v0 \ +EEbcs20_MC_AMPT2760GeV_MC_3XY_V25_NoZS_v0 \ +HFhits10_MC_AMPT2760GeV_MC_3XY_V25_NoZS_v0 \ +EEbcs10_MC_AMPT2760GeV_MC_3XY_V25_NoZS_v0 \ +HFhits5_MC_AMPT2760GeV_MC_3XY_V25_NoZS_v0 \ +EEbcs5_MC_AMPT2760GeV_MC_3XY_V25_NoZS_v0 +do +cmsRun makeDBFromTFile.py outputTag=$tag inputFile=$input outputFile=$output +done + + + + + + + diff --git a/RecoHI/HiCentralityAlgos/tools/pushHistogramIntoFile.C b/RecoHI/HiCentralityAlgos/tools/pushHistogramIntoFile.C new file mode 100644 index 0000000000000..f308d5981ff42 --- /dev/null +++ b/RecoHI/HiCentralityAlgos/tools/pushHistogramIntoFile.C @@ -0,0 +1,14 @@ + +void pushHistogramIntoFile(const char* tag){ + + // const char* tag = "HFhits40_MC_Hydjet4TeV_MC_3XY_V24_v0"; + TFile* file1 = new TFile("efficiency.root","read"); + TFile* file2 = new TFile("../data/CentralityTables.root","update"); + file2->cd(tag); + + TH1D* h = (TH1D*)file1->Get("hEff"); + h->Write(); + file2->Write(); + +} + diff --git a/RecoHI/HiCentralityAlgos/tools/rootlogon.C b/RecoHI/HiCentralityAlgos/tools/rootlogon.C new file mode 100644 index 0000000000000..fee48a83e91f2 --- /dev/null +++ b/RecoHI/HiCentralityAlgos/tools/rootlogon.C @@ -0,0 +1,11 @@ +{ + gSystem->Load( "libFWCoreFWLite" ); + gSystem->Load("libDataFormatsFWLite"); + gSystem->Load("libDataFormatsCommon"); + gSystem->Load("libDataFormatsCaloTowers"); + gSystem->Load("libDataFormatsHeavyIonEvent"); + gSystem->Load("libSimDataFormatsHiGenData"); + gSystem->AddIncludePath("-I$CMSSW_BASE/src/"); + gSystem->AddIncludePath("-I$CMSSW_RELEASE_BASE/src/"); + AutoLibraryLoader::enable(); +} diff --git a/RecoHI/HiCentralityAlgos/tools/run.sh b/RecoHI/HiCentralityAlgos/tools/run.sh new file mode 100755 index 0000000000000..fd3047e1a63f4 --- /dev/null +++ b/RecoHI/HiCentralityAlgos/tools/run.sh @@ -0,0 +1,31 @@ + +datadir=$CMSSW_BASE/src/RecoHI/HiCentralityAlgos/data + +rm tables.root +rm $datadir/Cen*.* + +root -b -q makeCentralityTable.C+'(40,"hf", "HFhits40_MC_Hydjet4TeV_MC_3XY_V24_v0")' +root -b -q makeCentralityTable.C+'(40,"ee", "EEbcs40_MC_Hydjet4TeV_MC_3XY_V24_v0")' +root -b -q makeCentralityTable.C+'(20,"hf", "HFhits20_MC_Hydjet4TeV_MC_3XY_V24_v0")' +root -b -q makeCentralityTable.C+'(20,"ee", "EEbcs20_MC_Hydjet4TeV_MC_3XY_V24_v0")' +root -b -q makeCentralityTable.C+'(10,"hf", "HFhits10_MC_Hydjet4TeV_MC_3XY_V24_v0")' +root -b -q makeCentralityTable.C+'(10,"ee", "EEbcs10_MC_Hydjet4TeV_MC_3XY_V24_v0")' +root -b -q makeCentralityTable.C+'(5,"hf", "HFhits5_MC_Hydjet4TeV_MC_3XY_V24_v0")' +root -b -q makeCentralityTable.C+'(5,"ee", "EEbcs5_MC_Hydjet4TeV_MC_3XY_V24_v0")' + +mv tables.root $datadir/CentralityTables.root + +cmsRun makeDBFromTFile.py outputTag="HFhits40_MC_Hydjet4TeV_MC_3XY_V24_v0" inputFile=$datadir/CentralityTables.root outputFile=$datadir/CentralityTables.db +cmsRun makeDBFromTFile.py outputTag="EEbcs40_MC_Hydjet4TeV_MC_3XY_V24_v0" inputFile=$datadir/CentralityTables.root outputFile=$datadir/CentralityTables.db +cmsRun makeDBFromTFile.py outputTag="HFhits20_MC_Hydjet4TeV_MC_3XY_V24_v0" inputFile=$datadir/CentralityTables.root outputFile=$datadir/CentralityTables.db +cmsRun makeDBFromTFile.py outputTag="EEbcs20_MC_Hydjet4TeV_MC_3XY_V24_v0" inputFile=$datadir/CentralityTables.root outputFile=$datadir/CentralityTables.db +cmsRun makeDBFromTFile.py outputTag="HFhits10_MC_Hydjet4TeV_MC_3XY_V24_v0" inputFile=$datadir/CentralityTables.root outputFile=$datadir/CentralityTables.db +cmsRun makeDBFromTFile.py outputTag="EEbcs10_MC_Hydjet4TeV_MC_3XY_V24_v0" inputFile=$datadir/CentralityTables.root outputFile=$datadir/CentralityTables.db +cmsRun makeDBFromTFile.py outputTag="HFhits5_MC_Hydjet4TeV_MC_3XY_V24_v0" inputFile=$datadir/CentralityTables.root outputFile=$datadir/CentralityTables.db +cmsRun makeDBFromTFile.py outputTag="EEbcs5_MC_Hydjet4TeV_MC_3XY_V24_v0" inputFile=$datadir/CentralityTables.root outputFile=$datadir/CentralityTables.db + + + + + + diff --git a/RecoHI/HiCentralityAlgos/tools/runData.sh b/RecoHI/HiCentralityAlgos/tools/runData.sh new file mode 100755 index 0000000000000..fc6e7fec961ce --- /dev/null +++ b/RecoHI/HiCentralityAlgos/tools/runData.sh @@ -0,0 +1,20 @@ + +datadir=../data + +cp $CMSSW_BASE/src/CmsHi/JulyExercise/data/CentralityTables.root $datadir/ + +####eff=90.2 +for binning in 40 20 10 5 +do + root -b -q makeDataCentralityTable.C+\(${binning},\"hf\",\"HFhits${binning}_DataJulyExercise_Hydjet2760GeV_MC_37Y_V5_NZS_v0\",\"HFhits${binning}_MC_Hydjet2760GeV_MC_3XY_V24_v0\",1\) +done + + + + + + + + + + diff --git a/RecoHI/HiCentralityAlgos/tools/runMC.sh b/RecoHI/HiCentralityAlgos/tools/runMC.sh new file mode 100755 index 0000000000000..90b122e3a190c --- /dev/null +++ b/RecoHI/HiCentralityAlgos/tools/runMC.sh @@ -0,0 +1,34 @@ + +datadir=../data +rm $datadir/Cen*.* + +cp ~/cvs/UserCode/CmsHi/JulyExercise/data/CentralityTables.root ./tables.root + +root -b -q makeMCCentralityTable.C+'(40,"hf", "HFhits40_MC_AMPT2760GeV_MC_37Y_V5_v0")' +root -b -q makeMCCentralityTable.C+'(20,"hf", "HFhits20_MC_AMPT2760GeV_MC_37Y_V5_v0")' +root -b -q makeMCCentralityTable.C+'(10,"hf", "HFhits10_MC_AMPT2760GeV_MC_37Y_V5_v0")' +root -b -q makeMCCentralityTable.C+'(5,"hf", "HFhits5_MC_AMPT2760GeV_MC_37Y_V5_v0")' +root -b -q makeMCCentralityTable.C+'(1,"hf", "HFhits1_MC_AMPT2760GeV_MC_37Y_V5_v0")' + +#root -b -q makeMCCentralityTable.C+'(40,"etmr", "ETmidRap40_MC_AMPT2760GeV_MC_37Y_V5_v0")' +#root -b -q makeMCCentralityTable.C+'(20,"etmr", "ETmidRap20_MC_AMPT2760GeV_MC_37Y_V5_v0")' +#root -b -q makeMCCentralityTable.C+'(10,"etmr", "ETmidRap10_MC_AMPT2760GeV_MC_37Y_V5_v0")' +#root -b -q makeMCCentralityTable.C+'(5,"etmr", "ETmidRap5_MC_AMPT2760GeV_MC_37Y_V5_v0")' +#root -b -q makeMCCentralityTable.C+'(1,"etmr", "ETmidRap1_MC_AMPT2760GeV_MC_37Y_V5_v0")' + +root -b -q makeMCCentralityTable.C+'(40,"npix", "PixelNhits40_MC_AMPT2760GeV_MC_37Y_V5_v0")' +root -b -q makeMCCentralityTable.C+'(20,"npix", "PixelNhits20_MC_AMPT2760GeV_MC_37Y_V5_v0")' +root -b -q makeMCCentralityTable.C+'(10,"npix", "PixelNhits10_MC_AMPT2760GeV_MC_37Y_V5_v0")' +root -b -q makeMCCentralityTable.C+'(5,"npix", "PixelNhits5_MC_AMPT2760GeV_MC_37Y_V5_v0")' +root -b -q makeMCCentralityTable.C+'(1,"npix", "PixelNhits1_MC_AMPT2760GeV_MC_37Y_V5_v0")' + +mv tables.root $datadir/CentralityTables.root + +#root -b -q pushHistogramIntoFile.C'("HFhits40_MC_Hydjet4TeV_MC_3XY_V24_v0")' + + + + + + + diff --git a/RecoHI/HiCentralityAlgos/tools/runTestDB.py b/RecoHI/HiCentralityAlgos/tools/runTestDB.py new file mode 100644 index 0000000000000..6466fa5d48dc9 --- /dev/null +++ b/RecoHI/HiCentralityAlgos/tools/runTestDB.py @@ -0,0 +1,83 @@ +import FWCore.ParameterSet.VarParsing as VarParsing + +ivars = VarParsing.VarParsing('standard') + +ivars.register ('outputTag', + mult=ivars.multiplicity.singleton, + mytype=ivars.varType.string, + info="for testing") +ivars.outputTag="HFhits40_MC_Hydjet2760GeV_MC_3XY_V24_v0" + +ivars.register ('inputFile', + mult=ivars.multiplicity.singleton, + mytype=ivars.varType.string, + info="for testing") + +ivars.register ('outputFile', + mult=ivars.multiplicity.singleton, + mytype=ivars.varType.string, + info="for testing") + +ivars.inputFile="../data/CentralityTables.root" +ivars.outputFile="Test.db" + +ivars.parseArguments() + +hiRecord = 'HeavyIonRcd' + +import FWCore.ParameterSet.Config as cms + +process = cms.Process('DUMMY') + +process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(-1)) + +process.MessageLogger = cms.Service("MessageLogger", + cout = cms.untracked.PSet( + threshold = cms.untracked.string('INFO') + ), + destinations = cms.untracked.vstring('cout') + ) + +process.source = cms.Source("EmptyIOVSource", + timetype = cms.string("runnumber"), + firstValue = cms.uint64(1), + lastValue = cms.uint64(1), + interval = cms.uint64(1) + ) + + +process.makeCentralityTableDB = cms.EDAnalyzer('CentralityPopConProducer', + Source = cms.PSet(makeDBFromTFile = cms.untracked.bool(True), + inputFile = cms.string(ivars.inputFile), + rootTag = cms.string(ivars.outputTag) + ), + record = cms.string(hiRecord), + name= cms.untracked.string(ivars.outputTag), + loggingOn = cms.untracked.bool(True) + ) + +process.load("CondCore.DBCommon.CondDBCommon_cfi") +process.CondDBCommon.connect = "oracle://cms_orcoff_prep/CMS_COND_PHYSICSTOOLS" +process.CondDBCommon.DBParameters.messageLevel = cms.untracked.int32(3) +process.CondDBCommon.DBParameters.authenticationPath = "authPath" + +process.PoolDBOutputService = cms.Service("PoolDBOutputService", + process.CondDBCommon, + logconnect = cms.untracked.string("sqlite_file:" + "LogsTest.db"), + timetype = cms.untracked.string("runnumber"), + toPut = cms.VPSet(cms.PSet(record = cms.string(hiRecord), + tag = cms.string(ivars.outputTag) + ) + ) + ) + + + + +process.step = cms.Path(process.makeCentralityTableDB) + + + + + + diff --git a/RecoHI/HiEgammaAlgos/interface/CxCalculator.h b/RecoHI/HiEgammaAlgos/interface/CxCalculator.h new file mode 100755 index 0000000000000..4e0293effac5a --- /dev/null +++ b/RecoHI/HiEgammaAlgos/interface/CxCalculator.h @@ -0,0 +1,45 @@ +#ifndef CxCalculator_h +#define CxCalculator_h + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/Framework/interface/ESHandle.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Utilities/interface/InputTag.h" + +#include "DataFormats/EgammaReco/interface/BasicClusterFwd.h" +#include "DataFormats/EgammaReco/interface/SuperClusterFwd.h" + +#include "Geometry/CaloGeometry/interface/CaloGeometry.h" +#include "Geometry/Records/interface/IdealGeometryRecord.h" + + +class CxCalculator +{ + public: + + CxCalculator(const edm::Event &iEvent, const edm::EventSetup &iSetup,const edm::InputTag& barrelLabel,const edm::InputTag& endcapLabel) ; + + double getJurassicArea( double r1, double r2, double width) ; + double getBCMax(const reco::SuperClusterRef clus,int i); + double getCx(const reco::SuperClusterRef clus, double i,double threshold); + double getCxRemoveSC(const reco::SuperClusterRef clus, double i,double threshold); + double getCCx(const reco::SuperClusterRef clus, double i,double threshold); // background subtracted Cx + double getJc (const reco::SuperClusterRef cluster, double r1=0.4, double r2=0.06, double jWidth=0.04, double threshold=0); + double getJcc(const reco::SuperClusterRef cluster, double r1=0.4, double r2=0.06, double jWidth=0.04, double threshold=0); + double getCCxRemoveSC(const reco::SuperClusterRef clus, double i,double threshold); // background subtracted Cx + double getCorrection(const reco::SuperClusterRef clus, double i,double j,double threshold); // background subtracted Cx + double getAvgBCEt(const reco::SuperClusterRef clus, double eta,double phi1, double phi2,double threshold); // background subtracted Cx + double getNBC(const reco::SuperClusterRef clus, double eta,double phi1, double phi2,double threshold); // background subtracted Cx + bool checkUsed(const reco::SuperClusterRef clus, const reco::BasicCluster* clu); + + private: + + const reco::BasicClusterCollection *fEBclusters_; + const reco::BasicClusterCollection *fEEclusters_; + const CaloGeometry *geometry_; + +}; + +#endif diff --git a/RecoHI/HiEgammaAlgos/interface/HICaloUtil.h b/RecoHI/HiEgammaAlgos/interface/HICaloUtil.h new file mode 100644 index 0000000000000..76d861bea079a --- /dev/null +++ b/RecoHI/HiEgammaAlgos/interface/HICaloUtil.h @@ -0,0 +1,33 @@ +#ifndef HICaloUtil_h +#define HICaloUtil_h + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/Framework/interface/ESHandle.h" + +#include "DataFormats/EgammaReco/interface/BasicClusterFwd.h" +#include "DataFormats/EgammaReco/interface/SuperClusterFwd.h" + +#include "Geometry/CaloGeometry/interface/CaloGeometry.h" +#include "Geometry/Records/interface/IdealGeometryRecord.h" +#include "DataFormats/Candidate/interface/CandidateFwd.h" + +class HICaloUtil { +public: + HICaloUtil() {} + + static double EcalEta(const reco::Candidate &p); + static double EcalPhi(const reco::Candidate &p); + static double EcalEta(double EtaParticle, double Zvertex, double plane_Radius); + static double EcalPhi(double PtParticle, double EtaParticle, + double PhiParticle, int ChargeParticle, double Rstart); + + static const double kEEtaBarrelEndcap; //eta boundary for between barrel and endcap + static const double kER_ECAL; //radius ecal barrel begin + static const double kEZ_Endcap; //z distance for endcap begin + static const double kERBARM; //magnetic field was 3.15, updated on 16122003 + static const double kEZENDM; //magnetic field was 1.31, updated on 16122003 + +}; + +#endif /*HIROOT_HICaloUtil*/ diff --git a/RecoHI/HiEgammaAlgos/interface/RxCalculator.h b/RecoHI/HiEgammaAlgos/interface/RxCalculator.h new file mode 100755 index 0000000000000..456027474b872 --- /dev/null +++ b/RecoHI/HiEgammaAlgos/interface/RxCalculator.h @@ -0,0 +1,37 @@ +#ifndef RxCalculator_h +#define RxCalculator_h + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/Framework/interface/ESHandle.h" + +#include "FWCore/Utilities/interface/InputTag.h" + +#include "DataFormats/EgammaReco/interface/BasicClusterFwd.h" +#include "DataFormats/EgammaReco/interface/SuperClusterFwd.h" +#include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h" + + +#include "Geometry/CaloGeometry/interface/CaloGeometry.h" +#include "Geometry/Records/interface/IdealGeometryRecord.h" + +class RxCalculator +{ + public: + + RxCalculator(const edm::Event &iEvent, const edm::EventSetup &iSetup, const edm::InputTag& hbheLabel,const edm::InputTag& hfLabel,const edm::InputTag& hoLabel) ; + + double getRx (const reco::SuperClusterRef clus, double i, double threshold, double innerR=0.0); + double getRFx(const reco::SuperClusterRef clus, double i, double threshold); + double getROx(const reco::SuperClusterRef clus, double i, double threshold); + double getCRx(const reco::SuperClusterRef clus, double i, double threshold, double innerR=0.0); // background subtracted Rx + + private: + + const HBHERecHitCollection *fHBHERecHits_; + const HORecHitCollection *fHORecHits_; + const HFRecHitCollection *fHFRecHits_; + const CaloGeometry *geometry_; +}; + +#endif diff --git a/RecoHI/HiEgammaAlgos/interface/TxCalculator.h b/RecoHI/HiEgammaAlgos/interface/TxCalculator.h new file mode 100644 index 0000000000000..d96886672cb85 --- /dev/null +++ b/RecoHI/HiEgammaAlgos/interface/TxCalculator.h @@ -0,0 +1,71 @@ +#ifndef TxCalculator_h +#define TxCalculator_h + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/Framework/interface/ESHandle.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Utilities/interface/InputTag.h" + +#include "DataFormats/EgammaReco/interface/BasicClusterFwd.h" +#include "DataFormats/EgammaReco/interface/SuperClusterFwd.h" + +#include "DataFormats/TrackReco/interface/Track.h" +#include "DataFormats/TrackReco/interface/TrackFwd.h" + +#include "DataFormats/EgammaCandidates/interface/Photon.h" + +#include "Geometry/CaloGeometry/interface/CaloGeometry.h" +#include "Geometry/Records/interface/IdealGeometryRecord.h" + +#define PI 3.141592653 + +namespace CLHEP { + class HepRandomEngine; +} + +class TxCalculator +{ + public: + + TxCalculator(const edm::Event &iEvent, const edm::EventSetup &iSetup, const edm::InputTag& trackLabel) ; + + double getTx(const reco::Photon& clus, double i,double threshold, double innerDR=0,double effRatio=2); + double getCTx(const reco::Photon& clus, double i,double threshold, double innerDR=0, double effRatio=2); + double getMPT(double ptCut=0, double etaCut=1000); + + double getJurassicArea( double r1, double r2, double width) ; + double getJt(const reco::Photon& cluster, double r1=0.4, double r2=0.04, double jWidth=0.015, double threshold=2); + double getJct(const reco::Photon& cluster, double r1=0.4, double r2=0.04, double jWidth=0.015, double threshold=2); + + private: + + edm::Handle recCollection; + CLHEP::HepRandomEngine *theDice; + + double dRDistance(double eta1,double phi1,double eta2,double phi2) + { + double deta = eta1 - eta2; + double dphi = (calcDphi(phi1, phi2)); + + return sqrt(deta * deta + dphi * dphi); + } + + double calcDphi(double phi1_,double phi2_) + { + double dphi=phi1_-phi2_; + + if (dphi>0){ + while (dphi>2*PI) dphi-=2*PI; + if (dphi>PI) dphi=2*PI-dphi; + } else { + while (dphi<-2*PI) dphi+=2*PI; + if (dphi<-PI) dphi=-2*PI-dphi; + } + return dphi; + } + +}; + +#endif diff --git a/RecoHI/HiEgammaAlgos/interface/TxyCalculator.h b/RecoHI/HiEgammaAlgos/interface/TxyCalculator.h new file mode 100755 index 0000000000000..8df9f25bd713c --- /dev/null +++ b/RecoHI/HiEgammaAlgos/interface/TxyCalculator.h @@ -0,0 +1,65 @@ +#ifndef TxyCalculator_h +#define TxyCalculator_h + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/Framework/interface/ESHandle.h" + +#include "FWCore/Utilities/interface/InputTag.h" + +#include "DataFormats/EgammaReco/interface/BasicClusterFwd.h" +#include "DataFormats/EgammaReco/interface/SuperClusterFwd.h" + +#include "Geometry/CaloGeometry/interface/CaloGeometry.h" +#include "Geometry/Records/interface/IdealGeometryRecord.h" + +#include "DataFormats/Candidate/interface/CandidateFwd.h" +#include "DataFormats/Candidate/interface/Candidate.h" + +#include "DataFormats/TrackReco/interface/Track.h" +#include "DataFormats/TrackReco/interface/TrackFwd.h" + +#include "DataFormats/EgammaCandidates/interface/Photon.h" + +#define PI 3.141592653 + +class TxyCalculator +{ +public: + TxyCalculator(const edm::Event &iEvent, const edm::EventSetup &iSetup, const edm::InputTag& trackLabel); + double getTxy(const reco::Photon& p, double x, double y); + double getHollSxy(const reco::Photon& p, double thePtCut, double outerR, double innerR); + int getNumAllTracks(double ptCut); + int getNumLocalTracks(const reco::Photon& p, double detaCut, double ptCut); + + +private: + + double dRDistance(double eta1,double phi1,double eta2,double phi2) + { + double deta = eta1 - eta2; + double dphi = (calcDphi(phi1, phi2)); + + return sqrt(deta * deta + dphi * dphi); + } + + double calcDphi(double phi1_,double phi2_) + { + double dphi=phi1_-phi2_; + + if (dphi>0){ + while (dphi>2*PI) dphi-=2*PI; + if (dphi>PI) dphi=2*PI-dphi; + } else { + while (dphi<-2*PI) dphi+=2*PI; + if (dphi<-PI) dphi=-2*PI-dphi; + } + return dphi; + } + +private: + edm::Handle recCollection; +}; + +#endif + diff --git a/RecoHI/HiEgammaAlgos/interface/dRxyCalculator.h b/RecoHI/HiEgammaAlgos/interface/dRxyCalculator.h new file mode 100755 index 0000000000000..37031b0ca4e79 --- /dev/null +++ b/RecoHI/HiEgammaAlgos/interface/dRxyCalculator.h @@ -0,0 +1,59 @@ +#ifndef dRxyCalculator_h +#define dRxyCalculator_h + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/Framework/interface/ESHandle.h" + +#include "FWCore/Utilities/interface/InputTag.h" + +#include "DataFormats/EgammaReco/interface/BasicClusterFwd.h" +#include "DataFormats/EgammaReco/interface/SuperClusterFwd.h" + +#include "Geometry/CaloGeometry/interface/CaloGeometry.h" +#include "Geometry/Records/interface/IdealGeometryRecord.h" + +#include "DataFormats/Candidate/interface/CandidateFwd.h" +#include "DataFormats/Candidate/interface/Candidate.h" + +#include "DataFormats/TrackReco/interface/Track.h" +#include "DataFormats/TrackReco/interface/TrackFwd.h" +#include "DataFormats/EgammaCandidates/interface/Photon.h" + +#define PI 3.141592653 + +class dRxyCalculator +{ +public: + dRxyCalculator(const edm::Event &iEvent, const edm::EventSetup &iSetup, const edm::InputTag& trackLabel); + double getDRxy(const reco::Photon& cluster, double x, double y); + +private: + double dRDistance(double eta1,double phi1,double eta2,double phi2) + { + double deta = eta1 - eta2; + double dphi = (calcDphi(phi1, phi2)); + + return sqrt(deta * deta + dphi * dphi); + } + + double calcDphi(double phi1_,double phi2_) + { + double dphi=phi1_-phi2_; + + if (dphi>0){ + while (dphi>2*PI) dphi-=2*PI; + if (dphi>PI) dphi=2*PI-dphi; + } else { + while (dphi<-2*PI) dphi+=2*PI; + if (dphi<-PI) dphi=-2*PI-dphi; + } + return dphi; + } + +private: + edm::Handle recCollection; +}; + +#endif + diff --git a/RecoHI/HiEgammaAlgos/plugins/HiEgammaIsolationProducer.cc b/RecoHI/HiEgammaAlgos/plugins/HiEgammaIsolationProducer.cc new file mode 100644 index 0000000000000..9acd86eb6bf00 --- /dev/null +++ b/RecoHI/HiEgammaAlgos/plugins/HiEgammaIsolationProducer.cc @@ -0,0 +1,164 @@ +// -*- C++ -*- +// +// Package: PatAlgos +// Class: HiEgammaIsolationProducer +// +/**\class HiEgammaIsolationProducer HiEgammaIsolationProducer.cc PhysicsTools/PatAlgos/test/HiEgammaIsolationProducer.cc + + Description: Produce HI Egamma isolationsfor PAT + + Implementation: + +*/ +// +// Original Author: Yen-Jie Lee +// +// + + +// system include files +#include + +// user include files +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/EDProducer.h" + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/MakerMacros.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Utilities/interface/InputTag.h" + + +#include "DataFormats/EgammaCandidates/interface/Photon.h" + +#include "DataFormats/Common/interface/View.h" +#include "DataFormats/Common/interface/ValueMap.h" +#include "DataFormats/Common/interface/OwnVector.h" + +#include "RecoHI/HiEgammaAlgos/interface/CxCalculator.h" +#include "RecoHI/HiEgammaAlgos/interface/RxCalculator.h" +#include "RecoHI/HiEgammaAlgos/interface/TxyCalculator.h" +#include "RecoHI/HiEgammaAlgos/interface/dRxyCalculator.h" + +#include + +namespace edm { using ::std::advance; } + +// +// class decleration +// + +class HiEgammaIsolationProducer : public edm::EDProducer { + public: + explicit HiEgammaIsolationProducer(const edm::ParameterSet&); + ~HiEgammaIsolationProducer(); + + + private: + virtual void produce(edm::Event&, const edm::EventSetup&) override; + + // ----------member data --------------------------- + edm::InputTag photons_; + edm::InputTag barrelBCLabel_; + edm::InputTag endcapBCLabel_; + edm::InputTag hfLabel_; + edm::InputTag hoLabel_; + edm::InputTag hbheLabel_; + edm::InputTag trackLabel_; + + std::string label_; + enum IsoMode { calcCx, calcRx, calcTxy, calcDRxy, calcErr }; + double x_; + double y_; + IsoMode var_; + int mode_; +}; + +// +// constructors and destructor +// +HiEgammaIsolationProducer::HiEgammaIsolationProducer(const edm::ParameterSet& iConfig): + photons_(iConfig.getParameter("photons")), + barrelBCLabel_(iConfig.getParameter("barrelBasicCluster")), + endcapBCLabel_(iConfig.getParameter("endcapBasicCluster")), + hfLabel_(iConfig.getParameter("hfreco")), + hoLabel_(iConfig.getParameter("horeco")), + hbheLabel_(iConfig.getParameter("hbhereco")), + trackLabel_(iConfig.getParameter("track")), + label_(iConfig.existsAs("label") ? iConfig.getParameter("label") : ""), + x_(iConfig.getParameter("x")), + y_(iConfig.getParameter("y")), + var_(iConfig.getParameter("iso") == "Cx" ? calcCx : + iConfig.getParameter("iso") == "Rx" ? calcRx : + iConfig.getParameter("iso") == "Txy" ? calcTxy : + iConfig.getParameter("iso") == "dRxy" ? calcDRxy : calcErr ), + mode_( iConfig.getParameter("mode") == "BackgroundSubtracted" ? 1 : 0) +{ + produces >(); +} + + +HiEgammaIsolationProducer::~HiEgammaIsolationProducer() +{ +} + +// ------------ method called to for each event ------------ +void +HiEgammaIsolationProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) +{ + using namespace edm; + using namespace std; + + Handle > recoPhotons; + iEvent.getByLabel(photons_, recoPhotons); + //std::cout << "Got " << recoPhotons->size() << " photons" << std::endl; + //std::cout << "mode "< floats(recoPhotons->size(), -100); + + CxCalculator CxC(iEvent,iSetup,barrelBCLabel_,endcapBCLabel_); + RxCalculator RxC(iEvent,iSetup,hbheLabel_,hfLabel_,hoLabel_); + TxyCalculator TxyC(iEvent,iSetup,trackLabel_); + dRxyCalculator dRxyC(iEvent,iSetup,trackLabel_); + + for (size_t i = 0; i < recoPhotons->size(); ++i) { + if (var_ == calcRx) { + if (mode_ == 1) { + floats[i] = RxC.getCRx((*recoPhotons)[i].superCluster(),x_,0); + } else { + floats[i] = RxC.getRx((*recoPhotons)[i].superCluster(),x_,0); + } + } else if (var_ == calcCx) { + if (mode_ == 1) { + floats[i] = CxC.getCCx((*recoPhotons)[i].superCluster(),x_,0); + } else { + floats[i] = CxC.getCx((*recoPhotons)[i].superCluster(),x_,0); + } + } else if (var_ == calcTxy) { + if (mode_ == 1) { + // No background subtraction for the moment... + floats[i] = TxyC.getTxy((*recoPhotons)[i],x_,y_); + } else { + floats[i] = TxyC.getTxy((*recoPhotons)[i],x_,y_); + } + } else if (var_ == calcDRxy) { + if (mode_ == 1) { + // No background subtraction for the moment... + floats[i] = dRxyC.getDRxy((*recoPhotons)[i],x_,y_); + } else { + floats[i] = dRxyC.getDRxy((*recoPhotons)[i],x_,y_); + } + } + } + + auto_ptr > pis(new ValueMap()); + ValueMap::Filler floatfiller(*pis); + floatfiller.insert(recoPhotons, floats.begin(), floats.end()); + floatfiller.fill(); + iEvent.put(pis); + + +} + +//define this as a plug-in +DEFINE_FWK_MODULE(HiEgammaIsolationProducer); diff --git a/RecoHI/HiEgammaAlgos/plugins/HiEgammaSCCorrectionMaker.cc b/RecoHI/HiEgammaAlgos/plugins/HiEgammaSCCorrectionMaker.cc index c7d921746fcfb..af7a2b3114c56 100755 --- a/RecoHI/HiEgammaAlgos/plugins/HiEgammaSCCorrectionMaker.cc +++ b/RecoHI/HiEgammaAlgos/plugins/HiEgammaSCCorrectionMaker.cc @@ -1,6 +1,8 @@ #include "RecoHI/HiEgammaAlgos/plugins/HiEgammaSCCorrectionMaker.h" #include "DataFormats/EgammaReco/interface/SuperCluster.h" +#include "DataFormats/EgammaReco/interface/SuperClusterFwd.h" #include "DataFormats/EcalRecHit/interface/EcalRecHit.h" +#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" #include "FWCore/PluginManager/interface/ModuleDef.h" #include "FWCore/Framework/interface/MakerMacros.h" @@ -35,10 +37,8 @@ HiEgammaSCCorrectionMaker::HiEgammaSCCorrectionMaker(const edm::ParameterSet& ps else verbosity_ = HiEgammaSCEnergyCorrectionAlgo::pERROR; // the input producers - rHInputProducerTag_ = ps.getParameter("recHitProducer"); - sCInputProducerTag_ = ps.getParameter("rawSuperClusterProducer"); - rHInputProducer_ = consumes(rHInputProducerTag_); - sCInputProducer_ = consumes(sCInputProducerTag_); + rHInputProducer_ = ps.getParameter("recHitProducer"); + sCInputProducer_ = ps.getParameter("rawSuperClusterProducer"); std::string sCAlgo_str = ps.getParameter("superClusterAlgo"); // determine which BasicCluster algo we are correcting for @@ -106,7 +106,7 @@ HiEgammaSCCorrectionMaker::produce(edm::Event& evt, const edm::EventSetup& es) es.get().get(theCaloTopo_); const CaloTopology *topology = theCaloTopo_.product(); - std::string rHInputCollection = rHInputProducerTag_.instance(); + std::string rHInputCollection = rHInputProducer_.instance(); if(rHInputCollection == "EcalRecHitsEB") { geometry_p = geometry.getSubdetectorGeometry(DetId::Ecal, EcalBarrel); } else if(rHInputCollection == "EcalRecHitsEE") { @@ -121,21 +121,21 @@ HiEgammaSCCorrectionMaker::produce(edm::Event& evt, const edm::EventSetup& es) // Get raw SuperClusters from the event Handle pRawSuperClusters; try { - evt.getByToken(sCInputProducer_, pRawSuperClusters); + evt.getByLabel(sCInputProducer_, pRawSuperClusters); } catch ( cms::Exception& ex ) { edm::LogError("HiEgammaSCCorrectionMakerError") << "Error! can't get the rawSuperClusters " - << sCInputProducerTag_.label() ; + << sCInputProducer_.label() ; } // Get the RecHits from the event Handle pRecHits; try { - evt.getByToken(rHInputProducer_, pRecHits); + evt.getByLabel(rHInputProducer_, pRecHits); } catch ( cms::Exception& ex ) { edm::LogError("HiEgammaSCCorrectionMakerError") << "Error! can't get the RecHits " - << rHInputProducerTag_.label(); + << rHInputProducer_.label(); } // Create a pointer to the RecHits and raw SuperClusters diff --git a/RecoHI/HiEgammaAlgos/plugins/HiEgammaSCCorrectionMaker.h b/RecoHI/HiEgammaAlgos/plugins/HiEgammaSCCorrectionMaker.h index 5130e256b6551..b3cbd4ddd6f37 100755 --- a/RecoHI/HiEgammaAlgos/plugins/HiEgammaSCCorrectionMaker.h +++ b/RecoHI/HiEgammaAlgos/plugins/HiEgammaSCCorrectionMaker.h @@ -26,8 +26,6 @@ #include "FWCore/Framework/interface/EventSetup.h" #include "DataFormats/EgammaReco/interface/BasicCluster.h" #include "DataFormats/CaloRecHit/interface/CaloCluster.h" -#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" -#include "DataFormats/EgammaReco/interface/SuperClusterFwd.h" #include "RecoHI/HiEgammaAlgos/interface/HiEgammaSCEnergyCorrectionAlgo.h" #include "RecoEcal/EgammaCoreTools/interface/EcalClusterFunctionBaseClass.h" @@ -61,10 +59,8 @@ class HiEgammaSCCorrectionMaker : public edm::EDProducer { double etThresh_; // vars to get products - edm::InputTag rHInputProducerTag_; - edm::InputTag sCInputProducerTag_; - edm::EDGetTokenT rHInputProducer_; - edm::EDGetTokenT sCInputProducer_; + edm::InputTag rHInputProducer_; + edm::InputTag sCInputProducer_; reco::CaloCluster::AlgoId sCAlgo_; std::string outputCollection_; diff --git a/RecoHI/HiEgammaAlgos/plugins/HiSuperClusterProducer.cc b/RecoHI/HiEgammaAlgos/plugins/HiSuperClusterProducer.cc index db5a5109f171a..795646fd94d6f 100644 --- a/RecoHI/HiEgammaAlgos/plugins/HiSuperClusterProducer.cc +++ b/RecoHI/HiEgammaAlgos/plugins/HiSuperClusterProducer.cc @@ -16,6 +16,7 @@ // Reconstruction Classes #include "DataFormats/EgammaReco/interface/BasicCluster.h" +#include "DataFormats/EgammaReco/interface/BasicClusterFwd.h" #include "DataFormats/EgammaReco/interface/SuperCluster.h" #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h" @@ -32,6 +33,11 @@ HiSuperClusterProducer::HiSuperClusterProducer(const edm::ParameterSet& ps) else if (verbosityString == "INFO") verbosity = HiBremRecoveryClusterAlgo::pINFO; else verbosity = HiBremRecoveryClusterAlgo::pERROR; + endcapClusterProducer_ = ps.getParameter("endcapClusterProducer"); + barrelClusterProducer_ = ps.getParameter("barrelClusterProducer"); + + endcapClusterCollection_ = ps.getParameter("endcapClusterCollection"); + barrelClusterCollection_ = ps.getParameter("barrelClusterCollection"); endcapSuperclusterCollection_ = ps.getParameter("endcapSuperclusterCollection"); barrelSuperclusterCollection_ = ps.getParameter("barrelSuperclusterCollection"); @@ -63,11 +69,6 @@ HiSuperClusterProducer::HiSuperClusterProducer(const edm::ParameterSet& ps) produces< reco::SuperClusterCollection >(endcapSuperclusterCollection_); produces< reco::SuperClusterCollection >(barrelSuperclusterCollection_); - eeClustersToken_ = consumes(edm::InputTag(ps.getParameter("endcapClusterProducer"), - ps.getParameter("endcapClusterCollection"))); - ebClustersToken_ = consumes(edm::InputTag(ps.getParameter("barrelClusterProducer"), - ps.getParameter("barrelClusterCollection"))); - totalE = 0; noSuperClusters = 0; nEvt_ = 0; @@ -97,22 +98,23 @@ void HiSuperClusterProducer::endJob() { void HiSuperClusterProducer::produce(edm::Event& evt, const edm::EventSetup& es) { if(doEndcaps_) - produceSuperclustersForECALPart(evt, eeClustersToken_, endcapSuperclusterCollection_); + produceSuperclustersForECALPart(evt, endcapClusterProducer_, endcapClusterCollection_, endcapSuperclusterCollection_); if(doBarrel_) - produceSuperclustersForECALPart(evt, ebClustersToken_, barrelSuperclusterCollection_); + produceSuperclustersForECALPart(evt, barrelClusterProducer_, barrelClusterCollection_, barrelSuperclusterCollection_); nEvt_++; } void HiSuperClusterProducer::produceSuperclustersForECALPart(edm::Event& evt, - const edm::EDGetTokenT& clustersToken, - std::string superclusterCollection) + std::string clusterProducer, + std::string clusterCollection, + std::string superclusterCollection) { // get the cluster collection out and turn it to a BasicClusterRefVector: reco::CaloClusterPtrVector *clusterPtrVector_p = new reco::CaloClusterPtrVector; - getClusterPtrVector(evt, clustersToken, clusterPtrVector_p); + getClusterPtrVector(evt, clusterProducer, clusterCollection, clusterPtrVector_p); // run the brem recovery and get the SC collection std::auto_ptr @@ -133,15 +135,15 @@ void HiSuperClusterProducer::produceSuperclustersForECALPart(edm::Event& evt, } -void HiSuperClusterProducer::getClusterPtrVector(edm::Event& evt, const edm::EDGetTokenT& clustersToken, reco::CaloClusterPtrVector *clusterPtrVector_p) +void HiSuperClusterProducer::getClusterPtrVector(edm::Event& evt, std::string clusterProducer_, std::string clusterCollection_, reco::CaloClusterPtrVector *clusterPtrVector_p) { edm::Handle bccHandle; - evt.getByToken(clustersToken, bccHandle); - + evt.getByLabel(clusterProducer_, clusterCollection_, bccHandle); if (!(bccHandle.isValid())) { edm::LogError("HiSuperClusterProducerError") << "could not get a handle on the BasicCluster Collection!"; + edm::LogError("HiSuperClusterProducerError") << "Error! can't get the product " << clusterCollection_.c_str(); clusterPtrVector_p = 0; } diff --git a/RecoHI/HiEgammaAlgos/plugins/HiSuperClusterProducer.h b/RecoHI/HiEgammaAlgos/plugins/HiSuperClusterProducer.h index bd643238a1a27..9e7cc18699612 100644 --- a/RecoHI/HiEgammaAlgos/plugins/HiSuperClusterProducer.h +++ b/RecoHI/HiEgammaAlgos/plugins/HiSuperClusterProducer.h @@ -36,12 +36,15 @@ class HiSuperClusterProducer : public edm::EDProducer HiBremRecoveryClusterAlgo::VerbosityLevel verbosity; + std::string endcapClusterCollection_; + std::string barrelClusterCollection_; + + std::string endcapClusterProducer_; + std::string barrelClusterProducer_; + std::string endcapSuperclusterCollection_; std::string barrelSuperclusterCollection_; - edm::EDGetTokenT eeClustersToken_; - edm::EDGetTokenT ebClustersToken_; - float barrelEtaSearchRoad_; float barrelPhiSearchRoad_; float endcapEtaSearchRoad_; @@ -59,10 +62,11 @@ class HiSuperClusterProducer : public edm::EDProducer int noSuperClusters; - void getClusterPtrVector(edm::Event& evt, const edm::EDGetTokenT& clustersToken, reco::CaloClusterPtrVector *); + void getClusterPtrVector(edm::Event& evt, std::string clusterProducer_, std::string clusterCollection_, reco::CaloClusterPtrVector *); void produceSuperclustersForECALPart(edm::Event& evt, - const edm::EDGetTokenT& clustersToken, + std::string clusterProducer, + std::string clusterCollection, std::string superclusterColection); void outputValidationInfo(reco::SuperClusterCollection &superclusterCollection); diff --git a/RecoHI/HiEgammaAlgos/python/HiCaloIsolation_cff.py b/RecoHI/HiEgammaAlgos/python/HiCaloIsolation_cff.py new file mode 100644 index 0000000000000..a09417f8a709f --- /dev/null +++ b/RecoHI/HiEgammaAlgos/python/HiCaloIsolation_cff.py @@ -0,0 +1,176 @@ +import FWCore.ParameterSet.Config as cms + +from RecoHI.HiEgammaAlgos.HiIsolationCommonParameters_cff import * + +isoC1 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Cx"), + x = cms.double(1), + y = cms.double(0), +) + +isoC2 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Cx"), + x = cms.double(2), + y = cms.double(0), +) + +isoC3 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Cx"), + x = cms.double(3), + y = cms.double(0), +) + +isoC4 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Cx"), + x = cms.double(4), + y = cms.double(0), +) + +isoC5 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Cx"), + x = cms.double(5), + y = cms.double(0), +) + +isoCC1 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("BackgroundSubtracted"), + iso = cms.string("Cx"), + x = cms.double(1), + y = cms.double(0), +) + +isoCC2 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("BackgroundSubtracted"), + iso = cms.string("Cx"), + x = cms.double(2), + y = cms.double(0), +) + +isoCC3 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("BackgroundSubtracted"), + iso = cms.string("Cx"), + x = cms.double(3), + y = cms.double(0), +) + +isoCC4 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("BackgroundSubtracted"), + iso = cms.string("Cx"), + x = cms.double(4), + y = cms.double(0), +) + +isoCC5 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("BackgroundSubtracted"), + iso = cms.string("Cx"), + x = cms.double(5), + y = cms.double(0), +) + +isoR1 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Rx"), + x = cms.double(1), + y = cms.double(0), +) + +isoR2 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Rx"), + x = cms.double(2), + y = cms.double(0), +) + +isoR3 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Rx"), + x = cms.double(3), + y = cms.double(0), +) + +isoR4 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Rx"), + x = cms.double(4), + y = cms.double(0), +) + +isoR5 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Rx"), + x = cms.double(5), + y = cms.double(0), +) + +isoCR1 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("BackgroundSubtracted"), + iso = cms.string("Rx"), + x = cms.double(1), + y = cms.double(0), +) + +isoCR2 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("BackgroundSubtracted"), + iso = cms.string("Rx"), + x = cms.double(2), + y = cms.double(0), +) + +isoCR3 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("BackgroundSubtracted"), + iso = cms.string("Rx"), + x = cms.double(3), + y = cms.double(0), +) + +isoCR4 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("BackgroundSubtracted"), + iso = cms.string("Rx"), + x = cms.double(4), + y = cms.double(0), +) + +isoCR5 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("BackgroundSubtracted"), + iso = cms.string("Rx"), + x = cms.double(5), + y = cms.double(0), +) + + +hiEcalIsolation = cms.Sequence(isoC1+isoC2+isoC3+isoC4+isoC5) +hiEcalIsolationBckSubtracted = cms.Sequence(isoCC1+isoCC2+isoCC3+isoCC4+isoCC5) +hiHcalIsolation = cms.Sequence(isoR1+isoR2+isoR3+isoR4+isoR5) +hiHcalIsolationBckSubtracted = cms.Sequence(isoCR1+isoCR2+isoCR3+isoCR4+isoCR5) + +hiCaloIsolation = cms.Sequence(hiEcalIsolation+hiHcalIsolation) +hiCaloIsolationBckSubtracted = cms.Sequence(hiEcalIsolationBckSubtracted+hiHcalIsolationBckSubtracted) + +hiCaloIsolationAll = cms.Sequence(hiCaloIsolation+hiCaloIsolationBckSubtracted) + + diff --git a/RecoHI/HiEgammaAlgos/python/HiEgammaIsolation_cff.py b/RecoHI/HiEgammaAlgos/python/HiEgammaIsolation_cff.py new file mode 100644 index 0000000000000..5cca03d81018d --- /dev/null +++ b/RecoHI/HiEgammaAlgos/python/HiEgammaIsolation_cff.py @@ -0,0 +1,23 @@ +import FWCore.ParameterSet.Config as cms + +from RecoHI.HiEgammaAlgos.HiCaloIsolation_cff import * +from RecoHI.HiEgammaAlgos.HiTrackerIsolation_cff import * + +from RecoEgamma.EgammaIsolationAlgos.gamIsolationSequence_cff import * +from RecoEgamma.PhotonIdentification.photonId_cff import * + +from RecoEcal.EgammaClusterProducers.reducedRecHitsSequence_cff import * + +interestingEcalDetIdEB.basicClustersLabel = cms.InputTag("islandBasicClusters","islandBarrelBasicClusters") +interestingEcalDetIdEE.basicClustersLabel = cms.InputTag("islandBasicClusters","islandEndcapBasicClusters") + + +gamIsoDepositEcalFromHits.ExtractorPSet.barrelEcalHits = cms.InputTag("reducedEcalRecHitsEB") +gamIsoDepositEcalFromHits.ExtractorPSet.endcapEcalHits = cms.InputTag("reducedEcalRecHitsEE") + +gamIsoDepositTk.ExtractorPSet.inputTrackCollection = isolationInputParameters.track + +hiEgammaIsolationSequenceAll = cms.Sequence(hiCaloIsolationAll+hiTrackerIsolation) +hiEgammaIsolationSequence = cms.Sequence(hiCaloIsolationBckSubtracted+hiTrackerIsolation+photonIDSequence+reducedEcalRecHitsSequence*gamIsolationSequence) + + diff --git a/RecoHI/HiEgammaAlgos/python/HiEgamma_cff.py b/RecoHI/HiEgammaAlgos/python/HiEgamma_cff.py index 275e4a1dee35f..a1e1d51102d5c 100644 --- a/RecoHI/HiEgammaAlgos/python/HiEgamma_cff.py +++ b/RecoHI/HiEgammaAlgos/python/HiEgamma_cff.py @@ -7,12 +7,14 @@ from RecoEcal.EgammaClusterProducers.multi5x5PreshowerClusteringSequence_cff import * from RecoEcal.EgammaClusterProducers.preshowerClusteringSequence_cff import * from RecoHI.HiEgammaAlgos.HiIsolationCommonParameters_cff import * -from RecoEcal.EgammaClusterProducers.particleFlowSuperClusteringSequence_cff import * -particleFlowSuperClusterECAL.regressionConfig.vertexCollection = 'hiSelectedVertex' - -hiEcalClusteringSequence = cms.Sequence(islandClusteringSequence*hybridClusteringSequence*multi5x5ClusteringSequence*multi5x5PreshowerClusteringSequence*preshowerClusteringSequence*particleFlowSuperClusteringSequence) +hiEcalClusteringSequence = cms.Sequence(islandClusteringSequence*hybridClusteringSequence*multi5x5ClusteringSequence*multi5x5PreshowerClusteringSequence*preshowerClusteringSequence) +# high purity tracks +#highPurityTracks = cms.EDFilter("TrackSelector", +# src = cms.InputTag("hiSelectedTracks"), +## cut = cms.string('quality("highPurity")') +#) # reco photon producer from RecoEgamma.EgammaPhotonProducers.photonSequence_cff import * @@ -30,16 +32,22 @@ photons.primaryVertexProducer = cms.InputTag('hiSelectedVertex') # replace the primary vertex photons.isolationSumsCalculatorSet.trackProducer = isolationInputParameters.track # cms.InputTag("highPurityTracks") -hiPhotonSequence = cms.Sequence(photonSequence) +hiPhotonSequence = cms.Sequence(#highPurityTracks* + photonSequence) +# HI Egamma Isolation +from RecoHI.HiEgammaAlgos.HiEgammaIsolation_cff import * # HI Ecal reconstruction hiEcalClusters = cms.Sequence(hiEcalClusteringSequence) hiEgammaSequence = cms.Sequence(hiPhotonSequence) +hiEcalClustersIsolation = cms.Sequence(hiEgammaSequence * hiEgammaIsolationSequence) # HI Spike Clean Sequence import RecoHI.HiEgammaAlgos.hiSpikeCleaner_cfi -hiSpikeCleanedSC = RecoHI.HiEgammaAlgos.hiSpikeCleaner_cfi.hiSpikeCleaner.clone() +hiSpikeCleanedSC = RecoHI.HiEgammaAlgos.hiSpikeCleaner_cfi.hiSpikeCleaner.clone( +# swissCutThr = cms.untracked.double(0.95) + ) cleanPhotonCore = photonCore.clone( scHybridBarrelProducer = cms.InputTag("hiSpikeCleanedSC") ) @@ -48,5 +56,6 @@ ) hiPhotonCleaningSequence = cms.Sequence(hiSpikeCleanedSC * + #highPurityTracks * cleanPhotonCore * cleanPhotons) diff --git a/RecoHI/HiEgammaAlgos/python/HiElectronSequence_cff.py b/RecoHI/HiEgammaAlgos/python/HiElectronSequence_cff.py index 3cf6ef37dc807..1c189aa0d0c6e 100644 --- a/RecoHI/HiEgammaAlgos/python/HiElectronSequence_cff.py +++ b/RecoHI/HiEgammaAlgos/python/HiElectronSequence_cff.py @@ -1,5 +1,7 @@ import FWCore.ParameterSet.Config as cms +# load local PF Reco +from RecoHI.Configuration.Reconstruction_hiPF_cff import HiParticleFlowLocalReco # creates the recoGsfTracks_electronGsfTracks__RECO = input GSF tracks from TrackingTools.GsfTracking.GsfElectronTracking_cff import * @@ -18,31 +20,17 @@ # run the supercluster(EE+EB)-GSF track association ==> output: recoGsfElectrons_gsfElectrons__RECO from RecoEgamma.EgammaElectronProducers.gsfElectronSequence_cff import * from RecoParticleFlow.PFProducer.pfElectronTranslator_cff import * -gsfElectrons.ctfTracks = cms.InputTag("hiGeneralTracks") -gsfElectronCores.ctfTracks = cms.InputTag("hiGeneralTracks") +gsfElectrons.ctfTracks = cms.InputTag("hiSelectedTracks") +gsfElectronCores.ctfTracks = cms.InputTag("hiSelectedTracks") pfElectronTranslator.emptyIsOk = cms.bool(True) -ecalDrivenGsfElectrons.ctfTracksTag = cms.InputTag("hiGeneralTracks") -ecalDrivenGsfElectronCores.ctfTracks = cms.InputTag("hiGeneralTracks") +ecalDrivenGsfElectrons.ctfTracksTag = cms.InputTag("hiSelectedTracks") +ecalDrivenGsfElectronCores.ctfTracks = cms.InputTag("hiSelectedTracks") ecalDrivenGsfElectrons.maxHOverEBarrel = cms.double(0.25) ecalDrivenGsfElectrons.maxHOverEEndcaps = cms.double(0.25) - - -from RecoParticleFlow.PFTracking.pfTrack_cfi import * -pfTrack.UseQuality = cms.bool(True) -pfTrack.TrackQuality = cms.string('highPurity') -pfTrack.TkColList = cms.VInputTag("hiGeneralTracks") -pfTrack.PrimaryVertexLabel = cms.InputTag("hiSelectedVertex") -pfTrack.MuColl = cms.InputTag("muons") - -from RecoParticleFlow.PFTracking.pfTrackElec_cfi import * -pfTrackElec.applyGsfTrackCleaning = cms.bool(True) -pfTrackElec.PrimaryVertexLabel = cms.InputTag("hiSelectedVertex") - -hiElectronSequence = cms.Sequence(electronGsfTrackingHi * - pfTrack * - pfTrackElec * - gsfEcalDrivenElectronSequence +hiElectronSequence = cms.Sequence(electronGsfTrackingHi * + HiParticleFlowLocalReco * + gsfEcalDrivenElectronSequence ) diff --git a/RecoHI/HiEgammaAlgos/python/HiTrackerIsolation_cff.py b/RecoHI/HiEgammaAlgos/python/HiTrackerIsolation_cff.py new file mode 100644 index 0000000000000..52df33b6d2c5d --- /dev/null +++ b/RecoHI/HiEgammaAlgos/python/HiTrackerIsolation_cff.py @@ -0,0 +1,265 @@ +import FWCore.ParameterSet.Config as cms + +from RecoHI.HiEgammaAlgos.HiIsolationCommonParameters_cff import * + +isoT11 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Txy"), + x = cms.double(1), + y = cms.double(1), +) + +isoT12 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Txy"), + x = cms.double(1), + y = cms.double(2), +) + +isoT13 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Txy"), + x = cms.double(1), + y = cms.double(3), +) + +isoT14 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Txy"), + x = cms.double(1), + y = cms.double(4), +) + +isoT21 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Txy"), + x = cms.double(2), + y = cms.double(1), +) + +isoT22 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Txy"), + x = cms.double(2), + y = cms.double(2), +) + +isoT23 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Txy"), + x = cms.double(2), + y = cms.double(3), +) + +isoT24 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Txy"), + x = cms.double(2), + y = cms.double(4), +) + +isoT31 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Txy"), + x = cms.double(3), + y = cms.double(1), +) + +isoT32 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Txy"), + x = cms.double(3), + y = cms.double(2), +) + +isoT33 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Txy"), + x = cms.double(3), + y = cms.double(3), +) + +isoT34 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Txy"), + x = cms.double(3), + y = cms.double(4), +) + +isoT41 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Txy"), + x = cms.double(4), + y = cms.double(1), +) + +isoT42 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Txy"), + x = cms.double(4), + y = cms.double(2), +) + +isoT43 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Txy"), + x = cms.double(4), + y = cms.double(3), +) + +isoT44 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("Txy"), + x = cms.double(4), + y = cms.double(4), +) + +isoDR11 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("dRxy"), + x = cms.double(1), + y = cms.double(1), +) + +isoDR12 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("dRxy"), + x = cms.double(1), + y = cms.double(2), +) + +isoDR13 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("dRxy"), + x = cms.double(1), + y = cms.double(3), +) + +isoDR14 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("dRxy"), + x = cms.double(1), + y = cms.double(4), +) + +isoDR21 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("dRxy"), + x = cms.double(2), + y = cms.double(1), +) + +isoDR22 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("dRxy"), + x = cms.double(2), + y = cms.double(2), +) + +isoDR23 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("dRxy"), + x = cms.double(2), + y = cms.double(3), +) + +isoDR24 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("dRxy"), + x = cms.double(2), + y = cms.double(4), +) + +isoDR31 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("dRxy"), + x = cms.double(3), + y = cms.double(1), +) + +isoDR32 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("dRxy"), + x = cms.double(3), + y = cms.double(2), +) + +isoDR33 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("dRxy"), + x = cms.double(3), + y = cms.double(3), +) + +isoDR34 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("dRxy"), + x = cms.double(3), + y = cms.double(4), +) + +isoDR41 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("dRxy"), + x = cms.double(4), + y = cms.double(1), +) + +isoDR42 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("dRxy"), + x = cms.double(4), + y = cms.double(2), +) + +isoDR43 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("dRxy"), + x = cms.double(4), + y = cms.double(3), +) + +isoDR44 = cms.EDProducer("HiEgammaIsolationProducer", + isolationInputParameters, + mode = cms.string("noBackgroundSubtracted"), + iso = cms.string("dRxy"), + x = cms.double(4), + y = cms.double(4), +) + + +hiTrackCountingIsolation = cms.Sequence(isoT11+isoT12+isoT13+isoT14+isoT21+isoT22+isoT23+isoT24+isoT31+isoT32+isoT33+isoT34+isoT41+isoT42+isoT43+isoT44) +hiTrackVetoConeIsolation = cms.Sequence(isoDR11+isoDR12+isoDR13+isoDR14+isoDR21+isoDR22+isoDR23+isoDR24+isoDR31+isoDR32+isoDR33+isoDR34+isoDR41+isoDR42+isoDR43+isoDR44) + +hiTrackerIsolation = cms.Sequence(hiTrackCountingIsolation+hiTrackVetoConeIsolation) diff --git a/RecoHI/HiEgammaAlgos/src/CxCalculator.cc b/RecoHI/HiEgammaAlgos/src/CxCalculator.cc new file mode 100755 index 0000000000000..10a7f615d662c --- /dev/null +++ b/RecoHI/HiEgammaAlgos/src/CxCalculator.cc @@ -0,0 +1,707 @@ +// ROOT includes +#include + +#include "RecoHI/HiEgammaAlgos/interface/CxCalculator.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" + +#include "Geometry/Records/interface/CaloGeometryRecord.h" +#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" + +#include "DataFormats/Common/interface/Handle.h" +#include "DataFormats/EgammaReco/interface/BasicCluster.h" +#include "DataFormats/EgammaReco/interface/SuperCluster.h" +#include "DataFormats/Math/interface/Vector3D.h" + + +using namespace edm; +using namespace reco; +using namespace std; +using namespace ROOT::Math::VectorUtil; + +#define PI 3.141592653589793238462643383279502884197169399375105820974945 + + +double CxCalculator::getJurassicArea( double r1, double r2, double width) { + + float theta1 = asin( width / r1); + float theta2 = asin( width / r2); + float theA = sqrt ( r1*r1 + r2*r2 - 2 * r1 * r2 * cos ( theta1 - theta2) ); + float area1 = 0.5 * r1*r1 * ( 3.141592 - 2 * theta1 ) ; + float area2 = 0.5 * r2*r2 * ( 3.141592 - 2 * theta2 ) ; + float area3 = width * theA; + float finalArea = 2 * ( area1 - area2 - area3); + return finalArea; +} + + + +CxCalculator::CxCalculator (const edm::Event &iEvent, const edm::EventSetup &iSetup,const edm::InputTag& barrelLabel,const edm::InputTag& endcapLabel) +{ +//InputTag("islandBasicClusters:islandBarrelBasicClusters") +//InputTag("islandBasicClusters:islandEndcapBasicClusters") + Handle pEBclusters; + iEvent.getByLabel(barrelLabel, pEBclusters); + if(pEBclusters.isValid()) + fEBclusters_ = pEBclusters.product(); + else + fEBclusters_ = NULL; + + Handle pEEclusters; + iEvent.getByLabel(endcapLabel, pEEclusters); + if(pEEclusters.isValid()) + fEEclusters_ = pEEclusters.product(); + else + fEEclusters_ = NULL; + + ESHandle geometryHandle; + iSetup.get().get(geometryHandle); + if(geometryHandle.isValid()) + geometry_ = geometryHandle.product(); + else + geometry_ = NULL; + +} + +double CxCalculator::getCx(const reco::SuperClusterRef cluster, double x, double threshold) +{ + using namespace edm; + using namespace reco; + + if(!fEBclusters_) { +// LogError("CxCalculator") << "Error! Can't get EBclusters for event."; + return -100; + } + + if(!fEEclusters_) { +// LogError("CxCalculator") << "Error! Can't get EEclusters for event."; + return -100; + } + + math::XYZVector SClusPoint(cluster->position().x(), + cluster->position().y(), + cluster->position().z()); + + double TotalEt = 0; + + TotalEt = - cluster->rawEnergy()/cosh(cluster->eta()); + + // Loop over barrel basic clusters + for(BasicClusterCollection::const_iterator iclu = fEBclusters_->begin(); + iclu != fEBclusters_->end(); ++iclu) { + const BasicCluster *clu = &(*iclu); + math::XYZVector ClusPoint(clu->x(),clu->y(),clu->z()); + double eta = ClusPoint.eta(); + + double dR = ROOT::Math::VectorUtil::DeltaR(ClusPoint,SClusPoint); + + if (dRenergy()/cosh(eta); + if (etbegin(); + iclu != fEEclusters_->end(); ++iclu) { + const BasicCluster *clu = &(*iclu); + const GlobalPoint clusPoint(clu->x(),clu->y(),clu->z()); + math::XYZVector ClusPoint(clu->x(),clu->y(),clu->z()); + double eta = ClusPoint.eta(); + + double dR = ROOT::Math::VectorUtil::DeltaR(ClusPoint,SClusPoint); + + if (dRenergy()/cosh(eta); + if (etposition().x(), + cluster->position().y(), + cluster->position().z()); + + double TotalEt = 0; + + TotalEt = 0; + + // Loop over barrel basic clusters + for(BasicClusterCollection::const_iterator iclu = fEBclusters_->begin(); + iclu != fEBclusters_->end(); ++iclu) { + const BasicCluster *clu = &(*iclu); + math::XYZVector ClusPoint(clu->x(),clu->y(),clu->z()); + double eta = ClusPoint.eta(); + + double dR = ROOT::Math::VectorUtil::DeltaR(ClusPoint,SClusPoint); + + // check if this basic cluster is used in the target supercluster + bool inSuperCluster = checkUsed(cluster,clu); + + if (dRenergy()/cosh(eta); + if (etbegin(); + iclu != fEEclusters_->end(); ++iclu) { + const BasicCluster *clu = &(*iclu); + const GlobalPoint clusPoint(clu->x(),clu->y(),clu->z()); + math::XYZVector ClusPoint(clu->x(),clu->y(),clu->z()); + double eta = ClusPoint.eta(); + + double dR = ROOT::Math::VectorUtil::DeltaR(ClusPoint,SClusPoint); + + // check if this basic cluster is used in the target supercluster + bool inSuperCluster = checkUsed(cluster,clu); + + if (dRenergy()/cosh(eta); + if (eteta(); + double SClusterPhi = cluster->phi(); + double TotalEt = 0; + + TotalEt = - cluster->rawEnergy()/cosh(cluster->eta()); + + for(BasicClusterCollection::const_iterator iclu = fEBclusters_->begin(); + iclu != fEBclusters_->end(); ++iclu) { + const BasicCluster *clu = &(*iclu); + math::XYZVector ClusPoint(clu->x(),clu->y(),clu->z()); + double eta = ClusPoint.eta(); + + double dEta = fabs(eta-SClusterEta); + + if (dEtaenergy()/cosh(eta); + if (etbegin(); + iclu != fEEclusters_->end(); ++iclu) { + const BasicCluster *clu = &(*iclu); + math::XYZVector ClusPoint(clu->x(),clu->y(),clu->z()); + double eta = ClusPoint.eta(); + double phi = ClusPoint.phi(); + + double dEta = fabs(eta-SClusterEta); + double dPhi = fabs(phi-SClusterPhi); + while (dPhi>2*PI) dPhi-=2*PI; + if (dPhi>PI) dPhi=2*PI-dPhi; + + if (dEtaenergy()/cosh(eta); + if (eteta(); + double SClusterPhi = cluster->phi(); + double TotalEt = 0; + + for(BasicClusterCollection::const_iterator iclu = fEBclusters_->begin(); + iclu != fEBclusters_->end(); ++iclu) { + const BasicCluster *clu = &(*iclu); + math::XYZVector ClusPoint(clu->x(),clu->y(),clu->z()); + double eta = ClusPoint.eta(); + double phi = ClusPoint.phi(); + + double dEta = fabs(eta-SClusterEta); + double dPhi = phi-SClusterPhi; + if ( dPhi < -PI ) dPhi = dPhi + 2*PI ; + if ( dPhi > PI ) dPhi = dPhi - 2*PI ; + if ( fabs(dPhi) > PI ) cout << " error!!! dphi > 2pi : " << dPhi << endl; + double dR = sqrt(dEta*dEta+dPhi*dPhi); + + // Jurassic Cone ///// + if ( dR > r1 ) continue; + if ( dR < r2 ) continue; + if ( fabs(dEta) < jWidth) continue; + ////////////////////// + double theEt = clu->energy()/cosh(eta); + if (theEtbegin(); + iclu != fEEclusters_->end(); ++iclu) { + const BasicCluster *clu = &(*iclu); + math::XYZVector ClusPoint(clu->x(),clu->y(),clu->z()); + double eta = ClusPoint.eta(); + double phi = ClusPoint.phi(); + double dEta = fabs(eta-SClusterEta); + double dPhi = phi-SClusterPhi; + if ( dPhi < -PI ) dPhi = dPhi + 2*PI ; + if ( dPhi > PI ) dPhi = dPhi - 2*PI ; + if ( fabs(dPhi) >PI ) cout << " error!!! dphi > 2pi : " << dPhi << endl; + double dR = sqrt(dEta*dEta+dPhi*dPhi); + // Jurassic Cone ///// + if ( dR > r1 ) continue; + if ( dR < r2 ) continue; + if ( fabs(dEta) < jWidth) continue; + ////////////////////// + double theEt = clu->energy()/cosh(eta); + if (theEteta(); + double SClusterPhi = cluster->phi(); + double TotalEt = 0; + + for(BasicClusterCollection::const_iterator iclu = fEBclusters_->begin(); + iclu != fEBclusters_->end(); ++iclu) { + const BasicCluster *clu = &(*iclu); + math::XYZVector ClusPoint(clu->x(),clu->y(),clu->z()); + double eta = ClusPoint.eta(); + double phi = ClusPoint.phi(); + + double dEta = fabs(eta-SClusterEta); + double dPhi = phi-SClusterPhi; + if ( dPhi < -PI ) dPhi = dPhi + 2*PI ; + if ( dPhi > PI ) dPhi = dPhi - 2*PI ; + // double dR = sqrt(dEta*dEta+dPhi*dPhi); + + //////// phi strip ///////// + if ( fabs(dEta) > r1 ) continue; + if ( fabs(dPhi) energy()/cosh(eta); + if (theEtbegin(); + iclu != fEEclusters_->end(); ++iclu) { + const BasicCluster *clu = &(*iclu); + math::XYZVector ClusPoint(clu->x(),clu->y(),clu->z()); + double eta = ClusPoint.eta(); + double phi = ClusPoint.phi(); + double dEta = fabs(eta-SClusterEta); + double dPhi = phi-SClusterPhi; + if ( dPhi < -PI ) dPhi = dPhi + 2*PI ; + if ( dPhi > PI ) dPhi = dPhi - 2*PI ; + // double dR = sqrt(dEta*dEta+dPhi*dPhi); + + //////// phi strip ///////// + if ( fabs(dEta) > r1 ) continue; + if ( fabs(dPhi) < r1 ) continue; + ////////////////////// + + double theEt = clu->energy()/cosh(eta); + if (theEteta(); + double SClusterPhi = cluster->phi(); + double TotalEt = 0; + + TotalEt = 0; + + for(BasicClusterCollection::const_iterator iclu = fEBclusters_->begin(); + iclu != fEBclusters_->end(); ++iclu) { + const BasicCluster *clu = &(*iclu); + math::XYZVector ClusPoint(clu->x(),clu->y(),clu->z()); + double eta = ClusPoint.eta(); + + double dEta = fabs(eta-SClusterEta); + + // check if this basic cluster is used in the target supercluster + bool inSuperCluster = checkUsed(cluster,clu); + + if (dEtaenergy()/cosh(eta); + if (etbegin(); + iclu != fEEclusters_->end(); ++iclu) { + const BasicCluster *clu = &(*iclu); + math::XYZVector ClusPoint(clu->x(),clu->y(),clu->z()); + double eta = ClusPoint.eta(); + double phi = ClusPoint.phi(); + + double dEta = fabs(eta-SClusterEta); + double dPhi = fabs(phi-SClusterPhi); + while (dPhi>2*PI) dPhi-=2*PI; + if (dPhi>PI) dPhi=2*PI-dPhi; + + // check if this basic cluster is used in the target supercluster + bool inSuperCluster = checkUsed(cluster,clu); + + if (dEtaenergy()/cosh(eta); + if (etclustersBegin(); + + // Loop over the basicClusters inside the target superCluster + for(;theEclust != sc->clustersEnd(); theEclust++) { + if ((**theEclust) == (*bc) ) return true; //matched, so it's used. + } + return false; +} + +double CxCalculator::getBCMax(const reco::SuperClusterRef cluster,int i) +{ + reco::CaloCluster_iterator theEclust = cluster->clustersBegin(); + + double energyMax=0,energySecond=0; + // Loop over the basicClusters inside the target superCluster + for(;theEclust != cluster->clustersEnd(); theEclust++) { + if ((*theEclust)->energy()>energyMax ) { + energySecond=energyMax; + energyMax=(*theEclust)->energy(); + } else if ((*theEclust)->energy()>energySecond) { + energySecond=(*theEclust)->energy(); + } + } + if (i==1) return energyMax; + return energySecond; +} + + +double CxCalculator::getCorrection(const reco::SuperClusterRef cluster, double x, double y,double threshold) +{ + using namespace edm; + using namespace reco; + + // doesn't really work now ^^; (Yen-Jie) + if(!fEBclusters_) { + LogError("CxCalculator") << "Error! Can't get EBclusters for event."; + return -100; + } + + if(!fEEclusters_) { + LogError("CxCalculator") << "Error! Can't get EEclusters for event."; + return -100; + } + + double SClusterEta = cluster->eta(); + double SClusterPhi = cluster->phi(); + double TotalEnergy = 0; + double TotalBC = 0; + + TotalEnergy = 0; + + double Area = PI * (-x*x+y*y) / 100.0; + double nCrystal = Area / 0.0174 / 0.0174; // ignore the difference between endcap and barrel for the moment.... + + for(BasicClusterCollection::const_iterator iclu = fEBclusters_->begin(); + iclu != fEBclusters_->end(); ++iclu) { + const BasicCluster *clu = &(*iclu); + const GlobalPoint clusPoint(clu->x(),clu->y(),clu->z()); + double eta = clusPoint.eta(); + double phi = clusPoint.phi(); + double dEta = fabs(eta-SClusterEta); + double dPhi = fabs(phi-SClusterPhi); + while (dPhi>2*PI) dPhi-=2*PI; + if (dPhi>PI) dPhi=2*PI-dPhi; + double dR = sqrt(dEta*dEta+dPhi*dPhi); + + if (dR>x*0.1&&dRenergy(); + if (esize(); // number of crystals + + } + } + + for(BasicClusterCollection::const_iterator iclu = fEEclusters_->begin(); + iclu != fEEclusters_->end(); ++iclu) { + const BasicCluster *clu = &(*iclu); + const GlobalPoint clusPoint(clu->x(),clu->y(),clu->z()); + double eta = clusPoint.eta(); + double phi = clusPoint.phi(); + double dEta = fabs(eta-SClusterEta); + double dPhi = fabs(phi-SClusterPhi); + while (dPhi>2*PI) dPhi-=2*PI; + if (dPhi>PI) dPhi=2*PI-dPhi; + double dR = sqrt(dEta*dEta+dPhi*dPhi); + + if (dR>x*0.1&&dRenergy(); + if (esize(); // number of crystals + } + } + + + if (TotalBC==0) return 0; + return TotalEnergy/nCrystal; +} + +double CxCalculator::getAvgBCEt(const reco::SuperClusterRef cluster, double x,double phi1,double phi2, double threshold) +// x: eta cut, phi1: deltaPhiMin cut, phi2: deltaPhiMax +{ + using namespace edm; + using namespace reco; + + + if(!fEBclusters_) { + LogError("CxCalculator") << "Error! Can't get EBclusters for event."; + return -100; + } + + if(!fEEclusters_) { + LogError("CxCalculator") << "Error! Can't get EEclusters for event."; + return -100; + } + + double SClusterEta = cluster->eta(); + double SClusterPhi = cluster->phi(); + + double TotalEt = 0; // Total E + double TotalN = 0; // Total N + + TotalEt = - cluster->rawEnergy()/cosh(cluster->eta()); + + if (fabs(SClusterEta) < 1.479) { + //Barrel + for(BasicClusterCollection::const_iterator iclu = fEBclusters_->begin(); + iclu != fEBclusters_->end(); ++iclu) { + const BasicCluster *clu = &(*iclu); + math::XYZVector ClusPoint(clu->x(),clu->y(),clu->z()); + double eta = ClusPoint.eta(); + double phi = ClusPoint.phi(); + + double dEta = fabs(eta-SClusterEta); + double dPhi = fabs(phi-SClusterPhi); + while (dPhi>2*PI) dPhi-=2*PI; + + bool inSuperCluster = checkUsed(cluster,clu); + + if (dEtaphi1*0.1&&dPhienergy()/cosh(eta); + if (etbegin(); + iclu != fEEclusters_->end(); ++iclu) { + const BasicCluster *clu = &(*iclu); + math::XYZVector ClusPoint(clu->x(),clu->y(),clu->z()); + double eta = ClusPoint.eta(); + double phi = ClusPoint.phi(); + + double dEta = fabs(eta-SClusterEta); + double dPhi = fabs(phi-SClusterPhi); + while (dPhi>2*PI) dPhi-=2*PI; + + bool inSuperCluster = checkUsed(cluster,clu); + + if (dEtaphi1*0.1&&dPhienergy()/cosh(eta); + if (eteta(); + double SClusterPhi = cluster->phi(); + + double TotalEt = 0; // Total E + double TotalN = 0; // Total N + + TotalEt = - cluster->rawEnergy()/cosh(cluster->eta()); + + + + if (fabs(SClusterEta) < 1.479) { + //Barrel + for(BasicClusterCollection::const_iterator iclu = fEBclusters_->begin(); + iclu != fEBclusters_->end(); ++iclu) { + const BasicCluster *clu = &(*iclu); + math::XYZVector ClusPoint(clu->x(),clu->y(),clu->z()); + double eta = ClusPoint.eta(); + double phi = ClusPoint.phi(); + + double dEta = fabs(eta-SClusterEta); + double dPhi = fabs(phi-SClusterPhi); + while (dPhi>2*PI) dPhi-=2*PI; + + bool inSuperCluster = checkUsed(cluster,clu); + + if (dEtaphi1*0.1&&dPhienergy()/cosh(eta); + if (etbegin(); + iclu != fEEclusters_->end(); ++iclu) { + const BasicCluster *clu = &(*iclu); + math::XYZVector ClusPoint(clu->x(),clu->y(),clu->z()); + double eta = ClusPoint.eta(); + double phi = ClusPoint.phi(); + + double dEta = fabs(eta-SClusterEta); + double dPhi = fabs(phi-SClusterPhi); + while (dPhi>2*PI) dPhi-=2*PI; + + bool inSuperCluster = checkUsed(cluster,clu); + + if (dEtaphi1*0.1&&dPhienergy()/cosh(eta); + if (et kEEtaBarrelEndcap ) + { + double Zend = kEZ_Endcap ; + if(EtaParticle<0.0 ) Zend = -Zend ; + double Zlen = Zend - Zvertex ; + double RR = Zlen/sinh(EtaParticle); + Theta = atan((RR+plane_Radius)/Zend); + if(Theta<0.0) Theta = Theta+PI ; + ETA = - log(tan(0.5*Theta)); + } + + return ETA; + } + + return EtaParticle; +} + + +//________________________________________________________________________ +double HICaloUtil::EcalPhi(const Candidate &p) +{ + // Calculate the phi of the particle transported to the Ecal. + + int charge = p.charge(); + double phi = p.phi(); + double rhovert = sqrt(p.vertex().X()*p.vertex().X()+p.vertex().Y()*p.vertex().Y()); + if(charge) phi = EcalPhi(p.pt(), p.eta(), phi, charge, rhovert); + return phi; +} + + +//________________________________________________________________________ +double HICaloUtil::EcalPhi(double PtParticle, double EtaParticle, + double PhiParticle, int ChargeParticle, double Rstart) +{ + // Calculate the phi of the particle transported to the Ecal. + + double Rbend = kERBARM-(Rstart/100.); //assumed rstart in cm + double Bend = 0.3 * 4. * Rbend/ 2.0 ; + + //PHI correction + double PHI = 0.0 ; + if( fabs(EtaParticle) <= kEEtaBarrelEndcap) { + if (fabs(Bend/PtParticle)<=1.) { + PHI = PhiParticle - asin(Bend/PtParticle)*ChargeParticle; + if(PHI > PI) {PHI = PHI - 2*PI;} + if(PHI < -PI) {PHI = PHI + 2*PI;} + return PHI; + } + } else { + double Rhit = 0.0 ; + Rhit = kEZENDM / sinh(fabs(EtaParticle)); + if (fabs(((Rhit-(Rstart/100.))/Rbend)*Bend/PtParticle)<=1.) { + PHI = PhiParticle - asin(((Rhit-(Rstart/100.))/Rbend)*Bend/PtParticle)*ChargeParticle; + if(PHI > PI) {PHI = PHI - 2*PI;} + if(PHI < -PI) {PHI = PHI + 2*PI;} + return PHI; + } else { + return PhiParticle; + } + } + + return PhiParticle; +} diff --git a/RecoHI/HiEgammaAlgos/src/RxCalculator.cc b/RecoHI/HiEgammaAlgos/src/RxCalculator.cc new file mode 100755 index 0000000000000..c40db2c5902c1 --- /dev/null +++ b/RecoHI/HiEgammaAlgos/src/RxCalculator.cc @@ -0,0 +1,206 @@ +#include "RecoHI/HiEgammaAlgos/interface/RxCalculator.h" + +#include "FWCore/MessageLogger/interface/MessageLogger.h" + +#include "Geometry/Records/interface/IdealGeometryRecord.h" +#include "Geometry/Records/interface/CaloGeometryRecord.h" +#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" + +#include "DataFormats/Common/interface/Handle.h" +#include "DataFormats/EgammaReco/interface/BasicCluster.h" +#include "DataFormats/EgammaReco/interface/SuperCluster.h" + + +using namespace edm; +using namespace reco; + +#define PI 3.141592653589793238462643383279502884197169399375105820974945 + + +RxCalculator::RxCalculator (const edm::Event &iEvent, const edm::EventSetup &iSetup,const edm::InputTag& hbheLabel,const edm::InputTag& hfLabel,const edm::InputTag& hoLabel) +{ + Handle hfhandle; + iEvent.getByLabel(hfLabel, hfhandle); + if(hfhandle.isValid()) + fHFRecHits_ = hfhandle.product(); + else + fHFRecHits_ = NULL; + + Handle hohandle; + iEvent.getByLabel(hoLabel, hohandle); + if(hohandle.isValid()) + fHORecHits_ = hohandle.product(); + else + fHORecHits_ = NULL; + + Handle hehbhandle; + iEvent.getByLabel(hbheLabel, hehbhandle); + if(hehbhandle.isValid()) + fHBHERecHits_ = hehbhandle.product(); + else + fHBHERecHits_ = NULL; + + ESHandle geometryHandle; + iSetup.get().get(geometryHandle); + if(geometryHandle.isValid()) + geometry_ = geometryHandle.product(); + else + geometry_ = NULL; + +} + + +double RxCalculator::getRx(const reco::SuperClusterRef cluster, double x, double threshold, double innerR ) +{ + using namespace edm; + using namespace reco; + + if(!fHBHERecHits_) { +// LogError("RxCalculator") << "Error! Can't get HBHERecHits for event."; + return -100; + } + + double SClusterEta = cluster->eta(); + double SClusterPhi = cluster->phi(); + double TotalEt = 0; + + for(size_t index = 0; index < fHBHERecHits_->size(); index++) { + const HBHERecHit &rechit = (*fHBHERecHits_)[index]; + const DetId &detid = rechit.id(); + const GlobalPoint& hitpoint = geometry_->getPosition(detid); + double eta = hitpoint.eta(); + double phi = hitpoint.phi(); + double dEta = fabs(eta-SClusterEta); + double dPhi = fabs(phi-SClusterPhi); + while (dPhi>2*PI) dPhi-=2*PI; + if (dPhi>PI) dPhi=2*PI-dPhi; + + if (dPhi>PI) dPhi=2*PI-dPhi; + + double dR = sqrt(dEta * dEta + dPhi * dPhi); + // veto inner cone/////////////// + if ( dR < innerR ) continue; + ///////////////////////////////// + if (dReta(); + double SClusterPhi = cluster->phi(); + double TotalEt = 0; + + for(size_t index = 0; index < fHORecHits_->size(); index++) { + const HORecHit &rechit = (*fHORecHits_)[index]; + const DetId &detid = rechit.id(); + const GlobalPoint& hitpoint = geometry_->getPosition(detid); + double eta = hitpoint.eta(); + double phi = hitpoint.phi(); + double dEta = fabs(eta-SClusterEta); + double dPhi = fabs(phi-SClusterPhi); + while (dPhi>2*PI) dPhi-=2*PI; + if (dPhi>PI) dPhi=2*PI-dPhi; + + double dR = sqrt(dEta * dEta + dPhi * dPhi); + if (dReta(); + double SClusterPhi = cluster->phi(); + double TotalEt = 0; + + for(size_t index = 0; index < fHFRecHits_->size(); index++) { + const HFRecHit &rechit = (*fHFRecHits_)[index]; + const DetId &detid = rechit.id(); + const GlobalPoint& hitpoint = geometry_->getPosition(detid); + double eta = hitpoint.eta(); + double phi = hitpoint.phi(); + double dEta = fabs(eta-SClusterEta); + double dPhi = fabs(phi-SClusterPhi); + while (dPhi>2*PI) dPhi-=2*PI; + if (dPhi>PI) dPhi=2*PI-dPhi; + + + double dR = sqrt(dEta * dEta + dPhi * dPhi); + if (dReta(); + double SClusterPhi = cluster->phi(); + double TotalEt = 0; + + for(size_t index = 0; index < fHBHERecHits_->size(); index++) { + const HBHERecHit &rechit = (*fHBHERecHits_)[index]; + const DetId &detid = rechit.id(); + const GlobalPoint& hitpoint = geometry_->getPosition(detid); + double eta = hitpoint.eta(); + double phi = hitpoint.phi(); + double dEta = fabs(eta-SClusterEta); + double dPhi = fabs(phi-SClusterPhi); + while (dPhi>2*PI) dPhi-=2*PI; + if (dPhi>PI) dPhi=2*PI-dPhi; + + if (dEta + +#include "RecoHI/HiEgammaAlgos/interface/TxCalculator.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" + +#include "Geometry/Records/interface/CaloGeometryRecord.h" +#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" + +#include "DataFormats/Common/interface/Handle.h" +#include "DataFormats/EgammaReco/interface/BasicCluster.h" +#include "DataFormats/EgammaReco/interface/SuperCluster.h" +#include "DataFormats/Math/interface/Vector3D.h" + +#include "FWCore/ServiceRegistry/interface/Service.h" +#include "FWCore/Utilities/interface/RandomNumberGenerator.h" + +#include "CLHEP/Random/RandomEngine.h" + +using namespace edm; +using namespace reco; +using namespace std; +using namespace ROOT::Math::VectorUtil; + + +TxCalculator::TxCalculator (const edm::Event &iEvent, const edm::EventSetup &iSetup,const edm::InputTag& trackLabel) +{ + iEvent.getByLabel(trackLabel, recCollection); + edm::Service rng; + if ( ! rng.isAvailable()) { + throw cms::Exception("Configuration") + << "XXXXXXX requires the RandomNumberGeneratorService\n" + "which is not present in the configuration file. You must add the service\n" + "in the configuration file or remove the modules that require it."; + } + theDice = &rng->getEngine(iEvent.streamID()); +} + + +double TxCalculator::getJurassicArea( double r1, double r2, double width) { + + float theta1 = asin( width / r1); + float theta2 = asin( width / r2); + float theA = sqrt ( r1*r1 + r2*r2 - 2 * r1 * r2 * cos ( theta1 - theta2) ); + float area1 = 0.5 * r1*r1 * ( 3.141592 - 2 * theta1 ) ; + float area2 = 0.5 * r2*r2 * ( 3.141592 - 2 * theta2 ) ; + float area3 = width * theA; + float finalArea = 2 * ( area1 - area2 - area3); + return finalArea; +} + + +double TxCalculator::getMPT( double ptCut , double etaCut ) +{ + using namespace edm; + using namespace reco; + + double sumpx(0), sumpy(0); + + for(reco::TrackCollection::const_iterator + recTrack = recCollection->begin(); recTrack!= recCollection->end(); recTrack++) + { + double pt = recTrack->pt(); + double eta = recTrack->eta(); + + if(pt < ptCut ) + continue; + if ( fabs( eta) > etaCut ) + continue; + + double pxTemp = recTrack->px(); + double pyTemp = recTrack->py(); + + sumpx = sumpx + pxTemp; + sumpy = sumpy + pyTemp; + // cout << " pt = " << recTrack->pt() << " and px = " << pxTemp << " and py = " << pyTemp << endl; + } + // cout << " square = " << sumpx*sumpx + sumpy*sumpy << endl; + double theMPT = sqrt(sumpx*sumpx + sumpy*sumpy) ; + // cout << " mpt = "<< theMPT << endl; + + return theMPT; +} + + +double TxCalculator::getTx(const reco::Photon& cluster, double x, double threshold, double innerDR, double effRatio) +{ + + using namespace edm; + using namespace reco; + + + + double SClusterEta = cluster.eta(); + double SClusterPhi = cluster.phi(); + double TotalPt = 0; + + for(reco::TrackCollection::const_iterator + recTrack = recCollection->begin(); recTrack!= recCollection->end(); recTrack++) + { + double diceNum = theDice->flat(); + if ( (effRatio < 1 ) && ( diceNum > effRatio)) + continue; + + double pt = recTrack->pt(); + double eta2 = recTrack->eta(); + double phi2 = recTrack->phi(); + + if(dRDistance(SClusterEta,SClusterPhi,eta2,phi2) >= 0.1 * x) + continue; + if(dRDistance(SClusterEta,SClusterPhi,eta2,phi2) < innerDR) + continue; + if(pt > threshold) + TotalPt = TotalPt + pt; + } + + return TotalPt; +} + + + + + +double TxCalculator::getCTx(const reco::Photon& cluster, double x, double threshold, double innerDR,double effRatio) +{ + using namespace edm; + using namespace reco; + + double SClusterEta = cluster.eta(); + double SClusterPhi = cluster.phi(); + double TotalPt = 0; + + TotalPt = 0; + + for(reco::TrackCollection::const_iterator + recTrack = recCollection->begin(); recTrack!= recCollection->end(); recTrack++) + { + double diceNum = theDice->flat(); + if ( (effRatio < 1 ) && ( diceNum > effRatio)) + continue; + + + double pt = recTrack->pt(); + double eta2 = recTrack->eta(); + double phi2 = recTrack->phi(); + double dEta = fabs(eta2-SClusterEta); + + if(dEta >= 0.1 * x) + continue; + if(dRDistance(SClusterEta,SClusterPhi,eta2,phi2) < innerDR) + continue; + + if(pt > threshold) + TotalPt = TotalPt + pt; + } + + double Tx = getTx(cluster,x,threshold,innerDR,effRatio); + double CTx = Tx - TotalPt / 40.0 * x; + + return CTx; +} + + + +double TxCalculator::getJt(const reco::Photon& cluster, double r1, double r2, double jWidth, double threshold) +{ + + using namespace edm; + using namespace reco; + + + double SClusterEta = cluster.eta(); + double SClusterPhi = cluster.phi(); + double TotalPt = 0; + + for(reco::TrackCollection::const_iterator + recTrack = recCollection->begin(); recTrack!= recCollection->end(); recTrack++) + { + double pt = recTrack->pt(); + double eta = recTrack->eta(); + double phi = recTrack->phi(); + double dEta = fabs(eta-SClusterEta); + double dPhi = phi-SClusterPhi; + if ( dPhi < -PI ) dPhi = dPhi + 2*PI ; + if ( dPhi > PI ) dPhi = dPhi - 2*PI ; + if ( fabs(dPhi) >PI ) cout << " error!!! dphi > 2pi : " << dPhi << endl; + double dR = sqrt(dEta*dEta+dPhi*dPhi); + // Jurassic Cone ///// + if ( dR > r1 ) continue; + if ( dR < r2 ) continue; + if ( fabs(dEta) < jWidth) continue; + // stupid bug if ( fabs(dPhi) > jWidth) continue; + ////////////////////// + + if(pt > threshold) + TotalPt = TotalPt + pt; + } + + return TotalPt; +} + + +double TxCalculator::getJct(const reco::Photon& cluster, double r1, double r2, double jWidth, double threshold) +{ + + using namespace edm; + using namespace reco; + + + double SClusterEta = cluster.eta(); + double SClusterPhi = cluster.phi(); + double TotalPt = 0; + + for(reco::TrackCollection::const_iterator + recTrack = recCollection->begin(); recTrack!= recCollection->end(); recTrack++) + { + double pt = recTrack->pt(); + double eta = recTrack->eta(); + double phi = recTrack->phi(); + double dEta = fabs(eta-SClusterEta); + double dPhi = phi-SClusterPhi; + if ( dPhi < -PI ) dPhi = dPhi + 2*PI ; + if ( dPhi > PI ) dPhi = dPhi - 2*PI ; + if ( fabs(dPhi) >PI ) cout << " error!!! dphi > 2pi : " << dPhi << endl; + // double dR = sqrt(dEta*dEta+dPhi*dPhi); + + + //////// phi strip ///////// + if ( fabs(dEta) > r1 ) continue; + if ( fabs(dPhi) threshold) + TotalPt = TotalPt + pt; + } + + double areaStrip = 4*PI*r1 - 4*r1*r1; + double areaJura = getJurassicArea(r1,r2, jWidth) ; + double theCJ = getJt(cluster,r1, r2, jWidth, threshold); + + double theCCJ = theCJ - TotalPt * areaJura / areaStrip ; + return theCCJ; + +} + diff --git a/RecoHI/HiEgammaAlgos/src/TxyCalculator.cc b/RecoHI/HiEgammaAlgos/src/TxyCalculator.cc new file mode 100755 index 0000000000000..507ddde47e73d --- /dev/null +++ b/RecoHI/HiEgammaAlgos/src/TxyCalculator.cc @@ -0,0 +1,117 @@ +#include "RecoHI/HiEgammaAlgos/interface/TxyCalculator.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "Geometry/Records/interface/IdealGeometryRecord.h" +#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" +#include "DataFormats/Common/interface/Handle.h" +#include "DataFormats/EgammaReco/interface/BasicCluster.h" +#include "DataFormats/EgammaReco/interface/SuperCluster.h" +#include "DataFormats/Candidate/interface/Candidate.h" + +using namespace edm; +using namespace reco; + +TxyCalculator::TxyCalculator(const edm::Event &iEvent, const edm::EventSetup &iSetup, const edm::InputTag& trackLabel) +{ + // Get reconstructed tracks + iEvent.getByLabel(trackLabel, recCollection); // !! +} + + +int TxyCalculator::getNumAllTracks(double ptCut) +{ + using namespace edm; + using namespace reco; + + int nTracks = 0; + + for(reco::TrackCollection::const_iterator + recTrack = recCollection->begin(); recTrack!= recCollection->end(); recTrack++) + { + double pt = recTrack->pt(); + if ( pt > ptCut) + nTracks = nTracks +1; + } + return nTracks; +} + + +int TxyCalculator::getNumLocalTracks(const reco::Photon& p, double detaCut, double ptCut) +{ + using namespace edm; + using namespace reco; + + int nTracks = 0; + + double eta1 = p.eta(); + double phi1 = p.phi(); + + for(reco::TrackCollection::const_iterator + recTrack = recCollection->begin(); recTrack!= recCollection->end(); recTrack++) + { + double pt = recTrack->pt(); + if ( (pt > ptCut) && ( fabs(eta1 - recTrack->eta()) < detaCut) && ( fabs(calcDphi(recTrack->phi(),phi1)) < 3.141592/2. ) ) + nTracks= nTracks +1; + } + return nTracks; +} + +double TxyCalculator::getTxy(const reco::Photon& p, double x, double y) +{ + using namespace edm; + using namespace reco; + + // if(!recCollection) + // { + // LogError("TxyCalculator") << "Error! The track container is not found."; + // return -100; + // } + + + double eta1 = p.eta(); + double phi1 = p.phi(); + + float txy = 0; + + for(reco::TrackCollection::const_iterator + recTrack = recCollection->begin(); recTrack!= recCollection->end(); recTrack++) + { + double pt = recTrack->pt(); + double eta2 = recTrack->eta(); + double phi2 = recTrack->phi(); + + if(dRDistance(eta1,phi1,eta2,phi2) >= 0.1 * x) + continue; + + if(pt > y * 0.4) + txy = txy + 1; + } + + return txy; +} + +double TxyCalculator::getHollSxy(const reco::Photon& p, double thePtCut, double outerR, double innerR) +{ + using namespace edm; + using namespace reco; + + double eta1 = p.eta(); + double phi1 = p.phi(); + + double ptSum = 0; + + for(reco::TrackCollection::const_iterator + recTrack = recCollection->begin(); recTrack!= recCollection->end(); recTrack++) + { + double pt = recTrack->pt(); + double eta2 = recTrack->eta(); + double phi2 = recTrack->phi(); + if (dRDistance(eta1,phi1,eta2,phi2) >= outerR) + continue; + if (dRDistance(eta1,phi1,eta2,phi2) <= innerR) + continue; + if(pt > thePtCut) + ptSum = ptSum + pt; + } + + return ptSum; +} diff --git a/RecoHI/HiEgammaAlgos/src/dRxyCalculator.cc b/RecoHI/HiEgammaAlgos/src/dRxyCalculator.cc new file mode 100755 index 0000000000000..f0a901186c281 --- /dev/null +++ b/RecoHI/HiEgammaAlgos/src/dRxyCalculator.cc @@ -0,0 +1,61 @@ +#include "RecoHI/HiEgammaAlgos/interface/dRxyCalculator.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "Geometry/Records/interface/IdealGeometryRecord.h" +#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" +#include "DataFormats/Common/interface/Handle.h" +#include "DataFormats/EgammaReco/interface/BasicCluster.h" +#include "DataFormats/EgammaReco/interface/SuperCluster.h" +#include "DataFormats/Candidate/interface/Candidate.h" + +using namespace edm; +using namespace reco; + +dRxyCalculator::dRxyCalculator(const edm::Event &iEvent, const edm::EventSetup &iSetup,const edm::InputTag& trackLabel) +{ + // Get reconstructed tracks + iEvent.getByLabel(trackLabel, recCollection); // !! + +} + +double dRxyCalculator::getDRxy(const reco::Photon& p, double x, double y) +{ + using namespace edm; + using namespace reco; + + double eta1 = p.eta(); + double phi1 = p.phi(); + + std::vector Rxy; + + for(reco::TrackCollection::const_iterator + recTrack = recCollection->begin(); recTrack!= recCollection->end(); recTrack++) + { + double pt = recTrack->pt(); + double eta2 = recTrack->eta(); + double phi2 = recTrack->phi(); + + if(pt < x * 0.4) + continue; + + double dR = dRDistance(eta1,phi1,eta2,phi2); + + if(Rxy.size() < y+1) + { + Rxy.push_back(dR); + sort(Rxy.begin(), Rxy.end()); + continue; + } + + if(dR < Rxy[Rxy.size()-1]) + { + Rxy[Rxy.size()-1] = dR; + sort(Rxy.begin(), Rxy.end()); + } + } + + double rxy = 4; + if (Rxy.size() - diff --git a/RecoHI/HiEvtPlaneAlgos/interface/HiEvtPlaneFlatten.h b/RecoHI/HiEvtPlaneAlgos/interface/HiEvtPlaneFlatten.h index 6587ad50bb03b..c732dec60d83b 100644 --- a/RecoHI/HiEvtPlaneAlgos/interface/HiEvtPlaneFlatten.h +++ b/RecoHI/HiEvtPlaneAlgos/interface/HiEvtPlaneFlatten.h @@ -1,8 +1,17 @@ #ifndef __HiEvtPlaneFlatten__ #define __HiEvtPlaneFlatten__ +// -*- C++ -*- +// +// Package: HiEvtPlaneFlatten +// Class: HiEvtPlaneFlatten +// +// +// // Original Author: Stephen Sanders // Created: Mon Jun 7 14:40:12 EDT 2010 +// +// // system include files #include diff --git a/RecoHI/HiEvtPlaneAlgos/python/HiEvtPlane_cfi.py b/RecoHI/HiEvtPlaneAlgos/python/HiEvtPlane_cfi.py index b593dba240088..21ca2d510dccd 100644 --- a/RecoHI/HiEvtPlaneAlgos/python/HiEvtPlane_cfi.py +++ b/RecoHI/HiEvtPlaneAlgos/python/HiEvtPlane_cfi.py @@ -3,7 +3,8 @@ hiEvtPlane = cms.EDProducer("EvtPlaneProducer", vtxCollection_=cms.InputTag("hiSelectedVertex"), caloCollection_=cms.InputTag("towerMaker"), - trackCollection_=cms.InputTag("hiGeneralTracks"), +# trackCollection_=cms.InputTag("hiGoodTightMergedTracks"), + trackCollection_=cms.InputTag("hiSelectedTracks"), useECAL_ = cms.untracked.bool(True), useHCAL_ = cms.untracked.bool(True), useTrackPtWeight_ = cms.untracked.bool(True), @@ -11,8 +12,8 @@ maxet_ = cms.untracked.double(500.0), minpt_ = cms.untracked.double(0.3), maxpt_ = cms.untracked.double(2.6), - minvtx_ = cms.untracked.double(-100.), - maxvtx_ = cms.untracked.double(100.), + minvtx_ = cms.untracked.double(-10.), + maxvtx_ = cms.untracked.double(10.), dzerr_ = cms.untracked.double(10.), chi2_ = cms.untracked.double(40.) ) diff --git a/RecoHI/HiEvtPlaneAlgos/python/hievtplaneflatcalib_cfi.py b/RecoHI/HiEvtPlaneAlgos/python/hievtplaneflatcalib_cfi.py index 6b32697c9f1c8..0766af2ccf7cd 100644 --- a/RecoHI/HiEvtPlaneAlgos/python/hievtplaneflatcalib_cfi.py +++ b/RecoHI/HiEvtPlaneAlgos/python/hievtplaneflatcalib_cfi.py @@ -1,6 +1,5 @@ import FWCore.ParameterSet.Config as cms hiEvtPlaneFlatCalib = cms.EDAnalyzer('HiEvtPlaneFlatCalib', - vtxCollection_=cms.InputTag("hiSelectedVertex"), genFlatPsi_ = cms.untracked.bool(True) ) diff --git a/RecoHI/HiEvtPlaneAlgos/src/EvtPlaneProducer.cc b/RecoHI/HiEvtPlaneAlgos/src/EvtPlaneProducer.cc index e5f71b972aa9a..cfd61749c3532 100644 --- a/RecoHI/HiEvtPlaneAlgos/src/EvtPlaneProducer.cc +++ b/RecoHI/HiEvtPlaneAlgos/src/EvtPlaneProducer.cc @@ -1,8 +1,22 @@ +// -*- C++ -*- +// +// Package: EvtPlaneProducer +// Class: EvtPlaneProducer +// +/**\class EvtPlaneProducer EvtPlaneProducer.cc RecoHI/EvtPlaneProducer/src/EvtPlaneProducer.cc + +Description: + +Implementation: + +*/ // // Original Author: Sergey Petrushanko // Created: Fri Jul 11 10:05:00 2008 // // +#define TRACKCOLLECTION 1 +//#define RECOCHARGEDCANDIDATECOLLECTION 1 // system include files @@ -113,14 +127,14 @@ class EvtPlaneProducer : public edm::EDProducer { GenPlane *rp[NumEPNames]; - virtual void beginJob() ; - virtual void produce(edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + virtual void beginJob() override ; + virtual void produce(edm::Event&, const edm::EventSetup&) override; + virtual void endJob() override ; // ----------member data --------------------------- - edm::EDGetTokenT vtxCollection_; - edm::EDGetTokenT caloCollection_; - edm::EDGetTokenT trackCollection_; + edm::InputTag vtxCollection_; + edm::InputTag caloCollection_; + edm::InputTag trackCollection_; bool useECAL_; bool useHCAL_; bool useTrack_; @@ -154,9 +168,9 @@ EvtPlaneProducer::EvtPlaneProducer(const edm::ParameterSet& iConfig) //register your products - vtxCollection_ = consumes(iConfig.getParameter("vtxCollection_")); - caloCollection_ = consumes(iConfig.getParameter("caloCollection_")); - trackCollection_ = consumes(iConfig.getParameter("trackCollection_")); + vtxCollection_ = iConfig.getParameter("vtxCollection_"); + caloCollection_ = iConfig.getParameter("caloCollection_"); + trackCollection_ = iConfig.getParameter("trackCollection_"); useECAL_ = iConfig.getUntrackedParameter("useECAL_",true); useHCAL_ = iConfig.getUntrackedParameter("useHCAL_",true); useTrack_ = iConfig.getUntrackedParameter("useTrack",true); @@ -204,7 +218,7 @@ EvtPlaneProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) //Get Vertex // edm::Handle vertexCollection3; - iEvent.getByToken(vtxCollection_,vertexCollection3); + iEvent.getByLabel(vtxCollection_,vertexCollection3); const reco::VertexCollection * vertices3 = vertexCollection3.product(); vs_sell = vertices3->size(); if(vs_sell>0) { @@ -220,7 +234,7 @@ EvtPlaneProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) double tower_energyet, tower_energyet_e, tower_energyet_h; double s1, s2, s13,s23,s14,s24,s15,s25,s16,s26; Handle calotower; - iEvent.getByToken(caloCollection_,calotower); + iEvent.getByLabel(caloCollection_,calotower); if(calotower.isValid()){ @@ -279,19 +293,28 @@ EvtPlaneProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) double track_eta; double track_phi; double track_pt; - +#ifdef TRACKCOLLECTION Handle tracks; - iEvent.getByToken(trackCollection_, tracks); + iEvent.getByLabel(trackCollection_, tracks); if(tracks.isValid()){ for(reco::TrackCollection::const_iterator j = tracks->begin(); j != tracks->end(); j++){ //Find possible collections with command line: edmDumpEventContent *.root - +#endif +#ifdef RECOCHARGEDCANDIDATECOLLECTION + edm::Handle trackCollection; + iEvent.getByLabel("allMergedPtSplit12Tracks",trackCollection); + // iEvent.getByLabel("hiGoodMergedTracks",trackCollection); + if(trackCollection.isValid()){ + + const reco::RecoChargedCandidateCollection * tracks = trackCollection.product(); + for(reco::RecoChargedCandidateCollection::const_iterator j = tracks->begin(); j != tracks->end(); j++){ +#endif edm::Handle vertex; - iEvent.getByToken(vtxCollection_, vertex); + iEvent.getByLabel(vtxCollection_, vertex); - // find the vertex point and error +// find the vertex point and error math::XYZPoint vtxPoint(0.0,0.0,0.0); double vzErr =0.0, vxErr=0.0, vyErr=0.0; diff --git a/RecoHI/HiEvtPlaneAlgos/src/HiEvtPlaneFlatCalib.cc b/RecoHI/HiEvtPlaneAlgos/src/HiEvtPlaneFlatCalib.cc index a5dad698616d6..0f84638957705 100644 --- a/RecoHI/HiEvtPlaneAlgos/src/HiEvtPlaneFlatCalib.cc +++ b/RecoHI/HiEvtPlaneAlgos/src/HiEvtPlaneFlatCalib.cc @@ -1,3 +1,16 @@ +// -*- C++ -*- +// +// Package: HiEvtPlaneFlatCalib +// Class: HiEvtPlaneFlatCalib +// +/**\class HiEvtPlaneFlatCalib HiEvtPlaneFlatCalib.cc HiEvtPlaneFlatten/HiEvtPlaneFlatCalib/src/HiEvtPlaneFlatCalib.cc + + + Description: [one line class summary] + + Implementation: + [Notes on implementation] +*/ // // Original Author: Stephen Sanders // Created: Sat Jun 26 16:04:04 EDT 2010 @@ -16,8 +29,7 @@ #include "FWCore/Framework/interface/MakerMacros.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "RecoHI/HiCentralityAlgos/interface/CentralityProvider.h" - +#include "DataFormats/HeavyIonEvent/interface/CentralityProvider.h" #include "Math/Vector3D.h" #include "DataFormats/Common/interface/Handle.h" @@ -74,7 +86,6 @@ class HiEvtPlaneFlatCalib : public edm::EDAnalyzer { virtual void endJob() override ; // ----------member data --------------------------- - edm::EDGetTokenT vtxCollection_; edm::Service fs; // const CentralityBins * cbins_; CentralityProvider * centrality_; @@ -120,7 +131,6 @@ class HiEvtPlaneFlatCalib : public edm::EDAnalyzer { HiEvtPlaneFlatCalib::HiEvtPlaneFlatCalib(const edm::ParameterSet& iConfig) { genFlatPsi_ = iConfig.getUntrackedParameter("genFlatPsi_",true); - vtxCollection_ = consumes(iConfig.getParameter("vtxCollection_")); // NumCentBins=9; wcent[0] = 0; @@ -205,7 +215,7 @@ HiEvtPlaneFlatCalib::analyze(const edm::Event& iEvent, const edm::EventSetup& iS //Get Vertex // edm::Handle vertexCollection3; - iEvent.getByToken(vtxCollection_,vertexCollection3); + iEvent.getByLabel("hiSelectedVertex",vertexCollection3); const reco::VertexCollection * vertices3 = vertexCollection3.product(); vs_sell = vertices3->size(); if(vs_sell>0) { diff --git a/RecoHI/HiEvtPlaneAlgos/src/HiEvtPlaneFlatProducer.cc b/RecoHI/HiEvtPlaneAlgos/src/HiEvtPlaneFlatProducer.cc index 26c88e91291d9..c25ed2e1501b8 100644 --- a/RecoHI/HiEvtPlaneAlgos/src/HiEvtPlaneFlatProducer.cc +++ b/RecoHI/HiEvtPlaneAlgos/src/HiEvtPlaneFlatProducer.cc @@ -1,3 +1,16 @@ +// -*- C++ -*- +// +// Package: HiEvtPlaneFlatProducer +// Class: HiEvtPlaneFlatProducer +// +/**\class HiEvtPlaneFlatProducer HiEvtPlaneFlatProducer.cc HiEvtPlaneFlatten/HiEvtPlaneFlatProducer/src/HiEvtPlaneFlatProducer.cc + + + Description: [one line class summary] + + Implementation: + [Notes on implementation] +*/ // // Original Author: Stephen Sanders // Created: Sat Jun 26 16:04:04 EDT 2010 @@ -80,9 +93,9 @@ class HiEvtPlaneFlatProducer : public edm::EDProducer { // ----------member data --------------------------- - edm::EDGetTokenT vtxCollection_; - edm::EDGetTokenT inputPlanes_; - edm::EDGetTokenT centrality_; + edm::InputTag vtxCollection_; + edm::InputTag inputPlanes_; + edm::InputTag centrality_; int vs_sell; // vertex collection size float vzr_sell; @@ -113,9 +126,9 @@ typedef TrackingParticleRefVector::iterator tp_iterator; HiEvtPlaneFlatProducer::HiEvtPlaneFlatProducer(const edm::ParameterSet& iConfig) { - vtxCollection_ = consumes(iConfig.getParameter("vtxCollection_")); - inputPlanes_ = consumes(iConfig.getParameter("inputPlanes_")); - centrality_ = consumes(iConfig.getParameter("centrality_")); + vtxCollection_ = iConfig.getParameter("vtxCollection_"); + inputPlanes_ = iConfig.getParameter("inputPlanes_"); + centrality_ = iConfig.getParameter("centrality_"); storeNames_ = 1; //register your products produces(); @@ -155,7 +168,7 @@ HiEvtPlaneFlatProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu // edm::Handle ch; - iEvent.getByToken(centrality_,ch); + iEvent.getByLabel(centrality_,ch); int bin = *(ch.product()); // double centval = 2.5*bin+1.25; @@ -163,7 +176,7 @@ HiEvtPlaneFlatProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu //Get Vertex // edm::Handle vertexCollection3; - iEvent.getByToken(vtxCollection_,vertexCollection3); + iEvent.getByLabel(vtxCollection_,vertexCollection3); const reco::VertexCollection * vertices3 = vertexCollection3.product(); vs_sell = vertices3->size(); if(vs_sell>0) { @@ -193,7 +206,7 @@ HiEvtPlaneFlatProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetu // Handle evtPlanes; - iEvent.getByToken(inputPlanes_,evtPlanes); + iEvent.getByLabel(inputPlanes_,evtPlanes); if(!evtPlanes.isValid()){ // cout << "Error! Can't get hiEvtPlane product!" << endl; diff --git a/RecoHI/HiEvtPlaneAlgos/src/MoveFlatParamsToDB.cc b/RecoHI/HiEvtPlaneAlgos/src/MoveFlatParamsToDB.cc index ffccef8ab223c..05890281d3492 100644 --- a/RecoHI/HiEvtPlaneAlgos/src/MoveFlatParamsToDB.cc +++ b/RecoHI/HiEvtPlaneAlgos/src/MoveFlatParamsToDB.cc @@ -1,3 +1,15 @@ +// -*- C++ -*- +// +// Package: MoveFlatParamsToDB +// Class: MoveFlatParamsToDB +// +/**\class MoveFlatParamsToDB MoveFlatParamsToDB.cc HiEvtPlaneFlatten/MoveFlatParamsToDB/src/MoveFlatParamsToDB.cc + + Description: [one line class summary] + + Implementation: + [Notes on implementation] +*/ // // Original Author: Stephen Sanders // Created: Fri Jun 11 12:56:15 EDT 2010 diff --git a/RecoHI/HiJetAlgos/BuildFile.xml b/RecoHI/HiJetAlgos/BuildFile.xml index 2d15a3d8adbc7..00541478b3f3d 100644 --- a/RecoHI/HiJetAlgos/BuildFile.xml +++ b/RecoHI/HiJetAlgos/BuildFile.xml @@ -1,10 +1,6 @@ - - - - diff --git a/RecoHI/HiJetAlgos/interface/JetOffsetCorrector.h b/RecoHI/HiJetAlgos/interface/JetOffsetCorrector.h index b60d830f13e18..33e2cca4d4067 100644 --- a/RecoHI/HiJetAlgos/interface/JetOffsetCorrector.h +++ b/RecoHI/HiJetAlgos/interface/JetOffsetCorrector.h @@ -6,7 +6,7 @@ class JetOffsetCorrector : public PileUpSubtractor { public: - JetOffsetCorrector(const edm::ParameterSet& iConfig, edm::ConsumesCollector && iC) : PileUpSubtractor(iConfig, std::move(iC)) {;} + JetOffsetCorrector(const edm::ParameterSet& iConfig) : PileUpSubtractor(iConfig) {;} ~JetOffsetCorrector(){;} }; diff --git a/RecoHI/HiJetAlgos/interface/MultipleAlgoIterator.h b/RecoHI/HiJetAlgos/interface/MultipleAlgoIterator.h index 42b9ae5c2ef4d..2047d1bf1f913 100644 --- a/RecoHI/HiJetAlgos/interface/MultipleAlgoIterator.h +++ b/RecoHI/HiJetAlgos/interface/MultipleAlgoIterator.h @@ -5,7 +5,7 @@ class MultipleAlgoIterator : public PileUpSubtractor { public: - MultipleAlgoIterator(const edm::ParameterSet& iConfig, edm::ConsumesCollector && iC) : PileUpSubtractor(iConfig, std::move(iC)), + MultipleAlgoIterator(const edm::ParameterSet& iConfig) : PileUpSubtractor(iConfig), sumRecHits_(iConfig.getParameter("sumRecHits")), dropZeroTowers_(iConfig.getUntrackedParameter("dropZeroTowers",true)) {;} diff --git a/RecoHI/HiJetAlgos/interface/ParametrizedSubtractor.h b/RecoHI/HiJetAlgos/interface/ParametrizedSubtractor.h index a41bf04491c20..2b308f9e42ec7 100644 --- a/RecoHI/HiJetAlgos/interface/ParametrizedSubtractor.h +++ b/RecoHI/HiJetAlgos/interface/ParametrizedSubtractor.h @@ -5,13 +5,14 @@ #include "RecoJets/JetProducers/interface/PileUpSubtractor.h" #include "DataFormats/HeavyIonEvent/interface/Centrality.h" +#include "FWCore/Utilities/interface/InputTag.h" #include "TH1D.h" #include "TF1.h" class ParametrizedSubtractor : public PileUpSubtractor { public: - ParametrizedSubtractor(const edm::ParameterSet& iConfig, edm::ConsumesCollector && iC); + ParametrizedSubtractor(const edm::ParameterSet& iConfig); virtual void setupGeometryMap(edm::Event& iEvent,const edm::EventSetup& iSetup); virtual void calculatePedestal( std::vector const & coll ); virtual void subtractPedestal(std::vector & coll); @@ -33,7 +34,7 @@ class ParametrizedSubtractor : public PileUpSubtractor { int bin_; double centrality_; const CentralityBins * cbins_; - edm::EDGetTokenT centTag_; + edm::InputTag centTag_; std::vector hEta; std::vector hEtaMean; std::vector hEtaRMS; diff --git a/RecoHI/HiJetAlgos/interface/ReflectedIterator.h b/RecoHI/HiJetAlgos/interface/ReflectedIterator.h index 9e0f346ae6d44..1af2f734d49f2 100644 --- a/RecoHI/HiJetAlgos/interface/ReflectedIterator.h +++ b/RecoHI/HiJetAlgos/interface/ReflectedIterator.h @@ -5,7 +5,7 @@ class ReflectedIterator : public PileUpSubtractor { public: - ReflectedIterator(const edm::ParameterSet& iConfig, edm::ConsumesCollector && iC) : PileUpSubtractor(iConfig, std::move(iC)), + ReflectedIterator(const edm::ParameterSet& iConfig) : PileUpSubtractor(iConfig), sumRecHits_(iConfig.getParameter("sumRecHits")), dropZeroTowers_(iConfig.getUntrackedParameter("dropZeroTowers",true)) {;} diff --git a/RecoHI/HiJetAlgos/interface/UECalibration.h b/RecoHI/HiJetAlgos/interface/UECalibration.h deleted file mode 100644 index 5755b38247ed1..0000000000000 --- a/RecoHI/HiJetAlgos/interface/UECalibration.h +++ /dev/null @@ -1,101 +0,0 @@ -#ifndef __HiJetAlgos_UECalibration_h__ -#define __HiJetAlgos_UECalibration_h__ - -///////////////////////////////////////////////////////////////////// -// SVD Block Predictor -#include -#include - -#include "FWCore/ParameterSet/interface/FileInPath.h" - -struct UECalibration{ - explicit UECalibration(bool isRealData = true, bool isCalo = false){ - np[0] = 3; // Number of reduced PF ID (track, ECAL, HCAL) - np[1] = 15; // Number of pseudorapidity block - np[2] = 5; // Fourier series order - np[3] = 2; // Re or Im - np[4] = 82; // Number of feature parameter - - ni0[0] = np[1]; - ni0[1] = 344; - - ni1[0] = np[1]; - ni1[1] = 344; - - ni2[0] = np[1]; - ni2[1] = 82; - - index = 0; - - unsigned int Nnp_full = np[0] * np[1] * np[2] * np[3] * np[4]; - unsigned int Nnp = np[0] * np[1] * (1 + (np[2] - 1) * np[3]) * np[4]; - unsigned int Nni0 = ni0[0]*ni0[1]; - unsigned int Nni1 = ni1[0]*ni1[1]; - unsigned int Nni2 = ni2[0]*ni2[1]; - - memset(ue_predictor_pf, 0, Nnp_full * sizeof(float)); - memset(ue_interpolation_pf0, 0, Nni0 * sizeof(float)); - memset(ue_interpolation_pf1, 0, Nni1 * sizeof(float)); - memset(ue_interpolation_pf2, 0, Nni2 * sizeof(float)); - - std::string calibrationFile; - - if(isCalo){ - if(isRealData) calibrationFile = "RecoHI/HiJetAlgos/data/ue_calibrations_calo_data.txt"; - if(!isRealData) calibrationFile = "RecoHI/HiJetAlgos/data/ue_calibrations_calo_mc.txt"; - }else{ - if(isRealData) calibrationFile = "RecoHI/HiJetAlgos/data/ue_calibrations_pf_data.txt"; - if(!isRealData) calibrationFile = "RecoHI/HiJetAlgos/data/ue_calibrations_pf_mc.txt"; - } - - edm::FileInPath ueData(calibrationFile.data()); - std::string qpDataName = ueData.fullPath(); - std::ifstream in( qpDataName.c_str() ); - std::string line; - - while( std::getline( in, line)){ - if(!line.size() || line[0]=='#') { - continue; - } - std::istringstream linestream(line); - float val; - int bin0, bin1, bin2, bin3, bin4; - if(index < Nnp){ - // cout<<"predictor "<>bin0>>bin1>>bin2>>bin3>>bin4>>val; - ue_predictor_pf[bin0][bin1][bin2][bin3][bin4] = val; - }else if(index < Nnp + Nni0){ - // cout<<"inter_0 "<>bin0>>bin1>>val; - ue_interpolation_pf0[bin0][bin1] = val; - }else if(index < Nnp + Nni0 + Nni1){ - // cout<<"inter_1 "<>bin0>>bin1>>val; - ue_interpolation_pf1[bin0][bin1] = val; - }else if(index < Nnp + Nni0 + Nni1 + Nni2){ - // cout<<"inter_2 "<>bin0>>bin1>>val; - ue_interpolation_pf2[bin0][bin1] = val; - } - ++index; - } - } - - unsigned int index, - np[5], - ni0[2], - ni1[2], - ni2[2]; - - float ue_predictor_pf[3][15][5][2][82], - ue_interpolation_pf0[15][344], - ue_interpolation_pf1[15][344], - ue_interpolation_pf2[15][82]; - -}; - - -#endif - - - diff --git a/RecoHI/HiJetAlgos/interface/UEParameters.h b/RecoHI/HiJetAlgos/interface/UEParameters.h deleted file mode 100644 index a9d75302dde76..0000000000000 --- a/RecoHI/HiJetAlgos/interface/UEParameters.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef __HiJetAlgos_UEParameters_h__ -#define __HiJetAlgos_UEParameters_h__ - -#include - -class UEParameters { - -private: - static const size_t nreduced_particle_flow_id = 3; - const std::vector *v_; - int nn_; - int neta_; - boost::const_multi_array_ref *parameters_; - -public: - UEParameters(const std::vector *v, int nn, int neta); - ~UEParameters(){delete parameters_;} - const std::vector& get_raw(void) const {return *v_;} - - void get_fourier(double &re, double &im, size_t n, size_t eta, int type = -1) const; - double get_sum_pt(int eta, int type = -1) const; - double get_vn(int n, int eta, int type = -1) const; - double get_psin(int n, int eta, int type = -1) const; -}; - -#endif diff --git a/RecoHI/HiJetAlgos/interface/VoronoiAlgorithm.h b/RecoHI/HiJetAlgos/interface/VoronoiAlgorithm.h deleted file mode 100644 index 54eed2e0b1a8a..0000000000000 --- a/RecoHI/HiJetAlgos/interface/VoronoiAlgorithm.h +++ /dev/null @@ -1,153 +0,0 @@ -#ifndef __VoronoiAlgorithm_h__ -#define __VoronoiAlgorithm_h__ - -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include "DataFormats/Math/interface/LorentzVector.h" -#include "DataFormats/Math/interface/deltaR.h" -#include "RecoHI/HiJetAlgos/interface/UECalibration.h" - -class VoronoiAlgorithm { -private: - // - typedef CGAL::Delaunay_triangulation_2< - CGAL::Exact_predicates_inexact_constructions_kernel> - delaunay_triangulation_t; - typedef delaunay_triangulation_t::Point point_2d_t; - class particle_t { - public: - math::PtEtaPhiELorentzVector momentum; - unsigned int reduced_particle_flow_id; - double area; - double momentum_perp_subtracted; - double momentum_perp_subtracted_unequalized; - std::set::iterator> incident; - particle_t(math::PtEtaPhiELorentzVector p, - unsigned int i, double a = NAN, - double ps = NAN) - : momentum(p), reduced_particle_flow_id(i), area(a), - momentum_perp_subtracted(ps), - momentum_perp_subtracted_unequalized(ps), - incident(std::set:: - iterator>()) - { - } - inline operator point_2d_t(void) const - { - return point_2d_t(momentum.Eta(), momentum.Phi()); - } - }; - typedef std::vector event_t; - // Remaining CGAL classes - typedef CGAL::Voronoi_diagram_2< - delaunay_triangulation_t, - CGAL::Delaunay_triangulation_adaptation_traits_2< - delaunay_triangulation_t>, - CGAL:: - Delaunay_triangulation_caching_degeneracy_removal_policy_2< - delaunay_triangulation_t> > voronoi_diagram_t; - typedef CGAL::Polygon_2< - CGAL::Exact_predicates_inexact_constructions_kernel> - polygon_t; -public: - static const size_t nreduced_particle_flow_id = 3; - static const size_t nfourier = 5; -protected: - std::vector _edge_pseudorapidity; - std::vector _cms_hcal_edge_pseudorapidity; - std::vector _cms_ecal_edge_pseudorapidity; - bool _remove_nonpositive; - std::pair _equalization_threshold; - double _radial_distance_square_max; - double _positive_bound_scale; - bool _subtracted; - event_t _event; - boost::multi_array *_perp_fourier; - std::vector _feature; - std::vector _active; - std::vector > _recombine; - std::vector > _recombine_index; - std::vector > _recombine_unsigned; - std::vector _recombine_tie; - size_t _ncost; - std::vector _nblock_subtract; - void *_lp_environment; - void *_lp_problem; - // calibrations - UECalibration *ue; -private: - void initialize_geometry(void); - void allocate(void); - void deallocate(void); - void event_fourier(void); - void feature_extract(void); - void voronoi_area_incident(void); - void subtract_momentum(void); - void recombine_link(void); - void lp_populate(void *lp_problem); - void equalize(void); - void remove_nonpositive(void); - void subtract_if_necessary(void); -public: - VoronoiAlgorithm( - const double dr_max, - const bool isRealData = true, - const bool isCalo = false, - const std::pair equalization_threshold = - std::pair(5.0, 35.0), - const bool remove_nonpositive = true); - ~VoronoiAlgorithm(void); - /** - * Add a new unsubtracted particle to the current event - * - * @param[in] perp transverse momentum - * @param[in] pseudorapidity pseudorapidity - * @param[in] azimuth azimuth - * @param[in] reduced_particle_flow_id reduced particle - * flow ID, between 0 and 2 (inclusive) - */ - void push_back_particle( - const double perp, const double pseudorapidity, - const double azimuth, - const unsigned int reduced_particle_flow_id); - /** - * Clears the list of unsubtracted particles - */ - void clear(void); - /** - * Returns the transverse momenta of the subtracted particles - * - * @return vector of transverse momenta - */ - std::vector subtracted_equalized_perp(void); - std::vector subtracted_unequalized_perp(void); - /** - * Returns the area in the Voronoi diagram diagram occupied by - * a given particle - * - * @return vector of area - */ - std::vector particle_area(void); - /** - * Returns the incident particles in the Delaunay diagram - * (particles that has a given particle as the nearest - * neighbor) - * - * @return vector of sets of incident particles - * indices, using the original indexing - */ - std::vector > particle_incident(void); - std::vector perp_fourier(void); - size_t nedge_pseudorapidity(void) const; -}; - -#endif diff --git a/RecoHI/HiJetAlgos/interface/VoronoiSubtractor.h b/RecoHI/HiJetAlgos/interface/VoronoiSubtractor.h deleted file mode 100644 index 144545cddb084..0000000000000 --- a/RecoHI/HiJetAlgos/interface/VoronoiSubtractor.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef __VoronoiSubtractor_h_ -#define __VoronoiSubtractor_h_ - -#include "RecoJets/JetProducers/interface/PileUpSubtractor.h" -#include "DataFormats/HeavyIonEvent/interface/VoronoiBackground.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" - -class VoronoiSubtractor : public PileUpSubtractor { - public: - VoronoiSubtractor(const edm::ParameterSet& iConfig, edm::ConsumesCollector && iC); - virtual void setupGeometryMap(edm::Event& iEvent,const edm::EventSetup& iSetup); - virtual void calculatePedestal(std::vector const & coll); - virtual void subtractPedestal(std::vector & coll); - virtual void calculateOrphanInput(std::vector & orphanInput); - virtual void offsetCorrectJets(); - - bool match(fastjet::PseudoJet, fastjet::PseudoJet); - - ~VoronoiSubtractor(){;} - - private: - edm::Handle candidates_; - edm::Handle backgrounds_; - edm::EDGetTokenT srcCand_; - edm::EDGetTokenT > srcVor_; - std::vector droppedCandidates_; - bool dropZeroTowers_; - bool addNegativesFromCone_; - double infinitesimalPt_; - double rParam_; - -}; - - -#endif diff --git a/RecoHI/HiJetAlgos/plugins/BuildFile.xml b/RecoHI/HiJetAlgos/plugins/BuildFile.xml index efd981f1d32cf..8ca5f1457dda6 100644 --- a/RecoHI/HiJetAlgos/plugins/BuildFile.xml +++ b/RecoHI/HiJetAlgos/plugins/BuildFile.xml @@ -4,14 +4,12 @@ - - - - - - - - + + + + + + + - diff --git a/RecoHI/HiJetAlgos/plugins/HiGenCleaner.cc b/RecoHI/HiJetAlgos/plugins/HiGenCleaner.cc index 8891851e46c7d..dd9a616161140 100644 --- a/RecoHI/HiJetAlgos/plugins/HiGenCleaner.cc +++ b/RecoHI/HiJetAlgos/plugins/HiGenCleaner.cc @@ -58,7 +58,7 @@ class HiGenCleaner : public edm::EDProducer { virtual void produce(edm::Event&, const edm::EventSetup&) override; // ----------member data --------------------------- - edm::EDGetTokenT > jetSrc_; + InputTag jetSrc_; double deltaR_; double ptCut_; bool makeNew_; @@ -81,14 +81,14 @@ class HiGenCleaner : public edm::EDProducer { template HiGenCleaner::HiGenCleaner(const edm::ParameterSet& iConfig) : - jetSrc_(consumes >(iConfig.getParameter("src"))), + jetSrc_(iConfig.getParameter( "src")), deltaR_(iConfig.getParameter("deltaR")), ptCut_(iConfig.getParameter("ptCut")), makeNew_(iConfig.getUntrackedParameter("createNewCollection",true)), fillDummy_(iConfig.getUntrackedParameter("fillDummyEntries",true)) { - std::string alias = (iConfig.getParameter( "src")).label(); - produces().setBranchAlias (alias); + std::string alias = jetSrc_.label(); + produces().setBranchAlias (alias); } template @@ -115,7 +115,7 @@ HiGenCleaner::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) jets = auto_ptr(new T2Collection); edm::Handle > genjets; - iEvent.getByToken(jetSrc_,genjets); + iEvent.getByLabel(jetSrc_,genjets); int jetsize = genjets->size(); diff --git a/RecoHI/HiJetAlgos/plugins/HiL1Subtractor.cc b/RecoHI/HiJetAlgos/plugins/HiL1Subtractor.cc index 22943a5d5c0f0..2d43bb464324e 100644 --- a/RecoHI/HiJetAlgos/plugins/HiL1Subtractor.cc +++ b/RecoHI/HiJetAlgos/plugins/HiL1Subtractor.cc @@ -1,4 +1,7 @@ #include "RecoHI/HiJetAlgos/plugins/HiL1Subtractor.h" +#include "DataFormats/JetReco/interface/CaloJetCollection.h" +#include "DataFormats/JetReco/interface/PFJetCollection.h" +#include "DataFormats/JetReco/interface/GenJetCollection.h" #include @@ -18,24 +21,20 @@ double medianPtkt[12]; // constructors and destructor // HiL1Subtractor::HiL1Subtractor(const edm::ParameterSet& iConfig) : - jetType_ (iConfig.getParameter("jetType") ), - rhoTagString_ (iConfig.getParameter("rhoTag") ) + src_ ( iConfig.getParameter("src") ), + jetType_ (iConfig.getParameter("jetType") ), + rhoTag_ (iConfig.getParameter("rhoTag") ) { - rhoTag_ = (consumes > (rhoTagString_)); if(jetType_ == "CaloJet"){ produces(); - caloJetSrc_ = (consumes< edm::View >(iConfig.getParameter("src"))); } else if(jetType_ == "PFJet"){ produces(); - pfJetSrc_ = (consumes< edm::View >(iConfig.getParameter("src"))); } else if(jetType_ == "GenJet"){ - produces(); - genJetSrc_ = (consumes< edm::View >(iConfig.getParameter("src"))); - + produces(); } else{ throw cms::Exception("InvalidInput") << "invalid jet type in HiL1Subtractor\n"; @@ -64,12 +63,12 @@ HiL1Subtractor::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) if(jetType_ == "GenJet"){ std::auto_ptr jets( new reco::GenJetCollection); edm::Handle< edm::View > h_jets; - iEvent.getByToken( genJetSrc_, h_jets ); + iEvent.getByLabel( src_, h_jets ); // Grab appropriate rho, hard coded for the moment edm::Handle > rs; - iEvent.getByToken(rhoTag_, rs); - + iEvent.getByLabel(edm::InputTag(rhoTag_,"rhos"),rs); + //iEvent.getByLabel(edm::InputTag("ic5CaloJets","rhos"),rs); int rsize = rs->size(); for(int j = 0; j < rsize; j++){ @@ -120,11 +119,12 @@ HiL1Subtractor::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) }else if(jetType_ == "CaloJet"){ std::auto_ptr jets( new reco::CaloJetCollection); edm::Handle< edm::View > h_jets; - iEvent.getByToken( caloJetSrc_, h_jets ); + iEvent.getByLabel( src_, h_jets ); // Grab appropriate rho, hard coded for the moment edm::Handle > rs; - iEvent.getByToken(rhoTag_, rs); + iEvent.getByLabel(edm::InputTag(rhoTag_,"rhos"),rs); + //iEvent.getByLabel(edm::InputTag("ic5CaloJets","rhos"),rs); int rsize = rs->size(); @@ -181,11 +181,12 @@ HiL1Subtractor::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) else if(jetType_ == "PFJet"){ std::auto_ptr jets( new reco::PFJetCollection); edm::Handle< edm::View > h_jets; - iEvent.getByToken( pfJetSrc_, h_jets ); + iEvent.getByLabel( src_, h_jets ); // Grab appropriate rho, hard coded for the moment edm::Handle > rs; - iEvent.getByToken(rhoTag_,rs); + iEvent.getByLabel(edm::InputTag(rhoTag_,"rhos"),rs); + //iEvent.getByLabel(edm::InputTag("ic5CaloJets","rhos"),rs); int rsize = rs->size(); diff --git a/RecoHI/HiJetAlgos/plugins/HiL1Subtractor.h b/RecoHI/HiJetAlgos/plugins/HiL1Subtractor.h index 184e43b1f2335..8571f5cb66978 100644 --- a/RecoHI/HiJetAlgos/plugins/HiL1Subtractor.h +++ b/RecoHI/HiJetAlgos/plugins/HiL1Subtractor.h @@ -31,10 +31,8 @@ #include "FWCore/Framework/interface/MakerMacros.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Utilities/interface/InputTag.h" -#include "DataFormats/JetReco/interface/GenJetCollection.h" -#include "DataFormats/JetReco/interface/CaloJetCollection.h" -#include "DataFormats/JetReco/interface/PFJetCollection.h" // // class declaration @@ -60,16 +58,11 @@ class HiL1Subtractor : public edm::EDProducer { // ----------member data --------------------------- - // input jet source - edm::EDGetTokenT > genJetSrc_; - edm::EDGetTokenT > caloJetSrc_; - edm::EDGetTokenT > pfJetSrc_; - + edm::InputTag src_; // input jet source + protected: std::string jetType_; // Type of jet - std::string rhoTagString_; // Algorithm for rho estimation - - edm::EDGetTokenT > rhoTag_; + std::string rhoTag_; // Algorithm for rho estimation }; diff --git a/RecoHI/HiJetAlgos/plugins/ParticleTowerProducer.cc b/RecoHI/HiJetAlgos/plugins/ParticleTowerProducer.cc index 26f4e3ed5fd19..81442b95d58ef 100644 --- a/RecoHI/HiJetAlgos/plugins/ParticleTowerProducer.cc +++ b/RecoHI/HiJetAlgos/plugins/ParticleTowerProducer.cc @@ -66,8 +66,8 @@ ParticleTowerProducer::ParticleTowerProducer(const edm::ParameterSet& iConfig): geo_(0) { //register your products - src_ = consumes(iConfig.getParameter("src")); - useHF_ = iConfig.getParameter("useHF"); + src_ = iConfig.getParameter("src"); + useHF_ = iConfig.getUntrackedParameter("useHF"); produces(); @@ -110,7 +110,7 @@ ParticleTowerProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup edm::Handle inputsHandle; - iEvent.getByToken(src_, inputsHandle); + iEvent.getByLabel(src_, inputsHandle); for(reco::PFCandidateCollection::const_iterator ci = inputsHandle->begin(); ci!=inputsHandle->end(); ++ci) { diff --git a/RecoHI/HiJetAlgos/plugins/ParticleTowerProducer.h b/RecoHI/HiJetAlgos/plugins/ParticleTowerProducer.h index 89cdf217d0b4f..4daff6bb78239 100644 --- a/RecoHI/HiJetAlgos/plugins/ParticleTowerProducer.h +++ b/RecoHI/HiJetAlgos/plugins/ParticleTowerProducer.h @@ -44,8 +44,8 @@ class ParticleTowerProducer : public edm::EDProducer { int phi2iphi(double phi, int ieta) const; // ----------member data --------------------------- - - edm::EDGetTokenT src_; + + edm::InputTag src_; bool useHF_; std::map towers_; diff --git a/RecoHI/HiJetAlgos/plugins/VoronoiBackgroundProducer.cc b/RecoHI/HiJetAlgos/plugins/VoronoiBackgroundProducer.cc deleted file mode 100644 index b13d1882392c9..0000000000000 --- a/RecoHI/HiJetAlgos/plugins/VoronoiBackgroundProducer.cc +++ /dev/null @@ -1,150 +0,0 @@ -// system include files -#include -#include - -// user include files -#include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/EDProducer.h" - -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/MakerMacros.h" - -#include "FWCore/ParameterSet/interface/ParameterSet.h" - -#include "DataFormats/HeavyIonEvent/interface/VoronoiBackground.h" -#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" -#include "DataFormats/Candidate/interface/Candidate.h" -#include "DataFormats/Candidate/interface/LeafCandidate.h" - -#include "RecoHI/HiJetAlgos/interface/VoronoiAlgorithm.h" - -using namespace std; -// -// class declaration -// - -class VoronoiBackgroundProducer : public edm::EDProducer { - public: - explicit VoronoiBackgroundProducer(const edm::ParameterSet&); - ~VoronoiBackgroundProducer(); - - static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); - - private: - virtual void produce(edm::Event&, const edm::EventSetup&); - - // ----------member data --------------------------- - - edm::EDGetTokenT src_; - VoronoiAlgorithm* voronoi_; - bool doEqualize_; - double equalizeThreshold0_; - double equalizeThreshold1_; - double equalizeR_; - bool isCalo_; - int etaBins_; - int fourierOrder_; - std::vector vvm; - -}; - -// -// constants, enums and typedefs -// - - -// -// static data member definitions -// - -// -// constructors and destructor -// -VoronoiBackgroundProducer::VoronoiBackgroundProducer(const edm::ParameterSet& iConfig): - voronoi_(0), - doEqualize_(iConfig.getParameter("doEqualize")), - equalizeThreshold0_(iConfig.getParameter("equalizeThreshold0")), - equalizeThreshold1_(iConfig.getParameter("equalizeThreshold1")), - equalizeR_(iConfig.getParameter("equalizeR")), - isCalo_(iConfig.getParameter("isCalo")), - etaBins_(iConfig.getParameter("etaBins")), - fourierOrder_(iConfig.getParameter("fourierOrder")) -{ - - src_ = consumes(iConfig.getParameter("src")); - //register your products - - produces(); - produces >(); -} - - -VoronoiBackgroundProducer::~VoronoiBackgroundProducer() -{ -} - - -// -// member functions -// - -// ------------ method called to produce the data ------------ -void -VoronoiBackgroundProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) -{ - using namespace edm; - if(voronoi_ == 0){ - bool data = iEvent.isRealData(); - voronoi_ = new VoronoiAlgorithm(equalizeR_,data,isCalo_,std::pair(equalizeThreshold0_,equalizeThreshold1_),doEqualize_); - } - - voronoi_->clear(); - vvm.clear(); - - edm::Handle inputsHandle; - iEvent.getByToken(src_,inputsHandle); - - for(unsigned int i = 0; i < inputsHandle->size(); ++i){ - reco::CandidateViewRef ref(inputsHandle,i); - voronoi_->push_back_particle(ref->pt(),ref->eta(),ref->phi(),0); - } - - std::vector subtracted_momenta = voronoi_->subtracted_unequalized_perp(); - std::vector equalized_momenta = voronoi_->subtracted_equalized_perp(); - std::vector particle_area = voronoi_->particle_area(); - std::vector voronoi_vn = voronoi_->perp_fourier(); - std::auto_ptr > vnout(new std::vector(voronoi_vn.begin(), voronoi_vn.end())); - std::auto_ptr mapout(new reco::VoronoiMap()); - reco::VoronoiMap::Filler filler(*mapout); - - for(unsigned int i = 0; i < inputsHandle->size(); ++i){ - reco::CandidateViewRef ref(inputsHandle,i); - const double pre_eq_pt = subtracted_momenta[i]; - const double post_eq_pt = equalized_momenta[i]; - const double area = particle_area[i]; - const double mass_square = ref->massSqr(); - const double pre_eq_mt = sqrt(mass_square + pre_eq_pt * pre_eq_pt); - const double post_eq_mt = sqrt(mass_square + post_eq_pt * post_eq_pt); - - reco::VoronoiBackground bkg(pre_eq_pt,post_eq_pt,pre_eq_mt,post_eq_mt,area); - LogDebug("VoronoiBackgroundProducer")<<"Subtraction --- oldpt : "<pt()<<" --- newpt : "<("dropZeroTowers",true)), cbins_(0) { - - centTag_ = iC.consumes(iConfig.getUntrackedParameter("centTag",edm::InputTag("hiCentrality","","RECO"))); + centTag_ = iConfig.getUntrackedParameter("centTag",edm::InputTag("hiCentrality","","RECO")); interpolate_ = iConfig.getParameter("interpolate"); sumRecHits_ = iConfig.getParameter("sumRecHits"); @@ -52,7 +51,7 @@ void ParametrizedSubtractor::setupGeometryMap(edm::Event& iEvent,const edm::Even // if(!cbins_) getCentralityBinsFromDB(iSetup); edm::Handle cent; - iEvent.getByToken(centTag_,cent); + iEvent.getByLabel(centTag_,cent); centrality_ = cent->EtHFhitSum(); bin_ = 40-hC->FindBin(centrality_); diff --git a/RecoHI/HiJetAlgos/src/UEParameters.cc b/RecoHI/HiJetAlgos/src/UEParameters.cc deleted file mode 100644 index 6c78f226963d0..0000000000000 --- a/RecoHI/HiJetAlgos/src/UEParameters.cc +++ /dev/null @@ -1,62 +0,0 @@ - -#include "RecoHI/HiJetAlgos/interface/UEParameters.h" - -UEParameters::UEParameters(const std::vector *v, int nn, int neta) : v_(v), nn_(nn), neta_(neta){ - parameters_ = new boost::const_multi_array_ref(&(*v)[0], boost::extents[neta][nreduced_particle_flow_id][nn][2]); -} - -void UEParameters::get_fourier(double &re, double &im, size_t n, size_t eta, int type) const { - re = 0; - im = 0; - - if(type < 0){ - for (size_t i = 0; i < nreduced_particle_flow_id; i++) { - re += (*parameters_)[eta][i][n][0]; - im += (*parameters_)[eta][i][n][1]; - } - }else{ - re = (*parameters_)[eta][type][n][0]; - im = (*parameters_)[eta][type][n][1]; - } - -} - -double UEParameters::get_sum_pt(int eta, int type) const { - double re; - double im; - - get_fourier(re, im, 0, eta, type); - - // There is no imaginary part - return re; -} - -double UEParameters::get_vn(int n, int eta, int type) const { - if (n < 0) { - return NAN; - } - else if (n == 0) { - return 1; - } - - double re; - double im; - - get_fourier(re, im, n, eta, type); - - return sqrt(re * re + im * im) / get_sum_pt(eta, type); -} - -double UEParameters::get_psin(int n, int eta, int type) const { - if (n <= 0) { - return 0; - } - - double re; - double im; - - get_fourier(re, im, n, eta, type); - - return atan2(im, re) / n; -} - diff --git a/RecoHI/HiJetAlgos/src/VoronoiAlgorithm.cc b/RecoHI/HiJetAlgos/src/VoronoiAlgorithm.cc deleted file mode 100644 index aa8e3b6253b9f..0000000000000 --- a/RecoHI/HiJetAlgos/src/VoronoiAlgorithm.cc +++ /dev/null @@ -1,1969 +0,0 @@ -#include "RecoHI/HiJetAlgos/interface/VoronoiAlgorithm.h" - -extern "C" { - - extern struct ascal_s { - double objnor; - double rhsnor; - double scdiff; - int scpass; - int scalmet; - } ascal_; - - extern struct compl_s { - double climit; - double ccorr; - } compl_; - - extern struct dims_s { - int n; - int n1; - int m; - int mn; - int nz; - int cfree; - int pivotn; - int denwin; - int rfree; - } dims_; - - extern struct drop_s { - double tfixvar; - double tfixslack; - double slklim; - } drop_; - - extern struct factor_s { - double tpiv1; - double tpiv2; - double tabs; - double trabs; - double lam; - double tfind; - double order; - double supdens; - } factor_; - - extern struct initv_s { - double prmin; - double upmax; - double dumin; - int stamet; - int safmet; - int premet; - int regul; - } initv_; - - extern struct itref_s { - double tresx; - double tresy; - int maxref; - } itref_; - - extern struct mscal_s { - double varadd; - double slkadd; - double scfree; - } mscal_; - - extern struct numer_s { - double tplus; - double tzer; - } numer_; - - extern struct param_s { - double palpha; - double dalpha; - } param_; - - extern struct predc_s { - double target; - double tsmall; - double tlarge; - double center; - double corstp; - int mincc; - int maxcc; - } predc_; - - extern struct predp_s { - double ccstop; - double barset; - double bargrw; - double barmin; - int mincor; - int maxcor; - int inibar; - } predp_; - - extern struct setden_s { - double maxdense; - double densgap; - int setlam; - int denslen; - } setden_; - - extern struct sprnod_s { - int psupn; - int ssupn; - int maxsnz; - } sprnod_; - - extern struct toler_s { - double tsdir; - double topt1; - double topt2; - double tfeas1; - double tfeas2; - double feas1; - double feas2; - double pinfs; - double dinfs; - double inftol; - int maxiter; - } toler_; - - extern int solver_( - double *obj, double *rhs, double *lbound, double *ubound, - /* Size dims_.mn working arrays */ - double *diag, double *odiag, - /* Size dims_.mn primal values */ - double *xs, - /* Size dims_.mn working arrays */ - double *dxs, double *dxsn, double *up, - /* Size dims_.mn dual residuals */ - double *dspr, - /* Size dims_.mn working arrays */ - double *ddspr, double *ddsprn, double *dsup, double *ddsup, - double *ddsupn, - /* Size dims_.m dual values */ - double *dv, - /* Size dims_.m working arrays */ - double *ddv, double *ddvn, double *prinf, - /* Size dims_.mn working arrays */ - double *upinf, double *duinf, double *scale, - /* Size dims_.cfree nonzero values */ - double *nonzeros, - /* Size dims_.n working array */ - int *vartyp, - /* Size dims_.m working array */ - int *slktyp, - /* Size dims_.n1 column pointer */ - int *colpnt, - /* Size dims_.mn working arrays */ - int *ecolpnt, int *count, int *vcstat, int *pivots, - int *invprm, int *snhead, int *nodtyp, int *inta1, - int *prehis, - /* Size dims_.cfree row index */ - int *rowidx, - /* Size dims_.rfree working array */ - int *rindex, - /* Scalar termination code */ - int *code, - /* Scalar optimum value */ - double *opt, - int *iter, int *corect, int *fixn, int *dropn, int *fnzmax, - int *fnzmin, double *addobj, double *bigbou, - /* Practical +inf */ - double *big, - int *ft); -} - -namespace { - - class problem_t { - public: - static constexpr double infinity = INFINITY; - // These are equivalent to the constants used by IBM ILOG - // CPLEX - static const int minimize = 1; - static const int maximize = -1; - static const char less_equal = 'L'; - static const char equal = 'E'; - static const char greater_equal = 'G'; - static const char range = 'R'; - protected: - bool _optimized; - bool _variable_named; - - std::vector _rhs; - std::vector _constraint_sense; - std::vector _range_value; - std::vector _row_name; - - std::vector _objective; - std::vector _lower_bound; - std::vector _upper_bound; - std::vector _column_name; - - std::vector _coefficient_row; - std::vector _coefficient_column; - std::vector _coefficient_value; - - void clear_row(void) - { - _rhs.clear(); - _constraint_sense.clear(); - for (std::vector::const_iterator iterator = - _row_name.begin(); - iterator != _row_name.end(); iterator++) { - delete [] *iterator; - } - _row_name.clear(); - } - void clear_column(void) - { - _objective.clear(); - _lower_bound.clear(); - _upper_bound.clear(); - for (std::vector::const_iterator iterator = - _column_name.begin(); - iterator != _column_name.end(); iterator++) { - free(*iterator); - } - _column_name.clear(); - } - void clear_coefficient(void) - { - _coefficient_row.clear(); - _coefficient_column.clear(); - _coefficient_value.clear(); - } - void to_csr(std::vector &column_pointer, - std::vector &row_index, - std::vector &nonzero_value, - const int index_start = 1) - { - // Convert from coordinate (COO) storage into compressed - // sparse row (CSR) - - std::vector > > - column_index(_objective.size(), - std::vector >()); - - std::vector::const_iterator iterator_row = - _coefficient_row.begin(); - std::vector::const_iterator iterator_column = - _coefficient_column.begin(); - std::vector::const_iterator iterator_value = - _coefficient_value.begin(); - - for (; iterator_value != _coefficient_value.end(); - iterator_row++, iterator_column++, iterator_value++) { - column_index[*iterator_column].push_back( - std::pair( - // Conversion into Fortran indexing - *iterator_row + index_start, *iterator_value)); - } - - for (std::vector > >:: - iterator iterator_outer = column_index.begin(); - iterator_outer != column_index.end(); iterator_outer++) { - // Conversion into Fortran indexing - column_pointer.push_back(row_index.size() + index_start); - std::sort(iterator_outer->begin(), iterator_outer->end()); - for (std::vector >::const_iterator - iterator_inner = iterator_outer->begin(); - iterator_inner != iterator_outer->end(); - iterator_inner++) { - row_index.push_back(iterator_inner->first); - nonzero_value.push_back(iterator_inner->second); - } - } - // Conversion into Fortran indexing - column_pointer.push_back(row_index.size() + index_start); - } - public: - problem_t(const bool variable_named) - : _optimized(false), _variable_named(variable_named) - { - } - ~problem_t(void) - { - clear(); - } - void clear(void) - { - clear_row(); - clear_column(); - clear_coefficient(); - } - virtual int populate(void) = 0; - size_t nrow(void) const - { - return _rhs.size(); - } - size_t ncolumn(void) const - { - return _objective.size(); - } - void push_back_row(const char constraint_sense, - const double rhs) - { - _rhs.push_back(rhs); - _constraint_sense.push_back(constraint_sense); - - if (_variable_named) { - static const size_t name_length = 24; - char *name = new char[name_length]; - - snprintf(name, name_length, "c%llu", - static_cast(_rhs.size())); - _row_name.push_back(name); - } - } - void push_back_row(const std::string &constraint_sense, - const double rhs) - { - char cplex_sense; - - if (constraint_sense == "<=") { - cplex_sense = 'L'; - push_back_row(rhs, cplex_sense); - } - else if (constraint_sense == "==") { - cplex_sense = 'E'; - push_back_row(rhs, cplex_sense); - } - else if (constraint_sense == ">=") { - cplex_sense = 'G'; - push_back_row(rhs, cplex_sense); - } - else { - fprintf(stderr, "%s:%d: illegal sense (`%s')\n", - __FILE__, __LINE__, constraint_sense.c_str()); - } - } - void push_back_column(const double objective, - const double lower_bound, - const double upper_bound) - { - _objective.push_back(objective); - _lower_bound.push_back(lower_bound); - _upper_bound.push_back(upper_bound); - - if (_variable_named) { - static const size_t name_length = 24; - char *name = new char[name_length]; - - snprintf(name, name_length, "x%llu", - static_cast( - _objective.size())); - _column_name.push_back(name); - } - } - void push_back_coefficient( - const int row, const int column, const double value) - { - _coefficient_row.push_back(row); - _coefficient_column.push_back(column); - _coefficient_value.push_back(value); - } - virtual int optimize(void) = 0; - int optimize_primal_simplex(void) - { - return optimize(); - } - int optimize_dual_simplex(void) - { - return optimize(); - } - int optimize_barrier(void) - { - return optimize(); - } - int optimize_network(void) - { - return optimize(); - } - int optimize_sifting(void) - { - return optimize(); - } - int optimize_concurrent(void) - { - return optimize(); - } - int optimize_deterministic_concurrent(void) - { - return optimize(); - } - // - virtual int solve( - int &solution_status, double &objective_value, - std::vector &variable_primal, - std::vector &variable_dual, - std::vector &variable_slack_surplus, - std::vector &reduced_cost) = 0; - int solve( - double &objective_value, - std::vector &variable_primal, - std::vector &variable_dual, - std::vector &variable_slack_surplus, - std::vector &reduced_cost) - { - int solution_status; - - return solve(solution_status, objective_value, - variable_primal, variable_dual, - variable_slack_surplus, reduced_cost); - } - int solve( - std::vector &variable_primal, - std::vector &variable_dual, - std::vector &variable_slack_surplus, - std::vector &reduced_cost) - { - int solution_status; - double objective_value; - - return solve(solution_status, objective_value, - variable_primal, variable_dual, - variable_slack_surplus, reduced_cost); - } - virtual int solve( - int &solution_status, double &objective_value, - std::vector &variable_primal, - std::vector &variable_dual) - { - std::vector variable_slack_surplus; - std::vector reduced_cost; - - return solve(solution_status, objective_value, - variable_primal, variable_dual, - variable_slack_surplus, reduced_cost); - } - int solve( - std::vector &variable_primal, - std::vector &variable_dual) - { - int solution_status; - double objective_value; - - return solve(solution_status, objective_value, variable_primal, - variable_dual); - } - int solve( - std::vector &variable_primal) - { - std::vector variable_dual; - - return solve(variable_primal, variable_dual); - } - }; - - class environment_t { - protected: - std::vector _problem; - }; - -#ifndef BPMPD_INFINITY_BOUND -#define BPMPD_INFINITY_BOUND 1e+30 -#endif // BPMPD_INFINITY_BOUND - -#ifndef BPMPD_VERSION_STRING -#define BPMPD_VERSION_STRING "Version 2.11 (1996 December)" -#endif // BPMPD_VERSION_STRING - - class bpmpd_environment_t; - - class bpmpd_problem_t : public problem_t { - public: - static constexpr double infinity = BPMPD_INFINITY_BOUND; - protected: - double _objective_sense; - double _objective_value; - std::vector _variable_primal; - std::vector _variable_dual; - int _solution_status; - private: - int ampl_solution_status(const int termination_code) - { - switch (termination_code) { - // General memory limit (no solution) - case -2: return 520; - // Memory limit during iterations - case -1: return 510; - // No optimum - case 1: return 506; - // Optimal solution - case 2: return 0; - // Primal infeasible - case 3: return 503; - // Dual infeasible - case 4: return 503; - default: - fprintf(stderr, "%s:%d: error: unknown termination code " - "%d\n", __FILE__, __LINE__, termination_code); - return 500; - } - fprintf(stderr, "%s:%d: %d\n", __FILE__, __LINE__, - termination_code); - } - void set_bpmpd_parameter(void) - { - // Set the parameter as in subroutine BPMAIN - - setden_.maxdense = 0.15; - setden_.densgap = 3.00; - setden_.setlam = 0; - factor_.supdens = 250; - setden_.denslen = 10; - - mscal_.varadd = 1e-12; - mscal_.slkadd = 1e+16; - mscal_.scfree = 1.1e-6; - - factor_.tpiv1 = 1e-3; - factor_.tpiv2 = 1e-8; - factor_.tabs = 1e-12; - factor_.trabs = 1e-15; - factor_.lam = 1e-5; - factor_.tfind = 25; - factor_.order = 2; - - sprnod_.psupn = 3; - sprnod_.ssupn = 4; - sprnod_.maxsnz = 9999999; - - toler_.tsdir = 1e-16; - toler_.topt1 = 1e-8; - toler_.topt2 = 1e-16; - toler_.tfeas1 = 1e-7; - toler_.tfeas2 = 1e-7; - toler_.feas1 = 1e-2; - toler_.feas2 = 1e-2; - toler_.pinfs = 1e-6; - toler_.dinfs = 1e-6; - toler_.inftol = 1e+4; - toler_.maxiter = 99; - - numer_.tplus = 1e-11; - numer_.tzer = 1e-35; - - itref_.tresx = 1e-9; - itref_.tresy = 1e-9; - itref_.maxref = 5; - - ascal_.objnor = 1e+2; - ascal_.rhsnor = 0; - ascal_.scdiff = 1; - ascal_.scalmet = 2; - ascal_.scpass = 5; - - predp_.ccstop = 1.01; - predp_.barset = 2.50e-1; - predp_.bargrw = 1.00e+2; - predp_.barmin = 1.00e-10; - predp_.mincor = 1; - predp_.maxcor = 1; - predp_.inibar = 0; - - predc_.target = 9e-2; - predc_.tsmall = 2e-1; - predc_.tlarge = 2e+1; - predc_.center = 5; - predc_.corstp = 1.01; - predc_.mincc = 0; - predc_.maxcc = 9; - - param_.palpha = 0.999; - param_.dalpha = 0.999; - - drop_.tfixvar = 1e-16; - drop_.tfixslack = 1e-16; - drop_.slklim = 1e-16; - - initv_.prmin = 100; - initv_.upmax = 50000; - initv_.dumin = 100; - initv_.stamet = 2; - initv_.safmet = -3; - initv_.premet = 511; - initv_.regul = 0; - - compl_.climit = 1; - compl_.ccorr = 1e-5; - } - void append_constraint_sense_bound( - std::vector &lower_bound_bpmpd, - std::vector &upper_bound_bpmpd) - { - for (std::vector::const_iterator iterator = - _constraint_sense.begin(); - iterator != _constraint_sense.end(); iterator++) { - switch (*iterator) { - case less_equal: - lower_bound_bpmpd.push_back(-BPMPD_INFINITY_BOUND); - upper_bound_bpmpd.push_back(0); - break; - case equal: - lower_bound_bpmpd.push_back(0); - upper_bound_bpmpd.push_back(0); - break; - case greater_equal: - lower_bound_bpmpd.push_back(0); - upper_bound_bpmpd.push_back(BPMPD_INFINITY_BOUND); - break; - case range: - { - const size_t index = - iterator - _constraint_sense.begin(); - - lower_bound_bpmpd.push_back(0); - upper_bound_bpmpd.push_back(_range_value[index] - - _rhs[index]); - } - break; - } - } - lower_bound_bpmpd.reserve(dims_.mn); - lower_bound_bpmpd.insert(lower_bound_bpmpd.end(), - _lower_bound.begin(), - _lower_bound.end()); - upper_bound_bpmpd.reserve(dims_.mn); - upper_bound_bpmpd.insert(upper_bound_bpmpd.end(), - _upper_bound.begin(), - _upper_bound.end()); - } - protected: - int populate(void) - { - return 0; - } - public: - bpmpd_problem_t(void) - : problem_t(false), _objective_sense(1.0), - _objective_value(NAN) - { - } - inline size_t nrow(void) const - { - return dims_.m; - } - inline size_t ncolumn(void) const - { - return dims_.n; - } - inline void set_objective_sense(int sense) - { - _objective_sense = sense; - - // This will be multiplied to the objective coefficients - // (i.e. sign flip when sense = -1 for maximization) - } - inline void save(std::string filename) - { - // MPS save? - } - void push_back_column(const double objective, - const double lower_bound = 0, - const double upper_bound = BPMPD_INFINITY_BOUND) - { - problem_t::push_back_column(objective, lower_bound, - upper_bound); - } - void set_size(const size_t nonzero_value_size, - const double mf = 6.0, const size_t ma = 0) - { - dims_.n = _objective.size(); - dims_.m = _rhs.size(); - dims_.mn = dims_.m + dims_.n; - dims_.n1 = dims_.n + 1; - - dims_.nz = nonzero_value_size; - - // Adapted from the AMPL interface - // http://www.netlib.org/ampl/solvers/bpmpd/ - - const size_t rp_23 = 4 * dims_.m + 18 * dims_.mn; - - dims_.cfree = static_cast( - std::max(2.0, mf) * (rp_23 + dims_.nz)) + - std::max(static_cast(0), ma); - dims_.rfree = ((dims_.cfree + rp_23) >> 1) + 11 * dims_.m + - 8 * dims_.n; - } - int optimize(void) - { - // Usually referred to as the variable "IA" for the CSR format - std::vector column_pointer; - // Usually referred to as the variable "JA" for the CSR format - std::vector row_index; - // Usually referred to as the variable "A" for the CSR format - std::vector nonzero_value; - - to_csr(column_pointer, row_index, nonzero_value); - std::transform(_objective.begin(), _objective.end(), - _objective.begin(), - std::bind1st(std::multiplies(), - _objective_sense)); - - // Try 1x, 2x, and 4x the default memory allocation - for (size_t i = 0; i < 3; i++) { - set_size(nonzero_value.size(), 6.0 * (1 << i)); - - nonzero_value.resize(dims_.cfree); - row_index.resize(dims_.cfree); - - set_bpmpd_parameter(); - - std::vector diag(dims_.mn, 0); - std::vector odiag(dims_.mn, 0); - std::vector dxs(dims_.mn, 0); - std::vector dxsn(dims_.mn, 0); - std::vector up(dims_.mn, 0); - std::vector dual_residual(dims_.mn, 0); - std::vector ddspr(dims_.mn, 0); - std::vector ddsprn(dims_.mn, 0); - std::vector dsup(dims_.mn, 0); - std::vector ddsup(dims_.mn, 0); - std::vector ddsupn(dims_.mn, 0); - std::vector ddv(dims_.m, 0); - std::vector ddvn(dims_.m, 0); - std::vector prinf(dims_.m, 0); - std::vector upinf(dims_.mn, 0); - std::vector duinf(dims_.mn, 0); - std::vector scale(dims_.mn, 0); - std::vector vartyp(dims_.n, 0); - std::vector slktyp(dims_.m, 0); - std::vector colpnt(dims_.n1, 0); - std::vector ecolpnt(dims_.mn, 0); - std::vector count(dims_.mn, 0); - std::vector vcstat(dims_.mn, 0); - std::vector pivots(dims_.mn, 0); - std::vector invprm(dims_.mn, 0); - std::vector snhead(dims_.mn, 0); - std::vector nodtyp(dims_.mn, 0); - std::vector inta1(dims_.mn, 0); - std::vector prehis(dims_.mn, 0); - std::vector rindex(dims_.rfree, 0); - int termination_code; - int iter; - int correct; - int fixn; - int dropn; - int fnzmax = 0; - int fnzmin = -1; - double addobj = 0; - // Numerical limit of bounds to be ignored - double bigbou = 1e+15; - double infinity_copy = BPMPD_INFINITY_BOUND; - int ft; - - _variable_primal.resize(dims_.mn); - _variable_dual.resize(dims_.m); - - std::vector lower_bound_bpmpd = _lower_bound; - std::vector upper_bound_bpmpd = _upper_bound; - - append_constraint_sense_bound(lower_bound_bpmpd, - upper_bound_bpmpd); - - solver_(&_objective[0], &_rhs[0], &lower_bound_bpmpd[0], - &upper_bound_bpmpd[0], &diag[0], &odiag[0], - &_variable_primal[0], &dxs[0], &dxsn[0], &up[0], - &dual_residual[0], &ddspr[0], &ddsprn[0], - &dsup[0], &ddsup[0], &ddsupn[0], - &_variable_dual[0], &ddv[0], &ddvn[0], &prinf[0], - &upinf[0], &duinf[0], &scale[0], - &nonzero_value[0], &vartyp[0], &slktyp[0], - &column_pointer[0], &ecolpnt[0], &count[0], - &vcstat[0], &pivots[0], &invprm[0], &snhead[0], - &nodtyp[0], &inta1[0], &prehis[0], &row_index[0], - &rindex[0], &termination_code, &_objective_value, - &iter, &correct, &fixn, &dropn, &fnzmax, &fnzmin, - &addobj, &bigbou, &infinity_copy, &ft); - - _objective_value *= _objective_sense; - _solution_status = ampl_solution_status(termination_code); - if (termination_code != -2) { - // No out-of-memory errors - break; - } - } - - return _solution_status == 0 ? 0 : 1; - } - int solve( - int &solution_status, double &objective_value, - std::vector &variable_primal, - std::vector &variable_dual, - std::vector &variable_slack_surplus, - std::vector &reduced_cost) - { - // This set of solution is not implemented yet (or readily - // available from BPMPD) - - return 1; - } - int solve( - int &solution_status, double &objective_value, - std::vector &variable_primal, - std::vector &variable_dual) - { - variable_primal = std::vector( - _variable_primal.begin(), - _variable_primal.begin() + _objective.size()); - variable_dual = _variable_dual; - - return 0; - } - friend class bpmpd_environment_t; - }; - - class bpmpd_environment_t : public environment_t { - public: - bpmpd_environment_t(void) - { - } - ~bpmpd_environment_t(void) - { - } - int set_verbose(void); - int set_data_checking(void); - inline std::string version_str(void) const - { - return BPMPD_VERSION_STRING; - } - bpmpd_problem_t problem(std::string name = "") - { - return bpmpd_problem_t(); - } - }; - -} - -namespace { - - double angular_range_reduce(const double x) - { - if (!std::isfinite(x)) { - return NAN; - } - - static const double cody_waite_x_max = 1608.4954386379741381; - static const double two_pi_0 = 6.2831853071795649157; - static const double two_pi_1 = 2.1561211432631314669e-14; - static const double two_pi_2 = 1.1615423895917441336e-27; - double ret; - - if (x >= -cody_waite_x_max && x <= cody_waite_x_max) { - static const double inverse_two_pi = - 0.15915494309189534197; - const double k = rint(x * inverse_two_pi); - ret = ((x - (k * two_pi_0)) - k * two_pi_1) - - k * two_pi_2; - } - else { - long double sin_x; - long double cos_x; - - sincosl(x, &sin_x, &cos_x); - ret = (double)atan2l(sin_x, cos_x); - } - if (ret == -M_PI) { - ret = M_PI; - } - - return ret; - } - -} - - void VoronoiAlgorithm::initialize_geometry(void) - { - static const size_t ncms_hcal_edge_pseudorapidity = 82 + 1; - static const double cms_hcal_edge_pseudorapidity[ - ncms_hcal_edge_pseudorapidity] = { - -5.191, -4.889, -4.716, -4.538, -4.363, -4.191, -4.013, - -3.839, -3.664, -3.489, -3.314, -3.139, -2.964, -2.853, - -2.650, -2.500, -2.322, -2.172, -2.043, -1.930, -1.830, - -1.740, -1.653, -1.566, -1.479, -1.392, -1.305, -1.218, - -1.131, -1.044, -0.957, -0.879, -0.783, -0.696, -0.609, - -0.522, -0.435, -0.348, -0.261, -0.174, -0.087, - 0.000, - 0.087, 0.174, 0.261, 0.348, 0.435, 0.522, 0.609, - 0.696, 0.783, 0.879, 0.957, 1.044, 1.131, 1.218, - 1.305, 1.392, 1.479, 1.566, 1.653, 1.740, 1.830, - 1.930, 2.043, 2.172, 2.322, 2.500, 2.650, 2.853, - 2.964, 3.139, 3.314, 3.489, 3.664, 3.839, 4.013, - 4.191, 4.363, 4.538, 4.716, 4.889, 5.191 - }; - - _cms_hcal_edge_pseudorapidity = std::vector( - cms_hcal_edge_pseudorapidity, - cms_hcal_edge_pseudorapidity + - ncms_hcal_edge_pseudorapidity); - - static const size_t ncms_ecal_edge_pseudorapidity = 344 + 1; - - for (size_t i = 0; i < ncms_ecal_edge_pseudorapidity; i++) { - _cms_ecal_edge_pseudorapidity.push_back( - i * (2 * 2.9928 / - (ncms_ecal_edge_pseudorapidity - 1)) - - 2.9928); - } - } - void VoronoiAlgorithm::allocate(void) - { - _perp_fourier = new boost::multi_array( - boost::extents[_edge_pseudorapidity.size() - 1] - [nreduced_particle_flow_id][nfourier][2]); - } - void VoronoiAlgorithm::deallocate(void) - { - delete _perp_fourier; - } - void VoronoiAlgorithm::event_fourier(void) - { - std::fill(_perp_fourier->data(), - _perp_fourier->data() + - _perp_fourier->num_elements(), - 0); - - for (std::vector::const_iterator iterator = - _event.begin(); - iterator != _event.end(); iterator++) { - const unsigned int reduced_id = - iterator->reduced_particle_flow_id; - - for (size_t k = 1; k < _edge_pseudorapidity.size(); - k++) { - if (iterator->momentum.Eta() >= - _edge_pseudorapidity[k - 1] && - iterator->momentum.Eta() < - _edge_pseudorapidity[k]) { - const double azimuth = - iterator->momentum.Phi(); - - for (size_t l = 0; l < nfourier; l++) { - (*_perp_fourier)[k - 1][reduced_id] - [l][0] += - iterator->momentum.Pt() * - cos(l * azimuth); - (*_perp_fourier)[k - 1][reduced_id] - [l][1] += - iterator->momentum.Pt() * - sin(l * azimuth); - } - } - } - } - } - void VoronoiAlgorithm::feature_extract(void) - { - const size_t nfeature = 2 * nfourier - 1; - - _feature.resize(nfeature); - - // Scale factor to get 95% of the coefficient below 1.0 - // (where however one order of magnitude tolerance is - // acceptable). This is valid for nfourier < 18 (where - // interference behavior with the HF geometry starts to - // appear) - - std::vector scale(nfourier, 1.0 / 200.0); - - if (nfourier >= 1) { - scale[0] = 1.0 / 5400.0; - } - if (nfourier >= 2) { - scale[1] = 1.0 / 130.0; - } - if (nfourier >= 3) { - scale[2] = 1.0 / 220.0; - } - - const size_t index_edge_end = - _edge_pseudorapidity.size() - 2; - - _feature[0] = 0; - for (size_t j = 0; j < nreduced_particle_flow_id; j++) { - _feature[0] += scale[0] * - ((*_perp_fourier)[0 ][j][0][0] + - (*_perp_fourier)[index_edge_end][j][0][0]); - } - - for (size_t k = 1; k < nfourier; k++) { - _feature[2 * k - 1] = 0; - for (size_t j = 0; j < nreduced_particle_flow_id; j++) { - _feature[2 * k - 1] += scale[k] * - ((*_perp_fourier)[0 ][j][k][0] + - (*_perp_fourier)[index_edge_end][j][k][0]); - } - _feature[2 * k] = 0; - for (size_t j = 0; j < nreduced_particle_flow_id; j++) { - _feature[2 * k] += scale[k] * - ((*_perp_fourier)[0 ][j][k][1] + - (*_perp_fourier)[index_edge_end][j][k][1]); - } - } - - -#if 0 - const double event_plane = atan2(_feature[4], _feature[3]); - const double v2 = - sqrt(_feature[3] * _feature[3] + - _feature[4] * _feature[4]) / _feature[0]; -#endif - } - void VoronoiAlgorithm::voronoi_area_incident(void) - { - // Make the Voronoi diagram - - voronoi_diagram_t diagram; - - // Reverse Voronoi face lookup -#ifdef HAVE_SPARSEHASH - // The "empty" or default value of the hash table - const voronoi_diagram_t::Face face_empty; - google::dense_hash_map > - face_index; - - face_index.set_empty_key(face_empty); -#else // HAVE_SPARSEHASH - std::map - face_index; -#endif // HAVE_SPARSEHASH - - for (std::vector::const_iterator iterator = - _event.begin(); - iterator != _event.end(); iterator++) { - // Make two additional replicas with azimuth +/- 2 pi - // (and use only the middle) to mimick the azimuthal - // cyclicity - for (int k = -1; k <= 1; k++) { - const point_2d_t p( - iterator->momentum.Eta(), - iterator->momentum.Phi() + - k * (2 * M_PI)); - const voronoi_diagram_t::Face_handle handle = - diagram.insert(p); - - face_index[handle] = iterator - _event.begin(); - } - } - - // Extract the Voronoi cells as polygon and calculate the - // area associated with individual particles - - for (std::vector::iterator iterator = - _event.begin(); - iterator != _event.end(); iterator++) { - const voronoi_diagram_t::Locate_result result = - diagram.locate(*iterator); - const voronoi_diagram_t::Face_handle *face = - boost::get( - &result); - double polygon_area; - - if (face != NULL) { - voronoi_diagram_t::Ccb_halfedge_circulator - circulator_start = (*face)->outer_ccb(); - bool unbounded = false; - polygon_t polygon; - - voronoi_diagram_t::Ccb_halfedge_circulator - circulator = circulator_start; - - // Circle around the edges and extract the polygon - // vertices - do { - if (circulator->has_target()) { - polygon.push_back( - circulator->target()->point()); - _event[face_index[*face]].incident. - insert( - _event.begin() + - face_index[circulator->twin()-> - face()]); - } - else { - unbounded = true; - break; - } - } - while (++circulator != circulator_start); - if (unbounded) { - polygon_area = INFINITY; - } - else { - polygon_area = polygon.area(); - } - } - else { - polygon_area = NAN; - } - iterator->area = fabs(polygon_area); - } - } - void VoronoiAlgorithm::subtract_momentum(void) - { - for (std::vector::iterator iterator = - _event.begin(); - iterator != _event.end(); iterator++) { - int predictor_index = -1; - int interpolation_index = -1; - double density = 0; - double pred_0 = 0; - - for (size_t l = 1; l < _edge_pseudorapidity.size(); l++) { - if (iterator->momentum.Eta() >= - _edge_pseudorapidity[l - 1] && - iterator->momentum.Eta() < - _edge_pseudorapidity[l]) { - predictor_index = l - 1; - } - } - - for (size_t j = 0; j < nreduced_particle_flow_id; j++) { - if (j == 2) { - // HCAL - for (size_t l = 1; - l < _cms_hcal_edge_pseudorapidity.size(); l++) { - if (iterator->momentum.Eta() >= - _cms_hcal_edge_pseudorapidity[l - 1] && - iterator->momentum.Eta() < - _cms_hcal_edge_pseudorapidity[l]) { - interpolation_index = l - 1; - } - } - } - else { - // Tracks or ECAL clusters - for (size_t l = 1; - l < _cms_ecal_edge_pseudorapidity.size(); l++) { - if (iterator->momentum.Eta() >= - _cms_ecal_edge_pseudorapidity[l - 1] && - iterator->momentum.Eta() < - _cms_ecal_edge_pseudorapidity[l]) { - interpolation_index = l - 1; - } - } - } - - if (predictor_index >= 0 && interpolation_index >= 0) { - // Calculate the aggregated prediction and - // interpolation for the pseudorapidity segment - - const double azimuth = iterator->momentum.Phi(); - const float (*p)[2][82] = -#ifdef STANDALONE - ue_predictor_pf[j][predictor_index] -#else // STANDALONE - ue->ue_predictor_pf[j][predictor_index] -#endif // STANDALONE - ; - double pred = 0; - - for (size_t l = 0; l < nfourier; l++) { - for (size_t m = 0; m < 2; m++) { - float u = p[l][m][0]; - - for (size_t n = 0; n < 2 * nfourier - 1; n++) { - u += (((((((((p[l][m][9 * n + 9]) * - _feature[n] + - p[l][m][9 * n + 8]) * - _feature[n] + - p[l][m][9 * n + 7]) * - _feature[n] + - p[l][m][9 * n + 6]) * - _feature[n] + - p[l][m][9 * n + 5]) * - _feature[n] + - p[l][m][9 * n + 4]) * - _feature[n] + - p[l][m][9 * n + 3]) * - _feature[n] + - p[l][m][9 * n + 2]) * - _feature[n] + - p[l][m][9 * n + 1]) * - _feature[n]; - } - - pred += u * (l == 0 ? 1.0 : 2.0) * - (m == 0 ? cos(l * azimuth) : - sin(l * azimuth)); - if (l == 0 && m == 0) { - pred_0 += u / - (2.0 * M_PI * - (_edge_pseudorapidity[predictor_index + 1] - - _edge_pseudorapidity[predictor_index])); - } - } - } - - double interp; - -#ifdef STANDALONE - if (j == 0) { - interp = - ue_interpolation_pf0[predictor_index][ - interpolation_index]; - } - else if (j == 1) { - interp = - ue_interpolation_pf1[predictor_index][ - interpolation_index]; - } - else if (j == 2) { - interp = - ue_interpolation_pf2[predictor_index][ - interpolation_index]; - } -#else // STANDALONE - if (j == 0) { - interp = - ue->ue_interpolation_pf0[predictor_index][ - interpolation_index]; - } - else if (j == 1) { - interp = - ue->ue_interpolation_pf1[predictor_index][ - interpolation_index]; - } - else if (j == 2) { - interp = - ue->ue_interpolation_pf2[predictor_index][ - interpolation_index]; - } -#endif // STANDALONE - // Interpolate down to the finely binned - // pseudorapidity - - density += pred / - (2.0 * M_PI * - (_edge_pseudorapidity[predictor_index + 1] - - _edge_pseudorapidity[predictor_index])) * - interp; - } - } - - if (std::isfinite(iterator->area) && density >= 0) { - // Subtract the PF candidate by density times - // Voronoi cell area - iterator->momentum_perp_subtracted = - iterator->momentum.Pt() - - density * iterator->area; - } - else { - iterator->momentum_perp_subtracted = - iterator->momentum.Pt(); - } - iterator->momentum_perp_subtracted_unequalized = - iterator->momentum_perp_subtracted; - } - } - void VoronoiAlgorithm::recombine_link(void) - { - boost::multi_array radial_distance_square( - boost::extents[_event.size()][_event.size()]); - - for (std::vector::const_iterator - iterator_outer = _event.begin(); - iterator_outer != _event.end(); iterator_outer++) { - radial_distance_square - [iterator_outer - _event.begin()] - [iterator_outer - _event.begin()] = 0; - - for (std::vector::const_iterator - iterator_inner = _event.begin(); - iterator_inner != iterator_outer; - iterator_inner++) { - const double deta = iterator_outer->momentum.Eta() - - iterator_inner->momentum.Eta(); - const double dphi = angular_range_reduce( - iterator_outer->momentum.Phi() - - iterator_inner->momentum.Phi()); - - radial_distance_square - [iterator_outer - _event.begin()] - [iterator_inner - _event.begin()] = - deta * deta + dphi * dphi; - radial_distance_square - [iterator_inner - _event.begin()] - [iterator_outer - _event.begin()] = - radial_distance_square - [iterator_outer - _event.begin()] - [iterator_inner - _event.begin()]; - } - } - - _active.clear(); - - for (std::vector::const_iterator - iterator_outer = _event.begin(); - iterator_outer != _event.end(); iterator_outer++) { - double incident_area_sum = iterator_outer->area; - - for (std::set::iterator>:: - const_iterator iterator_inner = - iterator_outer->incident.begin(); - iterator_inner != - iterator_outer->incident.end(); - iterator_inner++) { - incident_area_sum += (*iterator_inner)->area; - } - _active.push_back(incident_area_sum < 2.0); - } - - _recombine.clear(); - _recombine_index = std::vector >( - _event.size(), std::vector()); - _recombine_unsigned = std::vector >( - _event.size(), std::vector()); - _recombine_tie.clear(); - - // 36 cells corresponds to ~ 3 layers, note that for - // hexagonal tiling, cell in proximity = 3 * layer * - // (layer + 1) - static const size_t npair_max = 36; - - for (size_t i = 0; i < _event.size(); i++) { - for (size_t j = 0; j < _event.size(); j++) { - const bool active_i_j = _active[i] && _active[j]; - const size_t incident_count = - _event[i].incident.count(_event.begin() + j) + - _event[j].incident.count(_event.begin() + i); - - if (active_i_j && - (radial_distance_square[i][j] < - _radial_distance_square_max || - incident_count > 0)) { - _recombine_unsigned[i].push_back(j); - } - } - - if (_event[i].momentum_perp_subtracted < 0) { - std::vector radial_distance_square_list; - - for (std::vector::const_iterator iterator = - _recombine_unsigned[i].begin(); - iterator != _recombine_unsigned[i].end(); - iterator++) { - const size_t j = *iterator; - - if (_event[j].momentum_perp_subtracted > 0) { - radial_distance_square_list.push_back( - radial_distance_square[i][j]); - } - } - - double radial_distance_square_max_equalization_cut = - _radial_distance_square_max; - - if (radial_distance_square_list.size() >= npair_max) { - std::sort(radial_distance_square_list.begin(), - radial_distance_square_list.end()); - radial_distance_square_max_equalization_cut = - radial_distance_square_list[npair_max - 1]; - } - - for (std::vector::const_iterator iterator = - _recombine_unsigned[i].begin(); - iterator != _recombine_unsigned[i].end(); - iterator++) { - const size_t j = *iterator; - - if (_event[j].momentum_perp_subtracted > 0 && - radial_distance_square[i][j] < - radial_distance_square_max_equalization_cut) { - _recombine_index[j].push_back( - _recombine.size()); - _recombine_index[i].push_back( - _recombine.size()); - _recombine.push_back( - std::pair(i, j)); - _recombine_tie.push_back( - radial_distance_square[i][j] / - _radial_distance_square_max); - } - } - } - } - } - void VoronoiAlgorithm::lp_populate(void *lp_problem) - { - bpmpd_problem_t *p = reinterpret_cast(lp_problem); - - // The minimax problem is transformed into the LP notation - // using the cost variable trick: - // - // Minimize c - // Subject to: - // c + sum_l t_kl + n_k >= 0 for negative cells n_k - // c - sum_k t_kl + p_l >= 0 for positive cells p_l - - // Common LP mistakes during code development and their - // CPLEX errors when running CPLEX in data checking mode: - // - // Error 1201 (column index ... out of range): Bad column - // indexing, usually index_column out of bound for the - // cost variables. - // - // Error 1222 (duplicate entry): Forgetting to increment - // index_row, or index_column out of bound for the cost - // variables. - - p->set_objective_sense(bpmpd_problem_t::minimize); - - // Rows (RHS of the constraints) of the LP problem - - static const size_t nsector_azimuth = 12; - - // Approximatively 2 pi / nsector_azimuth segmentation of - // the CMS HCAL granularity - - static const size_t ncms_hcal_edge_pseudorapidity = 19 + 1; - static const double cms_hcal_edge_pseudorapidity[ - ncms_hcal_edge_pseudorapidity] = { - -5.191, -4.538, -4.013, - -3.489, -2.853, -2.322, -1.830, -1.305, -0.783, -0.261, - 0.261, 0.783, 1.305, 1.830, 2.322, 2.853, 3.489, - 4.013, 4.538, 5.191 - }; - - size_t nedge_pseudorapidity; - const double *edge_pseudorapidity; - - nedge_pseudorapidity = ncms_hcal_edge_pseudorapidity; - edge_pseudorapidity = cms_hcal_edge_pseudorapidity; - - const size_t nsuperblock = (nedge_pseudorapidity - 2) * - nsector_azimuth; - - size_t index_row = 0; - for (size_t index_pseudorapidity = 0; - index_pseudorapidity < nedge_pseudorapidity - 2; - index_pseudorapidity++) { - for (size_t index_azimuth = 0; - index_azimuth < nsector_azimuth - 1; - index_azimuth++) { - const size_t index_column = - index_pseudorapidity * nsector_azimuth + - index_azimuth; - p->push_back_row( - bpmpd_problem_t::greater_equal, 0); - p->push_back_coefficient( - index_row, index_column, 1); - p->push_back_coefficient( - index_row, nsuperblock + index_column, -1); - index_row++; - p->push_back_row( - bpmpd_problem_t::greater_equal, 0); - p->push_back_coefficient( - index_row, index_column, 1); - p->push_back_coefficient( - index_row, nsuperblock + index_column + 1, -1); - index_row++; - p->push_back_row( - bpmpd_problem_t::greater_equal, 0); - p->push_back_coefficient( - index_row, index_column, 1); - p->push_back_coefficient( - index_row, - nsuperblock + index_column + nsector_azimuth, -1); - index_row++; - p->push_back_row( - bpmpd_problem_t::greater_equal, 0); - p->push_back_coefficient( - index_row, index_column, 1); - p->push_back_coefficient( - index_row, - nsuperblock + index_column + nsector_azimuth + 1, - -1); - index_row++; - } - const size_t index_column = - index_pseudorapidity * nsector_azimuth + - nsector_azimuth - 1; - p->push_back_row( - bpmpd_problem_t::greater_equal, 0); - p->push_back_coefficient( - index_row, index_column, 1); - p->push_back_coefficient( - index_row, nsuperblock + index_column, -1); - index_row++; - p->push_back_row( - bpmpd_problem_t::greater_equal, 0); - p->push_back_coefficient( - index_row, index_column, 1); - p->push_back_coefficient( - index_row, - nsuperblock + index_column - (nsector_azimuth - 1), - -1); - index_row++; - p->push_back_row( - bpmpd_problem_t::greater_equal, 0); - p->push_back_coefficient( - index_row, index_column, 1); - p->push_back_coefficient( - index_row, - nsuperblock + index_column + nsector_azimuth, -1); - index_row++; - p->push_back_row( - bpmpd_problem_t::greater_equal, 0); - p->push_back_coefficient( - index_row, index_column, 1); - p->push_back_coefficient( - index_row, - nsuperblock + index_column + nsector_azimuth - - (nsector_azimuth - 1), - -1); - index_row++; - } - - const size_t nstaggered_block = - (nedge_pseudorapidity - 1) * nsector_azimuth; - const size_t nblock = nsuperblock + 2 * nstaggered_block; - - _nblock_subtract = std::vector(_event.size(), 0); - - std::vector - positive_index(_event.size(), _event.size()); - size_t positive_count = 0; - - for (std::vector::const_iterator iterator = - _event.begin(); - iterator != _event.end(); iterator++) { - if (iterator->momentum_perp_subtracted >= 0) { - positive_index[iterator - _event.begin()] = - positive_count; - positive_count++; - } - } - - _ncost = nblock + positive_count; - - const double sum_unequalized_0 = _equalization_threshold.first; - const double sum_unequalized_1 = (2.0 / 3.0) * _equalization_threshold.first + (1.0 / 3.0) * _equalization_threshold.second; - const double sum_unequalized_2 = (1.0 / 3.0) * _equalization_threshold.first + (2.0 / 3.0) * _equalization_threshold.second; - const double sum_unequalized_3 = _equalization_threshold.second; - - std::vector::const_iterator - iterator_particle = _event.begin(); - std::vector::const_iterator iterator_active = - _active.begin(); - std::vector >::const_iterator - iterator_recombine_index_outer = - _recombine_index.begin(); - std::vector >::const_iterator - iterator_recombine_unsigned_outer = - _recombine_unsigned.begin(); - size_t index_column_max = _ncost - 1; - for (; iterator_particle != _event.end(); - iterator_particle++, iterator_active++, - iterator_recombine_index_outer++, - iterator_recombine_unsigned_outer++) { - if (*iterator_active) { - int index_pseudorapidity = -1; - -///////////////////////////////////////////////////////////////////// - for (size_t i = 1; i < nedge_pseudorapidity; i++) { - if (iterator_particle->momentum.Eta() >= edge_pseudorapidity[i - 1] && - iterator_particle->momentum.Eta() < edge_pseudorapidity[i]) { - index_pseudorapidity = i - 1; - } - } - - const int index_azimuth = floor( - (iterator_particle->momentum.Phi() + M_PI) * - ((nsector_azimuth >> 1) / M_PI)); - - if (index_pseudorapidity != -1) { - // p_i - sum t - u = c_i - // or: c_i + u + sum_t = p_i - // n_i + sum t - u <= 0 - // or: u - sum_t >= n_i - - // Inequality RHS - p->push_back_row( - iterator_particle->momentum_perp_subtracted >= 0 ? - bpmpd_problem_t::equal : - bpmpd_problem_t::greater_equal, - iterator_particle->momentum_perp_subtracted); - - // Energy transfer coefficients t_kl - const double sign = iterator_particle->momentum_perp_subtracted >= 0 ? 1 : -1; - const size_t index_column_block_subtract = - nsuperblock + - (nedge_pseudorapidity - 1) * nsector_azimuth + - index_pseudorapidity * nsector_azimuth + - index_azimuth; - - _nblock_subtract[iterator_particle - _event.begin()] = - index_column_block_subtract; - - if (iterator_particle->momentum_perp_subtracted >= 0) { - const size_t index_column_cost = - nblock + positive_index[iterator_particle - _event.begin()]; - - p->push_back_coefficient( - index_row, index_column_cost, 1); - index_column_max = - std::max(index_column_max, index_column_cost); - } - p->push_back_coefficient( - index_row, index_column_block_subtract, 1); - index_column_max = - std::max(index_column_max, index_column_block_subtract); - - for (std::vector::const_iterator - iterator_recombine_index_inner = - iterator_recombine_index_outer->begin(); - iterator_recombine_index_inner != - iterator_recombine_index_outer->end(); - iterator_recombine_index_inner++) { - const size_t index_column = - *iterator_recombine_index_inner + - _ncost; - - p->push_back_coefficient( - index_row, index_column, sign); - index_column_max = - std::max(index_column_max, index_column); - } - index_row++; - - const size_t index_column_block = - nsuperblock + - index_pseudorapidity * nsector_azimuth + - index_azimuth; - - // sum_R c_i - o_i >= -d - // or: d + sum_R c_i >= o_i - // sum_R c_i - o_i <= d - // or: d - sum_R c_i >= -o_i - - double sum_unequalized; - - sum_unequalized = 0; - for (std::vector::const_iterator - iterator_recombine_unsigned_inner = - iterator_recombine_unsigned_outer->begin(); - iterator_recombine_unsigned_inner != - iterator_recombine_unsigned_outer->end(); - iterator_recombine_unsigned_inner++) { - sum_unequalized += - _event[*iterator_recombine_unsigned_inner].momentum_perp_subtracted; - } - sum_unequalized = std::max(0.0, sum_unequalized); - - if (sum_unequalized >= sum_unequalized_3 || - (sum_unequalized >= sum_unequalized_2 && - (iterator_particle - _event.begin()) % 2 == 0) || - (sum_unequalized >= sum_unequalized_1 && - (iterator_particle - _event.begin()) % 4 == 0) || - (sum_unequalized >= sum_unequalized_0 && - (iterator_particle - _event.begin()) % 8 == 0)) { - - const double weight = sum_unequalized * - std::min(1.0, std::max(1e-3, - iterator_particle->area)); - - if (weight > 0) { - p->push_back_row( - bpmpd_problem_t::greater_equal, - sum_unequalized); - - p->push_back_coefficient( - index_row, index_column_block, 1.0 / weight); - - for (std::vector::const_iterator - iterator_recombine_unsigned_inner = - iterator_recombine_unsigned_outer->begin(); - iterator_recombine_unsigned_inner != - iterator_recombine_unsigned_outer->end(); - iterator_recombine_unsigned_inner++) { - if (_event[*iterator_recombine_unsigned_inner].momentum_perp_subtracted >= 0) { - const size_t index_column_cost = - nblock + - positive_index[*iterator_recombine_unsigned_inner]; - - p->push_back_coefficient( - index_row, index_column_cost, 1); - index_column_max = - std::max(index_column_max, index_column_cost); - } - } - index_row++; - - p->push_back_row( - bpmpd_problem_t::greater_equal, - -sum_unequalized); - - p->push_back_coefficient( - index_row, index_column_block, _positive_bound_scale / weight); - - for (std::vector::const_iterator iterator_recombine_unsigned_inner = iterator_recombine_unsigned_outer->begin(); - iterator_recombine_unsigned_inner != iterator_recombine_unsigned_outer->end(); - iterator_recombine_unsigned_inner++) { - if (_event[*iterator_recombine_unsigned_inner].momentum_perp_subtracted >= 0) { - const size_t index_column_cost = - nblock + - positive_index[*iterator_recombine_unsigned_inner]; - - p->push_back_coefficient( - index_row, index_column_cost, -1); - index_column_max = - std::max(index_column_max, index_column_cost); - } - } - index_row++; - } - - } - - } - } - } - - // Epsilon that breaks the degeneracy, in the same units - // as the pT of the event (i.e. GeV) - static const double epsilon_degeneracy = 1e-2; - - // Columns (variables and the objective coefficients) of - // the LP problem - // - // Cost variables (objective coefficient 1) - for (size_t i = 0; i < nsuperblock; i++) { - p->push_back_column( - 1, 0, bpmpd_problem_t::infinity); - } - for (size_t i = nsuperblock; i < nsuperblock + nstaggered_block; i++) { - p->push_back_column( - 0, 0, bpmpd_problem_t::infinity); - } - for (size_t i = nsuperblock + nstaggered_block; i < nsuperblock + 2 * nstaggered_block; i++) { - p->push_back_column( - 0, 0, bpmpd_problem_t::infinity); - } - for (size_t i = nsuperblock + 2 * nstaggered_block; i < _ncost; i++) { - p->push_back_column( - 0, 0, bpmpd_problem_t::infinity); - } - //fprintf(stderr, "%s:%d: %lu %lu\n", __FILE__, __LINE__, index_column_max, recombine_tie.size()); - // Energy transfer coefficients t_kl (objective - // coefficient 0 + epsilon) - for (size_t i = _ncost; i <= index_column_max; i++) { - p->push_back_column( - epsilon_degeneracy * _recombine_tie[i - _ncost], - 0, bpmpd_problem_t::infinity); - } - } - void VoronoiAlgorithm::equalize(void) - { - bpmpd_problem_t lp_problem = reinterpret_cast(_lp_environment)->problem(); - - recombine_link(); - lp_populate(&lp_problem); - lp_problem.optimize(); - - int solution_status; - double objective_value; - std::vector x; - std::vector pi; - - lp_problem.solve(solution_status, objective_value, - x, pi); - - for (size_t k = _ncost; k < x.size(); k++) { - if (_event[_recombine[k - _ncost].first]. - momentum_perp_subtracted < 0 && - _event[_recombine[k - _ncost].second]. - momentum_perp_subtracted >= 0 && x[k] >= 0) { - _event[_recombine[k - _ncost].first]. - momentum_perp_subtracted += x[k]; - _event[_recombine[k - _ncost].second]. - momentum_perp_subtracted -= x[k]; - } - } - for (size_t k = 0; k < _event.size(); k++) { - if (_nblock_subtract[k] != 0 && - x[_nblock_subtract[k]] >= 0) { - _event[k].momentum_perp_subtracted -= - x[_nblock_subtract[k]]; - } - } - } - void VoronoiAlgorithm::remove_nonpositive(void) - { - for (std::vector::iterator iterator = - _event.begin(); - iterator != _event.end(); iterator++) { - iterator->momentum_perp_subtracted = std::max( - 0.0, iterator->momentum_perp_subtracted); - } - } - void VoronoiAlgorithm::subtract_if_necessary(void) - { - if (!_subtracted) { - event_fourier(); - feature_extract(); - voronoi_area_incident(); - subtract_momentum(); - if (_remove_nonpositive) { - equalize(); - remove_nonpositive(); - } - _subtracted = true; - } - } - - VoronoiAlgorithm::VoronoiAlgorithm( - const double dr_max, - const bool isRealData, - const bool isCalo, - const std::pair equalization_threshold, - const bool remove_nonpositive) - : _remove_nonpositive(remove_nonpositive), - _equalization_threshold(equalization_threshold), - _radial_distance_square_max(dr_max * dr_max), - _positive_bound_scale(0.2), - _subtracted(false), - ue(NULL) - { - initialize_geometry(); - ue = new UECalibration(isRealData, isCalo); - static const size_t nedge_pseudorapidity = 15 + 1; - static const double edge_pseudorapidity[nedge_pseudorapidity] = { - -5.191, -2.650, -2.043, -1.740, -1.479, -1.131, -0.783, -0.522, 0.522, 0.783, 1.131, 1.479, 1.740, 2.043, 2.650, 5.191 - }; - - _edge_pseudorapidity = std::vector( - edge_pseudorapidity, - edge_pseudorapidity + nedge_pseudorapidity); - allocate(); - } - - VoronoiAlgorithm::~VoronoiAlgorithm(void) - { - deallocate(); - } - - /** - * Add a new unsubtracted particle to the current event - * - * @param[in] perp transverse momentum - * @param[in] pseudorapidity pseudorapidity - * @param[in] azimuth azimuth - * @param[in] reduced_particle_flow_id reduced particle - * flow ID, between 0 and 2 (inclusive) - */ - void VoronoiAlgorithm::push_back_particle( - const double perp, const double pseudorapidity, - const double azimuth, - const unsigned int reduced_particle_flow_id) - { - math::PtEtaPhiELorentzVector p(perp, pseudorapidity, azimuth, NAN); - - p.SetE(p.P()); - _event.push_back(particle_t(p, reduced_particle_flow_id)); - } - /** - * Clears the list of unsubtracted particles - */ - void VoronoiAlgorithm::clear(void) - { - _event.clear(); - _subtracted = false; - } - /** - * Returns the transverse momenta of the subtracted particles - * - * @return vector of transverse momenta - */ - std::vector VoronoiAlgorithm::subtracted_equalized_perp(void) - { - subtract_if_necessary(); - - std::vector ret; - - for (std::vector::const_iterator iterator = - _event.begin(); - iterator != _event.end(); iterator++) { - ret.push_back(iterator->momentum_perp_subtracted); - } - - return ret; - } - std::vector VoronoiAlgorithm::subtracted_unequalized_perp(void) - { - subtract_if_necessary(); - - std::vector ret; - - for (std::vector::const_iterator iterator = - _event.begin(); - iterator != _event.end(); iterator++) { - ret.push_back(iterator->momentum_perp_subtracted_unequalized); - } - - return ret; - } - /** - * Returns the area in the Voronoi diagram diagram occupied by - * a given particle - * - * @return vector of area - */ - std::vector VoronoiAlgorithm::particle_area(void) - { - subtract_if_necessary(); - - std::vector ret; - - for (std::vector::const_iterator iterator = - _event.begin(); - iterator != _event.end(); iterator++) { - ret.push_back(iterator->area); - } - - return ret; - } - /** - * Returns the incident particles in the Delaunay diagram - * (particles that has a given particle as the nearest - * neighbor) - * - * @return vector of sets of incident particles - * indices, using the original indexing - */ - std::vector > VoronoiAlgorithm::particle_incident(void) - { - subtract_if_necessary(); - - std::vector > ret; - - for (std::vector::const_iterator - iterator_outer = _event.begin(); - iterator_outer != _event.end(); iterator_outer++) { - std::set e; - - for (std::set::iterator>:: - const_iterator iterator_inner = - iterator_outer->incident.begin(); - iterator_inner != iterator_outer->incident.begin(); - iterator_inner++) { - e.insert(*iterator_inner - _event.begin()); - } - ret.push_back(e); - } - - return ret; - } - std::vector VoronoiAlgorithm::perp_fourier(void) - { - subtract_if_necessary(); - - return std::vector( - _perp_fourier->data(), - _perp_fourier->data() + - _perp_fourier->num_elements()); - } - size_t VoronoiAlgorithm::nedge_pseudorapidity(void) const - { - return _edge_pseudorapidity.size(); - } diff --git a/RecoHI/HiJetAlgos/src/VoronoiSubtractor.cc b/RecoHI/HiJetAlgos/src/VoronoiSubtractor.cc deleted file mode 100644 index 9121c7310c57b..0000000000000 --- a/RecoHI/HiJetAlgos/src/VoronoiSubtractor.cc +++ /dev/null @@ -1,188 +0,0 @@ -#include "RecoHI/HiJetAlgos/interface/VoronoiSubtractor.h" -#include "DataFormats/Candidate/interface/Candidate.h" -#include "FWCore/Framework/interface/ConsumesCollector.h" -#include "FWCore/Framework/interface/ESHandle.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" -using namespace std; - -bool VoronoiSubtractor::match(const fastjet::PseudoJet cand1, const fastjet::PseudoJet cand2){ - return (cand1.delta_R(cand2) < rParam_); -} - - -VoronoiSubtractor::VoronoiSubtractor(const edm::ParameterSet& iConfig, edm::ConsumesCollector && iC) : - PileUpSubtractor(iConfig, std::move(iC)), - srcCand_(iC.consumes(iConfig.getParameter("src"))), - srcVor_(iC.consumes >(iConfig.getParameter("bkg"))), - dropZeroTowers_(iConfig.getParameter("dropZeros")), - addNegativesFromCone_(iConfig.getParameter("addNegativesFromCone")), - infinitesimalPt_(iConfig.getParameter("infinitesimalPt")), - rParam_(iConfig.getParameter("rParam")) -{ - -} - - - -void VoronoiSubtractor::setupGeometryMap(edm::Event& iEvent,const edm::EventSetup& iSetup) -{ - - LogDebug("VoronoiSubtractor")<<"The subtractor retrieving Voronoi background...\n"; - geo_ = 0; - droppedCandidates_.clear(); - jetOffset_.clear(); - - iEvent.getByToken(srcCand_,candidates_); - iEvent.getByToken(srcVor_,backgrounds_); - -} - -void VoronoiSubtractor::offsetCorrectJets() -{ - - LogDebug("VoronoiSubtractor")<<"finalizing the output...\n"; - - jetOffset_.reserve(fjJets_->size()); - - for (unsigned int ijet = 0;ijet size();++ijet) { - fastjet::PseudoJet& fjJet = (*fjJets_)[ijet]; - - LogDebug("VoronoiSubtractor")<<"fjJets_ "< fjConstituents = fastjet::sorted_by_pt(fjJet.constituents()); - for (unsigned int i=0;ipx(),ref->py(),ref->pz(),ref->energy()); - double orpt = candidate.perp(); - unsubtracted += candidate; - if(voronoi.pt() > 0){ - candidate.reset_PtYPhiM(voronoi.pt(),ref->rapidity(),ref->phi(),ref->mass()); - LogDebug("VoronoiSubtractor")<<"candidate "<pt() - <<" --- constituent "<px(),ref->py(),ref->pz(),ref->energy()); - - if(match(fjJet,dropcand)){ - unsubtractedDropped += dropcand; - unsubtracted += dropcand; - } - } - } - - fjJet.reset_momentum(subtracted); - - LogDebug("VoronoiSubtractor")<<"fjJets_ "< & coll) -{ - - LogDebug("VoronoiSubtractor")<<"The subtractor subtracting pedestals...\n"; - vector newcoll; - - for (vector::iterator input_object = coll.begin (), - fjInputsEnd = coll.end(); - input_object != fjInputsEnd; ++input_object) { - - reco::CandidateViewRef ref(candidates_,input_object->user_index()); - const reco::VoronoiBackground& voronoi = (*backgrounds_)[ref]; - - double ptold = input_object->pt(); - double ptnew = voronoi.pt(); - - LogDebug("VoronoiSubtractor")<<"pt old : "<e() - <<" rap : "<rapidity() - <<" phi : "<phi() - <<" MASS : "<m()< 0){ - // Low-pt candidate is assigned a very small finite pt - // so that the jet clustering includes the candidate - // and can associate it to the jet. - // The original candidate pt is restored - // in the offsetCorrectJets() function. - ptnew = infinitesimalPt_; - }else{ - // Low-pt candidate is removed from the input collection, - // so that the jet clustering algorithm can function properly. - // However, we need to keep track of these candidates - // in order to determine how much energy has been subtracted in total. - droppedCandidates_.push_back(input_object->user_index()); - continue; - } - } - - int index = input_object->user_index(); - - fastjet::PseudoJet ps(input_object->four_mom()); - ps.reset_PtYPhiM(ptnew,input_object->rapidity(),input_object->phi(),input_object->m()); - ps.set_user_index(index); - - LogDebug("VoronoiSubtractor")<<"New momentum : "< const & coll ) -{ - LogDebug("VoronoiSubtractor")<<"do nothing...\n"; -} - - -void VoronoiSubtractor::calculateOrphanInput(vector & orphanInput) -{ - LogDebug("VoronoiSubtractor")<<"do nothing...\n"; -} - - diff --git a/RecoHI/HiJetAlgos/src/bpmpd-2.11.f b/RecoHI/HiJetAlgos/src/bpmpd-2.11.f deleted file mode 100644 index 0d7fd63a5eb05..0000000000000 --- a/RecoHI/HiJetAlgos/src/bpmpd-2.11.f +++ /dev/null @@ -1,10561 +0,0 @@ -C Version for CMSSW, modified to suppress gfortran warnings -C ------------------------------------------------------------------- -c Primal-dual method with supernodal cholesky factorization -c Version 2.11 (1996 December) -c Written by Cs. Meszaros, MTA SzTAKI, Budapest, Hungary -c Questions, remarks to the e-mail address: -c meszaros@lutra.sztaki.hu -c -c All rights reserved ! Free for academic and research use only ! -c Commercial users are required to purchase a software license. -c -c Related publications: -c -c Meszaros, Cs.: Fast Cholesky Factorization for Interior Point Methods -c of Linear Programming. Computers & Mathematics with Applications, -c Vol. 31. No.4/5 (1996) pp. 49-51. -c -c Meszaros, Cs.: The "inexact" minimum local fill-in ordering algorithm. -c Working Paper WP 95-7, Computer and Automation Institute, Hungarian -c Academy of Sciences -c -c Maros I., Meszaros Cs.: The Role of the Augmented System in Interior -c Point Methods. European Journal of Operations Researches -c (submitted) -c -c =========================================================================== -c -c Callable interface -c -c Standard form: ax-s=b u>=x,s>=l -c -c remarks: -c EQ rows 0 >= s >= 0 -c GT rows +inf >= s >= 0 -c LT rows 0 >= s >= -inf -c FR rows +inf >= s >= -inf -c -c input: obj objective function (to be minimize) (n) -c rhs right-hand side (m) -c lbound lower bounds (m+n) -c ubound upper bounds (m+n) -c colpnt pointer to the columns (n+1) -c rowidx row indices (nz) -c nonzeros nonzero values (nz) -c big practical +inf -c -c output: code termination code -c xs primal values -c dv dual values -c dspr dual resuduals -c -c Input arrays will be destroyed ! -c -c =========================================================================== -c - subroutine solver( - x obj,rhs,lbound,ubound,diag,odiag,xs,dxs,dxsn,up,dspr,ddspr, - x ddsprn,dsup,ddsup,ddsupn,dv,ddv,ddvn,prinf,upinf,duinf,scale, - x nonzeros, - x vartyp,slktyp,colpnt,ecolpnt,count,vcstat,pivots,invprm, - x snhead,nodtyp,inta1,prehis,rowidx,rindex, - x code,opt,iter,corect,fixn,dropn,fnzmax,fnzmin,addobj, - x bigbou,big,ft) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - common/initv/ prmin,upmax,dumin,stamet,safmet,premet,regul - real*8 prmin,upmax,dumin - integer*4 stamet,safmet,premet,regul -c - integer*4 fixn,dropn,code,iter,corect,fnzmin,fnzmax,ft - real*8 addobj,opt,big, - x obj(n),rhs(m),lbound(mn),ubound(mn),scale(mn),diag(mn),odiag(mn), - x xs(mn),dxs(mn),dxsn(mn),up(mn),dspr(mn),ddspr(mn),ddsprn(mn), - x dsup(mn),ddsup(mn),ddsupn(mn),dv(m),ddv(m),ddvn(m), - x nonzeros(cfree),prinf(m),upinf(mn),duinf(mn),bigbou - integer*4 vartyp(n),slktyp(m),colpnt(n1),ecolpnt(mn), - x count(mn),vcstat(mn),pivots(mn),invprm(mn),snhead(mn), - x nodtyp(mn),inta1(mn),prehis(mn),rowidx(cfree),rindex(rfree) -c - common/numer/ tplus,tzer - real*8 tplus,tzer - common/ascal/ objnor,rhsnor,scdiff,scpass,scalmet - real*8 objnor,rhsnor,scdiff - integer*4 scpass,scalmet -c --------------------------------------------------------------------------- - integer*4 i,j,k,active,pnt1,pnt2,prelen,freen - real*8 scobj,scrhs,sol,lbig - character*99 buff -C CMSSW: Temporary integer array needed to avoid reusing REAL*8 for -C integer storage - integer*4 pmbig(m),ppbig(m),dmbig(n),dpbig(n) - integer*4 iwork1(mn+mn),iwork2(mn+mn),iwork3(mn+mn),iwork4(mn+mn), - & iwork5(mn+mn) -c --------------------------------------------------------------------------- -c -c inicializalas -c - if(cfree.le.(nz+1)*2)then - write(buff,'(1x,a)')'Not enough memory, realmem < nz !' - call mprnt(buff) - code=-2 - goto 50 - endif - if(rfree.le.nz)then - write(buff,'(1x,a)')'Not enough memory, intmem < nz !' - call mprnt(buff) - code=-2 - goto 50 - endif - iter=0 - corect=0 - prelen=0 - fnzmin=cfree - fnzmax=-1 - scobj=1.0d+0 - scrhs=1.0d+0 - code=0 - lbig=0.9d+0*big - if(bigbou.gt.lbig)then - lbig=bigbou - big=lbig/0.9d+0 - endif - do i=1,mn - scale(i)=1.0d+0 - enddo -c -c Remove fix variables and free rows -c - do i=1,n - vartyp(i)=0 - if(abs(ubound(i)-lbound(i)).le.tplus*(abs(lbound(i)+1.0d0)))then - vartyp(i)= 1 - vcstat(i)=-2-1 - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - do j=pnt1,pnt2 - rhs(rowidx(j))=rhs(rowidx(j))-ubound(i)*nonzeros(j) - enddo - addobj=addobj+obj(i)*lbound(i) - else - vcstat(i)=0 - endif - enddo - do i=1,m - slktyp(i)=0 - j=i+n - if((ubound(j).gt.lbig).and.(lbound(j).lt.-lbig))then - vcstat(j)=-2-1 - else - vcstat(j)=0 - endif - enddo -c -c p r e s o l v e r -c - call timer(k) - if(premet.gt.0)then - write(buff,'(1x)') - call mprnt(buff) - write(buff,'(1x,a)')'Process: presolv' - call mprnt(buff) - call presol(colpnt,rowidx,nonzeros,rindex,nonzeros(nz+1), - x snhead,snhead(n1),nodtyp,nodtyp(n1),vcstat,vcstat(n1), - x ecolpnt,count,ecolpnt(n1),count(n1), -C CMSSW: Prevent REAL*8 reusage warning -C Was: vartyp,dxsn(n1),dxs(n1),diag(n1),odiag(n1), - x vartyp,dxsn(n1),dxs(n1),pmbig,ppbig, - x ubound,lbound,ubound(n1),lbound(n1),rhs,obj,prehis,prelen, -C CMSSW: Prevent REAL*8 reusage warning -C Was: addobj,big,pivots,invprm,dv,ddv,dxsn,dxs,diag,odiag,premet,code) - x addobj,big,pivots,invprm,dv,ddv,dxsn,dxs,dmbig,dpbig,premet, - x code) - write(buff,'(1x,a)')'Presolv done...' - call mprnt(buff) - if(code.ne.0)goto 45 - endif -c -c Remove lower bounds -c - call stndrd(ubound,lbound,rhs,obj,nonzeros, - x vartyp,slktyp,vcstat,colpnt,rowidx,addobj,tplus,tzer,lbig,big) -c -c Scaling before aggregator -c - i=iand(scalmet,255) - j=iand(scpass,255) - if(i.gt.0)call mscale(colpnt,rowidx,nonzeros,obj,rhs,ubound, - x vcstat,scale,upinf,i,j,scdiff,ddsup,dxsn,dxs,snhead) -c -c Aggregator -c - if(premet.gt.127)then - write(buff,'(1x)') - call mprnt(buff) - write(buff,'(1x,a)')'Process: aggregator' - call mprnt(buff) - call aggreg(colpnt,rowidx,nonzeros,rindex, - x vcstat,vcstat(n1),ecolpnt,count,ecolpnt(n1),count(n1), - x rhs,obj,prehis,prelen,pivots,vartyp,slktyp,invprm,snhead, - x nodtyp,inta1,inta1(n1),dv,addobj,premet,code) - write(buff,'(1x,a)')'Aggregator done...' - call mprnt(buff) - if(code.ne.0)goto 55 - endif -c -c Scaling after aggregator -c - i=scalmet/256 - j=scpass/256 - if(i.gt.0)call mscale(colpnt,rowidx,nonzeros,obj,rhs, - x ubound,vcstat,scale,upinf,i,j,scdiff,ddsup,dxsn,dxs,snhead) -c - call timer(j) - write(buff,'(1x)') - call mprnt(buff) - write(buff,'(1x,a,f8.2,a)') - x 'Time for presolv, scaling and aggregator: ',0.01*(j-k),' sec.' - call mprnt(buff) -c -c cleaning -c - do i=1,mn - xs(i)=0.0d+0 - dspr(i)=0.0d+0 - dsup(i)=0.0d+0 - up(i)=0.0d+0 - enddo - do i=1,m - dv(i)=0.0d+0 - enddo -c -c Is the problem solved ? -c - fixn=0 - dropn=0 - freen=0 - do i=1,n - if(vcstat(i).le.-2)then - fixn=fixn+1 - else if(vartyp(i).eq.0) then - freen=freen+1 - endif - enddo - do i=1,m - if(vcstat(i+n).le.-2)dropn=dropn+1 - enddo - active=mn-fixn-dropn - if(active.eq.0)code=2 - if(code.gt.0)then - opt=addobj - write(buff,'(1x,a)')'Problem is solved by the pre-solver' - call mprnt(buff) - if(code.gt.0)goto 55 - goto 50 - endif -c -c Presolve statistics -c - if(premet.gt.0)then - i=0 - j=0 - do k=1,n - if(vcstat(k).gt.-2)then - i=i+count(k)-ecolpnt(k)+1 - if(j.lt.count(k)-ecolpnt(k)+1)j=count(k)-ecolpnt(k)+1 - endif - enddo - write(buff,'(1x,a22,i8)')'Number of rows :',(m-dropn) - call mprnt(buff) - write(buff,'(1x,a22,i8)')'Number of columns :',(n-fixn) - call mprnt(buff) - write(buff,'(1x,a22,i8)')'Free variables :',freen - call mprnt(buff) - write(buff,'(1x,a22,i8)')'No. of nonzeros :',i - call mprnt(buff) - write(buff,'(1x,a22,i8)')'Longest column count :',j - call mprnt(buff) - endif -c -c Incrase rowidx by n -c - j=colpnt(1) - k=colpnt(n+1)-1 - do i=j,k - rowidx(i)=rowidx(i)+n - enddo - active=mn-fixn-dropn -c -c Normalize obj and rhs -c - if(objnor.gt.tzer)then - call scalobj(obj,scobj,vcstat,objnor) - endif - if(rhsnor.gt.tzer)then - call scalrhs(rhs,scrhs,vcstat,rhsnor,ubound,xs,up) - endif -c -c Calling phas12 -c - sol=scobj*scrhs - i=mn+mn - call timer(k) - call phas12( - x obj,rhs,ubound,diag,odiag,xs,dxs,dxsn,up,dspr,ddspr, - x ddsprn,dsup,ddsup,ddsupn,dv,ddv,ddvn,nonzeros,prinf,upinf,duinf, - x vartyp,slktyp,colpnt,ecolpnt,count,vcstat,pivots,invprm, - x snhead,nodtyp,inta1,rowidx,rindex, -C CMSSW: Prevent REAL*8 reusage warning -C Was: dxs,dxsn,ddspr,ddsprn,ddsup,ddsupn, - x dxs,iwork1,iwork2,iwork3,iwork4,iwork5, - x code,opt,iter,corect,fixn,dropn,active,fnzmax,fnzmin,addobj, - x sol,ft,i) - call timer(j) - write(buff,'(1x,a,f11.2,a)')'Solver time ',0.01*(j-k),' sec.' - call mprnt(buff) -c -c Decrease rowidx by n -c - j=colpnt(1) - k=colpnt(n+1)-1 - do i=j,k - rowidx(i)=rowidx(i)-n - enddo -c -c Rescaling -c - 55 do i=1,m - rhs(i)=rhs(i)*scrhs*scale(i+n) - ubound(i+n)=ubound(i+n)*scrhs*scale(i+n) - xs(i+n)=xs(i+n)*scrhs*scale(i+n) - up(i+n)=up(i+n)*scrhs*scale(i+n) - dv(i)=dv(i)*scobj/scale(i+n) - dspr(i+n)=dspr(i+n)/scale(i+n)*scobj - dsup(i+n)=dsup(i+n)/scale(i+n)*scobj - enddo -c - do i=1,n - obj(i)=obj(i)*scobj*scale(i) - ubound(i)=ubound(i)*scrhs/scale(i) - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - do j=pnt1,pnt2 - nonzeros(j)=nonzeros(j)*scale(i)*scale(rowidx(j)+n) - enddo -c - xs(i)=xs(i)/scale(i)*scrhs - up(i)=up(i)/scale(i)*scrhs - dspr(i)=dspr(i)*scale(i)*scobj - dsup(i)=dsup(i)*scale(i)*scobj - enddo -c -c Postprocessing -c - 45 call pstsol(colpnt,rowidx,nonzeros,vcstat,vcstat(n1), - x vartyp,slktyp,ubound,lbound,ubound(n1),lbound(n1),rhs,obj,xs, - x inta1,ddvn,prehis,prelen,big) -c - 50 return - end -c -c =========================================================================== -c - subroutine stndrd(ubound,lbound,rhs,obj,nonzeros, - x vartyp,slktyp,vcstat,colpnt,rowidx,addobj,tplus,tzer,lbig,big) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - integer*4 vartyp(n),slktyp(m),vcstat(mn),colpnt(n1),rowidx(nz) - real*8 ubound(mn),lbound(mn),rhs(m),obj(n),nonzeros(nz), - x addobj,tplus,tzer,lbig,big -c - integer*4 i,j,k,pnt1,pnt2 -c -c generate standard form, row modification -c - k=0 - do 150 i=1,m - j=i+n - if(vcstat(j).gt.-2)then - if(abs(ubound(j)-lbound(j)).le.tplus*(abs(lbound(j))+1d0))then - slktyp(i)=0 - ubound(j)=0.0d+00 - rhs(i)=rhs(i)+lbound(j) - goto 150 - endif -ccc if((ubound(j).gt.lbig).and.(lbound(j).lt.-lbig))then -ccc vcstat(j)=-2 -ccc slktyp(i)=0 -ccc goto 150 -ccc endif - if(lbound(j).lt.-lbig)then - slktyp(i)=2 - lbound(j)=-ubound(j) - ubound(j)=big - rhs(i)=-rhs(i) - k=k+1 - else - slktyp(i)=1 - endif - rhs(i)=rhs(i)+lbound(j) - ubound(j)=ubound(j)-lbound(j) - if(ubound(j).lt.lbig)slktyp(i)=-slktyp(i) - else - slktyp(i)=0 - endif - 150 continue -c -c negate reverse rows -c - if(k.gt.0)then - do i=1,n - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - do j=pnt1,pnt2 - if(abs(slktyp(rowidx(j))).ge.2)nonzeros(j)=-nonzeros(j) - enddo - enddo - endif -c -c column modification -c - do 155 i=1,n - if(vcstat(i).gt.-2)then -ccc if(abs(ubound(i)-lbound(i)).le.tplus*(abs(lbound(i))+1d0))then -ccc vcstat(i)=-2 -ccc vartyp(i)= 1 -ccc do j=colpnt(i),colpnt(i+1)-1 -ccc rhs(rowidx(j))=rhs(rowidx(j))-nonzeros(j)*lbound(i) -ccc enddo -ccc addobj=addobj+obj(i)*lbound(i) -ccc goto 155 -ccc endif - if((ubound(i).gt.lbig).and.(lbound(i).lt.-lbig))then - vartyp(i)=0 - goto 155 - endif - if(lbound(i).lt.-lbig)then - vartyp(i)=2 - lbound(i)=-ubound(i) - ubound(i)=big - obj(i)=-obj(i) - do j=colpnt(i),colpnt(i+1)-1 - nonzeros(j)=-nonzeros(j) - enddo - else - vartyp(i)=1 - endif - if(abs(lbound(i)).gt.tzer)then - if(ubound(i).lt.lbig)ubound(i)=ubound(i)-lbound(i) - do j=colpnt(i),colpnt(i+1)-1 - rhs(rowidx(j))=rhs(rowidx(j))-nonzeros(j)*lbound(i) - enddo - addobj=addobj+obj(i)*lbound(i) - endif - if(ubound(i).lt.lbig)vartyp(i)=-vartyp(i) - endif - 155 continue - return - end -c -c =========================================================================== -c Primal-dual method with supernodal cholesky factorization -c Version 2.11 (1996 December) -c Written by Cs. Meszaros, MTA SzTAKI, Budapest, Hungary -c e-mail: meszaros@lutra.sztaki.hu -c see "bpmain.f" -c -c code=-2 General memory limit (no solution) -c code=-1 Memory limit during iterations -c code= 0 -c code= 1 No optimum -c code= 2 Otimal solution -c code= 3 Primal Infeasible -c code= 4 Dual Infeasible -c -c =========================================================================== -c - subroutine phas12( - x obj,rhs,bounds,diag,odiag,xs,dxs,dxsn,up,dspr,ddspr, - x ddsprn,dsup,ddsup,ddsupn,dv,ddv,ddvn,nonzeros,prinf,upinf,duinf, - x vartyp,slktyp,colpnt,ecolpnt,count,vcstat,pivots,invprm, - x snhead,nodtyp,inta1,rowidx,rindex, - x rwork1,iwork1,iwork2,iwork3,iwork4,iwork5, - x code,opt,iter,corect,fixn,dropn,active,fnzmax,fnzmin,addobj, - x scobj,factim,mn2) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - common/mscal/ varadd,slkadd,scfree - real*8 varadd,slkadd,scfree -c - common/numer/ tplus,tzer - real*8 tplus,tzer -c - common/param/ palpha,dalpha - real*8 palpha,dalpha -c - common/factor/ tpiv1,tpiv2,tabs,trabs,lam,tfind,order,supdens - real*8 tpiv1,tpiv2,tabs,trabs,lam,tfind,order,supdens -c - common/toler/ tsdir,topt1,topt2,tfeas1,tfeas2,feas1,feas2, - x pinfs,dinfs,inftol,maxiter - real*8 tsdir,topt1,topt2,tfeas1,tfeas2,feas1,feas2, - x pinfs,dinfs,inftol - integer*4 maxiter -c - common/initv/ prmin,upmax,dumin,stamet,safmet,premet,regul - real*8 prmin,upmax,dumin - integer*4 stamet,safmet,premet,regul -c - integer*4 fixn,dropn,active,code,iter,corect,fnzmin,fnzmax,mn2 - real*8 addobj,scobj,opt -c - common/predp/ ccstop,barset,bargrw,barmin,mincor,maxcor,inibar - real*8 ccstop,barset,bargrw,barmin - integer*4 mincor,maxcor,inibar -c - common/predc/ target,tsmall,tlarge,center,corstp,mincc,maxcc - real*8 target,tsmall,tlarge,center,corstp - integer*4 mincc,maxcc - - common/itref/ tresx,tresy,maxref - real*8 tresx,tresy - integer*4 maxref -c - real*8 obj(n),rhs(m),bounds(mn),diag(mn),odiag(mn),xs(mn), - x dxs(mn),dxsn(mn),up(mn),dspr(mn),ddspr(mn),ddsprn(mn),dsup(mn), - x ddsup(mn),ddsupn(mn),dv(m),ddv(m),ddvn(m),nonzeros(cfree), - x prinf(m),upinf(mn),duinf(mn),rwork1(mn) - - integer*4 vartyp(n),slktyp(m),colpnt(n1),ecolpnt(mn),count(mn), - x vcstat(mn),pivots(mn),invprm(mn),snhead(mn),nodtyp(mn), - x inta1(mn),rowidx(cfree),rindex(rfree),factim, - x iwork1(mn2),iwork2(mn2),iwork3(mn2),iwork4(mn2),iwork5(mn2) -c -c --------------------------------------------------------------------------- -c - integer*4 i,j,err,factyp,pphase,dphase,t1,t2,opphas,odphas - real*8 pinf,dinf,uinf,prelinf,drelinf,popt,dopt,cgap, - x prstpl,dustpl,barpar,oper,maxstp,pinfrd,dinfrd,objerr,nonopt, - x oprelinf,odrelinf,opinf,odinf,ocgap - integer*4 corr,corrc,barn,fxp,fxd,fxu,nropt - character*99 buff,sbuff - character*1 wmark -c -c to save parameters -c - integer*4 maxcco,mxrefo - real*8 lamo,spdeno,bargro,topto -C CMSSW: Temporary integer array needed to avoid reusing REAL*8 for -C integer storage - integer*4 inta12(mn) -c -c -------------------------------------------------------------------------- -c - 101 format(1x,' ') - 102 format(1x,'It-PC P.Inf D.Inf U.Inf Actions ', - x 'P.Obj D.Obj Barpar') - 103 format(1x,'------------------------------------------------', - x '------------------------------') - 104 format(1x,I2,a1,I1,I1,' ',1PD7.1,' ',1PD7.1,' ',1PD6.0, - x ' ',I2,' ',I3,' ',I3,' ',1PD15.8,' ',1PD15.8,' ',1PD6.0) -c -c Saving parameters -c - maxcco=maxcc - mxrefo=maxref - lamo=lam - spdeno=supdens - bargro=bargrw - topto=topt1 -c -c Include dummy ranges if requested -c - if(regul.gt.0)then - do i=1,m - if(slktyp(i).eq.0)then - slktyp(i)=-1 - bounds(i+n)=0.0d+0 - endif - enddo - endif -c -c Other initialization -c - nropt=0 - factim=0 - wmark='-' - fxp=0 - fxd=0 - fxu=0 -c - call stlamb(colpnt,vcstat,rowidx,inta1,fixn,dropn,factyp) - call timer(t1) - j=0 - do i=1,n - if((vcstat(i).gt.-2).and.(vartyp(i).eq.0))j=j+1 - enddo - if((j.gt.0).and.(scfree.lt.tzer))factyp=1 -c -c Initial scaling matrix (diagonal) -c - call fscale (vcstat,diag,odiag,vartyp,slktyp) - do i=1,m - dv(i)=0.0d+0 - enddo - -ccc i=2*rfree -ccc j=400 -ccc call paintmat(m,n,nz,i,rowidx,colpnt,rindex,j,'matrix01.pic') - -c -c Initial factorization -c - fnzmax=0 - if(factyp.eq.1)then - call ffactor(ecolpnt,vcstat,colpnt,rowidx, - x iwork4,pivots,count,nonzeros,diag, - x iwork1,iwork1(mn+1),iwork2,iwork2(mn+1),inta1,iwork5, - x iwork5(mn+1),iwork3,iwork3(mn+1),iwork4(mn+1),rindex, - x rwork1,fixn,dropn,fnzmax,fnzmin,active,oper,xs,slktyp,code) - if(code.ne.0)goto 999 - call supnode(ecolpnt,count,rowidx,vcstat,pivots,snhead, - x invprm,nodtyp) - else -c -c minimum local fill-in ordering -c - i=int(tfind) - if(order.lt.1.5)i=0 - if(order.lt.0.5)i=-1 - call symmfo(inta1,pivots,ecolpnt,vcstat, - x colpnt,rowidx,nodtyp,rindex,iwork3,invprm, - x count,snhead,iwork1,iwork1(mn+1),iwork2,iwork2(mn+1), - x iwork4,iwork4(mn+1),iwork3(mn+1),iwork5,iwork5(mn+1), -C CMSSW: Prevent REAL*8 reusage warning -C Was: nonzeros,fnzmax,oper,i,rwork1,code - x nonzeros,fnzmax,oper,i,inta12,code) - if(code.ne.0)goto 999 - call supnode(ecolpnt,count,rowidx,vcstat,pivots,snhead, - x invprm,nodtyp) - popt=trabs - trabs=tabs - call nfactor(ecolpnt,vcstat,rowidx,pivots,count,nonzeros, - x diag,err,rwork1,iwork2,iwork2(mn+1),dropn,slktyp, - x snhead,iwork3,invprm,nodtyp,dv,odiag) - trabs=popt - endif - fnzmin=fnzmax -c -c Compute centrality and iterative refinement power -c - if(fnzmin.eq.0)fnzmin=1 - cgap=oper/fnzmin/10.0d+0 - j=0 - 78 if(cgap.ge.1.0d+0)then - cgap=cgap/2 - j=j+1 - goto 78 - endif - if(j.eq.0)j=1 - if(maxcc.le.0d+0)then - maxcc=-maxcc - else - if(j.le.maxcc)maxcc=j - endif - if(mincc.gt.maxcc)maxcc=mincc - cgap=log(1.0d+0+oper/fnzmin/5.0d+0)/log(2.0d+00) - if(maxref.le.0)then - maxref=-maxref - else - maxref=int(cgap*maxref) - endif - if(maxref.le.0)maxref=0 - write(buff,'(1x,a,i2)')'Centrality correction Power:',maxcc - call mprnt(buff) - write(buff,'(1x,a,i2)')'Iterative refinement Power:',maxref - call mprnt(buff) -c -c Starting point -c - call initsol(xs,up,dv,dspr,dsup,rhs,obj,bounds,vartyp,slktyp, - x vcstat,colpnt,ecolpnt,pivots,rowidx,nonzeros,diag,rwork1, - x count) - call timer(t2) -c - write(buff,'(1x,a,f12.2,a)')'FIRSTFACTOR TIME :', - x (dble(t2-t1)*0.01d+0),' sec' - call mprnt(buff) -c - maxstp=1.0d+0 - iter=0 - corect=0 - corr=0 - corrc=0 - barn=0 - cgap=0.0d+0 - do i=1,mn - if(vcstat(i).gt.-2)then - if(i.le.n)then - j=vartyp(i) - else - j=slktyp(i-n) - endif - if(j.ne.0)then - cgap=cgap+xs(i)*dspr(i) - barn=barn+1 - endif - if(j.lt.0)then - cgap=cgap+up(i)*dsup(i) - barn=barn+1 - endif - endif - enddo - if(barn.lt.1)barn=1 - -ccc i=2*rfree -ccc j=350 -ccc call paintaat(mn,nz,pivotn,i,rowidx,ecolpnt,count,rindex, -ccc x j,pivots,iwork1,iwork1(mn+1),iwork2,iwork2(mn+1),iwork3, -ccc x iwork3(mn+1),'normal01.pic') - -ccc i=2*rfree -ccc j=400 -ccc call paintata(mn,nz,pivotn,i,rowidx,ecolpnt,count,rindex, -ccc x j,pivots,iwork1,iwork1(mn+1),iwork2,iwork2(mn+1),iwork3, -ccc x 'atapat01.pic') - - -ccc i=2*rfree -ccc j=350 -ccc err=nz -ccc call paintfct(mn,cfree,pivotn,i,rowidx,ecolpnt,count,rindex, -ccc x j,pivots,iwork2,err,'factor01.pic') -c -c Initialize for the iteration loop -c - do i=1,n - if((vcstat(i).gt.-2).and.(vartyp(i).ne.0))then - if(xs(i).gt.dspr(i))then - vcstat(i)=1 - else - vcstat(i)=0 - endif - endif - enddo - do i=1,m - if((vcstat(i+n).gt.-2).and.(slktyp(i).ne.0))then - if(xs(i+n).gt.dspr(i+n))then - vcstat(i+n)=1 - else - vcstat(i+n)=0 - endif - endif - enddo - opphas=0 - odphas=0 - pinfrd=1.0d+0 - dinfrd=1.0d+0 - barpar=0.0d+0 -c -c main iteration loop -c - 10 if(mod(iter,20).eq.0)then - write(buff,101) - call mprnt(buff) - write(buff,102) - call mprnt(buff) - write(buff,103) - call mprnt(buff) - endif -c -c Infeasibilities -c - call cprinf(xs,prinf,slktyp,colpnt,rowidx,nonzeros, - x rhs,vcstat,pinf) - call cduinf(dv,dspr,dsup,duinf,vartyp,slktyp,colpnt,rowidx, - x nonzeros,obj,vcstat,dinf) - call cupinf(xs,up,upinf,bounds,vartyp,slktyp,vcstat, - x uinf) -c -c Objectives -c - call cpdobj(popt,dopt,obj,rhs,bounds,xs,dv,dsup, - x vcstat,vartyp,slktyp) - popt=scobj*popt+addobj - dopt=scobj*dopt+addobj -c -c Stopping criteria -c - call stpcrt(prelinf,drelinf,popt,dopt,cgap,iter, - x code,pphase,dphase,maxstp,pinf,uinf,dinf, - x prinf,upinf,duinf,nonopt,pinfrd,dinfrd, - x prstpl,dustpl,obj,rhs,bounds,xs,dxs,dspr,ddspr,dsup,ddsup,dv,ddv, - x up,addobj,scobj,vcstat,vartyp,slktyp, - x oprelinf,odrelinf,opinf,odinf,ocgap,opphas,odphas,sbuff) -c - write(buff,104)iter,wmark,corr,corrc,pinf,dinf,uinf,fxp,fxd,fxu, - x popt,dopt,barpar - call mprnt(buff) - if(code.ne.0)then - write(buff,'(1x)') - call mprnt(buff) - call mprnt(sbuff) - goto 90 - endif -c -c P-D solution modification -c - call pdmodi(xs,dspr,vcstat,vartyp,slktyp,cgap,popt, - x dopt,prinf,duinf,upinf,colpnt,rowidx,nonzeros,pinf,uinf,dinf) -c -c Fixing variables / dropping rows / handling dual slacks -c - i=fixn - call varfix(vartyp,slktyp,rhs,colpnt,rowidx,nonzeros, - x xs,up,dspr,dsup,vcstat,fixn,dropn,addobj,scobj,obj,bounds, - x duinf,dinf,fxp,fxd,fxu) - if(fixn.ne.i)then - call supupd(pivots,invprm,snhead,nodtyp,vcstat,ecolpnt) - call cprinf(xs,prinf,slktyp,colpnt,rowidx,nonzeros, - x rhs,vcstat,pinf) - call cupinf(xs,up,upinf,bounds,vartyp,slktyp,vcstat, - x uinf) - endif -c -c Compute gap -c - cgap=0.0d+0 - do i=1,mn - if(vcstat(i).gt.-2)then - if(i.le.n)then - j=vartyp(i) - else - j=slktyp(i-n) - endif - if(j.ne.0)then - cgap=cgap+xs(i)*dspr(i) - if(j.lt.0)then - cgap=cgap+up(i)*dsup(i) - endif - endif - endif - enddo -c -c Computation of the scaling matrix -c - objerr=abs(dopt-popt)/(abs(popt)+1.0d+0) - call cdiag(xs,up,dspr,dsup,vartyp,slktyp,vcstat,diag,odiag) - pinfrd=pinf - dinfrd=dinf -c -c The actual factorization -c - 50 err=0 - call timer(t1) - if (factyp.eq.1) then - call mfactor(ecolpnt,vcstat,colpnt,rowidx,pivots, - x count,iwork4,nonzeros,diag,err,rwork1,iwork2,iwork2(mn+1), - x dropn,slktyp,snhead,iwork3,invprm,nodtyp,dv,odiag) - else - call nfactor(ecolpnt,vcstat,rowidx,pivots,count,nonzeros, - x diag,err,rwork1,iwork2,iwork2(mn+1),dropn,slktyp, - x snhead,iwork3,invprm,nodtyp,dv,odiag) - endif - call timer(t2) - if(err.gt.0)then - do i=1,mn - diag(i)=odiag(i) - enddo - call newsmf(colpnt,pivots,rowidx,nonzeros,ecolpnt,count, - x vcstat,invprm,snhead,nodtyp,iwork1,rwork1,iwork2,iwork3, - x iwork4,code) - if(code.lt.0)then - write(buff,'(1x)') - call mprnt(buff) - goto 90 - endif - goto 50 - endif - factim=factim+t2-t1 -c -c We are in the finish ? -c - wmark(1:1)='-' - if(objerr.gt.1.0d+0)objerr=1.0d+0 - if(objerr.lt.topt1)objerr=topt1 - if((objerr.le.topt1*10.0d+0).and.(pphase+dphase.eq.4))then - if(bargrw.gt.0.1d+0)bargrw=0.1d+0 - nropt=nropt+1 - if(nropt.eq.5)then - nropt=0 - topt1=topt1*sqrt(10.d+0) - write(buff,'(1x,a)')'Near otptimal but slow convergence.' - call mprnt(buff) - endif - wmark(1:1)='+' - endif -c -c primal-dual predictor-corrector direction -c - call cpdpcd(xs,up,dspr,dsup,prinf,duinf,upinf, - x dxsn,ddvn,ddsprn,ddsupn,dxs,ddv,ddspr,ddsup,bounds, - x ecolpnt,count,pivots,vcstat,diag,odiag,rowidx,nonzeros, - x colpnt,vartyp,slktyp,barpar,corr,prstpl,dustpl,barn,cgap) - corect=corect+corr -c -c primal-dual centality-correction -c - call cpdccd(xs,up,dspr,dsup,upinf, - x dxsn,ddvn,ddsprn,ddsupn,dxs,ddv,ddspr,ddsup,bounds, - x ecolpnt,count,pivots,vcstat,diag,odiag,rowidx,nonzeros, - x colpnt,vartyp,slktyp,barpar,corrc,prstpl,dustpl) - corect=corect+corrc -c -c compute steplengths -c - iter=iter+1 - prstpl=prstpl*palpha - dustpl=dustpl*dalpha -c -c compute the new primal-dual solution -c - call cnewpd(prstpl,xs,dxs,up,upinf,dustpl,dv,ddv,dspr, - x ddspr,dsup,ddsup,vartyp,slktyp,vcstat,maxstp) -c -c End main loop -c - goto 10 -c - 90 opt=(dopt-popt)/(abs(popt)+1.0d+0) - write(buff,'(1x,a,1PD11.4,a,1PD18.10)') - x 'ABSOLUTE infeas. Primal :',pinf, ' Dual :',dinf - call mprnt(buff) - write(buff,'(1x,a,1PD11.4,a,1PD18.10)') - x 'PRIMAL : Relative infeas. :',prelinf,' Objective :',popt - call mprnt(buff) - write(buff,'(1x,a,1PD11.4,a,1PD18.10)') - x 'DUAL : Relative infeas. :',drelinf,' Objective :',dopt - call mprnt(buff) - write(buff,'(1x,a,1PD11.4,a,1PD18.10)') - x 'Complementarity gap :',cgap,' Duality gap :',opt - call mprnt(buff) - opt=popt -c -c Restoring parameters -c - 999 maxcc=maxcco - maxref=mxrefo - lam=lamo - supdens=spdeno - bargrw=bargro - topt1=topto - return - end -c -c =========================================================================== -c =========================================================================== -c - subroutine mscale(colpnt,rowidx,nonzeros, - x obj,rhs,ubound,vcstat,scale,scalen,scalmet,scpass,scdiff, - x ddsup,ddsupn,dxs,snhead) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - integer*4 colpnt(n1),rowidx(nz),vcstat(mn), - x scalmet,scpass,snhead(mn) - real*8 nonzeros(cfree),obj(n),rhs(m),ubound(mn),scale(mn), - x scalen(mn),scdiff,ddsup(mn),ddsupn(mn),dxs(mn) -c - integer*4 i - character*99 buff -c - write(buff,'(1x)') - call mprnt(buff) - write(buff,'(1x,a)')'Process: scaling' - call mprnt(buff) -c - do i=1,mn - scalen(i)=1.0d+0 - enddo -c - if((scalmet.eq.2).or.(scalmet.eq.4))then - call scale1(ubound,nonzeros,colpnt,obj,scalen,vcstat, - x rowidx,rhs,ddsup,scpass,scdiff,snhead,nonzeros(nz+1)) - endif - if((scalmet.eq.3).or.(scalmet.eq.5))then - call scale2(ubound,nonzeros,colpnt,obj,scalen,vcstat, - x rowidx,rhs,scpass,scdiff,ddsup,ddsupn,dxs,snhead) - endif - if((scalmet.gt.0).and.(scalmet.le.3))then - call sccol2(ubound,nonzeros,colpnt,obj,scalen, - x vcstat,rowidx) - call scrow2(rhs,ubound,nonzeros,rowidx,colpnt,ddsup, - x scalen,vcstat) - endif -c - do i=1,mn - scale(i)=scale(i)*scalen(i) - enddo -c - write(buff,'(1x,a)')'Scaling done...' - call mprnt(buff) - return - end -c -c ============================================================================ -c - subroutine scale1(bounds,rownzs,colpnt,obj,scale, - x vcstat,rowidx,rhs,work1,scpass,scdif,veclen, - x lognz) - - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - common/numer/ tplus,tzer - real*8 tplus,tzer - - real*8 bounds(mn),rownzs(cfree),obj(n),scale(mn), - x rhs(m),work1(mn),scdif,lognz(nz) - integer*4 rowidx(cfree),colpnt(n1),vcstat(mn),scpass,veclen(mn) -c - real*8 defic,odefic - integer*4 pass,i,j,pnt1,pnt2,nonz - character*99 buff -c - pass=0 - nonz=0 - defic= 1.0d+0 - odefic=0.0d+0 - do i=1,mn - veclen(i)=0 - enddo - do i=1,n - if(vcstat(i).gt.-2)then - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - do j=pnt1,pnt2 - if((abs(rownzs(j)).gt.tzer).and. - x (vcstat(rowidx(j)+n).gt.-2))then - lognz(j)=log(abs(rownzs(j))) - veclen(i)=veclen(i)+1 - veclen(rowidx(j)+n)=veclen(rowidx(j)+n)+1 - nonz=nonz+1 - odefic=odefic+abs(lognz(j)) - else - lognz(j)=0.0d+0 - endif - enddo - endif - enddo - do i=1,mn - if(veclen(i).eq.0)veclen(i)=1 - scale(i)=0.0d+0 - enddo - if(nonz.eq.0)goto 999 - odefic=exp(odefic/dble(nonz)) - if(odefic.le.scdif)goto 999 - 10 write(buff,'(1x,a,i2,a,d12.6)')'Pass',pass,'. Average def.',odefic - call mprnt(buff) - call sccol1(colpnt,scale, - x vcstat,rowidx,veclen,lognz) - pass=pass+1 - call scrow1(rowidx,colpnt,work1,scale,vcstat,defic,veclen,lognz) - defic=exp(defic/dble(nonz)) - if(defic.le.scdif)goto 999 - if(pass.ge.scpass)goto 999 - if(odefic.le.defic)goto 999 - odefic=defic - goto 10 - 999 write(buff,'(1x,a,i2,a,d12.6)')'Pass',pass,'. Average def.',defic - call mprnt(buff) -c -c Scaling -c - do i=1,mn - scale(i)=exp(scale(i)) - enddo - do i=1,n - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - do j=pnt1,pnt2 - rownzs(j)=rownzs(j)/scale(i)/scale(rowidx(j)+n) - enddo - obj(i)=obj(i)/scale(i) - bounds(i)=bounds(i)*scale(i) - enddo - do i=1,m - rhs(i)=rhs(i)/scale(i+n) - bounds(i+n)=bounds(i+n)/scale(i+n) - enddo - return - end -c -c ============================================================================ -c - subroutine scrow1(rowidx,colpnt, - x maxi,scale,excld,ss,veclen,lognz) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - real*8 lognz(nz),maxi(mn),scale(mn),ss - integer*4 rowidx(cfree),colpnt(n1),excld(mn),veclen(mn) - common/numer/ tplus,tzer - real*8 tplus,tzer -c --------------------------------------------------------------------------- - integer*4 i,j,pnt1,pnt2 - real*8 sol -c --------------------------------------------------------------------------- - ss=0 - do i=1,m - maxi(i)=0.0d+0 - enddo - do i=1,n - if(excld(i).gt.-2)then - sol=scale(i) - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - do j=pnt1,pnt2 - if(excld(rowidx(j)+n).gt.-2)then - maxi(rowidx(j))=maxi(rowidx(j))+lognz(j)-sol - ss=ss+abs(lognz(j)-sol-scale(rowidx(j)+n)) - endif - enddo - endif - enddo - do i=1,m - scale(n+i)=maxi(i)/veclen(i+n) - enddo - return - end -c -c =========================================================================== -c - subroutine sccol1(colpnt,scale, - x excld,rowidx,veclen,lognz) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - real*8 scale(mn),lognz(nz) - integer*4 colpnt(n1),excld(mn),rowidx(cfree),veclen(mn) - common/numer/ tplus,tzer - real*8 tplus,tzer -c --------------------------------------------------------------------------- - integer*4 i,j,pnt1,pnt2 - real*8 ma -c --------------------------------------------------------------------------- - do i=1,n - ma=0.0d+0 - if(excld(i).gt.-2)then - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - do j=pnt1,pnt2 - ma=ma+lognz(j)-scale(rowidx(j)+n) - enddo - scale(i)=ma/veclen(i) - endif - enddo - return - end -c -c =========================================================================== -c - subroutine scrow2(rhs,bounds,rownzs,rowidx, - x colpnt,maxi,scale,excld) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - common/numer/ tplus,tzer - real*8 tplus,tzer -c - real*8 rownzs(cfree),bounds(mn),rhs(m),maxi(m),scale(mn) - integer*4 rowidx(cfree),colpnt(n1),excld(mn) -c --------------------------------------------------------------------------- - integer*4 i,j,pnt1,pnt2,k - real*8 sol -c --------------------------------------------------------------------------- - do i=1,m - maxi(i)=0 - enddo - do i=1,n - if(excld(i).gt.-2)then - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - do j=pnt1,pnt2 - k=rowidx(j) - sol=abs(rownzs(j)) - if (maxi(k).lt.sol)maxi(k)=sol - enddo - endif - enddo - do i=1,m - if(maxi(i).le.tzer)maxi(i)=1.0d+0 - scale(n+i)=maxi(i)*scale(n+i) - rhs(i)=rhs(i)/maxi(i) - bounds(i+n)=bounds(i+n)/maxi(i) - enddo - do i=1,n - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - do j=pnt1,pnt2 - k=rowidx(j) - rownzs(j)=rownzs(j)/maxi(k) - enddo - enddo - return - end -c -c =========================================================================== - -c - subroutine sccol2(bounds,rownzs,colpnt,obj,scale, - x excld,rowidx) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - real*8 rownzs(cfree),bounds(mn),obj(n),scale(mn) - integer*4 colpnt(n1),excld(mn),rowidx(cfree) - common/numer/ tplus,tzer - real*8 tplus,tzer -c --------------------------------------------------------------------------- - integer*4 i,j,pnt1,pnt2 - real*8 sol,ma -c --------------------------------------------------------------------------- - do i=1,n - if(excld(i).gt.-2)then - ma=0 - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - do j=pnt1,pnt2 - if(excld(rowidx(j)+n).gt.-2)then - sol=abs(rownzs(j)) - if (ma.lt.sol)ma=sol - endif - enddo - if (ma.le.tzer)ma=1.0d+0 - scale(i)=ma*scale(i) - do j=pnt1,pnt2 - rownzs(j)=rownzs(j)/ma - enddo - obj(i)=obj(i)/ma - bounds(i)=bounds(i)*ma - endif - enddo - return - end -c -c =========================================================================== -c - subroutine scalobj(obj,scobj,excld,objnor) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - real*8 obj(n),scobj,objnor - integer*4 excld(n),i - character*99 buff -c --------------------------------------------------------------------------- - scobj=0.0d+0 - do i=1,n - if(excld(i).gt.-2)then - if (abs(obj(i)).gt.scobj)scobj=abs(obj(i)) - endif - enddo - scobj=scobj/objnor - if(scobj.lt.1.0d-08)scobj=1.0d-08 - write(buff,'(1x,a,d8.2)')'Obj. scaled ',scobj - call mprnt(buff) - do i=1,n - obj(i)=obj(i)/scobj - enddo - return - end -c -c =========================================================================== -c - subroutine scalrhs(rhs,scrhs,excld,rhsnor,bounds,xs,up ) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - real*8 rhs(m),scrhs,rhsnor,bounds(mn),xs(mn),up(mn) - integer*4 excld(mn),i - character*99 buff -c --------------------------------------------------------------------------- - scrhs=0.0d+0 - do i=1,m - if(excld(i+n).gt.-2)then - if(abs(rhs(i)).gt.scrhs)scrhs=abs(rhs(i)) - endif - enddo - scrhs=scrhs/rhsnor - if(scrhs.lt.1.0d-08)scrhs=1.0d-08 - write(buff,'(1x,a,d8.2)')'Rhs. scaled ',scrhs - call mprnt(buff) - do i=1,m - rhs(i)=rhs(i)/scrhs - enddo - do i=1,mn - bounds(i)=bounds(i)/scrhs - xs(i)=xs(i)/scrhs - up(i)=up(i)/scrhs - enddo - return - end -c -c ============================================================================ -c Curtis-Reid Scaling algorithm -c ============================================================================ -c - subroutine scale2(bounds,rownzs,colpnt,obj,sc, - x vcstat,rowidx,rhs,scpass,scdif,scm1,rk,logsum,count) - - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - common/numer/ tplus,tzer - real*8 tplus,tzer -c - real*8 bounds(mn),rownzs(cfree),obj(n),sc(mn), - x rhs(m),scdif,scm1(mn),rk(mn),logsum(mn) - integer*4 rowidx(cfree),colpnt(n1),vcstat(mn),scpass,count(mn) -c - integer*4 i,j,in,pnt1,pnt2,pass - real*8 logdef,s,qk,qkm1,ek,ekm1,ekm2,sk,skm1 - character*99 buff -c - pass=0 - do i=1,mn - count(i)=0 - logsum(i)=0.0d+0 - enddo - logdef=0.0d+0 - in=0 - do i=1,n - if(vcstat(i).gt.-2)then - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - do j=pnt1,pnt2 - if(vcstat(rowidx(j)+n).gt.-2)then - if(abs(rownzs(j)).gt.tzer)then - s=log(abs(rownzs(j))) - count(rowidx(j)+n)=count(rowidx(j)+n)+1 - count(i)=count(i)+1 - logsum(i)=logsum(i)+s - logsum(rowidx(j)+n)=logsum(rowidx(j)+n)+s - logdef=logdef+s*s - in=in+1 - endif - endif - enddo - endif - enddo - do i=1,mn - if((vcstat(i).le.-2).or.(count(i).eq.0))count(i)=1 - enddo - logdef=sqrt(logdef)/dble(in) - logdef=exp(logdef) - write(buff,'(1x,a,i2,a,d12.6)')'Pass',pass,'. Average def.',logdef - call mprnt(buff) - if(logdef.le.scdif)then - do i=1,mn - sc(i)=1.0d+0 - enddo - goto 999 - endif -c -c Initialize -c - do i=1,m - sc(i+n)=logsum(i+n)/count(i+n) - rk(i+n)=0 - enddo - sk=0 - do i=1,n - if(vcstat(i).gt.-2)then - s=logsum(i) - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - do j=pnt1,pnt2 - s=s-logsum(rowidx(j)+n)/count(rowidx(j)+n) - enddo - else - s=0 - endif - rk(i)=s - sk=sk+s*s/count(i) - sc(i)=0.0d+0 - enddo - do i=1,mn - scm1(i)=sc(i) - enddo - ekm1=0 - ek=0 - qk=1.0d+0 -c -c Curtis-Reid scaling -c - 10 pass=pass+1 - do i=1,m - rk(i+n)=ek*rk(i+n) - enddo - do i=1,n - if(vcstat(i).gt.-2)then - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - s=rk(i)/count(i) - do j=pnt1,pnt2 - if(vcstat(rowidx(j)+n).gt.-2) - x rk(rowidx(j)+n)=rk(rowidx(j)+n)+s - enddo - endif - enddo - skm1=sk - sk=0.0d+0 - do i=1,m - rk(i+n)=-rk(i+n)/qk - sk=sk+rk(i+n)*rk(i+n)/count(i+n) - enddo - ekm2=ekm1 - ekm1=ek - ek=qk*sk/skm1 - qkm1=qk - qk=1-ek - if(pass.gt.scpass)goto 20 -c -c Update Column-scale factors -c - do i=1,n - if(vcstat(i).gt.-2)then - s=sc(i) - sc(i)=s+(rk(i)/count(i)+ekm1*ekm2*(s-scm1(i)))/qk/qkm1 - scm1(i)=s - endif - enddo -c -c even pass -c - do i=1,n - if(vcstat(i).gt.-2)then - s=ek*rk(i) - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - do j=pnt1,pnt2 - if(vcstat(rowidx(j)+n).gt.-2) - x s=s+rk(rowidx(j)+n)/count(rowidx(j)+n) - enddo - s=-s/qk - else - s=0 - endif - rk(i)=s - enddo - skm1=sk - sk=0.0d+0 - do i=1,n - sk=sk+rk(i)*rk(i)/count(i) - enddo - ekm2=ekm1 - ekm1=ek - ek=qk*sk/skm1 - qkm1=qk - qk=1-ek -c -c Update Row-scale factors -c - do i=1,m - j=i+n - if(vcstat(j).gt.-2)then - s=sc(j) - sc(j)=s+(rk(j)/count(j)+ekm1*ekm2*(s-scm1(j)))/qk/qkm1 - scm1(j)=s - endif - enddo - goto 10 -c -c Syncronize Column factors -c - 20 do i=1,n - if(vcstat(i).gt.-2)then - sc(i)=sc(i)+(rk(i)/count(i)+ekm1*ekm2*(sc(i)-scm1(i)))/qkm1 - endif - enddo -c -c Scaling -c - logdef=0 - do i=1,mn - if(vcstat(i).gt.-2)then - sc(i)=exp(sc(i)) - else - sc(i)=1.0d+0 - endif - enddo - do i=1,n - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - do j=pnt1,pnt2 - rownzs(j)=rownzs(j)/sc(i)/sc(rowidx(j)+n) - if((vcstat(rowidx(j)+n).gt.-2).and. - x (abs(rownzs(j)).gt.tzer))then - s=log(abs(rownzs(j))) - logdef=logdef+s*s - endif - enddo - obj(i)=obj(i)/sc(i) - bounds(i)=bounds(i)*sc(i) - enddo - do i=1,m - rhs(i)=rhs(i)/sc(i+n) - bounds(i+n)=bounds(i+n)/sc(i+n) - enddo - logdef=sqrt(logdef)/dble(in) - logdef=exp(logdef) - pass=pass-1 - write(buff,'(1x,a,i2,a,d12.6)')'Pass',pass,'. Average def.',logdef - call mprnt(buff) - 999 return - end -c -c ============================================================================ -c =========================================================================== -c - subroutine stlamb(colpnt,vcstat,rowidx,cnt,fixn,dropn,p) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - integer*4 colpnt(n1),vcstat(mn),rowidx(nz),cnt(mn), - x fixn,dropn,p -c - common/factor/ tpiv1,tpiv2,tabs,trabs,lam,tfind,order,supdens - real*8 tpiv1,tpiv2,tabs,trabs,lam,tfind,order,supdens -c - common/setden/ maxdense,densgap,setlam,denslen - real*8 maxdense,densgap - integer*4 setlam,denslen -c - integer*4 i,j,pnt1,pnt2,cn,lcn,lcd,ndn,z,maxcn - real*8 la - character*99 buff -c -c --------------------------------------------------------------------------- -c - -C CMSSW: Explicit initialization needed - ndn=0 - - write(buff,'(1X)') - call mprnt(buff) - do i=1,m - cnt(i)=0 - enddo - if((m-dropn).ge.(n-fixn))then - cnt(1)=m-dropn-n+fixn - endif - maxcn=0 - do i=1,n - if(vcstat(i).gt.-2)then - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - cn=0 - do j=pnt1,pnt2 - if(vcstat(rowidx(j)).gt.-2)cn=cn+1 - enddo - if(cn.gt.0)cnt(cn)=cnt(cn)+1 - vcstat(i)=cn - if(maxcn.lt.cn)maxcn=cn - endif - enddo - if(setlam.lt.0)goto 70 -c - cn =maxcn - lcd=maxcn - lcn=maxcn - z=0 -C CMSSW: Explicit integer conversion needed - pnt1=int((n-fixn+m-dropn)*maxdense) - pnt2=0 - if((m-dropn).ge.1.5*(n-fixn))then - maxdense=1.0 - endif - if((m-dropn).ge.2.5*(n-fixn))then - lcn=1 - lcd=2 - goto 60 - endif -c - do while ((pnt2.le.pnt1).and.(cn.gt.0)) - if(cnt(cn).eq.0)then - z=z+1 - else - if(z.gt.0)then - if((densgap*cn*cn).le.(cn+z+1)*(cn+z+1))then - lcd=cn+z+1 - lcn=cn - ndn=pnt2 - endif - z=0 - endif - pnt2=pnt2+cnt(cn) - endif - cn=cn-1 - enddo -c - 60 write(buff,'(1X,A,I6)')'Largest sparse column length :',lcn - call mprnt(buff) - if((maxcn.le.denslen).or.(lcn.eq.maxcn))then - write(buff,'(1X,A)')'Problem has no dense columns' - call mprnt(buff) - lcn=maxcn - else - write(buff,'(1X,A,I6)')'Smallest dense column length :',lcd - call mprnt(buff) - write(buff,'(1X,A,I6)')'Number of dense columns :',ndn - call mprnt(buff) - endif - la=lcn+0.5 - la=la/m - write(buff,'(1X,A,F7.4)')'Computed density parameter : ',la - call mprnt(buff) - if(la.gt.lam)then - lam=la - else - write(buff,'(1X,A,F7.4)') 'Parameter reset to value : ',lam - call mprnt(buff) - endif - 70 lam=lam*m - p=1 - if((lam.ge.maxcn).and.(setlam.le.0))p=2 - if(supdens.le.lam)supdens=lam -c - write(buff,'(1X)') - call mprnt(buff) - return - end -c -c =========================================================================== -c =========================================================================== -c - subroutine symmfo(inta1,pivots,ecolpnt,vcstat, - x colpnt,rowidx,rowpnt,colindex,perm,invperm, - x count,inta2,inta3,inta4,inta5,inta6,inta7,inta8,inta9, - x inta10,inta11,nonzeros,l,oper,tfind,inta12,code) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - integer*4 inta1(mn),ecolpnt(mn),pivots(mn),vcstat(mn), - x colpnt(n1),rowidx(cfree),rowpnt(mn),colindex(rfree), - x perm(mn),invperm(mn),count(mn),inta2(mn),inta3(mn),inta4(mn), - x inta5(mn),inta6(mn),inta7(mn),inta8(mn),inta9(mn),inta10(mn), - x inta11(mn),tfind,inta12(mn),l,code -c - real*8 nonzeros(cfree),oper -c - integer*4 i,j,k,t1,tt1,t2,p1,p2,pnt,pnt1,pnt2,aatnz - character*99 buff -c -c --------------------------------------------------------------------------- -c - 1 format(1x,'Building aat time:',f9.2,' sec') - 2 format(1x,'Building ordering list time:',f9.2,' sec') - 4 format(1x,'Symbolic factorisation time:',f9.2,' sec') - 5 format(1x,'Total symbolic phase time:',f9.2,' sec') - 6 format(1x,'Sub-diagonal nonzeros in aat :',i9) - 7 format(1x,'Sub-diagonal nonzeros in L :',i9) - 8 format(1x,'NONZEROS :',i12) - 9 format(1x,'OPERATIONS :',f13.0) - 10 format(1x,'Minimum Local Fill-in Ordering with Power:',i3) - 11 format(1x,'Minimum Degree Ordering (Power=0)') - 12 format(1x,'Without Ordering') -c - call timer (tt1) - if(tfind.lt.0)then - write(buff,12) - else if(tfind.eq.0)then - write(buff,11) - else - write(buff,10)tfind - endif - oper=0.0d+0 - call mprnt(buff) - do i=1,nz - rowidx(i)=rowidx(i)-n - enddo - if(rfree.lt.nz)then - write(buff,'(1x,a)')'Not enough integer memory' - call mprnt(buff) - code=-2 - goto 999 - endif - if(cfree.lt.2*nz)then - write(buff,'(1x,a)')'Not enough real memory' - call mprnt(buff) - code=-2 - goto 999 - endif -c -c If no ordering... -c - if(tfind.lt.0)then - t2=tt1 - do i=1,m - perm(i)=i - enddo - goto 50 - endif -c -c Otherwise... -c - do i=1,n - inta2(i)=i - enddo - call transps(n,m,nz,colpnt,rowidx,nonzeros, - x rowpnt,colindex,nonzeros(nz+1),inta2) - k=1 - l=m - do i=1,m - pivots(i)=0 - if(vcstat(i+n).le.-2)then - invperm(l)=i - l=l-1 - else - invperm(k)=i - k=k+1 - endif - enddo - call transps(m,n,nz,rowpnt,colindex,nonzeros(nz+1), - x colpnt,rowidx,nonzeros,invperm) - do i=1,n - p1=colpnt(i) - if(vcstat(i).le.-2)then - p2=colpnt(i)-1 - else - p2=colpnt(i+1)-1 - 19 if((p1.le.p2).and.(vcstat(rowidx(p2)+n).le.-2))then - p2=p2-1 - goto 19 - endif - endif - perm(i)=p1 - invperm(i)=p2 - enddo -c - pnt=nz+1 - do i=1,m - if(pnt+mn.gt.cfree)then - write(buff,'(1x,a)')'Not enough real memory' - call mprnt(buff) - code=-2 - goto 999 - endif - pivots(i)=1 - if(vcstat(i+n).gt.-2)then - ecolpnt(i)=pnt - pnt1=rowpnt(i) - pnt2=rowpnt(i+1)-1 - do j=pnt1,pnt2 - k=colindex(j) - if(vcstat(k).gt.-2)then - p1=perm(k) - p2=invperm(k) - perm(k)=perm(k)+1 - do l=p1,p2 - if(pivots(rowidx(l)).eq.0)then - pivots(rowidx(l))=1 - rowidx(pnt)=rowidx(l) - pnt=pnt+1 - endif - enddo - endif - enddo - count(i)=pnt-ecolpnt(i) - do j=ecolpnt(i),pnt-1 - pivots(rowidx(j))=0 - enddo - endif - enddo - aatnz=pnt-nz-1 -c -c - call timer (t2) - write(buff,1)dble(t2-tt1)/100.0d+0 - call mprnt(buff) -c -c call minimum fill-in ordering -c - call genmfo(m,mn,nz,cfree,rfree,pivotn, - x ecolpnt,count,perm,rowpnt,vcstat(n+1),rowidx, - x invperm,inta1,inta2,inta3,inta4,inta5,inta6,inta7, - x inta8,inta9,inta10,inta11,colindex,tfind,inta12,pivots,code) - if(code.lt.0)goto 999 -c -c - 50 call timer(t1) - write(buff,2)dble(t1-t2)/100.0d+0 - call mprnt(buff) -c - pivotn=0 - do 30 i=1,n - ecolpnt(i)=colpnt(i) - count(i)=colpnt(i+1)-1 - inta2(i)=i - if(vcstat(i).le.-2)goto 30 - pivotn=pivotn+1 - pivots(pivotn)=i - 30 continue -c - call transps(n,m,nz,colpnt,rowidx,nonzeros, - x rowpnt,colindex,nonzeros(nz+1),inta2) -c - k=1 - l=m - do 40 i=1,m - j=perm(i) - if(vcstat(j+n).le.-2)then - invperm(l)=j - l=l-1 - else - pivotn=pivotn+1 - pivots(pivotn)=j+n - invperm(k)=j - k=k+1 - endif - 40 continue -c - call transps(m,n,nz,rowpnt,colindex,nonzeros(nz+1), - x colpnt,rowidx,nonzeros,invperm) -c - do 20 i=1,nz - rowidx(i)=rowidx(i)+n - 20 continue -c - do i=1,n - if(vcstat(i).gt.-2)then - k=ecolpnt(i) - l=count(i) - 35 if((l.ge.k).and.(vcstat(rowidx(l)).le.-2))then - l=l-1 - goto 35 - endif - count(i)=l - endif - enddo -c - call symfact(pivots,rowidx,ecolpnt,count,vcstat, - x perm,invperm,inta2,inta1,l,code) - if(code.lt.0)goto 999 - call timer(t2) - write(buff,4)dble(t2-t1)/100.0d+0 - call mprnt(buff) - if(tfind.ge.0)then - write(buff,6)aatnz - call mprnt(buff) - endif - write(buff,7)l - call mprnt(buff) -c - do 55 i=1,mn - inta1(i)=0 - 55 continue - l=0 - do 60 i=1,pivotn - j=pivots(pivotn-i+1) - k=count(j)-ecolpnt(j)+1 - if(k.eq.0)goto 60 - l=l+k - inta1(j)=inta1(rowidx(ecolpnt(j)))+k - oper=oper+(dble(k)*dble(k)+dble(k))/2.0d+0 - 60 continue - call timer(t1) - write(buff,5)dble(t2-tt1)/100.0d+0 - call mprnt(buff) - write(buff,8)l - call mprnt(buff) - write(buff,9)oper - call mprnt(buff) -c - 999 return - end -c -c =========================================================================== -c Minimum local fill-in ordering -c -c =========================================================================== -c - subroutine genmfo(m,mn,nz,cfree,rfree,pivotn, - x pntc,ccol,permut,pntr,crow,rowidx, - x mark,cpermf,cpermb,rpermf,rpermb,cfill,rfill,cpnt, - x cnext,cprew,suplst,fillin,colidx,tfind,noddeg,supdeg,code) -c - integer*4 m,mn,nz,cfree,rfree,pivotn,rowidx(cfree),colidx(rfree), - x permut(m),cpermf(m),cpermb(m),rpermf(m),rpermb(m), - x ccol(m),crow(m),pntc(m),pntr(m),mark(m),cfill(m),cpnt(m), - x cnext(m),cprew(m),rfill(m),suplst(m),fillin(m),tfind, - x noddeg(m),supdeg(m),code - character*99 buff -c -c --------------------------------------------------------------------------- -c INPUT PARAMETERS -c -c m number of rows -c mn an number greather than m -c nz last used position of the column file -c cfree length of the column file (column file is used from nz+1 to cfree) -c rfree length of the row file (row file is used from 1 to rfree) -c rowidx column file (containing the lower tiriangular part of AAT) -c colidx row file -c pntc pointer to the columns of the lower diagonal of AAT -c ccol column lengths of AAT -c crow if crow(i)<-1 row i is removed from the ordering -c tfind search loop, tfind=0 gives the minimum degree ordering -c suggested value tfind=25 -c -c -c OUTPUT PARAMETERS -c permut the ordering -c pivotn Number of ordered nodes -c -c -c Others: Integer working arrays of size m -c -c -c -------------------------------------------------------------------------- - integer*4 pnt,pnt1,pnt2,i,j,k,l,o,p,endmem,ccfree,rcfree,pmode, - x rfirst,rlast,cfirst,clast,pcol,pcnt,ppnt1,ppnt2,fill,prewcol, - x ii,mm,mfill,supnd,hsupnd,oo,nnz,fnd,oldpcol,q,fl -c--------------------------------------------------------------------------- -c - 1 format(' NOT ENOUGH MEMORY IN THE ROW FILE ') - 2 format(' NOT ENOUGH MEMORY IN THE COLUMN FILE ') - 3 format(' Analyse for supernodes in aat :',i9,' col') - 4 format(' Final supernodal columns disabled:',i9,' col') - 5 format(' Hidden supernodal columns :',i9,' col') - -C CMSSW: Explicit initialization needed - clast=0 -c -c initialization -c - code=0 - endmem=cfree - pivotn=0 - pmode =0 - do i=1,m - permut(i)=0 - suplst(i)=0 - fillin(i)=-1 - supdeg(i)=1 - if(crow(i).gt.-2)then - crow(i)=0 - endif - enddo -c -c Compute crow -c - do 10 i=1,m - if(crow(i).le.-2)goto 10 - pnt1=pntc(i) - pnt2=pnt1+ccol(i)-1 - do j=pnt1,pnt2 - crow(rowidx(j))=crow(rowidx(j))+1 - enddo - clast=i - 10 continue - cpermf(clast)=0 - ccfree=cfree-pntc(clast)-ccol(clast) - if(ccfree.lt.mn)then - write(buff,2) - call mprnt(buff) - code=-2 - goto 999 - endif -c -c create pointers to colidx -c - do i=1,m - cprew(i)=0 - enddo - pnt=1 - do i=1,m - if(crow(i).ge.0)then - pntr(i)=pnt - rfill(i)=pnt - pnt=pnt+crow(i) - endif - enddo - rcfree=rfree-pnt - if(rcfree.lt.mn)then - write(buff,1) - call mprnt(buff) - code=-2 - goto 999 - endif -c -c create the row file : symbolical transps the matrix, set up noddeg -c - do i=1,m - noddeg(i)=ccol(i)+crow(i) - if(crow(i).ge.0)then - pnt1=pntc(i) - pnt2=pnt1+ccol(i)-1 - do j=pnt1,pnt2 - k=rowidx(j) - colidx(rfill(k))=i - rfill(k)=rfill(k)+1 - enddo - endif - enddo -c -c Search supernodes -c - hsupnd=0 - supnd=0 - do i=1,m - if(crow(i).ge.0)then - pnt1=pntr(i) - pnt2=pnt1+crow(i)-1 - do j=pnt1,pnt2 - mark(colidx(j))=i - enddo - mark(i)=i - pnt1=pntc(i) - pnt2=pnt1+ccol(i)-1 - do j=pnt1,pnt2 - mark(rowidx(j))=i - enddo - p=ccol(i)+crow(i) - 118 if (pnt1.le.pnt2)then - o=rowidx(pnt1) - call chknod(m,cfree,rfree,i,o,p,ccol,crow,mark,pntc, - x pntr,rowidx,colidx,supdeg,suplst,ii) - supnd=supnd+ii - pnt1=pnt1-ii - pnt2=pnt2-ii - pnt1=pnt1+1 - goto 118 - endif - endif - enddo - write(buff,3)supnd - call mprnt(buff) -c -c Set up lists -c - do i=1,m - mark(i)=0 - cpnt(i)=0 - cnext(i)=0 - enddo - cfirst=0 - clast=0 - rfirst=0 - rlast=0 - mm=0 - do i=1,m - if(crow(i).ge.0)then - mm=mm+1 - if(cfirst.eq.0)then - cfirst=i - else - cpermf(clast)=i - endif - cpermb(i)=clast - clast=i -c - if(rfirst.eq.0)then - rfirst=i - else - rpermf(rlast)=i - endif - rpermb(i)=rlast - rlast=i -c - j=noddeg(i)-supdeg(i)+2 - if(j.gt.0)then - o=cpnt(j) - cnext(i)=o - cpnt(j)=i - if(o.ne.0)cprew(o)=i - endif - cprew(i)=0 - endif - enddo - cpermf(clast)=0 - rpermf(rlast)=0 - pcol=0 -c -c loop for pivots -c - 50 oldpcol=pcol - pcol=0 - nnz=1 - if(oldpcol.eq.0)goto 9114 -c -c Find supernodal pivot -c - mfill=0 - k=pntc(oldpcol) - l=k+ccol(oldpcol)-1 - oo=ccol(oldpcol)-1 -9125 if(k.gt.l)goto 9114 - j=rowidx(k) - if(crow(j)+ccol(j).eq.oo)then - hsupnd=hsupnd+1 - pcol=j - goto 9200 - endif - k=k+1 - goto 9125 -c -c Find another pivot -c -9114 pmode=0 - fnd=0 - mfill=-1 -9110 j=cpnt(nnz) - if((j.gt.0).and.(pmode.eq.0))then - pmode=nnz - if(tfind.eq.0)then - pcol=j - mfill=1 - goto 9200 - endif - endif -9120 if(j.le.0)goto 9150 - if(fillin(j).ge.0)then - fill=fillin(j) - goto 9175 - endif -c -c set up mark and cfill -c - q=0 - fill=0 - k=pntc(j) - l=k+ccol(j)-1 - p=0 - do o=k,l - q=q+1 - cfill(q)=rowidx(o) - mark(rowidx(o))=supdeg(rowidx(o)) - fill=fill-(supdeg(rowidx(o))*(supdeg(rowidx(o))-1))/2 - enddo - k=pntr(j) - l=k+crow(j)-1 - do o=k,l - q=q+1 - cfill(q)=colidx(o) - mark(colidx(o))=supdeg(colidx(o)) - fill=fill-(supdeg(colidx(o))*(supdeg(colidx(o))-1))/2 - enddo -c -c compute fill-in -c - fill=fill+((noddeg(j)-supdeg(j))*(noddeg(j)-supdeg(j)+1))/2 - do p=1,q - fl=0 - o=cfill(p) - k=pntc(o) - l=k+ccol(o)-1 - do oo=k,l - fl=fl+mark(rowidx(oo)) - enddo - fill=fill-supdeg(o)*fl - enddo -c -c administration -c - do o=1,q - mark(cfill(o))=0 - enddo -c -c Test -c - fillin(j)=fill -9175 if(mfill.lt.0)mfill=fill+1 - if(fill.lt.mfill)then - mfill=fill - pcol=j - endif - fnd=fnd+1 - if((fnd.gt.tfind).or.(mfill.eq.0))goto 9200 - j=cnext(j) - goto 9120 -c -c next bunch -c -9150 nnz=nnz+1 - if(nnz.le.m)goto 9110 -9200 if (pcol.eq.0)goto 900 - endmem=cfree - ccfree=cfree-pntc(clast)-ccol(clast) - rcfree=rfree-pntr(rlast)-crow(rlast) -c -c compress column file -c - if(ccfree.lt.mn)then - call mccmpr(mn,cfree,ccfree,endmem,nz, - x pntc,ccol,cfirst,cpermf,rowidx,code) - if(code.lt.0)goto 999 - endif -c -c remove pcol from the cpermf lists -c - prewcol=cpermb(pcol) - o=cpermf(pcol) - if(prewcol.ne.0)then - cpermf(prewcol)=o - else - cfirst=o - endif - if(o.eq.0)then - clast=prewcol - else - cpermb(o)=prewcol - endif -c -c remove pcol from the rpermf lists -c - prewcol=rpermb(pcol) - o=rpermf(pcol) - if(prewcol.ne.0)then - rpermf(prewcol)=o - else - rfirst=o - endif - if(o.eq.0)then - rlast=prewcol - else - rpermb(o)=prewcol - endif -c -c administration -c - pivotn=pivotn+1 - permut(pivotn)=pcol - pcnt=ccol(pcol)+crow(pcol) -c -c remove pcol from the counter lists -c - o=cnext(pcol) - ii=cprew(pcol) - if(ii.eq.0)then - cpnt(noddeg(pcol)-supdeg(pcol)+2)=o - else - cnext(ii)=o - endif - if(o.ne.0)cprew(o)=ii -c - ppnt1=endmem-pcnt - ppnt2=ppnt1+pcnt-1 - endmem=endmem-pcnt - ccfree=ccfree-pcnt - pnt=ppnt1 -c -c create pivot column from the row file -c - pnt1=pntr(pcol) - pnt2=pnt1+crow(pcol)-1 - do 70 i=pnt1,pnt2 - o=colidx(i) - l=pntc(o) - p=l+ccol(o)-1 -c -c find element and move in the column o -c - cfill(o)=ccol(o)-1 - rfill(o)= 0 - do 75 k=l,p - if(rowidx(k).eq.pcol)then - mark(o)=1 - rowidx(pnt)=o - pnt=pnt+1 - rowidx(k)=rowidx(p) - goto 70 - endif - 75 continue - 70 continue - mm=pnt -c -c extend pivot column from the column file -c - pnt1=pntc(pcol) - pnt2=pnt1+ccol(pcol)-1 - do 60 j=pnt1,pnt2 - o=rowidx(j) - mark(o)=1 - rowidx(pnt)=o - pnt=pnt+1 -c -c remove pcol from the row file -c - rfill(o)=-1 - cfill(o)=ccol(o) - l=pntr(o) - p=l+crow(o)-2 - do 55 k=l,p - if(colidx(k).eq.pcol)then - colidx(k)=colidx(p+1) - goto 60 - endif - 55 continue - 60 continue - pntc(pcol)=ppnt1 - ccol(pcol)=pcnt -c -c remove columns from the counter lists -c - do 77 j=ppnt1,ppnt2 - i=rowidx(j) - o=cnext(i) - ii=cprew(i) - if(ii.eq.0)then - cpnt(noddeg(i)-supdeg(i)+2)=o - else - cnext(ii)=o - endif - if(o.ne.0)cprew(o)=ii - 77 continue -c -c elimination loop -c - if(mfill.gt.0)then -c - if(ppnt1.lt.mm)call hpsort((mm-ppnt1),rowidx(ppnt1)) - if(mm.lt.ppnt2)call hpsort((ppnt2-mm+1),rowidx(mm)) -c - do 80 p=ppnt1,ppnt2 - i=rowidx(p) -c -c delete element from mark -c - mark(i)=0 - pcnt=pcnt-1 -c -c transformation on the column i -c - fill=pcnt - pnt1=pntc(i) - pnt2=pnt1+cfill(i)-1 - do 90 k=pnt1,pnt2 - o=rowidx(k) - if(mark(o).ne.0)then - fill=fill-1 - mark(o)=0 - endif - 90 continue -c -c compute the free space -c - ii=cpermf(i) - if(ii.eq.0)then - k=endmem-pnt2-1 - else - k=pntc(ii)-pnt2-1 - endif -c -c move column to the end of the column file -c - if(fill.gt.k)then - if (ccfree.lt.mn)then - call mccmpr(mn,cfree,ccfree,endmem,nz, - x pntc,ccol,cfirst,cpermf,rowidx,code) - if(code.lt.0)goto 999 - pnt1=pntc(i) - pnt2=pnt1+cfill(i)-1 - endif - if(i.ne.clast)then - l=pntc(clast)+ccol(clast) - pntc(i)=l - do 95 k=pnt1,pnt2 - rowidx(l)=rowidx(k) - l=l+1 - 95 continue - pnt1=pntc(i) - pnt2=l-1 - prewcol=cpermb(i) - if(prewcol.eq.0)then - cfirst=ii - else - cpermf(prewcol)=ii - endif - cpermb(ii)=prewcol - cpermf(clast)=i - cpermb(i)=clast - clast=i - cpermf(clast)=0 - endif - endif -c -c create fill in -c - do 97 k=p+1,ppnt2 - o=rowidx(k) - if(mark(o).eq.0)then - mark(o)=1 - else - pnt2=pnt2+1 - rowidx(pnt2)=o - rfill(o)=rfill(o)+1 - endif - 97 continue - pnt2=pnt2+1 - ccol(i)=pnt2-pnt1 - if(i.eq.clast)then - ccfree=endmem-pnt2-1 - endif - 80 continue - else - do p=ppnt1,ppnt2 - i=rowidx(p) - ccol(i)=ccol(i)-1-rfill(i) - mark(i)=0 - enddo - endif -c -c make space for fills in the row file -c - do 100 j=ppnt1,ppnt2 - i=rowidx(j) - if(mfill.eq.0)goto 135 - pnt2=pntr(i)+crow(i)-1 -c -c compute the free space -c - ii=rpermf(i) - if(ii.eq.0)then - k=rfree-pnt2-1 - else - k=pntr(ii)-pnt2-1 - endif -c -c move row to the end of the row file -c - if(k.lt.rfill(i))then - if(rcfree.lt.mn)then - call rcomprs(mn,rfree, - x rcfree,pntr,crow,rfirst,rpermf,colidx,code) - if(code.lt.0)goto 999 - endif - if(ii.ne.0)then - pnt1=pntr(i) - pnt2=pnt1+crow(i)-1 - pnt=pntr(rlast)+crow(rlast) - pntr(i)=pnt - do 110 l=pnt1,pnt2 - colidx(pnt)=colidx(l) - pnt=pnt+1 - 110 continue -c -c update the rperm lists -c - prewcol=rpermb(i) - if(prewcol.eq.0)then - rfirst=ii - else - rpermf(prewcol)=ii - endif - rpermb(ii)=prewcol - rpermf(rlast)=i - rpermb(i)=rlast - rlast=i - rpermf(rlast)=0 - endif - endif - 135 crow(i)=crow(i)+rfill(i) - if(i.eq.rlast)rcfree=rfree-crow(i)-pntr(i) - noddeg(i)=noddeg(i)-supdeg(pcol) - 100 continue - if(mfill.eq.0)goto 150 -c -c make pointers to the end of the filled rows -c - do 120 j=ppnt1,ppnt2 - rfill(rowidx(j))=pntr(rowidx(j))+crow(rowidx(j))-1 - 120 continue -c -c generate fill-in in the row file, update noddeg -c - do j=ppnt1,ppnt2 - o=rowidx(j) - pnt1=pntc(o)+cfill(o) - pnt2=pntc(o)+ccol(o)-1 - do k=pnt1,pnt2 - colidx(rfill(rowidx(k)))=o - rfill(rowidx(k))=rfill(rowidx(k))-1 - noddeg(o)=noddeg(o)+supdeg(rowidx(k)) - noddeg(rowidx(k))=noddeg(rowidx(k))+supdeg(o) - enddo - enddo -c -c Indicate new fill-in computation -c - if(tfind.gt.0)then - do j=ppnt1,ppnt2 - i=rowidx(j) - fillin(i)=-1 - pnt1=pntc(i)+cfill(i) - pnt2=pntc(i)+ccol(i)-1 - do pnt=pnt1,pnt2 - ii=rowidx(pnt) - if(rfill(ii).ge.0)then - k=pntc(ii) - l=k+ccol(ii)-1 - do o=k,l - fillin(rowidx(o))=-1 - enddo - k=pntr(ii) - l=k+crow(ii)-1 - do o=k,l - fillin(colidx(o))=-1 - enddo - rfill(ii)=-1 - endif - enddo - enddo - endif -c -c Searching for new supernodes -c - 150 l=0 - j=ppnt1 - 151 if(j.le.ppnt2)then - i=rowidx(j) - p=ccol(i)+crow(i) -c - pnt1=pntc(i) - pnt2=pnt1+ccol(i)-1 - do k=pnt1,pnt2 - if(mark(rowidx(k)).eq.0)then - l=l+1 - cfill(l)=rowidx(k) - endif - mark(rowidx(k))=i - enddo -c - if(mark(i).eq.0)then - l=l+1 - cfill(l)=i - endif - mark(i)=i -c - pnt1=pntr(i) - pnt2=pnt1+crow(i)-1 - do k=pnt1,pnt2 - if(mark(colidx(k)).eq.0)then - l=l+1 - cfill(l)=colidx(k) - endif - mark(colidx(k))=i - enddo -c - k=j+1 - 152 if(k.le.ppnt2)then - o=rowidx(k) - call chknod(m,cfree,rfree,i,o,p,ccol,crow,mark,pntc, - x pntr,rowidx,colidx,supdeg,suplst,ii) - if(ii.gt.0)then - supnd=supnd+1 -c - prewcol=cpermb(o) - oo=cpermf(o) - if(prewcol.ne.0)then - cpermf(prewcol)=oo - else - cfirst=oo - endif - if(oo.eq.0)then - clast=prewcol - else - cpermb(oo)=prewcol - endif -c - prewcol=rpermb(o) - oo=rpermf(o) - if(prewcol.ne.0)then - rpermf(prewcol)=oo - else - rfirst=oo - endif - if(oo.eq.0)then - rlast=prewcol - else - rpermb(oo)=prewcol - endif -c - rowidx(k)=rowidx(ppnt2) - k=k-1 - ppnt2=ppnt2-1 - ccol(pcol)=ccol(pcol)-1 - endif - k=k+1 - goto 152 - endif - j=j+1 - goto 151 - endif - do i=1,l - mark(cfill(i))=0 - enddo -c -c update the counter lists -c - do j=ppnt1,ppnt2 - i=rowidx(j) - fill=noddeg(i)-supdeg(i)+2 - o=cpnt(fill) - cnext(i)=o - cpnt(fill)=i - if(o.ne.0)cprew(o)=i - cprew(i)=0 - enddo -c -c Augment the permutation with the supernodes -c - i=suplst(pcol) - 155 if(i.gt.0)then - pivotn=pivotn+1 - permut(pivotn)=i - i=suplst(i) - goto 155 - endif - goto 50 -c -c Augment the permutation with the disabled rows -c - 900 do i=1,m - if(crow(i).le.-2)then - pivotn=pivotn+1 - permut(pivotn)=i - endif - enddo - write(buff,4)supnd - call mprnt(buff) - write(buff,5)hsupnd - call mprnt(buff) -c -c Ready -c - 999 return - end -c -c =========================================================================== -c - subroutine mccmpr(mn,cfree,ccfree,endmem,nz, - x pnt,count,cfirst,cpermf,rowidx,code) - integer*4 mn,cfree,ccfree,endmem,nz,pnt(mn),rowidx(cfree), - x count(mn),cpermf(mn),cfirst,code -c - integer*4 i,j,pnt1,pnt2,pnt0 - character*99 buff -c --------------------------------------------------------------------------- - 2 format(' NOT ENOUGH MEMORY DETECTED IN SUBROUTINE CCOMPRESS') - pnt0=nz+1 - i=cfirst - 40 if(i.le.0)goto 30 - pnt1=pnt(i) - if(pnt1.lt.pnt0)goto 10 - if(pnt1.eq.pnt0)then - pnt0=pnt0+count(i) - goto 10 - endif - pnt(i)=pnt0 - pnt2=pnt1+count(i)-1 - do 20 j=pnt1,pnt2 - rowidx(pnt0)=rowidx(j) - pnt0=pnt0+1 - 20 continue - 10 i=cpermf(i) - goto 40 - 30 ccfree=endmem-pnt0-1 - if(ccfree.lt.mn)then - write(buff,2) - call mprnt(buff) - code=-2 - endif - return - end -c -c =========================================================================== -c - subroutine chknod(m,cfree,rfree,i,o,p,ccol,crow,mark,pntc, - x pntr,rowidx,colidx,supdeg,suplst,fnd) -c - integer*4 m,cfree,rfree,i,o,p,ccol(m),crow(m),mark(m),pntc(m), - x pntr(m),rowidx(cfree),colidx(rfree),supdeg(m),suplst(m),fnd -c - integer*4 ppnt1,ppnt2,k,l,pnt,ii,pnod -c - fnd=0 - if(ccol(o)+crow(o).ne.p)goto 120 - ppnt1=pntr(o) - ppnt2=ppnt1+crow(o)-1 - 111 if(ppnt1.le.ppnt2)then - if(mark(colidx(ppnt1)).ne.i)goto 119 - ppnt1=ppnt1+1 - goto 111 - endif - ppnt1=pntc(o) - ppnt2=ppnt1+ccol(o)-1 - 112 if(ppnt1.le.ppnt2)then - if(mark(rowidx(ppnt1)).ne.i)goto 119 - ppnt1=ppnt1+1 - goto 112 - endif -c -c include column o (and its list) in to the list of column i -c - pnod=o - 211 if(suplst(pnod).ne.0)then - pnod=suplst(pnod) - goto 211 - endif - suplst(pnod)=suplst(i) - suplst(i)=o - supdeg(i)=supdeg(i)+supdeg(o) -c -c remove column/row o from the row and column files -c - ppnt1=pntr(o) - ppnt2=ppnt1+crow(o)-1 - do 124 k=ppnt1,ppnt2 - l=colidx(k) - pnt=pntc(l) - ii=pnt+ccol(l)-1 - ccol(l)=ccol(l)-1 - 123 if(pnt.le.ii)then - if(rowidx(pnt).eq.o)then - rowidx(pnt)=rowidx(ii) - goto 124 - endif - pnt=pnt+1 - goto 123 - endif - 124 continue - ppnt1=pntc(o) - ppnt2=ppnt1+ccol(o)-1 - do 127 k=ppnt1,ppnt2 - l=rowidx(k) - pnt=pntr(l) - ii=pnt+crow(l)-1 - crow(l)=crow(l)-1 - 126 if(pnt.le.ii)then - if(colidx(pnt).eq.o)then - colidx(pnt)=colidx(ii) - goto 127 - endif - pnt=pnt+1 - goto 126 - endif - 127 continue - crow(o)=-1 - p=p-1 - fnd=1 - goto 120 - 119 fnd=0 - 120 return - end -c -c =========================================================================== -c - subroutine hpsort(n,iarr) -c - integer*4 n,iarr(n) -c - integer*4 i,j,l,ir,rra -c -c --------------------------------------------------------------------------- -c - l=n/2+1 - ir=n - 10 if(l.gt.1)then - l=l-1 - rra=iarr(l) - else - rra=iarr(ir) - iarr(ir)=iarr(1) - ir=ir-1 - if(ir.le.1)then - iarr(1)=rra - goto 999 - endif - endif - i=l - j=l+l - 20 if(j-ir)40,50,60 - 40 if(iarr(j).lt.iarr(j+1))j=j+1 - 50 if(rra.lt.iarr(j))then - iarr(i)=iarr(j) - i=j - j=j+j - else - j=ir+1 - endif - goto 20 - 60 iarr(i)=rra - goto 10 - 999 return - end -c -c =========================================================================== -c ========================================================================== -c - subroutine symfact (pivots,rowidx,ecolpnt,count, - x vcstat,list,next,work,mark,fill,code) - - - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - integer*4 pivots(mn),ecolpnt(mn),count(mn),vcstat(mn), - x list(mn),next(mn),work(mn),mark(mn),rowidx(cfree),code -c - integer*4 i,ii,j,k,l,pnt1,pnt2,fnz,kprew,fill - character*99 buff -c -c -------------------------------------------------------------------------- -c - fnz=nz+1 -c - do 10 i=1,mn - list(i)=0 - next(i)=0 - mark(i)=0 - work(i)=mn+1 - 10 continue - do 15 i=1,pivotn - work(pivots(i))=i - 15 continue - do 20 i=1,n - if(vcstat(i).le.-2)goto 20 - j=rowidx(ecolpnt(i)) - next(i)=list(j) - list(j)=i - 20 continue -c - do 50 ii=1,pivotn - i=pivots(ii) - mark(i)=1 - if(i.le.n)goto 50 - l=fnz - ecolpnt(i)=fnz - kprew=list(i) - 60 if(kprew.eq.0)goto 70 - pnt1=ecolpnt(kprew) - pnt2=count(kprew) - if(fnz.ge.cfree-m)then - write(buff,'(1x,a)')'Not enough memory' - call mprnt(buff) - code=-2 - goto 999 - endif - do j=pnt1,pnt2 - k=rowidx(j) - if(mark(k).eq.0)then - mark(k)=1 - rowidx(fnz)=k - fnz=fnz+1 - endif - enddo - kprew=next(kprew) - goto 60 - - 70 do j=l,fnz-1 - mark(rowidx(j))=0 - enddo - count(i)=fnz-1 - k=fnz-l - if(k.gt.0)then - call hpsrt(k,mn,rowidx(l),work) - j=rowidx(l) - next(i)=list(j) - list(j)=i - endif - 50 continue - fill=fnz-nz-1 - 999 return - end -c -c =========================================================================== -c - subroutine transps(n,m,nz,colpnt,rowidx,colnz, - x rowpnt,colindex,rownz,perm) -c - integer*4 n,m,nz,colpnt(n+1),rowidx(nz),rowpnt(m+1), - x colindex(nz),perm(n) - real*8 colnz(nz),rownz(nz) - -c - integer*4 i,j,k,pnt1,pnt2,ii -c -c --------------------------------------------------------------------------- -c - do 10 i=1,m+1 - rowpnt(i)=0 - 10 continue - do 20 i=1,n - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - do 30 j=pnt1,pnt2 - k=rowidx(j) - rowpnt(k)=rowpnt(k)+1 - 30 continue - 20 continue -c - j=rowpnt(1) - k=1 - do 40 i=1,m - rowpnt(i)=k - k=k+j - j=rowpnt(i+1) - 40 continue -c - do 50 ii=1,n - i=perm(ii) - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - do 60 j=pnt1,pnt2 - k=rowidx(j) - colindex(rowpnt(k))=i - rownz(rowpnt(k))=colnz(j) - rowpnt(k)=rowpnt(k)+1 - 60 continue - 50 continue -c - do 70 i=1,m - rowpnt(m-i+2)=rowpnt(m-i+1) - 70 continue - rowpnt(1)=1 - return - end -c -c ========================================================================= -c - subroutine hpsrt(n,mn,iarr,index) -c - integer*4 n,mn,iarr(n),index(mn) -c - integer*4 i,j,l,ir,rra -c -c --------------------------------------------------------------------------- -c - l=n/2+1 - ir=n - 10 if(l.gt.1)then - l=l-1 - rra=iarr(l) - else - rra=iarr(ir) - iarr(ir)=iarr(1) - ir=ir-1 - if(ir.le.1)then - iarr(1)=rra - goto 999 - endif - endif - i=l - j=l+l - 20 if(j-ir)40,50,60 - 40 if(index(iarr(j)).lt.index(iarr(j+1)))j=j+1 - 50 if(index(rra).lt.index(iarr(j)))then - iarr(i)=iarr(j) - i=j - j=j+j - else - j=ir+1 - endif - goto 20 - 60 iarr(i)=rra - goto 10 - 999 if(n.gt.0)then - if(index(iarr(n)).gt.mn)then - n=n-1 - goto 999 - endif - endif - return - end -c -c =========================================================================== -c ========================================================================== -c - subroutine newsmf(colpnt,pivots,rowidx,cnonz,ecolpnt,count, - x vcstat,invprm,snhead,nodtyp,mark,workr,list,prew,next,code) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - common/logprt/ loglog,lfile - integer*4 loglog,lfile -c - integer*4 pivots(mn),ecolpnt(mn),count(mn),vcstat(mn), - x invprm(mn),snhead(mn),nodtyp(mn),mark(mn),rowidx(cfree), - x colpnt(n1),list(mn),prew(mn),next(mn),code - real*8 cnonz(nz),workr(mn) -c - integer*4 i,ii,j,k,l,o,pnt1,pnt2,fnz,kprew - character*99 buff -c -c -------------------------------------------------------------------------- -c - fnz=nz+1 -c -c Restructuring the ordering -c - k=0 - l=mn+1 - do i=1,pivotn - j=pivots(i) - if(vcstat(j).gt.-1)then - k=k+1 - invprm(k)=j - else if(vcstat(j).eq.-1)then - l=l-1 - invprm(l)=j - endif - enddo -c - write(buff,'(1x,a,i5,a)') - x 'Instable pivot(s), correcting',(mn-l+1),' pivot position(s)' - call mprnt(buff) -c - do i=1,k - pivots(i)=invprm(i) - enddo - pivotn=k - do i=l,mn - pivotn=pivotn+1 - pivots(pivotn)=invprm(i) - enddo -c -c Reorder the matrix -c - do 10 i=1,mn - invprm(i)=0 - snhead(i)=0 - mark(i)=0 - nodtyp(i)=mn+1 - next(i)=0 - prew(i)=0 - list(i)=0 - 10 continue - do i=1,pivotn - nodtyp(pivots(i))=i - enddo - do ii=1,pivotn - i=pivots(ii) - if(i.le.n)then - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - k=pnt2-pnt1+1 - if(k.gt.0)then - do j=pnt1,pnt2 - workr(rowidx(j))=cnonz(j) - enddo - call hpsrt(k,mn,rowidx(pnt1),nodtyp) - do j=pnt1,pnt2 - cnonz(j)=workr(rowidx(j)) - enddo - endif - ecolpnt(i)=pnt1 - 15 if((pnt1.le.pnt2).and.(vcstat(rowidx(pnt2)).le.-2))then - pnt2=pnt2-1 - goto 15 - endif - count(i)=pnt2 - if(pnt1.le.pnt2)then - j=rowidx(pnt1) - o=list(j) - next(i)=o - list(j)=i - if(o.ne.0)prew(o)=i - prew(i)=0 - endif - endif - enddo -c - do 50 ii=1,pivotn - i=pivots(ii) - mark(i)=1 - if(i.le.n)then -c -c Remove i from the secondary list -c - if(ecolpnt(i).le.count(i))then - k=next(i) - l=prew(i) - if(k.gt.0)then - prew(k)=l - endif - if(l.gt.0)then - next(l)=k - else - list(rowidx(ecolpnt(i)))=k - endif - endif -c -c Simple column of A -c - if(invprm(i).eq.0)then - l=ecolpnt(i) - k=count(i)-l+1 - goto 72 - endif -c -c Transformed column of A -c - pnt1=ecolpnt(i) - pnt2=count(i) - l=fnz - ecolpnt(i)=fnz - if(fnz.ge.cfree-mn)then - write(buff,'(1x,a)')'Not enough memory' - call mprnt(buff) - code=-1 - goto 999 - endif - do j=pnt1,pnt2 - mark(rowidx(j))=1 - rowidx(fnz)=rowidx(j) - fnz=fnz+1 - enddo - goto 59 - endif -c -c Create nonzero pattern -c - l=fnz - ecolpnt(i)=fnz - if(fnz.ge.cfree-mn)then - write(buff,'(1x,a)')'Not enough memory' - call mprnt(buff) - code=-2 - goto 999 - endif - kprew=list(i) - 25 if(kprew.eq.0)goto 59 - k=next(kprew) - mark(kprew)=1 - rowidx(fnz)=kprew - fnz=fnz+1 - pnt1=ecolpnt(kprew)+1 - pnt2=count(kprew) - ecolpnt(kprew)=pnt1 - if(pnt1.le.pnt2)then - j=rowidx(pnt1) - o=list(j) - next(kprew)=o - list(j)=kprew - if(o.ne.0)prew(o)=kprew - prew(kprew)=0 - endif - kprew=k - goto 25 -c -c Build new column structure -c - 59 kprew=invprm(i) - 60 if(kprew.eq.0)goto 70 - pnt1=ecolpnt(kprew) - pnt2=count(kprew) - do j=pnt1,pnt2 - k=rowidx(j) - if(mark(k).eq.0)then - mark(k)=1 - rowidx(fnz)=k - fnz=fnz+1 - endif - enddo - kprew=snhead(kprew) - goto 60 -c -c Linking invperms, free working arrays -c - 70 do j=l,fnz-1 - mark(rowidx(j))=0 - enddo - count(i)=fnz-1 - k=fnz-l - if(k.gt.1)call hpsrt(k,mn,rowidx(l),nodtyp) - 72 if(k.gt.0)then - j=rowidx(l) - snhead(i)=invprm(j) - invprm(j)=i - endif - 50 continue -c -c End of creation of nonzero pattern, set up new supernode partitions -c - k=loglog - loglog=0 - call supnode(ecolpnt,count,rowidx,vcstat,pivots,snhead, - x invprm,nodtyp) - loglog=k - 999 return - end -c -c ========================================================================= -c super dense oszlopok 'multiply' kezelessel -c -c =========================================================================== -c - subroutine ffactor(pntc,crow,colpnt,rowidx, - x mark,pivcols,ccol,nonz,diag, - x cpermf,cpermb,rpermf,rpermb,pntr,cfill,rfill, - x cpnt,cnext,cprew,rindex,workr, - x fixn,dropn,fnzmax,fnzmin,active,oper,actual,slktyp,code) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - common/factor/ tpiv1,tpiv2,tabs,trabs,lam,tfind,order,supdens - real*8 tpiv1,tpiv2,tabs,trabs,lam,tfind,order,supdens -c - common/numer/ tplus,tzer - real*8 tplus,tzer -c - integer*4 rowidx(cfree),rindex(rfree),colpnt(n1), - x pivcols(mn),cpermf(mn),cpermb(mn),rpermf(mn),rpermb(mn), - x ccol(mn),crow(mn),pntc(mn),pntr(mn),mark(mn),cfill(mn), - x cpnt(mn),cnext(mn),cprew(mn),slktyp(m),rfill(mn),fixn, - x dropn,fnzmax,fnzmin,active,col,dcols,code - real*8 nonz(cfree),diag(mn),workr(mn),actual(mn),oper - character*99 buff -c -c --------------------------------------------------------------------------- -c -c cpermf oszloplista elore lancolasa, fejmutato cfirst -c cpermb oszloplista hatra lancolasa, fejmutato clast -c rpermf sorlista elore lancolase, fejmutato rfirst -c rpermb sorlista hatra lancolasa, fejmutato rlast -c ccol oszlopszamlalok -c crow sorszamlalok (vcstat) -c pntc oszlopmutatok -c pntr sormutatok -c mark eliminacios integer segedtomb -c workr eliminacios real segedtomb -c cfill a sorfolytonos tarolas update-elesehez segedtomb -c rfill a sorfolytonos tarolas update-elesehez segedtomb -c cpnt szamlalok szerinti listak fejmutatoja -c cnext szamlalok szerinti elore-lancolt lista -c cprew szamlalok szerinti hatra-lancolt lista -c -c -------------------------------------------------------------------------- - integer*4 pnt,pnt1,pnt2,i,j,k,l,o,p,endmem,ccfree,rcfree,pmode, - x rfirst,rlast,cfirst,clast,pcol,pcnt,ppnt1,ppnt2,fill, - x prewcol,ii,pass,minm,w1,wignore,method - real*8 pivot,ss,tltmp1,tltmp2 -C CMSSW: Temporary integer array needed to avoid reusing REAL*8 for -C integer storage - integer*4 inds(mn) -c--------------------------------------------------------------------------- -c - 1 format(' NOT ENOUGH MEMORY IN THE ROW FILE ') - 2 format(' NOT ENOUGH MEMORY IN THE COLUMN FILE ') - 3 format(' ROW REALAXED :',i6,' DIAG :',d12.6,' TYPE :',i3) - 4 format(' COLUMN DROPPED :',i6,' DIAG :',d12.6) - 6 format(' NONZEROS :',i12) - 7 format(' OPERATIONS :',f13.0) - 8 format(' Superdense cols. :',i12) -C CMSSW: Explicit initialization needed - tltmp1=0 - tltmp2=0 -c -c move elements in the dropped rows to the end of the columns -c - code=0 - if((order.gt.2.5).and.(order.lt.3.5))then - method=1 - write(buff,'(a)')' Minimum Local Fill-In Heuristic' - else - method=0 - write(buff,'(a)')' Minimum Degree Heuristic' - endif - call mprnt(buff) - wignore=10 - w1=0 - pass=2 - minm=-m-1 - if(dropn.gt.0)then - do 15 i=1,n - if(crow(i).le.-2)goto 15 - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - p=pnt2 - do 16 j=pnt2,pnt1,-1 - if(crow(rowidx(j)).gt.-2)goto 16 - o=rowidx(j) - pivot=nonz(j) - rowidx(j)=rowidx(p) - rowidx(p)=o - nonz(j)=nonz(p) - nonz(p)=pivot - p=p-1 - 16 continue - 15 continue - endif -c -c initialization -c - endmem=cfree - pivotn=0 - pnt=nz+1 - cfirst=0 - clast =0 - pmode =0 - do 11 i=1,mn - pivcols(i)=0 - ccol(i)=0 - if(crow(i).gt.-2)then - crow(i)=0 - else - if(minm.ge.crow(i))minm=crow(i)-1 - endif - mark(i)=0 - 11 continue -c -c set up the permut lists and compute crow -c - dcols=0 - do 10 i=1,mn - if(crow(i).le.-2)goto 10 - if(i.le.n)then - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - o=0 - do while((pnt1+o.le.pnt2).and.(crow(rowidx(pnt1+o)).gt.-2)) - o=o+1 - enddo - if(o.ge.supdens)then - pass=1 - crow(i)=minm - dcols=dcols+1 - goto 10 - endif - pnt2=pnt1+o-1 - do j=pnt1,pnt2 - crow(rowidx(j))=crow(rowidx(j))+1 - enddo - pntc(i)=pnt1 - ccol(i)=o - else - pntc(i)=pnt - ccol(i)=0 - pnt=pnt+1 - endif - if(cfirst.eq.0)then - cfirst=i - else - cpermf(clast)=i - endif - cpermb(i)=clast - clast=i - 10 continue - cpermf(clast)=0 - ccfree=cfree-pnt - if(ccfree.lt.mn)then - write(buff,2) - call mprnt(buff) - code=-2 - goto 999 - endif - write(buff,8)dcols - call mprnt(buff) - if(pass.eq.1)then - tltmp1=tpiv2 - tltmp2=tabs - tabs=tpiv2 - endif -c -c create pointers to rindex -c - 500 do i=1,mn - cpnt(i) =0 - cnext(i)=0 - cprew(i)=0 - workr(i)=0.0d+0 - enddo - pnt=1 - i=cfirst - rfirst=0 - rlast=0 - 25 if(i.gt.0)then - if(rfirst.eq.0)then - rfirst=i - else - rpermf(rlast)=i - endif - rpermb(i)=rlast - rlast=i - pntr(i)=pnt - rfill(i)=pnt - pnt=pnt+crow(i) -c -c initialize the counter lists -c - j=crow(i)+ccol(i)+1 - if(j.gt.0)then - o=cpnt(j) - cnext(i)=o - cpnt(j)=i - if(o.ne.0)cprew(o)=i - endif - cprew(i)=0 - i=cpermf(i) - goto 25 - endif - rcfree=rfree-pnt - if(rcfree.lt.mn)then - write(buff,1) - call mprnt(buff) - code=-2 - goto 999 - endif -c -c create the row file : symbolical transps the matrix -c - i=cfirst - 26 if(i.gt.0)then - pnt1=pntc(i) - pnt2=pnt1+ccol(i)-1 - do 27 j=pnt1,pnt2 - k=rowidx(j) - if(crow(k).le.-2)goto 27 - rindex(rfill(k))=i - rfill(k)=rfill(k)+1 - 27 continue - i=cpermf(i) - goto 26 - endif - rpermf(rlast)=0 - pcol=0 -c -c loop for pivots -c - 50 call fndpiv(cpnt,cnext,pntc,ccol,crow,rowidx,nonz, -C CMSSW: Prevent REAL*8 reusage warning -C Was: diag,pcol,pivot,pmode,method,workr,mark,rindex,pntr - x diag,pcol,pivot,pmode,method,inds,mark,rindex,pntr) - if (pcol.eq.0)goto 900 - pivot=1.0d+0/pivot - diag(pcol)=pivot - ccfree=endmem-pntc(clast)-ccol(clast) -c -c compress column file -c - if(ccfree.lt.mn)then - call ccomprs(mn,cfree,ccfree,endmem,nz, - x pntc,ccol,cfirst,cpermf,rowidx,nonz,code) - if(code.lt.0)goto 999 - endif -c -c remove pcol from the cpermf lists -c - prewcol=cpermb(pcol) - o=cpermf(pcol) - if(prewcol.ne.0)then - cpermf(prewcol)=o - else - cfirst=o - endif - if(o.eq.0)then - clast=prewcol - else - cpermb(o)=prewcol - endif -c -c remove pcol from the rpermf lists -c - prewcol=rpermb(pcol) - o=rpermf(pcol) - if(prewcol.ne.0)then - rpermf(prewcol)=o - else - rfirst=o - endif - if(o.eq.0)then - rlast=prewcol - else - rpermb(o)=prewcol - endif -c -c administration -c - pivotn=pivotn+1 - pivcols(pivotn)=pcol - pcnt=ccol(pcol)+crow(pcol) -c -c remove pcol from the counter lists -c - o=cnext(pcol) - ii=cprew(pcol) - if(ii.eq.0)then - cpnt(pcnt+1)=o - else - cnext(ii)=o - endif - if(o.ne.0)cprew(o)=ii - pnt1=pntc(pcol) - pnt2=pnt1+ccol(pcol)-1 - if(pnt1.gt.nz)then - ppnt1=endmem-pcnt - ppnt2=ppnt1+pcnt-1 - endmem=endmem-pcnt - ccfree=ccfree-pcnt - pnt=ppnt1 - do 60 j=pnt1,pnt2 - o=rowidx(j) - mark(o)=1 - workr(o)=nonz(j) - rowidx(pnt)=o - pnt=pnt+1 -c -c remove pcol from the row file -c - rfill(o)=-1 - cfill(o)=ccol(o) - l=pntr(o) - p=l+crow(o)-2 - do 55 k=l,p - if(rindex(k).eq.pcol)then - rindex(k)=rindex(p+1) - goto 60 - endif - 55 continue - 60 continue - pntc(pcol)=ppnt1 -c -c create pivot column from the row file -c - pnt1=pntr(pcol) - pnt2=pnt1+crow(pcol)-1 - do 70 i=pnt1,pnt2 - o=rindex(i) - l=pntc(o) - p=l+ccol(o)-1 -c -c move the original column -c - if(l.le.nz)then - if(ccfree.lt.mn)then - call ccomprs(mn,cfree,ccfree,endmem,nz, - x pntc,ccol,cfirst,cpermf,rowidx,nonz,code) - if(code.lt.0)goto 999 - l=pntc(o) - p=l+ccol(o)-1 - endif - ccfree=ccfree-ccol(o) - j=pntc(clast)+ccol(clast) - if(j.le.nz)j=nz+1 - pntc(o)=j - do 72 k=l,p - nonz(j)=nonz(k) - rowidx(j)=rowidx(k) - j=j+1 - 72 continue - l=pntc(o) - p=j-1 -c -c update the cpermf lists -c - prewcol=cpermb(o) - k=cpermf(o) - if(prewcol.ne.0)then - cpermf(prewcol)=k - else - if(k.ne.0)then - cfirst=k - else - goto 93 - endif - endif - if(k.eq.0)then - clast=prewcol - else - cpermb(k)=prewcol - endif - cpermf(clast)=o - cpermb(o)=clast - cpermf(o)=0 - clast=o - 93 endif -c -c find element and move in the column o -c - cfill(o)=ccol(o)-1 - rfill(o)= 0 - do 75 k=l,p - if(rowidx(k).eq.pcol)then - mark(o)=1 - rowidx(pnt)=o - pnt=pnt+1 - workr(o)=nonz(k) - rowidx(k)=rowidx(p) - nonz(k)=nonz(p) - goto 70 - endif - 75 continue - 70 continue - else - ppnt1=pnt1 - ppnt2=pnt2 - do 65 j=pnt1,pnt2 - o=rowidx(j) - mark(o)=1 - workr(o)=nonz(j) -c -c remove pcol from the row file -c - rfill(o)=-1 - cfill(o)=ccol(o) - l=pntr(o) - p=l+crow(o)-2 - do 67 k=l,p - if(rindex(k).eq.pcol)then - rindex(k)=rindex(p+1) - goto 65 - endif - 67 continue - 65 continue - endif - ccol(pcol)=pcnt -c -c remove columns from the counter lists -c - do 77 j=ppnt1,ppnt2 - i=rowidx(j) - o=cnext(i) - ii=cprew(i) - if(ii.eq.0)then - cpnt(crow(i)+ccol(i)+1)=o - else - cnext(ii)=o - endif - if(o.ne.0)cprew(o)=ii - 77 continue -c -c Sort pivot column, set-up workr -c - if(ppnt1.lt.ppnt2)call hpsort((ppnt2-ppnt1+1),rowidx(ppnt1)) - do p=ppnt1,ppnt2 - nonz(p)=workr(rowidx(p)) - workr(rowidx(p))=workr(rowidx(p))*pivot - enddo -c -c elimination loop -c - do 80 p=ppnt1,ppnt2 - i=rowidx(p) - ss=nonz(p) -c -c transforme diag and delete element from mark -c - diag(i)=diag(i)-ss*workr(i) - mark(i)=0 - pcnt=pcnt-1 -c -c transformation on the column i -c - fill=pcnt - pnt1=pntc(i) - pnt2=pnt1+cfill(i)-1 - do 90 k=pnt1,pnt2 - o=rowidx(k) - if(mark(o).ne.0)then - nonz(k)=nonz(k)-ss*workr(o) - fill=fill-1 - mark(o)=0 - endif - 90 continue -c -c compute the free space -c - ii=cpermf(i) - if(ii.eq.0)then - k=endmem-pnt2-1 - else - k=pntc(ii)-pnt2-1 - endif -c -c move column to the end of the column file -c - if(fill.gt.k)then - if (ccfree.lt.mn)then - call ccomprs(mn,cfree,ccfree,endmem,nz, - x pntc,ccol,cfirst,cpermf,rowidx,nonz,code) - if(code.lt.0)goto 999 - pnt1=pntc(i) - pnt2=pnt1+cfill(i)-1 - endif - if(i.ne.clast)then - l=pntc(clast)+ccol(clast) - pntc(i)=l - do 95 k=pnt1,pnt2 - rowidx(l)=rowidx(k) - nonz(l)=nonz(k) - l=l+1 - 95 continue - pnt1=pntc(i) - pnt2=l-1 - prewcol=cpermb(i) - if(prewcol.eq.0)then - cfirst=ii - else - cpermf(prewcol)=ii - endif - cpermb(ii)=prewcol - cpermf(clast)=i - cpermb(i)=clast - clast=i - cpermf(clast)=0 - endif - endif -c -c create fill in -c - do 97 k=p+1,ppnt2 - o=rowidx(k) - if(mark(o).eq.0)then - mark(o)=1 - else - pnt2=pnt2+1 - nonz(pnt2)=-ss*workr(o) - rowidx(pnt2)=o - rfill(o)=rfill(o)+1 - endif - 97 continue - pnt2=pnt2+1 - ccol(i)=pnt2-pnt1 - if(i.eq.clast)then - ccfree=endmem-pnt2-1 - endif - 80 continue -c -c make space for fills in the row file -c - do 100 j=ppnt1,ppnt2 - i=rowidx(j) -c -c update the counter lists -c - fill=ccol(i)+crow(i)+rfill(i)+1 - o=cpnt(fill) - cnext(i)=o - cpnt(fill)=i - if(o.ne.0)cprew(o)=i - cprew(i)=0 - pnt2=pntr(i)+crow(i)-1 -c -c compute the free space -c - ii=rpermf(i) - if(ii.eq.0)then - k=rfree-pnt2-1 - else - k=pntr(ii)-pnt2-1 - endif -c -c move row to the end of the row file -c - if(k.lt.rfill(i))then - if(rcfree.lt.mn)then - call rcomprs(mn,rfree, - x rcfree,pntr,crow,rfirst,rpermf,rindex,code) - if(code.lt.0)goto 999 - endif - if(ii.ne.0)then - pnt1=pntr(i) - pnt2=pnt1+crow(i)-1 - pnt=pntr(rlast)+crow(rlast) - pntr(i)=pnt - do 110 l=pnt1,pnt2 - rindex(pnt)=rindex(l) - pnt=pnt+1 - 110 continue -c -c update the rperm lists -c - prewcol=rpermb(i) - if(prewcol.eq.0)then - rfirst=ii - else - rpermf(prewcol)=ii - endif - rpermb(ii)=prewcol - rpermf(rlast)=i - rpermb(i)=rlast - rlast=i - rpermf(rlast)=0 - endif - endif - crow(i)=crow(i)+rfill(i) - if(i.eq.rlast)rcfree=rfree-crow(i)-pntr(i) - 100 continue -c -c make pointers to the end of the filled rows -c - do 120 j=ppnt1,ppnt2 - rfill(rowidx(j))=pntr(rowidx(j))+crow(rowidx(j))-1 - 120 continue -c -c generate fill in the row file -c - do 130 j=ppnt1,ppnt2 - o=rowidx(j) - pnt1=pntc(o)+cfill(o) - pnt2=pntc(o)+ccol(o)-1 - do 140 k=pnt1,pnt2 - rindex(rfill(rowidx(k)))=o - rfill(rowidx(k))=rfill(rowidx(k))-1 - 140 continue - 130 continue -c -c end of the pivot loop -c - goto 50 -c -c compute the 'superdense' columns, enter in pass=2 -c - 900 if(pass.eq.1)then - pass=pass+1 - tpiv2=tltmp1 - tabs=tltmp2 - pmode=1 - call ccomprs(mn,cfree,ccfree,endmem,nz, - x pntc,ccol,cfirst,cpermf,rowidx,nonz,code) - if(code.lt.0)goto 999 - call excols(rowidx,nonz,rpermf,rpermb,crow, - x pntc,ccol,pivcols,cpermf,cpermb,workr,colpnt,diag, - x cfirst,clast,endmem,ccfree,minm,code) - if(code.lt.0)goto 999 - goto 500 - endif -c -c rank check -c - if(pivotn.lt.mn-fixn-dropn)then - i=cfirst - 910 if (i.gt.0)then - crow(i)=-2 - if(i.le.n)then - w1=w1+1 - if(w1.le.wignore)then - write(buff,4)i,diag(i) - call mprnt(buff) - endif - fixn=fixn+1 - else - w1=w1+1 - if(w1.le.wignore)then - write(buff,3)(i-n),diag(i),slktyp(i-n) - call mprnt(buff) - endif - actual(i)=-1 - dropn=dropn+1 - endif - i=cpermf(i) - goto 910 - endif - active=mn-pivotn - w1=w1-wignore - if(w1.gt.0)then - write(buff,'(1x,a,i5)')'Warnings ignored:',w1 - call mprnt(buff) - endif - endif -c -c repermut -c - do 955 i=1,mn - mark(i)=mn+1 - pntr(i)=0 - 955 continue - do 915 i=1,pivotn - mark(pivcols(i))=i - 915 continue - fill=0 - oper=0.0d+0 - do 920 i=1,mn - if(crow(i).le.-2)goto 920 - pnt1=pntc(i) - if(pnt1.le.nz)goto 920 - if(ccol(i).gt.0)then - pnt2=pnt1+ccol(i)-1 - do j=pnt1,pnt2 - workr(rowidx(j))=nonz(j) - enddo - call hpsrt(ccol(i),mn,rowidx(pnt1),mark) - do j=pnt1,pnt2 - nonz(j)=workr(rowidx(j)) - enddo - endif - fill=fill+ccol(i) - oper=oper+dble(ccol(i)*ccol(i)+ccol(i))/2.0d+0 - 920 continue - do 950 i=1,n - if(crow(i).le.-2)goto 950 - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - k=pnt2-pnt1+1 - if(k.gt.0)then - do j=pnt1,pnt2 - workr(rowidx(j))=nonz(j) - enddo - call hpsrt(k,mn,rowidx(pnt1),mark) - do j=pnt1,pnt2 - nonz(j)=workr(rowidx(j)) - enddo - endif - if(pntc(i).lt.nz)then - ccol(i)=k - fill=fill+ccol(i) - oper=oper+dble(ccol(i)*ccol(i)+ccol(i))/2.0d+0 - endif - 950 continue -c -c create the counter inta1 for the minor iterations -c - do 960 i=1,pivotn - col=pivcols(pivotn-i+1) - if(ccol(col).eq.0)goto 960 - pntr(col)=pntr(rowidx(pntc(col)))+ccol(col) - 960 continue -c -c modify ccol ( counter ->> pointer ) -c - do 970 i=1,pivotn - col=pivcols(i) - ccol(col)=pntc(col)+ccol(col)-1 - 970 continue -c -c end of ffactor -c - if(fnzmin.gt.fill)fnzmin=fill - if(fnzmax.lt.fill)fnzmax=fill - write(buff,6)fill - call mprnt(buff) - write(buff,7)oper - call mprnt(buff) - if(method.eq.1)tfind=-tfind - 999 return - end -c -c =========================================================================== -c - subroutine ccomprs(mn,cfree,ccfree,endmem,nz, - x pnt,count,cfirst,cpermf,rowidx,nonz,code) - integer*4 mn,cfree,ccfree,endmem,nz,pnt(mn),rowidx(cfree), - x count(mn),cpermf(mn),cfirst,code - real*8 nonz(cfree) -c - integer*4 i,j,pnt1,pnt2,pnt0 - character*99 buff -c --------------------------------------------------------------------------- - 2 format(' NOT ENOUGH MEMORY DETECTED IN SUBROUTINE CCOMPRESS') - pnt0=nz+1 - i=cfirst - 40 if(i.le.0)goto 30 - pnt1=pnt(i) - if(pnt1.lt.pnt0)goto 10 - if(pnt1.eq.pnt0)then - pnt0=pnt0+count(i) - goto 10 - endif - pnt(i)=pnt0 - pnt2=pnt1+count(i)-1 - do 20 j=pnt1,pnt2 - rowidx(pnt0)=rowidx(j) - nonz(pnt0)=nonz(j) - pnt0=pnt0+1 - 20 continue - 10 i=cpermf(i) - goto 40 - 30 ccfree=endmem-pnt0-1 - if(ccfree.lt.mn)then - write(buff,2) - call mprnt(buff) - code=-2 - endif - return - end -c -c =========================================================================== -c - subroutine rcomprs(mn,rfree,rcfree,pnt,count,rfirst, - x rpermf,rindex,code) - integer*4 mn,rfree,rcfree,pnt(mn),count(mn),rfirst,rpermf(mn), - x rindex(rfree),code -c - integer*4 i,j,ppnt,pnt1,pnt2 - character*99 buff -c -c --------------------------------------------------------------------------- -c - 2 format(' NOT ENOUGH MEMORY DETECTED IN SUBROUTINE RCOMPRESS') - ppnt=1 - i=rfirst - 5 if(i.eq.0)goto 20 - pnt1=pnt(i) - if(ppnt.eq.pnt1)then - ppnt=ppnt+count(i) - goto 15 - endif - pnt2=pnt1+count(i)-1 - pnt(i)=ppnt - do 10 j=pnt1,pnt2 - rindex(ppnt)=rindex(j) - ppnt=ppnt+1 - 10 continue - 15 i=rpermf(i) - goto 5 - 20 rcfree=rfree-ppnt - if(rcfree.lt.mn)then - write(buff,2) - call mprnt(buff) - code=-2 - endif - return - end -c -c ========================================================================== -c - subroutine excols(rowidx,nonz,rpermf,rpermb,crow, - x pntc,ccol,pivcols,cpermf,cpermb,workr,colpnt,diag, - x cfirst,clast,endmem,ccfree,minm,code) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - integer*4 rowidx(cfree),rpermf(mn),rpermb(mn),crow(mn), - x pntc(mn),ccol(mn),pivcols(mn),cpermf(mn),cpermb(mn),colpnt(n1), - x cfirst,clast,endmem,ccfree,minm,code - real*8 nonz(cfree),workr(mn),diag(mn) -c - integer*4 i,j,k,l,o,prewcol,pnt1,pnt2,ppnt1,ppnt2 - real*8 ss - character*99 buff -c -c ---------------------------------------------------------------------------- -c - 2 format(' NOT ENOUGH MEMORY IN THE COLUMN FILE ') -c - do i=1,mn - rpermf(i)=0 - rpermb(i)=0 - if(crow(i).gt.-2)crow(i)=0 - enddo - do i=1,pivotn - crow(pivcols(i))=-1 - enddo - prewcol=0 - do 200 i=1,n - if(crow(i).ne.minm)goto 200 - if(prewcol.eq.0)prewcol=i - ppnt1=colpnt(i) - ppnt2=colpnt(i+1)-1 -c -c update column's permut list -c - if(clast.ne.0)then - pnt1=pntc(clast)+ccol(clast) - cpermf(clast)=i - else - cfirst=i - pnt1=0 - endif - cpermb(i)=clast - cpermf(i)=0 - clast=i - if(pnt1.lt.nz)pnt1=nz+1 - pntc(i)=pnt1 - pnt2=pnt1 -c -c repack the original column -c - do 202 j=ppnt1,ppnt2 - k=rowidx(j) - if(crow(k).gt.-2)then - workr(k)=nonz(j) - rpermf(k)=1 - if(crow(k).eq.-1)then - rpermb(k)=rpermb(k)+1 - endif - rowidx(pnt2)=k - pnt2=pnt2+1 - endif - 202 continue -c -c Ftran on the column -c - do j=1,pivotn - o=pivcols(j) - if(rpermf(o).gt.0)then - ppnt1=pntc(o) - ppnt2=ppnt1+ccol(o)-1 - ss=-workr(o)*diag(o) - diag(i)=diag(i)+ss*workr(o) - do k=ppnt1,ppnt2 - l=rowidx(k) - if(rpermf(l).eq.0)then - workr(l)=nonz(k)*ss - rowidx(pnt2)=l - pnt2=pnt2+1 - rpermf(l)=1 - if((crow(l).eq.-1).or.(l.lt.i))then - rpermb(l)=rpermb(l)+1 - endif - else - workr(l)=workr(l)+nonz(k)*ss - endif - enddo - endif - enddo -c -c augftr with the prewious columns -c - j=prewcol - 215 if(j.ne.i)then - ppnt1=pntc(j) - ppnt2=ppnt1+ccol(j)-1 - do k=ppnt1,ppnt2 - l=rowidx(k) - if((crow(l).eq.-1).and.(rpermf(l).gt.0))then - if(rpermf(j).eq.0)then - workr(j)=-workr(l)*nonz(k)*diag(l) - rowidx(pnt2)=j - pnt2=pnt2+1 - rpermf(j)=1 - rpermb(j)=rpermb(j)+1 - else - workr(j)=workr(j)-workr(l)*nonz(k)*diag(l) - endif - endif - enddo - j=cpermf(j) - goto 215 - endif - ccol(i)=pnt2-pnt1 -c -c pack the column -c - pnt2=pnt2-1 - do j=pnt1,pnt2 - o=rowidx(j) - nonz(j)=workr(o) - rpermf(o)=0 - enddo - ccfree=endmem-pntc(clast)-ccol(clast) - if(ccfree.lt.mn)then - write(buff,2) - call mprnt(buff) - code=-2 - goto 999 - endif - crow(i)=0 - 200 continue -c -c Make space in the old factors -c - o=0 - do i=1,pivotn - j=pivcols(i) - o=o+rpermb(j) - enddo - ppnt1=endmem-o - if(ccfree.le.o)then - write(buff,2) - call mprnt(buff) - code=-2 - goto 999 - endif - endmem=ppnt1 - ccfree=ccfree-o - do i=pivotn,1,-1 - k=pivcols(i) - pnt1=pntc(k) - if(pnt1.gt.nz)then - pnt2=pnt1+ccol(k)-1 - pntc(k)=ppnt1 - do j=pnt1,pnt2 - rowidx(ppnt1)=rowidx(j) - nonz(ppnt1)=nonz(j) - ppnt1=ppnt1+1 - enddo - ppnt1=ppnt1+rpermb(k) - endif - enddo -c -c make space in the active submatrix -c - o=0 - i=cfirst - 220 if(i.ne.0)then - o=o+rpermb(i) - i=cpermf(i) - goto 220 - endif - if(ccfree.le.o)then - write(buff,2) - call mprnt(buff) - code=-2 - goto 999 - endif - ccfree=ccfree-o - ppnt1=pntc(clast)+ccol(clast)+o - i=clast - 230 if(i.ne.0)then - pnt1=pntc(i) - if(pnt1.gt.nz)then - pnt2=pnt1+ccol(i)-1 - ppnt1=ppnt1-rpermb(i) - do j=pnt2,pnt1,-1 - rowidx(ppnt1)=rowidx(j) - nonz(ppnt1)=nonz(j) - ppnt1=ppnt1-1 - enddo - pntc(i)=ppnt1+1 - endif - i=cpermb(i) - goto 230 - endif -c -c Store the dense columns in the final positions -c - i=prewcol - 250 if(i.gt.0)then - pnt1=pntc(i) - pnt2=pnt1+ccol(i)-1 - ppnt1=pnt1 - do j=pnt1,pnt2 - o=rowidx(j) - if((crow(o).eq.-1).or.(o.lt.i))then - k=pntc(o)+ccol(o) - nonz(k)=nonz(j) - rowidx(k)=i - ccol(o)=ccol(o)+1 - else - nonz(ppnt1)=nonz(j) - rowidx(ppnt1)=rowidx(j) - ppnt1=ppnt1+1 - endif - enddo - ccol(i)=ppnt1-pnt1 - i=cpermf(i) - goto 250 - endif -c -c compute crow -c - do i=1,mn - if(crow(i).gt.-2)crow(i)=0 - enddo - i=cfirst - 280 if(i.gt.0)then - pnt1=pntc(i) - pnt2=pnt1+ccol(i)-1 - do j=pnt1,pnt2 - crow(rowidx(j))=crow(rowidx(j))+1 - enddo - i=cpermf(i) - goto 280 - endif -999 return - end -c -c ============================================================================= -c Find pivot in the augmented system -c Prefer the pivot for expanding the supernodes -c Method=0 minimum count -c Method=1 minimum local fill in -c =========================================================================== -c - subroutine fndpiv(cpnt,cnext,pntc,ccol,crow,rowidx,nonzeros, - x diag,pivcol,pivot,md,method,inds,mark,rindex,pntr) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - common/factor/ tpiv1,tpiv2,tabs,trabs,lam,tfind,order,supdens - real*8 tpiv1,tpiv2,tabs,trabs,lam,tfind,order,supdens -c - integer*4 cpnt(mn),cnext(mn),pntc(mn),ccol(mn),crow(mn),pivcol, - x rowidx(cfree),md,method,inds(mn),mark(mn),rindex(rfree), - x pntr(mn) - real*8 nonzeros(cfree),diag(mn),pivot - -c -------------------------------------------------------------------------- - integer*4 j,k,l,o,nnz,ffind,oldpcol,oldlen,p1,p2,srcmod - integer*4 fill,mfill,q,oo,kk - real*8 sol,stab,stab1,d,toler,ss -c -------------------------------------------------------------------------- -C CMSSW: Explicit initialization needed - p1=0 - p2=0 - oldlen=0 - fill=0 - stab=0 - stab1=0 -c -c find pivot in sparse columns -c - mfill=-1 - toler=tpiv1 - if(md.gt.0)then - srcmod=1 - goto 101 - endif - 10 pivcol=pivcol+1 - if (pivcol.ge.n)goto 100 - if(crow(pivcol).ne.0)goto 10 - if(ccol(pivcol).gt.lam)goto 10 - pivot=diag(pivcol) - if(abs(pivot).lt.tpiv2)goto 10 - goto 200 -c -c find pivot in the another columns -c - 100 md=1 - srcmod=0 - 101 oldpcol=pivcol - pivcol=0 - stab1=0 - pivot=0 - nnz=md-1 - ffind=0 - if(nnz.lt.1)nnz=1 - md=md-1 - if(md.le.1)md=1 -c -c Find supernodal pivot (srcmode=1) -c - 115 if(oldpcol.eq.0)goto 112 - p1=pntc(oldpcol) - p2=p1+ccol(oldpcol)-1 - oldlen=ccol(oldpcol) - 125 if(p1.gt.p2)goto 114 - j=rowidx(p1) - if((crow(j)+ccol(j)).lt.oldlen)goto 121 - 145 p1=p1+1 - goto 125 - 114 if(pivcol.gt.0)goto 200 -c -c Find another pivot -c - 112 srcmod=0 - md=0 - 110 j=cpnt(nnz) - if((j.gt.0).and.(md.eq.0))md=nnz - 120 if(j.le.0)goto 150 -c -c Compute fill in -c - if(method.ne.0)then - q=0 - k=pntc(j) - l=k+ccol(j)-1 - do o=k,l - q=q+1 - inds(q)=rowidx(o) - mark(rowidx(o))=1 - enddo - k=pntr(j) - l=k+crow(j)-1 - do o=k,l - q=q+1 - inds(q)=rindex(o) - mark(rindex(o))=1 - enddo - fill=(q*(q-1))/2 - do kk=1,q - o=inds(kk) - k=pntc(o) - l=k+ccol(o)-1 - do oo=k,l - fill=fill-mark(rowidx(oo)) - enddo - enddo - do o=1,q - mark(inds(o))=0 - enddo - else - fill=crow(j) - endif - ffind=ffind+1 - if((mfill.ge.0).and.(fill.ge.mfill))goto 130 - 121 d=diag(j) - sol=abs(d) - if(sol.lt.tabs)goto 130 - k=pntc(j) -c -c stability test -c - stab=sol - l=k+ccol(j)-1 - do 32 o=k,l - ss=abs(nonzeros(o)) - if(stab.lt.ss)stab=ss - 32 continue - stab=sol/stab - if(stab.lt.toler)goto 130 - if(mfill.lt.0)mfill=fill+1 - if((fill.lt.mfill).or.((fill.eq.mfill).and.(stab.gt.stab1)))then - pivot=d - pivcol=j - stab1=stab - mfill=fill - goto 130 - endif - 130 if((srcmod.gt.0).and.(pivcol.ne.0))then -cccc md=md-1 -cccc if(md.lt.1)md=1 - goto 200 - endif - if((ffind.gt.tfind).and.(pivcol.ne.0))goto 200 - if(srcmod.gt.0)goto 145 - j=cnext(j) - goto 120 - 150 if((pivcol.eq.0).or.(method.ne.0))then - nnz=nnz+1 - if(nnz.le.mn)goto 110 - if(pivcol.gt.0)goto 200 - toler=toler/10 - nnz=md - if((toler.ge.tpiv2).and.(nnz.gt.0))goto 115 - md=1 - endif - 200 return - end -c -c ========================================================================== -c Supernodal left looking, primer supernode loop (cache), -c Supernode update with indirect addressing -c Relative pivot tolerance -c ============================================================================= -c - subroutine nfactor(ecolpnt, - x vcstat,rowidx,pivots,count, - x nonzeros,diag,err,updat,mut,index,dropn,slktyp, - x snhead,fpnt,invperm,nodtyp,dv,odiag) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - integer*4 err,mut(mn),dropn,ecolpnt(mn),vcstat(mn), - x rowidx(cfree),pivots(mn),count(mn),index(mn),slktyp(m) - integer*4 snhead(mn),fpnt(mn),invperm(mn),nodtyp(mn) - real*8 nonzeros(cfree),diag(mn),updat(mn),dv(m),odiag(mn) -c - common/factor/ tpiv1,tpiv2,tabs,trabs,lam,tfind,order,supdens - real*8 tpiv1,tpiv2,tabs,trabs,lam,tfind,order,supdens - common/numer/ tplus,tzer - real*8 tplus,tzer -c ----------------------------------------------------------------------------- - integer*4 i,j,k,o,p,pnt1,pnt2,ppnt1,ppnt2,col,kprew, - x prewnode,ppnode,rb,w1 - real*8 s,diap,diam - character*99 buff -c------------------------------------------------------------------------------ -C CMSSW: Explicit initialization needed - ppnt1=0 - ppnt2=0 - - err=0 - w1=0 -c -c initialization -c - do 10 i=1,mn - mut(i)=0 - index(i)=0 - updat(i)=0.0 - fpnt(i)=ecolpnt(i) - 10 continue - ppnode=0 - prewnode=0 - i=0 -c -c loop for pivot columns -c - 100 i=i+1 - if(i.gt.pivotn)goto 60 - col=pivots(i) -c -c step vcstat if relaxed -c - if(vcstat(col).le.-2)then - call colremv(i,col,mut,index,fpnt,count,pivots,invperm, - x snhead,nodtyp,rowidx,nonzeros,ppnode,prewnode) - diag(col)=0.0 - i=i-1 - if((ppnode.gt.0).and.(prewnode.eq.i))goto 110 - goto 100 - endif -c - ppnt1=ecolpnt(col) - ppnt2=count(col) - if(ppnt1.le.nz)then - diag(col)=1.0d00/diag(col) - goto 180 - endif - kprew=index(col) -c -c compute -c - diap=diag(col) - diam=0.0d+0 - 130 if(kprew)129,150,131 -c -c Standard transformation -c - 131 k=mut(kprew) - pnt1=fpnt(kprew) - pnt2=count(kprew) - if(pnt1.lt.pnt2)then - o=rowidx(pnt1+1) - mut(kprew)=index(o) - index(o)=kprew - endif - pnt1=pnt1+1 - fpnt(kprew)=pnt1 - s=-nonzeros(pnt1-1)*diag(kprew) - if(kprew.le.n)then - diap=diap+s*nonzeros(pnt1-1) - else - diam=diam+s*nonzeros(pnt1-1) - endif - do 170 o=pnt1,pnt2 - updat(rowidx(o))=updat(rowidx(o))+s*nonzeros(o) - 170 continue - kprew=k - goto 130 -c -c supernodal transformation -c - 129 kprew=-kprew - k=mut(kprew) - p=invperm(kprew) - pnt1=fpnt(kprew)+1 - if(pnt1.le.count(kprew))then - o=rowidx(pnt1) - mut(kprew)=index(o) - index(o)=-kprew - endif - if(kprew.le.n)then - call cspnd(p,snhead(p),diag,nonzeros, - x fpnt,count,pivots,updat,diap,rowidx(pnt1)) - else - call cspnd(p,snhead(p),diag,nonzeros, - x fpnt,count,pivots,updat,diam,rowidx(pnt1)) - endif - kprew=k - goto 130 -c -c pack a column, and free the working array -c - 150 do k=ppnt1,ppnt2 - nonzeros(k)=updat(rowidx(k)) - updat(rowidx(k))=0 - enddo -c -c set up diag -c - if((ppnode.le.0).or.(prewnode.ne.snhead(i)))then - diap=diap+diam - diam=max(trabs,abs(diam*trabs)) - if(abs(diap).lt.diam)then - call rngchk(rowidx,nonzeros,ecolpnt(col),count(col), - x vcstat,rb,diag,slktyp,dropn,col,dv,diap,w1,odiag(col)) - if(rb.ne.0)err=1 - diag(col)=diap - if(vcstat(col).le.-2)goto 100 - else - diag(col)=1.0d00/diap - endif - else - diag(col)=diam - updat(col)=diap - endif -c -c Transformation in (primer) supernode -c - 110 if(prewnode.eq.i)then - if(ppnode.gt.0)then - do j=ppnode+1,i - o=j-1 - p=pivots(j) - call cspnode(ppnode,o,diag,nonzeros,fpnt,count,pivots, - x nonzeros(ecolpnt(p)),diag(p)) - diam=max(trabs,abs(diag(p)*trabs)) - diag(p)=diag(p)+updat(p) - if(abs(diag(p)).lt.diam)then - call rngchk(rowidx,nonzeros,ecolpnt(p),count(p), - x vcstat,rb,diag,slktyp,dropn,p,dv,diag(p),w1,odiag(p)) - if(rb.ne.0)err=1 - else - diag(p)=1.0d00/diag(p) - endif - enddo - endif - ppnode=0 - endif -c -c Update the linked list -c - 180 if(snhead(i).eq.0)then - ppnode=0 - if(ppnt1.le.ppnt2)then - j=rowidx(ppnt1) - mut(col)=index(j) - index(j)=col - endif - prewnode=0 - else - if(prewnode.ne.snhead(i))then - prewnode=snhead(i) - if(nodtyp(i).gt.0)then - ppnode=i - else - ppnode=-i - endif - if(ecolpnt(pivots(prewnode)).le.count(pivots(prewnode)))then - j=rowidx(ecolpnt(pivots(prewnode))) - mut(col)=index(j) - index(j)=-col - endif - endif - endif -c -c end of the main loop -c - goto 100 -c -c end of mfactor -c - 60 if(w1.gt.0)then - write(buff,'(1x,a,i6)')'Total warnings of row dependencies:',w1 - call mprnt(buff) - endif - return - end -c -c ============================================================================= -c - subroutine colremv(i,col,mut,index,fpnt,count,pivots,invperm, - x snhead,nodtyp,rowidx,nonzeros,ppnode,prewnode) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - integer*4 i,col,mut(mn),index(mn),fpnt(mn),count(mn),pivots(mn), - x invperm(mn),snhead(mn),nodtyp(mn),rowidx(cfree),ppnode, - x prewnode - real*8 nonzeros(cfree) -c - integer*4 j,jj,k,l,o,p,pnt1 -c - jj=index(col) - 195 if(jj.eq.0)goto 103 - if(jj.lt.0)then - j=-jj - else - j=jj - endif - k=mut(j) - pnt1=fpnt(j) - call move(pnt1,count(j),rowidx,nonzeros) - if(pnt1.le.count(j))then - o=rowidx(pnt1) - mut(j)=index(o) - index(o)=jj - endif - if(jj.lt.0)then - p=invperm(j) - l=snhead(p) - do o=p+1,l - call move(fpnt(pivots(o)),count(pivots(o)),rowidx,nonzeros) - enddo - endif - jj=k - goto 195 -c -c Step in the primer supernode -c - 103 if((ppnode.gt.0).and.(prewnode.eq.snhead(i)))then - l=i-1 - do o=ppnode,l - pnt1=fpnt(pivots(o)) - 104 if(pnt1.le.count(pivots(o)))then - if(rowidx(pnt1).eq.col)then - call move(pnt1,count(pivots(o)),rowidx,nonzeros) - pnt1=count(pivots(o)) - endif - pnt1=pnt1+1 - goto 104 - endif - enddo - endif -c -c Make changes -c - pivotn=pivotn-1 - do j=i,pivotn - pivots(j)=pivots(j+1) - snhead(j)=snhead(j+1) - nodtyp(j)=nodtyp(j+1) - enddo - do j=1,pivotn - if(snhead(j).ge.i)snhead(j)=snhead(j)-1 - invperm(pivots(j))=j - enddo - if(prewnode.ge.i)prewnode=prewnode-1 - return - end -c -c ============================================================================= -c - subroutine move(pnt1,pnt2,rowidx,nonzeros) - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 pnt1,pnt2,rowidx(cfree),i,j - real*8 nonzeros(cfree),s - if(pnt1.le.pnt2)then - j=rowidx(pnt1) - s=nonzeros(pnt1) - pnt2=pnt2-1 - do i=pnt1,pnt2 - nonzeros(i)=nonzeros(i+1) - rowidx(i)=rowidx(i+1) - enddo - rowidx(pnt2+1)=j - nonzeros(pnt2+1)=s - endif - return - end -c -c ============================================================================= - -c Supernodal left looking, primer supernode loop (cache), -c Supernode update with indirect addressing -c Relative pivot tolerance -c ========================================================================== -c - subroutine mfactor(ecolpnt, - x vcstat,colpnt,rowidx,pivots,count,mut,nonzeros, - x diag,err,updat,list,index,dropn,slktyp, - x snhead,fpnt,invperm,nodtyp,dv,odiag) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - integer*4 err,list(mn),mut(mn),dropn - integer*4 ecolpnt(mn),vcstat(mn),colpnt(n1),rowidx(cfree) - integer*4 pivots(mn),count(mn),index(mn),slktyp(m) - integer*4 snhead(mn),fpnt(mn),invperm(mn),nodtyp(mn) - real*8 nonzeros(cfree),diag(mn),updat(mn),dv(m),odiag(mn) -c - common/factor/ tpiv1,tpiv2,tabs,trabs,lam,tfind,order,supdens - real*8 tpiv1,tpiv2,tabs,trabs,lam,tfind,order,supdens - common/numer/ tplus,tzer - real*8 tplus,tzer -c -------------------------------------------------------------------------- - integer*4 i,j,k,l,o,p,pnt1,pnt2,ppnt1,ppnt2,mk,col,kprew,rb, - x ppnode,prewnode,w1 - real*8 s,diap,diam - character*99 buff -c--------------------------------------------------------------------------- -C CMSSW: Explicit initialization needed - o=0 - - err=0 - w1=0 -c -c initialization -c - do 10 i=1,mn - list(i)=0 - index(i)=0 - updat(i)=0.0d+0 - fpnt(i)=0 - 10 continue -c -c initialize dll -c - do 15 i=1,n - if(vcstat(i).le.-2)goto 15 - k=ecolpnt(i) - if(k.le.nz)goto 15 - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - if(pnt1.le.pnt2)then - o=rowidx(pnt1) - fpnt(i)=index(o) - index(o)=i - list(i)=pnt1 - endif - 15 continue -c -c set the extra part of the matrix using a dll -c - do 20 col=1,pivotn - i=pivots(col) - pnt1=ecolpnt(i) - if(pnt1.le.nz)goto 20 - pnt2=count(i) - o=0 - if(i.le.n)then - if(vcstat(i).le.-2)goto 20 - ppnt1=list(i) - ppnt2=colpnt(i+1)-1 - do 18 j=ppnt1,ppnt2 - k=rowidx(j) - updat(k)=nonzeros(j) - o=o+1 - mut(o)=k - 18 continue - list(i)=ppnt2+1 - else - kprew=index(i) - if(kprew.eq.0)goto 25 - if(vcstat(i).le.-2)then - 21 mk=fpnt(kprew) - ppnt1=list(kprew)+1 - if(ppnt1.lt.colpnt(kprew+1))then - list(kprew)=ppnt1 - k=rowidx(ppnt1) - fpnt(kprew)=index(k) - index(k)=kprew - endif - kprew=mk - if(kprew.ne.0)goto 21 - else - 22 mk=fpnt(kprew) - ppnt1=list(kprew)+1 - if(ppnt1-colpnt(kprew+1))11,12,13 - 11 updat(kprew)=nonzeros(ppnt1-1) - list(kprew)=ppnt1 - k=rowidx(ppnt1) - fpnt(kprew)=index(k) - index(k)=kprew - o=o+1 - mut(o)=kprew - goto 13 - 12 updat(kprew)=nonzeros(ppnt1-1) - list(kprew)=ppnt1 - o=o+1 - mut(o)=kprew - 13 kprew=mk - if(kprew.ne.0)goto 22 - endif - endif -c -c set column i and delete updat -c - 25 do 23 j=pnt1,pnt2 - nonzeros(j)=updat(rowidx(j)) - 23 continue - do 26 j=1,o - updat(mut(j))=0 - 26 continue - 20 continue -c -c initialize for the computation -c - do 30 i=1,mn - mut(i)=0 - fpnt(i)=ecolpnt(i) - list(i)=0 - index(i)=0 - updat(i)=0.0 - 30 continue - ppnode=0 - prewnode=0 - i=0 -c -c loop for pivot columns -c - 100 i=i+1 - if(i.gt.pivotn)goto 60 - col=pivots(i) - ppnt1=ecolpnt(col) - ppnt2=count(col) -c -c step vcstat if relaxed -c - if(vcstat(col).le.-2)then - call colremv(i,col,mut,index,fpnt,count,pivots,invperm, - x snhead,nodtyp,rowidx,nonzeros,ppnode,prewnode) - do 75 j=ppnt1,ppnt2 - k=rowidx(j) - if((k.gt.n).or.(ecolpnt(k).le.nz))goto 75 - l=colpnt(k) - o=colpnt(k+1)-1 - do p=l,o - if(rowidx(p).eq.col)then - call move(p,o,rowidx,nonzeros) - goto 75 - endif - enddo - 75 continue - i=i-1 - if((ppnode.gt.0).and.(prewnode.eq.i))goto 110 - goto 100 - endif -c - if(ppnt1.le.nz)then - diag(col)=1.0d00/diag(col) - goto 180 - endif - kprew=index(col) -c -c repack a column -c - do k=ppnt1,ppnt2 - updat(rowidx(k))=nonzeros(k) - enddo - if(col.le.n)then - diam=diag(col) - diap=0.0d+0 - else - diap=diag(col) - diam=0.0d+0 - endif - 130 if(kprew)129,150,131 -c -c Standard transformation -c - 131 k=mut(kprew) - pnt1=fpnt(kprew) - pnt2=count(kprew) - if(pnt1.lt.pnt2)then - o=rowidx(pnt1+1) - mut(kprew)=index(o) - index(o)=kprew - endif - pnt1=pnt1+1 - fpnt(kprew)=pnt1 - s=-nonzeros(pnt1-1)*diag(kprew) - if(kprew.le.n)then - diap=diap+s*nonzeros(pnt1-1) - else - diam=diam+s*nonzeros(pnt1-1) - endif - do 170 o=pnt1,pnt2 - updat(rowidx(o))=updat(rowidx(o))+s*nonzeros(o) - 170 continue - kprew=k - goto 130 -c -c supernodal transformation -c - 129 kprew=-kprew - k=mut(kprew) - p=invperm(kprew) - pnt1=fpnt(kprew)+1 - if(pnt1.le.count(kprew))then - o=rowidx(pnt1) - mut(kprew)=index(o) - index(o)=-kprew - endif - if(kprew.le.n)then - call cspnd(p,snhead(p),diag,nonzeros, - x fpnt,count,pivots,updat,diap,rowidx(pnt1)) - else - call cspnd(p,snhead(p),diag,nonzeros, - x fpnt,count,pivots,updat,diam,rowidx(pnt1)) - endif - kprew=k - goto 130 -c -c pack a column -c - 150 do k=ppnt1,ppnt2 - nonzeros(k)=updat(rowidx(k)) - enddo -c -c set up diag -c - if((ppnode.le.0).or.(prewnode.ne.snhead(i)))then - diap=diap+diam - diam=max(trabs,abs(diam*trabs)) - if(abs(diap).lt.diam)then - call rngchk(rowidx,nonzeros,ecolpnt(col),count(col), - x vcstat,rb,diag,slktyp,dropn,col,dv,diap,w1,odiag(col)) - if(rb.ne.0)err=1 - diag(col)=diap - if(vcstat(col).le.-2)goto 100 - else - diag(col)=1.0d00/diap - endif - else - diag(col)=diam - updat(col)=diap - endif -c -c Transformation in (primer) supernode -c - 110 if(prewnode.eq.i)then - if(ppnode.gt.0)then - do j=ppnode+1,i - o=j-1 - p=pivots(j) - call cspnode(ppnode,o,diag,nonzeros,fpnt,count,pivots, - x nonzeros(ecolpnt(p)),diag(p)) - diam=max(trabs,abs(diag(p)*trabs)) - diag(p)=diag(p)+updat(p) - if(abs(diag(p)).lt.diam)then - call rngchk(rowidx,nonzeros,ecolpnt(p),count(p), - x vcstat,rb,diag,slktyp,dropn,p,dv,diag(p),w1,odiag(p)) - if(rb.ne.0)err=1 - else - diag(p)=1.0d+0/diag(p) - endif - enddo - endif - ppnode=0 - endif -c -c Update the linked list -c - 180 if(snhead(i).eq.0)then - ppnode=0 - if(ppnt1.le.ppnt2)then - j=rowidx(ppnt1) - mut(col)=index(j) - index(j)=col - endif - prewnode=0 - else - if(prewnode.ne.snhead(i))then - prewnode=snhead(i) - if(nodtyp(i).gt.0)then - ppnode=i - else - ppnode=-i - endif - if(ecolpnt(pivots(prewnode)).le.count(pivots(prewnode)))then - j=rowidx(ecolpnt(pivots(prewnode))) - mut(col)=index(j) - index(j)=-col - endif - endif - endif -c -c end of the main loop -c - goto 100 -c -c end of mfactor -c - 60 if(w1.gt.0)then - write(buff,'(1x,a,i6)')'Total warnings of row dependencies:',w1 - call mprnt(buff) - endif - return - end -c -c ============================================================================= -c ============================================================================= -c - subroutine rngchk(rowidx,nonzeros,pnt1,pnt2, - x vcstat,rb,diag,slktyp,dropn,col,dv,dia,w1,odia) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - common/numer/ tplus,tzer - real*8 tplus,tzer -c - integer*4 pnt1,pnt2,rowidx(cfree),vcstat(mn),rb, - x slktyp(m),dropn,col - real*8 nonzeros(cfree),diag(mn),dv(m),dia,odia -c - integer*4 i,j,w1,wignore - character*99 buff -c -c -------------------------------------------------------------------------- -c - wignore=5 - rb=0 - if(col.le.n)then - if(diag(col).lt.0)then - dia=-1.0d+12 - odia=odia+1.0d+00/dia - else - dia=+1.0d+12 - odia=odia+1.0d+00/dia - endif - else - dia=0.0d+0 -c -c Check for modification columns -c - do 10 i=pnt1,pnt2 - j=rowidx(i) - if((vcstat(j).le.-2).or.(j.gt.n))goto 10 - if(abs(nonzeros(i)).lt.tzer)goto 10 -ccc dia=+1.0+10 -ccc odia=odia+1.0d+00/dia - rb=1 - vcstat(col)=-1 - goto 20 - 10 continue -c -c Dependent row, relax only if the dual variable is zero ! -c - if(abs(dv(col-n)).lt.tzer)then - vcstat(col)=-2 - dropn=dropn+1 - w1=w1+1 - if(w1.le.wignore)then - write(buff,'(1x,a,i5,a,i6)') - x 'WARNING : Row DROPPED ',col-n,' Type:',slktyp(col-n) - call mprnt(buff) - endif - endif - endif - 20 return - end -c -c ========================================================================== -c nem relativ nullazassal -c ========================================================================== -c - subroutine augftr(ecolpnt, - x vcstat,rowidx,pivots,count,nonzeros,diag,vector) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - integer*4 ecolpnt(mn),vcstat(mn),rowidx(cfree) - integer*4 pivots(mn),count(mn) - real*8 nonzeros(cfree),diag(mn),vector(mn) -c - common/numer/ tplus,tzer - real*8 tplus,tzer -c -------------------------------------------------------------------------- - integer*4 i,j,pnt1,pnt2,col,o - real*8 val -c--------------------------------------------------------------------------- - do i=1,pivotn - col=pivots(i) - if (vcstat(col).gt.-2)then - val=vector(col)*diag(col) - if(abs(val).gt.tzer)then - pnt1=ecolpnt(col) - pnt2=count(col) - do j=pnt1,pnt2 - o=rowidx(j) - vector(o)=vector(o)-val*nonzeros(j) - enddo - endif - endif - enddo - do i=1,mn - if(vcstat(i).le.-2)vector(i)=0 - enddo - return - end -c -c ========================================================================== -c - subroutine augbtr(ecolpnt, - x vcstat,rowidx,pivots,count,nonzeros,diag,vector) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - integer*4 ecolpnt(mn),vcstat(mn),rowidx(cfree) - integer*4 pivots(mn),count(mn) - real*8 nonzeros(cfree),diag(mn),vector(mn) - common/numer/ tplus,tzer - real*8 tplus,tzer -c -------------------------------------------------------------------------- - integer*4 i,j,col,pnt1,pnt2 - real*8 sol -c--------------------------------------------------------------------------- -c - do i=1,pivotn - col=pivots(pivotn+1-i) - if(vcstat(col).gt.-2)then - sol=vector(col) - pnt1=ecolpnt(col) - pnt2=count(col) - do j=pnt1,pnt2 - sol=sol-nonzeros(j)*vector(rowidx(j)) - enddo - vector(col)=sol*diag(col) - endif - enddo - return - end -c ========================================================================== -c Multi predictor-corrector direction -c L2 norm -c =========================================================================== -c - subroutine citref(diag,odiag,pivots,rowidx,nonzeros,colpnt, - x ecolpnt,count,vcstat,xrhs,rwork1,rwork2,rwork3, - x bounds,xs,up,vartyp,slktyp) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - common/numer/ tplus,tzer - real*8 tplus,tzer - common/itref/ tresx,tresy,maxref - real*8 tresx,tresy - integer*4 maxref -c - integer*4 ecolpnt(mn),count(mn),rowidx(cfree), - x pivots(mn),colpnt(n1),vcstat(mn),vartyp(n),slktyp(m) - real*8 diag(mn),odiag(mn),nonzeros(cfree),xrhs(mn), - x rwork1(mn),rwork2(mn),rwork3(mn),bounds(mn),xs(mn),up(mn) -c -c --------------------------------------------------------------------------- -c - integer*4 i,j,pnt1,pnt2,refn - real*8 maxrx,maxry,sx,sol,l2,ol2 -c -c --------------------------------------------------------------------------- -c -c Simple case : No refinement -c - if(maxref.le.0)then - call augftr(ecolpnt,vcstat,rowidx,pivots,count,nonzeros, - x diag,xrhs) - call augbtr(ecolpnt,vcstat,rowidx,pivots,count,nonzeros, - x diag,xrhs) - goto 999 - endif - do i=1,mn - rwork1(i)=xrhs(i) - enddo - ol2=1.0d+0/tzer - do i=1,mn - rwork3(i)=0.0d+0 - enddo - refn=-1 -c -c Main loop -c - 10 refn=refn+1 - call augftr(ecolpnt,vcstat,rowidx,pivots,count,nonzeros, - x diag,xrhs) - call augbtr(ecolpnt,vcstat,rowidx,pivots,count,nonzeros, - x diag,xrhs) - do i=1,mn - xrhs(i)=xrhs(i)+rwork3(i) - enddo -c -c Compute the residuals -c - l2=0.0d+0 - maxrx=0.0d+0 - maxry=0.0d+0 - do i=1,mn - rwork2(i)=rwork1(i)-odiag(i)*xrhs(i) - enddo - do i=1,n - if(vcstat(i).gt.-2)then - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - sx=xrhs(i) - sol=rwork2(i) - do j=pnt1,pnt2 - rwork2(rowidx(j))=rwork2(rowidx(j))-nonzeros(j)*sx - sol=sol-nonzeros(j)*xrhs(rowidx(j)) - enddo - rwork2(i)=sol - if(maxry.lt.abs(sol))maxry=abs(sol) - l2=l2+sol*sol - endif - enddo - do i=1,m - if(vcstat(i+n).gt.-2)then - if(maxrx.lt.abs(rwork2(i+n)))maxrx=abs(rwork2(i+n)) - l2=l2+rwork2(i+n)*rwork2(i+n) - endif - enddo - l2=sqrt(l2) - if(l2.ge.ol2)then - do i=1,mn - xrhs(i)=rwork3(i) - enddo - else - if((maxrx.gt.tresx).or.(maxry.gt.tresy))then - if(refn.lt.maxref)then - ol2=l2 - do i=1,mn - rwork3(i)=xrhs(i) - xrhs(i)=rwork2(i) - enddo - goto 10 - endif - endif - endif -c -c End of the main loop, reset work3 (upinf)=bounds-xs-up -c - do i=1,mn - if(vcstat(i).gt.-2)then - if(i.le.n)then - j=vartyp(i) - else - j=slktyp(i-n) - endif - if(j.lt.0)then - sol=bounds(i)-xs(i)-up(i) - else - sol=0.0d+0 - endif - else - sol=0.0d+0 - endif - rwork3(i)=sol - enddo -c -c return -c - 999 return - end -c -c ============================================================================ -c 6 way loop unrolling -c -c ============================================================================ -c - subroutine cspnode(firstc,lastc,diag,nonzeros, - x fpnt,count,pivots,knz,dia) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - integer*4 firstc,lastc,fpnt(mn),count(mn),pivots(mn) - real*8 diag(mn),nonzeros(cfree),knz(mn),dia -c - integer*4 pnt11,pnt12,pnt13,pnt14,pnt15,pnt16, - x col1,col2,col3,col4,col5,col6,frs,j,pnt2 - real*8 s1,s2,s3,s4,s5,s6 -c -c compute -c - frs=firstc -c - 99 if(lastc-2-frs) 98,30,97 - 98 if(lastc-frs) 999,10,20 - 97 if(lastc-4-frs) 40,50,60 -c -c -c - 60 col1=pivots(frs) - col2=pivots(frs+1) - col3=pivots(frs+2) - col4=pivots(frs+3) - col5=pivots(frs+4) - col6=pivots(frs+5) - pnt11=fpnt(col1) - pnt12=fpnt(col2) - pnt13=fpnt(col3) - pnt14=fpnt(col4) - pnt15=fpnt(col5) - pnt16=fpnt(col6) - pnt2=count(col1)-pnt11 - fpnt(col1)=pnt11+1 - fpnt(col2)=pnt12+1 - fpnt(col3)=pnt13+1 - fpnt(col4)=pnt14+1 - fpnt(col5)=pnt15+1 - fpnt(col6)=pnt16+1 - s1=-nonzeros(pnt11)*diag(col1) - s2=-nonzeros(pnt12)*diag(col2) - s3=-nonzeros(pnt13)*diag(col3) - s4=-nonzeros(pnt14)*diag(col4) - s5=-nonzeros(pnt15)*diag(col5) - s6=-nonzeros(pnt16)*diag(col6) - dia=dia+ - x nonzeros(pnt11)*s1+nonzeros(pnt12)*s2+ - x nonzeros(pnt13)*s3+nonzeros(pnt14)*s4+ - x nonzeros(pnt15)*s5+nonzeros(pnt16)*s6 - do j=1,pnt2 - knz(j)=knz(j)+ - x nonzeros(pnt11+j)*s1+nonzeros(pnt12+j)*s2+ - x nonzeros(pnt13+j)*s3+nonzeros(pnt14+j)*s4+ - x nonzeros(pnt15+j)*s5+nonzeros(pnt16+j)*s6 - enddo - frs=frs+6 - goto 99 -c -c -c - 50 col1=pivots(frs) - col2=pivots(frs+1) - col3=pivots(frs+2) - col4=pivots(frs+3) - col5=pivots(frs+4) - pnt11=fpnt(col1) - pnt12=fpnt(col2) - pnt13=fpnt(col3) - pnt14=fpnt(col4) - pnt15=fpnt(col5) - pnt2=count(col1)-pnt11 - fpnt(col1)=pnt11+1 - fpnt(col2)=pnt12+1 - fpnt(col3)=pnt13+1 - fpnt(col4)=pnt14+1 - fpnt(col5)=pnt15+1 - s1=-nonzeros(pnt11)*diag(col1) - s2=-nonzeros(pnt12)*diag(col2) - s3=-nonzeros(pnt13)*diag(col3) - s4=-nonzeros(pnt14)*diag(col4) - s5=-nonzeros(pnt15)*diag(col5) - dia=dia+ - x nonzeros(pnt11)*s1+nonzeros(pnt12)*s2+ - x nonzeros(pnt13)*s3+nonzeros(pnt14)*s4+ - x nonzeros(pnt15)*s5 - do j=1,pnt2 - knz(j)=knz(j)+ - x nonzeros(pnt11+j)*s1+nonzeros(pnt12+j)*s2+ - x nonzeros(pnt13+j)*s3+nonzeros(pnt14+j)*s4+ - x nonzeros(pnt15+j)*s5 - enddo - goto 999 -c -c -c - 40 col1=pivots(frs) - col2=pivots(frs+1) - col3=pivots(frs+2) - col4=pivots(frs+3) - pnt11=fpnt(col1) - pnt12=fpnt(col2) - pnt13=fpnt(col3) - pnt14=fpnt(col4) - pnt2=count(col1)-pnt11 - fpnt(col1)=pnt11+1 - fpnt(col2)=pnt12+1 - fpnt(col3)=pnt13+1 - fpnt(col4)=pnt14+1 - s1=-nonzeros(pnt11)*diag(col1) - s2=-nonzeros(pnt12)*diag(col2) - s3=-nonzeros(pnt13)*diag(col3) - s4=-nonzeros(pnt14)*diag(col4) - dia=dia+ - x nonzeros(pnt11)*s1+nonzeros(pnt12)*s2+ - x nonzeros(pnt13)*s3+nonzeros(pnt14)*s4 - do j=1,pnt2 - knz(j)=knz(j)+ - x nonzeros(pnt11+j)*s1+nonzeros(pnt12+j)*s2+ - x nonzeros(pnt13+j)*s3+nonzeros(pnt14+j)*s4 - enddo - goto 999 -c -c -c - 30 col1=pivots(frs) - col2=pivots(frs+1) - col3=pivots(frs+2) - pnt11=fpnt(col1) - pnt12=fpnt(col2) - pnt13=fpnt(col3) - pnt2=count(col1)-pnt11 - fpnt(col1)=pnt11+1 - fpnt(col2)=pnt12+1 - fpnt(col3)=pnt13+1 - s1=-nonzeros(pnt11)*diag(col1) - s2=-nonzeros(pnt12)*diag(col2) - s3=-nonzeros(pnt13)*diag(col3) - dia=dia+ - x nonzeros(pnt11)*s1+nonzeros(pnt12)*s2+ - x nonzeros(pnt13)*s3 - do j=1,pnt2 - knz(j)=knz(j)+ - x nonzeros(pnt11+j)*s1+nonzeros(pnt12+j)*s2+ - x nonzeros(pnt13+j)*s3 - enddo - goto 999 -c -c -c - 20 col1=pivots(frs) - col2=pivots(frs+1) - pnt11=fpnt(col1) - pnt12=fpnt(col2) - pnt2=count(col1)-pnt11 - fpnt(col1)=pnt11+1 - fpnt(col2)=pnt12+1 - s1=-nonzeros(pnt11)*diag(col1) - s2=-nonzeros(pnt12)*diag(col2) - dia=dia+ - x nonzeros(pnt11)*s1+nonzeros(pnt12)*s2 - do j=1,pnt2 - knz(j)=knz(j)+ - x nonzeros(pnt11+j)*s1+nonzeros(pnt12+j)*s2 - enddo - goto 999 -c -c -c - 10 col1=pivots(frs) - pnt11=fpnt(col1) - pnt2=count(col1)-pnt11 - fpnt(col1)=pnt11+1 - s1=-nonzeros(pnt11)*diag(col1) - dia=dia+ - x nonzeros(pnt11)*s1 - do j=1,pnt2 - knz(j)=knz(j)+ - x nonzeros(pnt11+j)*s1 - enddo -c - 999 return - end -c -c ========================================================================== -c 6 way loop unrolling -c -c ============================================================================ -c - subroutine cspnd(firstc,lastc,diag,nonzeros, - x fpnt,count,pivots,knz,dia,index) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - integer*4 firstc,lastc,fpnt(mn),count(mn),pivots(mn),index(mn) - real*8 diag(mn),nonzeros(cfree),knz(mn),dia -c - integer*4 pnt11,pnt12,pnt13,pnt14,pnt15,pnt16, - x col1,col2,col3,col4,col5,col6,frs,j,pnt2 - real*8 s1,s2,s3,s4,s5,s6 -c -c compute -c - frs=firstc -c - 99 if(lastc-2-frs) 98,30,97 - 98 if(lastc-frs) 999,10,20 - 97 if(lastc-4-frs) 40,50,60 -c -c -c - 60 col1=pivots(frs) - col2=pivots(frs+1) - col3=pivots(frs+2) - col4=pivots(frs+3) - col5=pivots(frs+4) - col6=pivots(frs+5) - pnt11=fpnt(col1) - pnt12=fpnt(col2) - pnt13=fpnt(col3) - pnt14=fpnt(col4) - pnt15=fpnt(col5) - pnt16=fpnt(col6) - pnt2=count(col1)-pnt11 - fpnt(col1)=pnt11+1 - fpnt(col2)=pnt12+1 - fpnt(col3)=pnt13+1 - fpnt(col4)=pnt14+1 - fpnt(col5)=pnt15+1 - fpnt(col6)=pnt16+1 - s1=-nonzeros(pnt11)*diag(col1) - s2=-nonzeros(pnt12)*diag(col2) - s3=-nonzeros(pnt13)*diag(col3) - s4=-nonzeros(pnt14)*diag(col4) - s5=-nonzeros(pnt15)*diag(col5) - s6=-nonzeros(pnt16)*diag(col6) - dia=dia+ - x nonzeros(pnt11)*s1+nonzeros(pnt12)*s2+ - x nonzeros(pnt13)*s3+nonzeros(pnt14)*s4+ - x nonzeros(pnt15)*s5+nonzeros(pnt16)*s6 - do j=1,pnt2 - knz(index(j))=knz(index(j))+ - x nonzeros(pnt11+j)*s1+nonzeros(pnt12+j)*s2+ - x nonzeros(pnt13+j)*s3+nonzeros(pnt14+j)*s4+ - x nonzeros(pnt15+j)*s5+nonzeros(pnt16+j)*s6 - enddo - frs=frs+6 - goto 99 -c -c -c - 50 col1=pivots(frs) - col2=pivots(frs+1) - col3=pivots(frs+2) - col4=pivots(frs+3) - col5=pivots(frs+4) - pnt11=fpnt(col1) - pnt12=fpnt(col2) - pnt13=fpnt(col3) - pnt14=fpnt(col4) - pnt15=fpnt(col5) - pnt2=count(col1)-pnt11 - fpnt(col1)=pnt11+1 - fpnt(col2)=pnt12+1 - fpnt(col3)=pnt13+1 - fpnt(col4)=pnt14+1 - fpnt(col5)=pnt15+1 - s1=-nonzeros(pnt11)*diag(col1) - s2=-nonzeros(pnt12)*diag(col2) - s3=-nonzeros(pnt13)*diag(col3) - s4=-nonzeros(pnt14)*diag(col4) - s5=-nonzeros(pnt15)*diag(col5) - dia=dia+ - x nonzeros(pnt11)*s1+nonzeros(pnt12)*s2+ - x nonzeros(pnt13)*s3+nonzeros(pnt14)*s4+ - x nonzeros(pnt15)*s5 - do j=1,pnt2 - knz(index(j))=knz(index(j))+ - x nonzeros(pnt11+j)*s1+nonzeros(pnt12+j)*s2+ - x nonzeros(pnt13+j)*s3+nonzeros(pnt14+j)*s4+ - x nonzeros(pnt15+j)*s5 - enddo - goto 999 -c -c -c - 40 col1=pivots(frs) - col2=pivots(frs+1) - col3=pivots(frs+2) - col4=pivots(frs+3) - pnt11=fpnt(col1) - pnt12=fpnt(col2) - pnt13=fpnt(col3) - pnt14=fpnt(col4) - pnt2=count(col1)-pnt11 - fpnt(col1)=pnt11+1 - fpnt(col2)=pnt12+1 - fpnt(col3)=pnt13+1 - fpnt(col4)=pnt14+1 - s1=-nonzeros(pnt11)*diag(col1) - s2=-nonzeros(pnt12)*diag(col2) - s3=-nonzeros(pnt13)*diag(col3) - s4=-nonzeros(pnt14)*diag(col4) - dia=dia+ - x nonzeros(pnt11)*s1+nonzeros(pnt12)*s2+ - x nonzeros(pnt13)*s3+nonzeros(pnt14)*s4 - do j=1,pnt2 - knz(index(j))=knz(index(j))+ - x nonzeros(pnt11+j)*s1+nonzeros(pnt12+j)*s2+ - x nonzeros(pnt13+j)*s3+nonzeros(pnt14+j)*s4 - enddo - goto 999 -c -c -c - 30 col1=pivots(frs) - col2=pivots(frs+1) - col3=pivots(frs+2) - pnt11=fpnt(col1) - pnt12=fpnt(col2) - pnt13=fpnt(col3) - pnt2=count(col1)-pnt11 - fpnt(col1)=pnt11+1 - fpnt(col2)=pnt12+1 - fpnt(col3)=pnt13+1 - s1=-nonzeros(pnt11)*diag(col1) - s2=-nonzeros(pnt12)*diag(col2) - s3=-nonzeros(pnt13)*diag(col3) - dia=dia+ - x nonzeros(pnt11)*s1+nonzeros(pnt12)*s2+ - x nonzeros(pnt13)*s3 - do j=1,pnt2 - knz(index(j))=knz(index(j))+ - x nonzeros(pnt11+j)*s1+nonzeros(pnt12+j)*s2+ - x nonzeros(pnt13+j)*s3 - enddo - goto 999 -c -c -c - 20 col1=pivots(frs) - col2=pivots(frs+1) - pnt11=fpnt(col1) - pnt12=fpnt(col2) - pnt2=count(col1)-pnt11 - fpnt(col1)=pnt11+1 - fpnt(col2)=pnt12+1 - s1=-nonzeros(pnt11)*diag(col1) - s2=-nonzeros(pnt12)*diag(col2) - dia=dia+ - x nonzeros(pnt11)*s1+nonzeros(pnt12)*s2 - do j=1,pnt2 - knz(index(j))=knz(index(j))+ - x nonzeros(pnt11+j)*s1+nonzeros(pnt12+j)*s2 - enddo - goto 999 -c -c -c - 10 col1=pivots(frs) - pnt11=fpnt(col1) - pnt2=count(col1)-pnt11 - fpnt(col1)=pnt11+1 - s1=-nonzeros(pnt11)*diag(col1) - dia=dia+ - x nonzeros(pnt11)*s1 - do j=1,pnt2 - knz(index(j))=knz(index(j))+ - x nonzeros(pnt11+j)*s1 - enddo -c - 999 return - end -c -c ========================================================================== -c =========================================================================== -c - subroutine supnode(ecolpnt,count,rowidx,vcstat,pivots, - x snhead,invperm,nodtyp) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - common/sprnod/ psupn,ssupn,maxsnz - integer*4 psupn,ssupn,maxsnz -c - integer*4 ecolpnt(mn),count(mn),rowidx(cfree),vcstat(mn), - x pivots(mn),snhead(mn),invperm(mn),nodtyp(mn) -c - integer*4 i,j,k,l,i1,i2,ppnt1,ppnt2,pnt1,pnt2,pcol,col,snmode - integer*4 sn1,sn2,ss1,ss2,supnz - character*99 buff -c - 1 format(1x,'Supernodes :',i12,' ',i12) - 2 format(1x,'Supernodal cols. :',i12,' ',i12) - 3 format(1x,'Dense window :',i12) -c -C CMSSW: Explicit initialization needed - j=0 - - do i=1,mn - snhead(i)=0 - invperm(i)=0 - nodtyp(mn)=0 - enddo - do i=1,pivotn - invperm(pivots(i))=i - enddo - sn1=0 - sn2=0 - ss1=0 - ss2=0 - pnt1=1 - pnt2=0 - i=0 - 10 i=i+1 - if(i.le.pivotn)then - pcol=pivots(i) - if(vcstat(pcol).gt.-2)then - j=0 - ppnt1=ecolpnt(pcol) - ppnt2=count(pcol) - k=i+1 - snmode=1 - supnz=pnt2-pnt1+1 - 20 if((k.le.pivotn).and.(ppnt1.le.ppnt2))then - col=pivots(k) - pnt1=ecolpnt(col) - pnt2=count(col) - supnz=supnz+pnt2-pnt1+1 - if(((ppnt2-ppnt1-pnt2+pnt1).eq.1).and.(supnz.lt.maxsnz))then - if(col.ne.rowidx(ppnt1))goto 30 - i2=ppnt1+1 - i1=pnt1 - 40 if(i1.le.pnt2)then - if(rowidx(i1).ne.rowidx(i2))goto 30 - i1=i1+1 - i2=i2+1 - goto 40 - endif - k=k+1 - ppnt1=ppnt1+1 - goto 20 - endif - endif - 30 if(k.eq.i+1)then - snmode=-1 - supnz=pnt2-pnt1+1 - 25 if((k.le.pivotn).and.(ppnt1.le.ppnt2))then - col=pivots(k) - pnt1=ecolpnt(col) - pnt2=count(col) - supnz=supnz+pnt2-pnt1+1 - if((ppnt2-ppnt1.eq.pnt2-pnt1).and.(supnz.le.maxsnz))then - i2=ppnt1 - i1=pnt1 - 45 if(i1.le.pnt2)then - if(rowidx(i1).ne.rowidx(i2))goto 35 - i1=i1+1 - i2=i2+1 - goto 45 - endif - k=k+1 - goto 25 - endif - endif - endif - 35 if(snmode.eq.1)then - denwin=k-i - if((k-i).lt.psupn)goto 10 - sn1=sn1+1 - ss1=ss1+(k-i) - j=sn1 - else - if((k-i).lt.ssupn)goto 10 - sn2=sn2+1 - ss2=ss2+(k-i) - j=-sn2 - endif - do l=i,k-1 - snhead(l)=j - nodtyp(l)=j - enddo - i=k-1 - endif - goto 10 - endif - write(buff,1)sn1,sn2 - call mprnt(buff) - write(buff,2)ss1,ss2 - call mprnt(buff) - write(buff,3)denwin - call mprnt(buff) - k=0 - do i=pivotn,1,-1 - if(snhead(i).ne.0)then - if(k.ne.snhead(i))then - j=i - k=snhead(i) - endif - snhead(i)=j - else - k=0 - endif - enddo - return - end -c -c ============================================================================ -c Update supernode partitions after column fixing -c (only in the sparse part of the constraint matrix) -c ============================================================================= -c - subroutine supupd(pivots,invperm,snhead,nodtyp,vcstat, - x ecolpnt) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - integer*4 pivots(mn),invperm(mn),snhead(mn),nodtyp(mn), - x ecolpnt(mn),vcstat(mn) -c - integer*4 i,j,k -c -c Make changes : Compress pivots,nodetyp,snhead -c - i=1 - j=0 - 10 if(i.le.pivotn)then - k=pivots(i) - if((ecolpnt(k).gt.nz).or.(vcstat(k).gt.-2))then - j=j+1 - pivots(j)=pivots(i) - snhead(j)=snhead(i) - nodtyp(j)=nodtyp(i) - endif - invperm(i)=j - i=i+1 - goto 10 - endif - pivotn=j -c -c Change snhead -c - do j=1,pivotn - if(snhead(j).gt.0)snhead(j)=invperm(snhead(j)) - enddo -c -c Create new invperm -c - do j=1,pivotn - invperm(pivots(j))=j - enddo - return - end -c -c ============================================================================= -c Computing the starting point xs,up in the primal space, -c dv, dspr,dsup in the dual space. -c -c =========================================================================== -c - subroutine initsol(xs,up,dv,dspr,dsup,rhs,obj,bounds,vartyp, - x slktyp,vcstat,colpnt,ecolpnt,pivots,rowidx,nonzeros,diag, - x updat1,count) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - common/initv/ prmin,upmax,dumin,stamet,safmet,premet,regul - real*8 prmin,upmax,dumin - integer*4 stamet,safmet,premet,regul -c - common/mscal/ varadd,slkadd,scfree - real*8 varadd,slkadd,scfree -c - common/numer/ tplus,tzer - real*8 tplus,tzer -c - integer*4 ecolpnt(mn),vcstat(mn),colpnt(n1),rowidx(cfree), - x pivots(mn),vartyp(n),slktyp(m),count(mn) - real*8 xs(mn),up(mn),dv(m),dspr(mn),dsup(mn),rhs(m),obj(n), - x bounds(mn),diag(mn),updat1(mn),nonzeros(cfree) -c - integer*4 i,j,pnt1,pnt2 - real*8 sol,sb,spr,sdu,prlo,dulo,ngap - logical addall -c -c --------------------------------------------------------------------------- -c -c Reset all values -c - do i=1,mn - xs(i)=0.0d+0 - up(i)=0.0d+0 - dspr(i)=0.0d+0 - dsup(i)=0.0d+0 - if(i.le.m)dv(i)=0.0d+0 - enddo -c -c RHS for XS ans UP -c - do i=1,m - if(slktyp(i).lt.0)then - if(bounds(i+n).gt.upmax)then - sol=upmax/2 - else - sol=bounds(i+n)/2 - endif - else - sol=0.0d+0 - endif - updat1(i+n)=rhs(i)+sol - enddo - do i=1,n - if(vartyp(i).lt.0)then - if(bounds(i).gt.upmax)then - sol=-upmax - else - sol=-bounds(i) - endif - else - sol=0.0d+0 - endif - updat1(i)=sol - enddo -c - call augftr(ecolpnt, - x vcstat,rowidx,pivots,count,nonzeros,diag,updat1) - call augbtr(ecolpnt, - x vcstat,rowidx,pivots,count,nonzeros,diag,updat1) -c -c Initial values for xs, up -c - do i=1,n - if(vcstat(i).gt.-2)then - xs(i)=updat1(i) - if(vartyp(i).lt.0)then - up(i)=bounds(i)-xs(i) - endif - endif - enddo - do i=1,m - j=i+n - if((vcstat(j).gt.-2).and.(slktyp(i).ne.0))then - xs(j)=-updat1(j) - if(slktyp(i).lt.0)then - xs(j)=(bounds(j)-updat1(j))/2 - up(j)=bounds(j)-xs(j) - endif - endif - enddo -c -c Initial dual variables, stamet=2 -c - if(stamet.eq.1)then - do i=1,m - dv(i)=0 - dspr(i+n)=0 - dsup(i+n)=0 - enddo - do i=1,n - if((vcstat(i).gt.-2).and.(vartyp(i).ne.0))then - if(vartyp(i).lt.0)then - dspr(i)=obj(i)/2 - dsup(i)=-obj(i)/2 - else - dspr(i)=obj(i) - endif - endif - enddo - else if(stamet.eq.2)then - do i=1,m - updat1(i+n)=0.0d+0 - enddo - do i=1,n - updat1(i)=obj(i) - enddo - call augftr(ecolpnt, - x vcstat,rowidx,pivots,count,nonzeros,diag,updat1) - call augbtr(ecolpnt, - x vcstat,rowidx,pivots,count,nonzeros,diag,updat1) - do i=1,m - if(vcstat(i+n).gt.-2)then - dv(i)=updat1(i+n) - else - dv(i)=0.0d+0 - endif - if(slktyp(i).ne.0)then - dspr(i+n)=-dv(i) - if(slktyp(i).lt.0)then - dspr(i+n)=-dv(i)/2 - dsup(i+n)=dv(i)/2 - endif - endif - enddo - do i=1,n - if((vcstat(i).gt.-2).and.(vartyp(i).ne.0))then - if(vartyp(i).lt.0)then - dspr(i)=-updat1(i) - dsup(i)=updat1(i) - else - dspr(i)=-updat1(i) - endif - endif - enddo - endif -c -c Compute prmin,dumin -c - if(safmet.lt.0)then - safmet=-safmet - addall=.true. - else - addall=.false. - endif -c -c Marsten et al. -c - if(safmet.eq.2)then - do i=1,m - updat1(i)=0 - enddo - do i=1,n - if(vcstat(i).gt.-2)then - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - sol=0.0d+0 - sb=obj(i) - do j=pnt1,pnt2 - if(vcstat(rowidx(j)).gt.-2)then - sol=sol+rhs(rowidx(j)-n)*nonzeros(j) - updat1(rowidx(j)-n)=updat1(rowidx(j)-n)+nonzeros(j)*sb - endif - enddo - if(prmin.lt.sol)prmin=sol - endif - enddo - do i=1,m - if(dumin.lt.abs(updat1(i)))dumin=abs(updat1(i)) - enddo - endif -c -c Mehrotra -c - if(safmet.eq.3)then - spr=1.0d+0/tzer - sdu=1.0d+0/tzer - do i=1,mn - if(i.le.n)then - j=vartyp(i) - else - j=slktyp(i-n) - endif - if((vcstat(i).gt.-2).and.(j.ne.0))then - if(spr.gt.xs(i))spr=xs(i) - if(sdu.gt.dspr(i))sdu=dspr(i) - if(j.lt.0)then - if(spr.gt.up(i))spr=up(i) - if(sdu.gt.dsup(i))sdu=dsup(i) - endif - endif - enddo - spr=-1.5d+0*spr - sdu=-1.5d+0*sdu - if(spr.lt.0.001d+0)spr=0.001d+0 - if(sdu.lt.0.001d+0)sdu=0.001d+0 - prlo=0.0d+0 - dulo=0.0d+0 - ngap=0.0d+0 - do i=1,mn - if(i.le.n)then - j=vartyp(i) - else - j=slktyp(i-n) - endif - if((vcstat(i).gt.-2).and.(j.ne.0))then - sol=xs(i)+spr - sb=dspr(i)+sdu - ngap=ngap+sol*sb - prlo=prlo+sol - dulo=dulo+sb - if(j.lt.0)then - sol=up(i)+spr - sb=dsup(i)+sdu - ngap=ngap+sol*sb - prlo=prlo+sol - dulo=dulo+sb - endif - endif - enddo - prmin=spr+0.5d+0*ngap/dulo - dumin=sdu+0.5d+0*ngap/prlo - endif - if(addall.and.(safmet.lt.3))then - sol=1.0d+0/tzer - sb=1.0d+0/tzer - do i=1,mn - if(vcstat(i).gt.-2)then - if(i.le.n)then - j=vartyp(i) - else - j=slktyp(i-n) - endif - if(j.ne.0)then - if(sol.gt.xs(i))sol=xs(i) - if(sb.gt.dspr(i))sb=dspr(i) - endif - if(j.lt.0)then - if(sol.gt.up(i))sol=up(i) - if(sb.gt.dsup(i))sb=dsup(i) - endif - endif - enddo - if(sol.lt.0)prmin=prmin-sol - if(sb.lt.0)dumin=dumin-sb - endif -c -c Correcting -c - if(addall)then - spr=1.0d+0/tzer - sdu=1.0d+0/tzer - sol=1.0d+0 - else - spr=prmin - sdu=dumin - sol=0.0d+0 - endif - do i=1,mn - if(vcstat(i).gt.-2)then - if(i.le.n)then - j=vartyp(i) - else - j=slktyp(i-n) - endif - if(j.ne.0)then - if(xs(i).lt.spr)then - xs(i)=sol*xs(i)+prmin - endif - if(dspr(i).lt.sdu)then - dspr(i)=sol*dspr(i)+dumin - endif - if(j.lt.0)then - if(up(i).lt.spr)then - up(i)=sol*up(i)+prmin - endif - if(dsup(i).lt.sdu)then - dsup(i)=sol*dsup(i)+dumin - endif - endif - endif - endif - enddo -c - return - end -c -c =========================================================================== -c -c Set up the initial scaling matrix -c (for the computation of the initial solution) -c - subroutine fscale(vcstat,diag,odiag,vartyp,slktyp) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - common/mscal/ varadd,slkadd,scfree - real*8 varadd,slkadd,scfree -c - integer*4 vcstat(mn),vartyp(n),slktyp(m) - real*8 diag(mn),odiag(mn) -c - integer*4 i,j - real*8 sol -c - do i=1,mn - sol=0.0d+0 - if(vcstat(i).gt.-2)then - if(i.le.n)then - j=vartyp(i) - if(j.gt.0)then - sol=-1.0d0 - else if(j.lt.0)then - sol=-2.0d0 - else - sol=-scfree - endif - else - j=slktyp(i-n) - if(j.gt.0)then - sol=1.0d0 - else if(j.lt.0)then - sol=0.5d+0 - else - sol=0.0d+0 - endif - endif - endif - diag(i)=sol - odiag(i)=sol - enddo - return - end -c -c ============================================================================ -c Compute primal, upper, dual infeasibilities -c =========================================================================== -c - subroutine cprinf(xs,prinf,slktyp,colpnt,rowidx,nonzeros, - x rhs,vcstat,pinf) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - integer*4 slktyp(m),colpnt(n1),rowidx(nz),vcstat(mn) - real*8 xs(mn),prinf(m),rhs(m),nonzeros(nz),pinf -c - integer*4 i,j,pnt1,pnt2 - real*8 sol -c -c --------------------------------------------------------------------------- -c - do i=1,m - prinf(i)=rhs(i) - enddo - pinf=0.0D+0 -c - do i=1,n - if(vcstat(i).gt.-2)then - sol=xs(i) - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - do j=pnt1,pnt2 - prinf(rowidx(j)-n)=prinf(rowidx(j)-n)-sol*nonzeros(j) - enddo - endif - enddo - do i=1,m - if(vcstat(i+n).gt.-2)then - if(slktyp(i).ne.0)then - sol=prinf(i)+xs(i+n) - else - sol=prinf(i) - endif - else - sol=0.0d+0 - endif - prinf(i)=sol - if(pinf.lt.abs(sol))pinf=abs(sol) - enddo - return - end -c -c =========================================================================== -c - subroutine cupinf(xs,up,upinf,bounds,vartyp,slktyp,vcstat, - x uinf) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - integer*4 vartyp(n),slktyp(m),vcstat(mn) - real*8 xs(mn),up(mn),upinf(mn),bounds(mn),uinf -c - integer*4 i -c - do i=1,mn - upinf(i)=0.0d+0 - enddo - uinf=0.0d+0 - do i=1,n - if((vcstat(i).gt.-2).and.(vartyp(i).lt.0))then - upinf(i)=bounds(i)-xs(i)-up(i) - if(uinf.lt.abs(upinf(i)))uinf=abs(upinf(i)) - endif - enddo - do i=1,m - if((vcstat(i+n).gt.-2).and.(slktyp(i).lt.0))then - upinf(i+n)=bounds(i+n)-xs(i+n)-up(i+n) - if(uinf.lt.abs(upinf(i+n)))uinf=abs(upinf(i+n)) - endif - enddo - return - end -c -c ============================================================================ -c - subroutine cduinf(dv,dspr,dsup,duinf,vartyp,slktyp,colpnt, - x rowidx,nonzeros,obj,vcstat,dinf) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - integer*4 vartyp(n),slktyp(m),colpnt(n1),rowidx(nz), - x vcstat(mn) - real*8 dv(m),dspr(mn),dsup(mn),duinf(mn),nonzeros(nz),obj(n), - x dinf -c - integer*4 i,j,pnt1,pnt2 - real*8 sol -c -c ------------------------------------------------------------------------------ -c - dinf=0.0d+0 -c - do i=1,m - sol=0.0d+0 - if(vcstat(i+n).gt.-2)then - if(slktyp(i).gt.0)then - sol=dv(i)-dspr(i+n) - else if(slktyp(i).lt.0)then - sol=dv(i)-dspr(i+n)+dsup(i+n) - endif - endif - duinf(i+n)=sol - enddo -c - do i=1,n - sol=0.0d+0 - if(vcstat(i).gt.-2)then - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - do j=pnt1,pnt2 - if(vcstat(rowidx(j)).gt.-2)then - sol=sol+dv(rowidx(j)-n)*nonzeros(j) - endif - enddo - if(vartyp(i))10,11,12 -c -c Upper bounded variable -c - 10 sol=obj(i)-sol-dspr(i)+dsup(i) - goto 15 -c -c Free variable -c - 11 sol=obj(i)-sol - goto 15 -c -c Standard variable -c - 12 sol=obj(i)-sol-dspr(i) - endif - 15 duinf(i)=sol - enddo -c -c Compute absolute and relative infeasibility -c - do i=1,mn - sol=abs(duinf(i)) - if(dinf.lt.sol)dinf=sol - enddo -c - return - end -c -c ============================================================================== -c - subroutine cpdobj(popt,dopt,obj,rhs,bounds,xs,dv, - x dsup,vcstat,vartyp,slktyp) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - integer*4 vcstat(mn),vartyp(n),slktyp(m) - real*8 popt,dopt,obj(n),rhs(m),bounds(mn),xs(mn),dv(m),dsup(mn) -c - integer*4 i -c - popt=0.0d+0 - dopt=0.0d+0 - do i=1,n - if(vcstat(i).gt.-2)then - popt=popt+obj(i)*xs(i) - if(vartyp(i).lt.0)then - dopt=dopt-bounds(i)*dsup(i) - endif - endif - enddo - do i=1,m - if(vcstat(i+n).gt.-2)then - dopt=dopt+rhs(i)*dv(i) - if(slktyp(i).lt.0)then - dopt=dopt-bounds(i+n)*dsup(i+n) - endif - endif - enddo - return - end -c -c =========================================================================== -c =========================================================================== -c - subroutine stpcrt(prelinf,drelinf,popt,dopt,cgap, - x iter,code,pphase,dphase,maxstp,pinf,uinf,dinf, - x prinf,upinf,duinf,oldmp,pb,db, - x prstpl,dustpl,obj,rhs,bounds,xs,dxs,dspr,ddspr,dsup, - x ddsup,dv,ddv,up,addobj,scobj,vcstat,vartyp,slktyp, - x oprelinf,odrelinf,opinf,odinf,ocgap,opphas,odphas,buff) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - real*8 prelinf,drelinf,popt,dopt,cgap,maxstp, - x pinf,uinf,oldmp,dinf,pb,db,oprelinf,odrelinf,opinf,odinf,ocgap - integer*4 iter,code,pphase,dphase,opphas,odphas -c - real*8 prstpl,dustpl,obj(n),rhs(m),bounds(mn),xs(mn),dxs(mn), - x dspr(mn),ddspr(mn),dsup(mn),ddsup(mn),dv(m),ddv(m),upinf(mn), - x up(mn),prinf(m),duinf(mn),addobj,scobj - integer*4 vcstat(mn),vartyp(n),slktyp(m) - character*99 buff -c - common/toler/ tsdir,topt1,topt2,tfeas1,tfeas2,feas1,feas2, - x pinfs,dinfs,inftol,maxiter - real*8 tsdir,topt1,topt2,tfeas1,tfeas2,feas1,feas2, - x pinfs,dinfs,inftol - integer*4 maxiter -c - real*8 oldpopt,olddopt,objnrm,rhsnrm,bndnrm,urelinf,mp - integer*4 i -c - prelinf=0.0d+0 - urelinf=0.0d+0 - drelinf=0.0d+0 - objnrm =0.0d+0 - rhsnrm =0.0d+0 - bndnrm =0.0d+0 - - do i=1,n - if(vcstat(i).gt.-2)then - objnrm=objnrm+obj(i)*obj(i) - drelinf=drelinf+duinf(i)*duinf(i) - if(vartyp(i).lt.0)then - bndnrm=bndnrm+bounds(i)*bounds(i) - urelinf=urelinf+upinf(i)*upinf(i) - endif - endif - enddo - do i=1,m - if(vcstat(i+n).gt.-2)then - rhsnrm=rhsnrm+rhs(i)*rhs(i) - prelinf=prelinf+prinf(i)*prinf(i) - drelinf=drelinf+duinf(i+n)*duinf(i+n) - if(slktyp(i).lt.0)then - bndnrm=bndnrm+bounds(i+n)*bounds(i+n) - urelinf=urelinf+upinf(i+n)*upinf(i+n) - endif - endif - enddo -c - prelinf=sqrt(prelinf+urelinf)/(1.0d+0+sqrt(bndnrm+rhsnrm)) - drelinf=sqrt(drelinf)/(1.0d+0+sqrt(objnrm)) - if(drelinf.gt.dinf)drelinf=dinf - if(prelinf.gt.max(pinf,uinf))prelinf=max(pinf,uinf) -c - mp=prelinf+drelinf+ - x abs(popt-dopt)/scobj/(1.0d+0+sqrt(rhsnrm+bndnrm)+sqrt(objnrm)) - if(iter.le.1)oldmp=mp -c - code=0 - if((prelinf.lt.tfeas1).and. - x (pinf.lt.feas1).and.(uinf.lt.feas1))then - pphase=2 - else - pphase=1 - pb=abs(pb-pinf)/(abs(pinf)) - endif - if((drelinf.lt.tfeas2).and.(dinf.lt.feas2))then - dphase=2 - else - dphase=1 - db=abs(db-dinf)/(abs(dinf)) - endif -c - if((abs(popt-dopt)/(abs(popt)+1.0d+0).le.topt1) - x. and.(pphase.eq.2).and.(dphase.eq.2))then - code=2 - write(buff,'(1x,a)') - x 'Stopping criterion : Small infeasibility and duality gap' - else if((popt.lt.dopt).and.(pphase.eq.2).and.(dphase.eq.2))then - code=0 - if(iter.gt.0)then - call cpdobj(oldpopt,olddopt,obj,rhs,bounds,dxs,ddv,ddsup, - x vcstat,vartyp,slktyp) - oldpopt=popt-oldpopt*scobj*prstpl - olddopt=dopt-olddopt*scobj*dustpl - if(oldpopt.ge.olddopt)then - code=2 - maxstp=1.0d+0-(oldpopt-olddopt)/(dopt-olddopt-popt+oldpopt) - dustpl=-maxstp*dustpl - prstpl=-maxstp*prstpl - call cnewpd(prstpl,xs,dxs,up,upinf,dustpl,dv,ddv,dspr, - x ddspr,dsup,ddsup,vartyp,slktyp,vcstat,maxstp) - call cpdobj(popt,dopt,obj,rhs,bounds,xs,dv,dsup, - x vcstat,vartyp,slktyp) - popt=popt*scobj+addobj - dopt=dopt*scobj+addobj - endif - endif - if(code.gt.0)then - write(buff,'(1x,a)') - x 'Stopping criterion : Small infeasibility and duality gap' - else - write(buff,'(1x,a)') - x 'Stopping criterion : Negative gap (Wrong tolerances ?)' - code=1 - endif - else if((mp.gt.topt1).and.(mp.gt.inftol*oldmp))then - if(pphase+dphase.eq.4)then - code=1 - write(buff,'(1x,a)') - x 'Stopping Criterion: Possible numerical problems' - else if (opphas+odphas.eq.4)then - code=1 - write(buff,'(1x,a)') - x 'Stopping Criterion: Instability, Suboptimal solution' - dustpl=-dustpl - prstpl=-prstpl - call cnewpd(prstpl,xs,dxs,up,upinf,dustpl,dv,ddv,dspr, - x ddspr,dsup,ddsup,vartyp,slktyp,vcstat,maxstp) - call cpdobj(popt,dopt,obj,rhs,bounds,xs,dv,dsup, - x vcstat,vartyp,slktyp) - call cpdobj(popt,dopt,obj,rhs,bounds,xs,dv,dsup, - x vcstat,vartyp,slktyp) - popt=popt*scobj+addobj - dopt=dopt*scobj+addobj - prelinf=oprelinf - drelinf=odrelinf - pinf=opinf - dinf=odinf - pphase=opphas - dphase=odphas - cgap=ocgap - else - write(buff,'(1x,a)') - x 'Stopping Criterion: Problem infeasibile' - code=4 - if(pphase.eq.2)code=3 - endif - else if(abs(cgap).lt.topt2)then - code=1 - if((pphase.eq.2).and.(dphase.eq.2))code=2 - write(buff,'(1x,a)') - x 'Stopping Criterion : Small complementarity gap' - else if(iter.ge.maxiter)then - code=1 - write(buff,'(1x,a)') - x 'Stopping Criterion : Iteration limit is exeeded' - else if(maxstp.lt.tsdir)then - code=1 - write(buff,'(1x,a)') - x 'Stopping Criterion : Very small step' - else if((iter.gt.0).and.(pphase.eq.1).and.(pb.lt.pinfs))then - code=4 - write(buff,'(1x,a)') - x 'Stopping Criterion: Pinfs limit. Problem primal infeasibile' - else if((iter.gt.0).and.(dphase.eq.1).and.(db.lt.dinfs))then - code=3 - write(buff,'(1x,a)') - x 'Stopping Criterion: Dinfs limit. Problem dual infeasibile' - endif - if(oldmp.gt.mp)oldmp=mp - oprelinf=prelinf - odrelinf=drelinf - opinf=pinf - odinf=dinf - opphas=pphase - odphas=dphase - ocgap=cgap - return - end -c -c =========================================================================== -c Compute the primal and dual steplengts -c -c =========================================================================== -c - subroutine cstpln(prstpl,xs,dxs,up,upinf, - x dustpl,dspr,ddspr,dsup,ddsup,vartyp,slktyp,vcstat) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - common/param/ palpha,dalpha - real*8 palpha,dalpha -c - integer*4 vartyp(n),slktyp(m),vcstat(mn) - real*8 prstpl,xs(mn),dxs(mn),up(mn),upinf(mn), - x dustpl,dspr(mn),ddspr(mn),dsup(mn),ddsup(mn) -c - integer*4 i,j - real*8 sol,dup -c - prstpl=1.0d0/palpha - dustpl=1.0d0/dalpha - do i=1,mn - if(vcstat(i).gt.-2)then - if(i.le.n)then - j=vartyp(i) - else - j=slktyp(i-n) - endif - if(j.ne.0)then - if(dxs(i).lt.0.0d+0)then - sol=-xs(i)/dxs(i) - if(sol.lt.prstpl)prstpl=sol - endif - if(ddspr(i).lt.0.0d+0)then - sol=-dspr(i)/ddspr(i) - if(sol.lt.dustpl)dustpl=sol - endif - if (j.lt.0)then - dup=upinf(i)-dxs(i) - if(dup.lt.0.0d+0)then - sol=-up(i)/dup - if(sol.lt.prstpl)prstpl=sol - endif - if(ddsup(i).lt.0.0d+0)then - sol=-dsup(i)/ddsup(i) - if(sol.lt.dustpl)dustpl=sol - endif - endif - endif - endif - enddo - return - end -c -c =========================================================================== -c Compute the new primal and dual solution -c -c =========================================================================== -c - subroutine cnewpd(prstpl,xs,dxs,up,upinf,dustpl,dv,ddv, - x dspr,ddspr,dsup,ddsup,vartyp,slktyp,vcstat,maxd) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - integer*4 vartyp(n),slktyp(m),vcstat(mn) - real*8 prstpl,xs(mn),dxs(mn),up(mn),upinf(mn),dustpl,dv(m), - x ddv(m),dspr(mn),ddspr(mn),dsup(mn),ddsup(mn),maxd -c - integer*4 i,j - real*8 maxdd,maxdp -c - maxdp=0.0d+0 - maxdd=0.0d+0 - do i=1,mn - if(vcstat(i).gt.-2)then - if(i.le.n)then - j=vartyp(i) - else - j=slktyp(i-n) - dv(i-n)=dv(i-n)+dustpl*ddv(i-n) - if(maxdd.lt.abs(ddv(i-n)))maxdd=abs(ddv(i-n)) - endif - if((i.le.n).or.(j.ne.0))then - xs(i)=xs(i)+prstpl*dxs(i) - if(maxdp.lt.abs(dxs(i)))maxdp=abs(dxs(i)) - dspr(i)=dspr(i)+dustpl*ddspr(i) - if(maxdd.lt.abs(ddspr(i)))maxdd=abs(ddspr(i)) - endif - if (j.lt.0)then - up(i)=up(i)+prstpl*(upinf(i)-dxs(i)) - if(maxdp.lt.abs(upinf(i)-dxs(i)))maxdp=abs(upinf(i)-dxs(i)) - dsup(i)=dsup(i)+dustpl*ddsup(i) - if(maxdd.lt.abs(ddsup(i)))maxdd=abs(ddsup(i)) - endif - endif - enddo - maxd=max(maxdp*prstpl,maxdd*dustpl) - return - end -c -c =========================================================================== -c Fixing variables and dropping rows -c =========================================================================== -c - subroutine varfix(vartyp,slktyp,rhs,colpnt,rowidx,nonzeros, - x xs,up,dspr,dsup,vcstat,fixn,dropn,addobj,scobj,obj,bounds, - x duinf,dinf,fxp,fxd,fxu) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - common/drop/ tfixvar,tfixslack,slklim - real*8 tfixvar,tfixslack,slklim -c - common/numer/ tplus,tzer - real*8 tplus,tzer -c - common/mscal/ varadd,slkadd,scfree - real*8 varadd,slkadd,scfree -c - integer*4 colpnt(n1),vartyp(n),slktyp(m),rowidx(nz), - x vcstat(mn),fixn,dropn,fxp,fxd,fxu - real*8 rhs(m),nonzeros(nz),xs(mn),up(mn),addobj,scobj,obj(n), - x dspr(mn),dsup(mn),bounds(mn),duinf(mn),dinf -c - integer*4 i,j,pnt1,pnt2 - real*8 sol -c -c --------------------------------------------------------------------------- -c - fxp=0 - fxd=0 - fxu=0 - do i=1,n - if((vcstat(i).gt.-2).and.(vartyp(i).ne.0))then - if((xs(i).lt.tfixvar).or. - x ((vartyp(i).lt.0).and.(up(i).lt.tfixvar)))then - fixn=fixn+1 - fxp=fxp+1 - vcstat(i)=-2 - if(xs(i).lt.tfixvar)then - xs(i)=0.0d+0 - up(i)=bounds(i) - else - xs(i)=bounds(i) - up(i)=0.0d+0 - endif - sol=xs(i) - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - do j=pnt1,pnt2 - rhs(rowidx(j)-n)=rhs(rowidx(j)-n)-sol*nonzeros(j) - enddo - addobj=addobj+scobj*obj(i)*sol - endif - if (dspr(i).lt.tfixslack)then - fxd=fxd+1 - duinf(i)=duinf(i)-slklim+dspr(i) - dspr(i)=slklim - endif - endif - enddo -c -c Release upper bounds -c - do i=1,mn - if(i.le.n)then - j=vartyp(i) - else - j=slktyp(i-n) - endif - if((vcstat(i).gt.-2).and.(j.lt.0))then - if(dsup(i).lt.slklim)then - fxu=fxu+1 - duinf(i)=duinf(i)-dsup(i) - dsup(i)=0 - if(i.le.n)then - vartyp(i)=-j - else - slktyp(i-n)=-j - endif - endif - endif - enddo -c -c Relax rows -c - do i=1,m - j=i+n - if((vcstat(j).gt.-2).and.(slktyp(i).gt.0))then - if(dspr(j).lt.tfixslack)then - fxd=fxd+1 - dropn=dropn+1 - vcstat(j)=-2 - endif - endif - enddo -c -c Compute new dual infeasibility -c - if((fxd.gt.0).or.(fxu.gt.0))then - dinf=0.0d+0 - do i=1,mn - if(vcstat(i).gt.-2)then - if(abs(duinf(i)).gt.dinf)dinf=abs(duinf(i)) - endif - enddo - endif -c - return - end -c -c =========================================================================== -c Modifying the primal and dual variables -c =========================================================================== -c - subroutine pdmodi(xs,dspr,vcstat, - x vartyp,slktyp,gap,pobj,dobj,prinf,duinf,upinf, - x colpnt,rowidx,rownz,pinf,uinf,dinf) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - common/compl/ climit,ccorr - real*8 climit,ccorr -c - integer*4 vcstat(mn),vartyp(n),slktyp(m),colpnt(n1),rowidx(nz) - real*8 xs(mn),dspr(mn),gap,pobj,dobj, - x prinf(m),upinf(mn),duinf(mn),rownz(nz),pinf,uinf,dinf -c - integer*4 i,j,k,prm,dum,upm,pnt1,pnt2 - real*8 sp,sd,sol,s -c -c -------------------------------------------------------------------------- -c - prm=0 - dum=0 - upm=0 - sd=gap - sp=abs(pobj-dobj)/(abs(pobj)+1.0d0) - sd=sd*ccorr - if(sd.gt.climit)sd=climit - do i=1,mn - if(vcstat(i).gt.-2)then - if(i.le.n)then - j=vartyp(i) - else - j=slktyp(i-n) - endif - if(j.ne.0)then - sp=xs(i)*dspr(i) - if(sp.lt.sd)then - if(xs(i).gt.dspr(i))then - sol=sd/xs(i) - duinf(i)=duinf(i)+dspr(i)-sol - dspr(i)=sol - dum=dum+1 - else - sol=sd/dspr(i) - s=xs(i)-sol - xs(i)=sol - if(j.lt.0)then - upinf(i)=upinf(i)+s - upm=upm+1 - endif - if(i.le.n)then - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - do k=pnt1,pnt2 - prinf(rowidx(k)-n)=prinf(rowidx(k)-n)+s*rownz(k) - enddo - else - prinf(i-n)=prinf(i-n)-s - endif - prm=prm+1 - endif - endif -ccc -ccc It's totally wrong! Do not modify upper bounds ! -ccc -ccc if(j.lt.0)then -ccc sp=up(i)*dsup(i) -ccc if(sp.lt.sd)then -ccc if(up(i).gt.dsup(i))then -ccc sol=sd/up(i) -ccc duinf(i)=duinf(i)-dsup(i)+sol -ccc dsup(i)=sol -ccc dum=dum+1 -ccc else -ccc sol=sd/dsup(i) -ccc upinf(i)=upinf(i)+up(i)-sol -ccc up(i)=sol -ccc upm=upm+1 -ccc endif -ccc endif -ccc endif - endif - endif - enddo -c -c Correct infeas. norm -c - if(prm.gt.0)then - pinf=0.0d+0 - do i=1,m - if(vcstat(i+n).gt.-2)then - if(abs(prinf(i)).gt.pinf)pinf=abs(prinf(i)) - else - prinf(i)=0.0d+0 - endif - enddo - endif - if(upm.gt.0)then - uinf=0.0d+0 - do i=1,mn - if(vcstat(i).gt.-2)then - if(abs(upinf(i)).gt.uinf)uinf=abs(upinf(i)) - else - upinf(i)=0.0d+0 - endif - enddo - endif - if(dum.gt.0)then - dinf=0.0d+0 - do i=1,mn - if(vcstat(i).gt.-2)then - if(abs(duinf(i)).gt.dinf)dinf=abs(duinf(i)) - else - duinf(i)=0.0d+0 - endif - enddo - endif - return - end -c -c =========================================================================== -c Scaling of free variables : "Average" of basics * scfree -c Correcting : "Average" of basics * varadd -c -c =========================================================================== -c - subroutine cdiag(xs,up,dspr,dsup,vartyp,slktyp,vcstat,diag, - x odiag) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - common/mscal/ varadd,slkadd,scfree - real*8 varadd,slkadd,scfree -c - common/numer/ tplus,tzer - real*8 tplus,tzer -c - integer*4 vartyp(n),slktyp(m),vcstat(mn) - real*8 xs(mn),up(mn),dspr(mn),dsup(mn),diag(mn),odiag(mn) -c - integer*4 i,j - real*8 sol,sn,sm,mins -c -c --------------------------------------------------------------------------- -c - sn=0.0d+0 - mins=1.0d+0 - j=0 - do i=1,n - sol=0.0d+0 - if((vcstat(i).gt.-2).and.(vartyp(i).ne.0))then - if(vartyp(i).lt.0)then - sol=dspr(i)/xs(i)+dsup(i)/up(i) - else - sol=dspr(i)/xs(i) - endif -c -c Compute average on "basic" variables -c - if(mins.gt.sol)mins=sol - if(vcstat(i).gt.0)then - j=j+1 - sn=sn+log(sol) - endif - endif - diag(i)=sol - odiag(i)=sol - enddo -c -c Compute geometric mean of the "basics" -c - if(j.eq.0)j=1 - sol=exp(sn/dble(j)) -c -c Set scale parameter for free variables -c - if(abs(scfree).lt.tzer)then - sn=0.0d+0 - else if(scfree.lt.0.0d+0)then - sn=-scfree - else - sn=max(sol*scfree,mins) - endif -c -c Set regularization parameter -c - if(abs(varadd).lt.tzer)then - sm=0.0d+0 - else if(varadd.lt.0.0d+0)then - sm=-varadd - else - sm=sol*varadd - endif -c -c Second pass: Set free variables and regularize -c - do i=1,n - if(vcstat(i).gt.-2)then - if(vartyp(i).eq.0)then - sol=sn - else - sol=diag(i) - endif -ccc if(sol.lt.sm*sm)sol=sm*sqrt(sol) - if(sol.lt.sm)sol=sm*sqrt(sol/sm) - diag(i)=-sol - odiag(i)=-sol - endif - enddo -c -c -c - j=0 - sn=0.0d+0 - do i=1,m - sol=0.0d+0 - if(vcstat(i+n).gt.-2)then - if(slktyp(i).eq.0)then - sol=0.0d+0 - else - if(slktyp(i).lt.0)then - sol=1.0d+0/(dspr(i+n)/xs(i+n)+dsup(i+n)/up(i+n))+0.0d+0 - else - sol=xs(i+n)/dspr(i+n) - endif - if(vcstat(i+n).gt.0)then - j=j+1 - sn=sn+log(sol) - endif - endif - endif - diag(i+n)=sol - odiag(i+n)=sol - enddo - - if(j.eq.0)j=1 - if(abs(slkadd).lt.tzer)then - sm=0.0d+0 - else if(slkadd.lt.0.0d+0)then - sm=-slkadd - else - sm=exp(sn/dble(j))*slkadd - endif - - if(sm.gt.tzer)then - do i=1,m - if(vcstat(i+n).gt.-2)then - sol=diag(i+n) -ccc if(sol.gt.sm*sm)sol=sm*sqrt(sol) - if(sol.gt.sm)sol=sm*sqrt(sol/sm) - diag(i+n)=sol - odiag(i+n)=sol - endif - enddo - endif - return - end -c -c =========================================================================== -c Multi predictor-corrector direction (Merothra) -c -c =========================================================================== -c - subroutine cpdpcd(xs,up,dspr,dsup,prinf,duinf,upinf, - x dxsn,ddvn,ddsprn,ddsupn,dxs,ddv,ddspr,ddsup,bounds, - x ecolpnt,count,pivots,vcstat,diag,odiag,rowidx,nonzeros, - x colpnt,vartyp,slktyp,barpar,corr,prstpl,dustpl,barn,cgap) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - - common/numer/ tplus,tzer - real*8 tplus,tzer - - common/predp/ ccstop,barset,bargrw,barmin,mincor,maxcor,inibar - real*8 ccstop,barset,bargrw,barmin - integer*4 mincor,maxcor,inibar -c - integer*4 ecolpnt(mn),count(mn),vcstat(mn),rowidx(cfree), - x pivots(mn),colpnt(n1),vartyp(n),slktyp(m),corr,barn - real*8 xs(mn),up(mn),dspr(mn),dsup(mn),prinf(m),duinf(mn), - x upinf(mn),dxsn(mn),ddvn(m),ddsprn(mn),ddsupn(mn), - x dxs(mn),ddv(m),ddspr(mn),ddsup(mn),bounds(mn), - x diag(mn),odiag(mn),nonzeros(cfree),barpar,prstpl,dustpl,cgap -c - integer*4 i,j,cr,mxcor - real*8 sol,sb,ogap,ngap,obpar,ostp,ostd -c -c --------------------------------------------------------------------------- -c -c Compute ogap -c - ogap=cgap - if(barpar.lt.tzer)barpar=ogap/dble(barn)*barset - obpar=barpar - if(inibar.le.0)then - barpar=0.0d+0 - else - barpar=ogap/dble(barn)*barset - if(barpar.gt.obpar*bargrw)barpar=obpar*bargrw - endif -c - cr=0 - mxcor=maxcor -c -c Initialize : Reset -c - do i=1,m - ddv(i)=0.0d+0 - enddo - do i=1,mn - dxs(i)=0.0d+0 - ddspr(i)=0.0d+0 - ddsup(i)=0.0d+0 - enddo -c -c Affine scaling / primal-dual direction -c - do i=1,n - sol=0.0d+0 - if(vcstat(i).gt.-2)then - if(vartyp(i))10,11,12 - 10 sol=duinf(i)+dspr(i)-barpar/xs(i) - x -dsup(i)+(barpar-dsup(i)*upinf(i))/up(i) - goto 15 - 11 sol=duinf(i) - goto 15 - 12 sol=duinf(i)+dspr(i)-barpar/xs(i) - endif - 15 dxsn(i)=sol - enddo -c - do i=1,m - j=i+n - sol=0.0d+0 - if(vcstat(j).gt.-2)then - if(slktyp(i))20,21,22 - 20 sol=-(duinf(j)+dspr(j)-barpar/xs(j) - x -dsup(j)+(barpar-dsup(j)*upinf(j))/up(j))*odiag(j) - goto 25 - 21 sol=0.0d+0 - goto 25 - 22 sol=-(duinf(j)+dspr(j)-barpar/xs(j))*odiag(j) - endif - 25 dxsn(j)=prinf(i)+sol - enddo -c -c Solve the augmented system -c - if(cr.lt.mincor)then - call augftr(ecolpnt,vcstat,rowidx,pivots,count,nonzeros, - x diag,dxsn) - call augbtr(ecolpnt,vcstat,rowidx,pivots,count,nonzeros, - x diag,dxsn) - else - call citref(diag,odiag,pivots,rowidx,nonzeros,colpnt, - x ecolpnt,count,vcstat,dxsn,ddsprn,ddsupn,upinf, - x bounds,xs,up,vartyp,slktyp) - endif -c -c Primal and dual variables -c Primal slacks : ds=D_s^{-1}*(b_s+dy) -c - do i=1,m - j=i+n - if(vcstat(j).gt.-2)then - ddvn(i)=dxsn(j) - if(slktyp(i).ne.0)then - if(slktyp(i).gt.0)then - sb=duinf(j)+dspr(j)-barpar/xs(j) - else - sb=duinf(j)+dspr(j)-barpar/xs(j) - x -dsup(j)+(barpar-dsup(j)*upinf(j))/up(j) - endif - dxsn(j)=-odiag(j)*(ddvn(i)+sb) - endif - endif - enddo -c -c Primal upper bounds, dual slacks -c dz=-Z+X^{-1}(mu -dx*dz -Z*dx) -c - do i=1,mn - if(vcstat(i).gt.-2)then - if(i.le.n)then - j=vartyp(i) - else - j=slktyp(i-n) - endif - if(j.lt.0)then - ddsupn(i)=-dsup(i)+(barpar-dsup(i)*(upinf(i)-dxsn(i)))/up(i) - endif - if(j.ne.0)then - ddsprn(i)=-dspr(i)+(barpar-dspr(i)*dxsn(i))/xs(i) - else if(i.le.n)then - ddsprn(i)=-dspr(i) - endif - endif - enddo -c -c Compute primal and dual steplengths -c - call cstpln(prstpl,xs,dxsn,up,upinf, - x dustpl,dspr,ddsprn,dsup,ddsupn,vartyp,slktyp,vcstat) -c -c Estimate basic variables vcstat(i)=1 for basic, 0 for nonbasic -c - do i=1,n - if((vcstat(i).gt.-2).and.(vartyp(i).ne.0))then - if(abs(ddsprn(i))*xs(i).gt.abs(dxsn(i))*dspr(i))then - vcstat(i)=1 - else - vcstat(i)=0 - endif - endif - enddo - do i=1,m - if((vcstat(i+n).gt.-2).and.(slktyp(i).ne.0))then - if(abs(ddsprn(i+n))*xs(i+n).gt.abs(dxsn(i+n))*dspr(i+n))then - vcstat(i+n)=1 - else - vcstat(i+n)=0 - endif - endif - enddo -c -c Compute ngap -c - ngap=0.0d+0 - do i=1,mn - if(vcstat(i).gt.-2)then - if(i.le.n)then - j=vartyp(i) - else - j=slktyp(i-n) - endif - if(j.ne.0)then - ngap=ngap+(xs(i)+prstpl*dxsn(i))*(dspr(i)+dustpl*ddsprn(i)) - if(j.lt.0)then - ngap=ngap+(up(i)+prstpl*(upinf(i)-dxsn(i)))* - x (dsup(i)+dustpl*ddsupn(i)) - endif - endif - endif - enddo - cgap=ngap/dble(barn) - ostp=prstpl - ostd=dustpl - do i=1,mn - dxs(i)=dxsn(i) - ddspr(i)=ddsprn(i) - ddsup(i)=ddsupn(i) - enddo - do i=1,m - ddv(i)=ddvn(i) - enddo -c -c Compute barrier -c - barpar=ngap*ngap*ngap/(ogap*ogap*dble(barn)) - if(barpar.gt.ogap/dble(barn)*barset)barpar=ogap/dble(barn)*barset - if(barpar.gt.obpar*bargrw)barpar=obpar*bargrw - if(barpar.lt.barmin)barpar=0.0d+0 - if(mxcor.le.0)goto 999 -c -c Higher order predictor-corrector direction -c - 50 cr=cr+1 - do i=1,n - sol=0.0d+0 - if(vcstat(i).gt.-2)then - if(vartyp(i))30,31,32 - 30 sol=duinf(i)+dspr(i)+(ddspr(i)*dxs(i)-barpar)/xs(i) - x -dsup(i)-(ddsup(i)*(upinf(i)-dxs(i))-barpar+dsup(i)* - x upinf(i))/up(i) - goto 35 - 31 sol=duinf(i) - goto 35 - 32 sol=duinf(i)+dspr(i)+(ddspr(i)*dxs(i)-barpar)/xs(i) - endif - 35 dxsn(i)=sol - enddo -c - do i=1,m - j=i+n - sol=0.0d+0 - if(vcstat(j).gt.-2)then - if(slktyp(i))40,41,42 - 40 sol=-(duinf(j)+dspr(j)+(ddspr(j)*dxs(j)-barpar)/xs(j) - x -dsup(j)-(ddsup(j)*(upinf(j)-dxs(j))-barpar+dsup(j)* - x upinf(j))/up(j))*odiag(j) - goto 45 - 41 sol=0.0d+0 - goto 45 - 42 sol=-(duinf(j)+dspr(j)+(ddspr(j)*dxs(j)-barpar)/xs(j))*odiag(j) - endif - 45 dxsn(j)=prinf(i)+sol - enddo -c -c Solve the augmented system -c - if(cr.lt.mincor)then - call augftr(ecolpnt,vcstat,rowidx,pivots,count,nonzeros, - x diag,dxsn) - call augbtr(ecolpnt,vcstat,rowidx,pivots,count,nonzeros, - x diag,dxsn) - else - call citref(diag,odiag,pivots,rowidx,nonzeros,colpnt, - x ecolpnt,count,vcstat,dxsn,ddsprn,ddsupn,upinf, - x bounds,xs,up,vartyp,slktyp) - endif -c -c Primal and dual variables -c Primal slacks : ds=D_s^{-1}*(b_s+dy) -c - do i=1,m - j=i+n - if(vcstat(j).gt.-2)then - ddvn(i)=dxsn(j) - if(slktyp(i).ne.0)then - if(slktyp(i).gt.0)then - sb=duinf(j)+dspr(j)+(ddspr(j)*dxs(j)-barpar)/xs(j) - else - sb=duinf(j)+dspr(j)+(ddspr(j)*dxs(j)-barpar)/xs(j) - x -dsup(j)-(ddsup(j)*(upinf(j)-dxs(j))-barpar+dsup(j)* - x upinf(j))/up(j) - endif - dxsn(j)=-odiag(j)*(ddvn(i)+sb) - endif - endif - enddo -c -c Primal upper bounds, dual slacks -c dz=-Z+X^{-1}(mu -dx*dz -Z*dx) -c - do i=1,mn - if(vcstat(i).gt.-2)then - if(i.le.n)then - j=vartyp(i) - else - j=slktyp(i-n) - endif - if(j.lt.0)then - ddsupn(i)= - x -dsup(i)+(barpar-ddsup(i)*(upinf(i)-dxs(i)) - x -dsup(i)*(upinf(i)-dxsn(i)))/up(i) - endif - if(j.ne.0)then - ddsprn(i)= - x -dspr(i)+(barpar-ddspr(i)*dxs(i)-dspr(i)*dxsn(i))/xs(i) - else if(i.le.n)then - ddsprn(i)=-dspr(i) - endif - endif - enddo -c -c Compute primal and dual steplengths -c - call cstpln(prstpl,xs,dxsn,up,upinf,dustpl,dspr, - x ddsprn,dsup,ddsupn,vartyp,slktyp,vcstat) -c -c Compute ngap -c - ngap=0.0d+0 - do i=1,mn - if(vcstat(i).gt.-2)then - if(i.le.n)then - j=vartyp(i) - else - j=slktyp(i-n) - endif - if(j.ne.0)then - ngap=ngap+(xs(i)+prstpl*dxsn(i))*(dspr(i)+dustpl*ddsprn(i)) - if(j.lt.0)then - ngap=ngap+(up(i)+prstpl*(upinf(i)-dxsn(i)))* - x (dsup(i)+dustpl*ddsupn(i)) - endif - endif - endif - enddo -c -c Check corrections criteria -c - if(cr.gt.mincor)then - if(min(prstpl,dustpl).lt.ccstop*min(ostp,ostd))then - if(min(prstpl,dustpl).lt.min(ostp,ostd))then - prstpl=ostp - dustpl=ostd - cr=cr-1 - goto 999 - else - mxcor=cr - endif - endif - endif -c -c Continue correcting, change the actual search direction -c - cgap=ngap/dble(barn) - ostp=prstpl - ostd=dustpl - do i=1,mn - dxs(i)=dxsn(i) - ddspr(i)=ddsprn(i) - ddsup(i)=ddsupn(i) - enddo - do i=1,m - ddv(i)=ddvn(i) - enddo - if(cr.ge.mxcor)goto 999 - goto 50 -c -c End of the correction loop, save the number of the corrections -c - 999 corr=cr - return - end -c -c ============================================================================ -c Multi-centrality corrections -c -c =========================================================================== -c - subroutine cpdccd(xs,up,dspr,dsup,upinf, - x dxsn,ddvn,ddsprn,ddsupn,dxs,ddv,ddspr,ddsup,bounds, - x ecolpnt,count,pivots,vcstat,diag,odiag,rowidx,nonzeros, - x colpnt,vartyp,slktyp,barpar,corr,prstpl,dustpl) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - - common/numer/ tplus,tzer - real*8 tplus,tzer - - common/predc/ target,tsmall,tlarge,center,corstp,mincc,maxcc - real*8 target,tsmall,tlarge,center,corstp - integer*4 mincc,maxcc -c - integer*4 ecolpnt(mn),count(mn),vcstat(mn),rowidx(cfree), - x pivots(mn),colpnt(n1),vartyp(n),slktyp(m),corr - real*8 xs(mn),up(mn),dspr(mn),dsup(mn), - x upinf(mn),dxsn(mn),ddvn(m),ddsprn(mn),ddsupn(mn), - x dxs(mn),ddv(m),ddspr(mn),ddsup(mn),bounds(mn), - x diag(mn),odiag(mn),nonzeros(cfree),barpar,prstpl,dustpl -c - integer*4 i,j,cr,maxccx - real*8 s,ss,ostp,ostd,prs,dus,dp -c -c --------------------------------------------------------------------------- - maxccx=maxcc - cr=0 - ostp=prstpl - ostd=dustpl - if(maxcc.le.0)goto 999 - cr=1 -c -c Define Target -c - 1 prs=prstpl*(target+1.0d+0)+target - dus=dustpl*(target+1.0d+0)+target - if (prs.ge.1.0d+0)prs=1.0d+0 - if (dus.ge.1.0d+0)dus=1.0d+0 - - do 10 j=1,n - if(vcstat(j).le.-2)then - dxsn(j)=0.0d+0 - goto 10 - endif - if(vartyp(j).eq.0)then - dxsn(j)=0.0d+0 - goto 10 - endif - dp=(xs(j)+prs*dxs(j))*(dspr(j)+dus*ddspr(j)) - if (dp.le.tsmall*barpar)then - s=barpar-dp - else if(dp.ge.tlarge*barpar)then - s=-center*barpar - else - s=0.0d+0 - endif - - if(vartyp(j).gt.0)then - dxsn(j)=-s/xs(j) - goto 10 - endif - - dp=(up(j)+prs*(upinf(j)-dxs(j)))*(dsup(j)+dus*ddsup(j)) - if (dp.le.tsmall*barpar)then - ss=barpar-dp - else if(dp.ge.tlarge*barpar)then - ss=-center*barpar - else - ss=0.0d+0 - endif - dxsn(j)=-s/xs(j)+ss/up(j) - 10 continue -c - do 20 i=1,m - j=i+n - if(vcstat(j).le.-2)then - dxsn(j)=0.0d+0 - goto 20 - endif - if(slktyp(i).eq.0)then - dxsn(j)=0.0d+0 - goto 20 - endif -c -c Bounded variable -c - dp=(xs(j)+prs*dxs(j))*(dspr(j)+dus*ddspr(j)) - if (dp.le.tsmall*barpar)then - s=barpar-dp - else if (dp.ge.tlarge*barpar)then - s=-center*barpar - else - s=0.0d+0 - endif - if(slktyp(i).gt.0)then - dxsn(j)=s/xs(j)*odiag(j) - goto 20 - endif -c -c upper bounded variable -c - dp=(up(j)+prs*(upinf(j)-dxs(j)))*(dsup(j)+dus*ddsup(j)) - if (dp.le.tsmall*barpar)then - ss=barpar-dp - else if(dp.ge.tlarge*barpar)then - ss=-center*barpar - else - ss=0.0d+0 - endif - dxsn(j)=(s/xs(j)-ss/up(j))*odiag(j) - 20 continue -c -c solve the augmented system -c - call citref(diag,odiag,pivots,rowidx,nonzeros,colpnt, - x ecolpnt,count,vcstat,dxsn,ddsprn,ddsupn,upinf, - x bounds,xs,up,vartyp,slktyp) -c -c Primal and dual variables -c - do 30 i=1,m - j=i+n - if(vcstat(j).le.-2)goto 30 - ddvn(i)=ddv(i)+dxsn(j) - if(slktyp(i).eq.0)goto 30 - dp=(xs(j)+prs*dxs(j))*(dspr(j)+dus*ddspr(j)) - if (dp.le.tsmall*barpar)then - s=barpar-dp - else if (dp.ge.tlarge*barpar)then - s=-center*barpar - else - s=0.0d+0 - endif - if(slktyp(i).gt.0)then - dxsn(j)=-odiag(j)*(dxsn(j)-s/xs(j)) - goto 30 - endif - dp=(up(j)+prs*(upinf(j)-dxs(j)))*(dsup(j)+dus*ddsup(j)) - if (dp.le.tsmall*barpar)then - ss=barpar-dp - else if(dp.ge.tlarge*barpar)then - ss=-center*barpar - else - ss=0.0d+0 - endif - dxsn(j)=-odiag(j)*(dxsn(j)-s/xs(j)+ss/up(j)) - 30 continue -c -c Primal upper bounds, dual slacks -c - do 40 i=1,mn - if(vcstat(i).le.-2)goto 40 - if(i.le.n)then - j=vartyp(i) - else - j=slktyp(i-n) - endif - if(j.eq.0)then - if(i.le.n)then - ddsprn(i)=ddsprn(i)+ddspr(i) - endif - goto 45 - endif - dp=(xs(i)+prs*dxs(i))*(dspr(i)+dus*ddspr(i)) - if (dp.le.tsmall*barpar)then - s=barpar-dp - else if(dp.ge.tlarge*barpar)then - s=-center*barpar - else - s=0.0d+0 - endif - ddsprn(i)=(s-dspr(i)*dxsn(i))/xs(i)+ddspr(i) - if(j.lt.0)then - dp=(up(i)+prs*(upinf(i)-dxs(i)))*(dsup(i)+dus*ddsup(i)) - if (dp.le.tsmall*barpar)then - ss=barpar-dp - else if(dp.ge.tlarge*barpar)then - ss=-center*barpar - else - ss=0.0d+0 - endif - ddsupn(i)=(ss+dsup(i)*dxsn(i))/up(i)+ddsup(i) - endif - 45 dxsn(i)=dxsn(i)+dxs(i) - 40 continue -c -c Compute primal and dual steplengths -c - call cstpln(prstpl,xs,dxsn,up,upinf, - x dustpl,dspr,ddsprn,dsup,ddsupn,vartyp,slktyp,vcstat) -c -c Check corrections criteria -c - if(cr.gt.mincc)then - if(min(prstpl,dustpl).lt.corstp*min(ostp,ostd))then - if(min(prstpl,dustpl).lt.min(ostp,ostd))then - prstpl=ostp - dustpl=ostd - cr=cr-1 - goto 999 - else - maxccx=cr - endif - endif - endif -c -c Continue correcting, change the actual search direction -c - ostp=prstpl - ostd=dustpl - do i=1,mn - dxs(i)=dxsn(i) - ddspr(i)=ddsprn(i) - ddsup(i)=ddsupn(i) - enddo - do i=1,m - ddv(i)=ddvn(i) - enddo - if(cr.lt.maxccx)then - cr=cr+1 - goto 1 - endif -c -c End of the correction loop, save the number of the corrections -c - 999 corr=cr - return - end -c -c ============================================================================ -c -c Prelev: 1 : rowsng -c 2 : colsng -c 4 : rowact -c 8 : chepdu -c 16 : duchek -c 32 : bndchk -c 64 : splchk -c 128 : freagr -c 256 : sparse -c 512 : xduchk -c -c ======================================================================== -c - subroutine presol(colpnt,colidx,colnzs,rowidx,rownzs, - x collst,rowlst,colmrk,rowmrk,colsta,rowsta, - x colbeg,colend,rowbeg,rowend, - x vartyp,pmaxr,pminr,pmbig,ppbig, - x upperb,lowerb,upslck,loslck,rhs,obj,prehis,prelen, - x addobj,big,list,mrk, - x dulo,duup,dmaxc,dminc,dmbig,dpbig,prelev,code) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - integer*4 colpnt(n1),colidx(nz),rowidx(nz), - x collst(n),rowlst(m),pmbig(m),ppbig(m), - x colbeg(n),colend(n),rowbeg(m),rowend(m), - x colmrk(n),rowmrk(m),colsta(n),rowsta(m), - x list(mn),mrk(mn),prehis(mn),prelen,prelev,code, - x dpbig(n),dmbig(n),vartyp(n) - real*8 colnzs(nz),rownzs(nz),pmaxr(m),pminr(m),addobj, - x upperb(n),lowerb(n),upslck(m),loslck(m),rhs(m),obj(n), - x dulo(m),duup(m),dmaxc(n),dminc(n),big -c - integer*4 i,j,k,p,o,pnt1,pnt2,pass,cnum,procn,rnum,coln,rown - real*8 sol,up,lo,tfeas,zero,lbig,bigbou,dbigbo - integer*4 dusrch,bndsrc,bndchg - character*99 buff -C CMSSW: Explicit initialization needed - pnt1=0 - pnt2=0 -c -c initialize : clean up the matrix and set-up row-wise structure -c - tfeas = 1.0d-08 - zero = 1.0d-15 - dusrch = 10 - bndsrc = 5 - bndchg = 6 - bigbou = 1.0d+5 - dbigbo = 1.0d+5 -c - lbig = big*0.9d+0 - pass=0 - rown=0 - coln=0 - cnum=0 - rnum=0 - do i=1,mn - mrk(i)=-1 - enddo - do i=1,m - pmaxr(i)=0.0d+0 - pminr(i)=0.0d+0 - pmbig(i)=0 - ppbig(i)=0 - rowend(i)=0 - if(rowsta(i).gt.-2)then - rown=rown+1 - rowlst(rown)=i - rowmrk(i)=0 - endif - enddo - do i=1,n - dmaxc(i)=0.0d+0 - dminc(i)=0.0d+0 - dmbig(i)=0 - dpbig(i)=0 - if(colsta(i).gt.-2)then - coln=coln+1 - collst(coln)=i - colmrk(i)=0 - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - p=pnt2 - do j=pnt2,pnt1,-1 - if((rowsta(colidx(j)).le.-2).or.(abs(colnzs(j)).lt.zero))then - o=colidx(j) - sol=colnzs(j) - colidx(j)=colidx(p) - colnzs(j)=colnzs(p) - colidx(p)=o - colnzs(p)=sol - p=p-1 - else - rowend(colidx(j))=rowend(colidx(j))+1 - endif - enddo - colbeg(i)=pnt1 - colend(i)=p - endif - enddo - pnt1=1 - do j=1,rown - i=rowlst(j) - rowbeg(i)=pnt1 - pnt1=pnt1+rowend(i) - rowend(i)=rowbeg(i)-1 - enddo - do k=1,coln - i=collst(k) - pnt1=colbeg(i) - pnt2=colend(i) - do j=pnt1,pnt2 - rowend(colidx(j))=rowend(colidx(j))+1 - rowidx(rowend(colidx(j)))=i - rownzs(rowend(colidx(j)))=colnzs(j) - enddo - enddo -c -c Initialize the minimum and maximum row activity -c - sol=0.9d+0*big - o=1 - do j=1,coln - i=collst(j) - pnt1=colbeg(i) - pnt2=colend(i) - up=upperb(i) - lo=lowerb(i) - call chgmxm(pnt1,pnt2,up,lo,colidx,colnzs, - x ppbig,pmaxr,pmbig,pminr,sol,o,m) - enddo -c -c Start Presolve sequence: Step 1 : ROW SINGLETONS -c - 10 procn=1 - call setlst(n,m,nz,rown,rowlst,rowmrk,coln,collst,colmrk, - x procn,rowsta,colsta,rowbeg,rowend,cnum,list,mrk,pass, - x colbeg,colend,colidx) - if(coln+rown.eq.0)goto 50 - if((iand(prelev,1).gt.0).and.(cnum.gt.0))then - call rowsng(n,m,mn,nz, - x colbeg,colend,colidx,colnzs, - x rowbeg,rowend,rowidx,rownzs, - x upperb,lowerb,upslck,loslck, - x rhs,obj,addobj,colsta,rowsta,prelen,prehis, - x coln,collst,colmrk,rown,rowlst,rowmrk, - x cnum,list,mrk,procn, - x ppbig,pmaxr,pmbig,pminr, - x lbig,tfeas,zero,code) - if(code.gt.0)goto 100 - endif -c -c Step 2 : COLUMN SINGLETONS -c - procn=2 - call setlst(m,n,nz,coln,collst,colmrk,rown,rowlst,rowmrk, - x procn,colsta,rowsta,colbeg,colend,cnum,list,mrk,pass, - x rowbeg,rowend,rowidx) - if(coln+rown.eq.0)goto 50 - if((iand(prelev,2).gt.0).and.(cnum.gt.0))then - call colsng(n,m,mn,nz, - x colbeg,colend,colidx,colnzs, - x rowbeg,rowend,rowidx,rownzs, - x upperb,lowerb,upslck,loslck, - x rhs,obj,addobj,colsta,rowsta,prelen,prehis, - x coln,collst,colmrk, - x cnum,list,mrk,procn, - x ppbig,pmaxr,pmbig,pminr, - x lbig,tfeas,zero,code) - if(code.gt.0)goto 100 - endif -c -c Step 3 : ROW ACTIVITY CHECK -c - procn=3 - call setlst(n,m,nz,rown,rowlst,rowmrk,coln,collst,colmrk, - x procn,rowsta,colsta,rowbeg,rowend,cnum,list,mrk,pass, - x colbeg,colend,colidx) - if(coln+rown.eq.0)goto 50 - if((iand(prelev,4).gt.0).and.(cnum.gt.0))then - call rowact(n,m,mn,nz, - x colbeg,colend,colidx,colnzs, - x rowbeg,rowend,rowidx,rownzs, - x upperb,lowerb,upslck,loslck, - x rhs,obj,addobj,colsta,rowsta,prelen,prehis, - x coln,collst,colmrk,rown,rowlst,rowmrk, - x cnum,list,mrk,procn, - x ppbig,pmaxr,pmbig,pminr, - x lbig,tfeas,code) - if(code.gt.0)goto 100 - endif -c -c Step 4 : CHEAP DUAL TEST -c - procn=4 - call setlst(m,n,nz,coln,collst,colmrk,rown,rowlst,rowmrk, - x procn,colsta,rowsta,colbeg,colend,cnum,list,mrk,pass, - x rowbeg,rowend,rowidx) - if(coln+rown.eq.0)goto 50 - if((iand(prelev,8).gt.0).and.(cnum.gt.0))then - call chepdu(n,m,mn,nz, - x colbeg,colend,colidx,colnzs, - x rowbeg,rowend,rowidx,rownzs, - x upperb,lowerb,upslck,loslck, - x rhs,obj,addobj,colsta,rowsta,prelen,prehis, - x coln,collst,colmrk,rown,rowlst,rowmrk, - x cnum,list,mrk,procn, - x ppbig,pmaxr,pmbig,pminr, - x lbig,zero,code) - if(code.gt.0)goto 100 - endif -c -c Step 5 : USUAL DUAL TEST -c - procn=5 - call setlst(n,m,nz,rown,rowlst,rowmrk,coln,collst,colmrk, - x procn,rowsta,colsta,rowbeg,rowend,rnum,list(n+1),mrk(n+1),pass, - x colbeg,colend,colidx) -c -c Remove zero entries at the first loop from the main list -c - if (pass.eq.5)then - k=1 - 5 if(k.le.coln)then - if(colmrk(collst(k)).eq.0)then - colmrk(collst(k))=-1 - collst(k)=collst(coln) - coln=coln-1 - else - k=k+1 - endif - goto 5 - endif - k=1 - 20 if(k.le.rown)then - if(rowmrk(rowlst(k)).eq.0)then - rowmrk(rowlst(k))=-1 - rowlst(k)=rowlst(rown) - rown=rown-1 - else - k=k+1 - endif - goto 20 - endif - endif -c - if((iand(prelev,16).gt.0).and.(cnum+rnum.gt.0))then - call duchek(n,m,mn,nz, - x colbeg,colend,colidx,colnzs, - x rowbeg,rowend,rowidx,rownzs, - x upperb,lowerb,upslck,loslck, - x rhs,obj,addobj,colsta,rowsta,prelen,prehis, - x coln,collst,colmrk,rown,rowlst,rowmrk, - x cnum,list,mrk,rnum,list(n+1),mrk(n+1),procn, - x ppbig,pmaxr,pmbig,pminr, -C CMSSW: Prevent REAL*8 reusage warning (note that this is cured by -C simply using the matching temporary array already available) -C Was: dulo,duup,dmaxc,dminc,dpbig,dmbig, - x dulo,duup,dpbig,dmbig,dmaxc,dminc, - x big,lbig,tfeas,zero,dbigbo,dusrch,code,prelev) - if(code.gt.0)goto 100 - endif - goto 10 -c -c Bound check -c - 50 procn=6 - if(iand(prelev,32).gt.0)then - call bndchk(n,m,mn,nz, - x colbeg,colend,colidx,colnzs, - x rowbeg,rowend,rowidx,rownzs, - x upperb,lowerb,upslck,loslck, - x rhs,obj,addobj,colsta,rowsta,prelen,prehis, - x cnum,list,mrk,procn,dmaxc,dminc, - x ppbig,pmaxr,pmbig,pminr,dpbig,dmbig, - x big,lbig,tfeas,bndsrc,bndchg,bigbou,code) - if(code.gt.0)goto 100 - endif -c -c Finding splitted free variables -c - procn=7 - if(iand(prelev,64).gt.0)then - call coldbl(n,m,mn,nz,colbeg,colend,colidx,colnzs, - x rowbeg,rowend,rowidx,rownzs,upperb,lowerb,obj,colsta, - x prelen,prehis,procn,list,dmaxc,vartyp,big,lbig,tfeas,zero) - if(code.gt.0)goto 100 - endif - goto 999 -c -c Infeasibility detected -c - 100 if(code.eq.3)then - write(buff,'(1x,a)')'Dual infeasibility detected in presolve' - else - write(buff,'(1x,a)')'Primal infeasibility detected in presolve' - endif - call mprnt(buff) - if (procn.eq.1)then - write(buff,'(1x,a)')'Presolve process: Row singleton check' - else if (procn.eq.2)then - write(buff,'(1x,a)')'Presolve process: Column singleton check' - else if (procn.eq.3)then - write(buff,'(1x,a)')'Presolve process: Row activity check' - else if (procn.eq.4)then - write(buff,'(1x,a)')'Presolve process: Cheap dual check' - else if (procn.eq.5)then - write(buff,'(1x,a)')'Presolve process: Dual check' - else if (procn.eq.6)then - write(buff,'(1x,a)')'Presolve process: Bound check' - else if (procn.eq.7)then - write(buff,'(1x,a)')'Presolve process: Splitcol check' - endif - call mprnt(buff) -c - 999 return - end -c -c ============================================================================ -c - subroutine chgmxm(pnt1,pnt2,upper,lower,idx,nonzrs, - x pbig,maxr,mbig,minr,lbig,dir,siz) -C - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c -c This subroutine changes/updates the minimum/maximum row activity -c values -c - integer*4 siz,pnt1,pnt2,idx(nz),pbig(siz),mbig(siz),dir - real*8 upper,lower,nonzrs(nz),maxr(siz),minr(siz),lbig -c - integer*4 j,k - real*8 s -c - do j=pnt1,pnt2 - k=idx(j) - s=nonzrs(j) - if(s.gt.0d+0)then - if(upper.ge.lbig)then - pbig(k)=pbig(k)+dir - else - maxr(k)=maxr(k)+upper*s*dble(dir) - endif - if(lower.le.-lbig)then - mbig(k)=mbig(k)+dir - else - minr(k)=minr(k)+lower*s*dble(dir) - endif - else - if(upper.ge.lbig)then - mbig(k)=mbig(k)+dir - else - minr(k)=minr(k)+upper*s*dble(dir) - endif - if(lower.le.-lbig)then - pbig(k)=pbig(k)+dir - else - maxr(k)=maxr(k)+lower*s*dble(dir) - endif - endif - enddo - return - end -c -c ============================================================================ -c - subroutine modmxm(nz,pnt1,pnt2,oldb,newb,rowidx,nonzeros, - x pbig,maxr,mbig,minr,lbig,dir,siz) -c -c This subroutine modifies the row (column) activity values -c from an old bound (oldb) to a new one (newb) -c dir= 1 update on upper bound -c dir=-1 update on lower bound -c - integer*4 nz,siz,pnt1,pnt2,rowidx(nz),pbig(siz),mbig(siz),dir - real*8 oldb,newb,nonzeros(nz),maxr(siz),minr(siz),lbig -c - integer*4 f,j,k - real*8 s,diff -c - f=0 - diff=newb-oldb - if(abs(oldb).gt.lbig)then - diff=newb - f=1 - if(oldb.gt.0.0d+0)then - dir=1 - else - dir=-1 - endif - do j=pnt1,pnt2 - k=rowidx(j) - if((nonzeros(j)*dble(dir)).gt.0.0d+0)then - pbig(k)=pbig(k)-1 - else - mbig(k)=mbig(k)-1 - endif - enddo - endif - if(abs(newb).gt.lbig)then - diff=-oldb - f=f+2 - if(newb.gt.0)then - dir=1 - else - dir=-1 - endif - do j=pnt1,pnt2 - k=rowidx(j) - if((nonzeros(j)*dble(dir)).gt.0.0)then - pbig(k)=pbig(k)+1 - else - mbig(k)=mbig(k)+1 - endif - enddo - endif - if(f.lt.3)then - do j=pnt1,pnt2 - k=rowidx(j) - s=nonzeros(j) - if(s.gt.0.0d+0)then - if(dir.eq.1)then - maxr(k)=maxr(k)+diff*s - else - minr(k)=minr(k)+diff*s - endif - else - if(dir.eq.1)then - minr(k)=minr(k)+diff*s - else - maxr(k)=maxr(k)+diff*s - endif - endif - enddo - endif - return - end -c -c ============================================================================ -c - subroutine remove(m,n,nz,col,colidx,colnzs,rowidx,rownzs, - x colbeg,colend,rowbeg,rowend,rhs,pivot,traf) -c -c This subroutine removes a column from the row-wise representation -c and updates the right-hand side, if parameter traf is set -c - integer*4 m,n,nz,col,colidx(nz),rowidx(nz), - x colbeg(n),colend(n),rowbeg(m),rowend(m) - real*8 rhs(m),pivot,colnzs(nz),rownzs(nz) - logical traf -c - integer*4 i,j,k,pnt1,pnt2 - real*8 sol -c - do i=colbeg(col),colend(col) - j=colidx(i) - pnt1=rowbeg(j) - pnt2=rowend(j)-1 - do k=pnt1,pnt2 - if(rowidx(k).eq.col)then - sol=rownzs(k) - rowidx(k)=rowidx(pnt2+1) - rownzs(k)=rownzs(pnt2+1) - rowidx(pnt2+1)=col - rownzs(pnt2+1)=sol - goto 10 - endif - enddo - 10 rowend(j)=pnt2 - enddo - if(traf)then - do i=colbeg(col),colend(col) - rhs(colidx(i))=rhs(colidx(i))-pivot*colnzs(i) - enddo - endif - return - end -c -c ============================================================================= -c - subroutine setlst(m,n,nz,coln,collst,colmrk,rown,rowlst,rowmrk, - x procn,colsta,rowsta,colbeg,colend,cnum,list,mrk,pass, - x rowbeg,rowend,rowidx) -c -c This subroutine deletes entries from the main search list -c and set-up the local search list for the presolv subprocesses. -c - integer*4 m,n,nz,coln,collst(n),colmrk(n),procn,colsta(n), - x cnum,list(n),mrk(n),pass,colbeg(n),colend(n), - x rown,rowlst(m),rowmrk(m),rowsta(m),rowbeg(m),rowend(m), - x rowidx(nz) -c - integer*4 i,j,k,p1,p2 -c - pass=pass+1 - k=1 - cnum=0 - 10 if(k.le.coln)then - i=collst(k) - if((colsta(i).le.-2).or.(colmrk(i).eq.procn))then - collst(k)=collst(coln) - colmrk(i)=-procn - coln=coln-1 - else - k=k+1 - if((procn.le.2).and.(colbeg(i).ne.colend(i)))goto 10 - cnum=cnum+1 - list(cnum)=i - mrk(i)=pass - endif - goto 10 - endif -c - k=1 - 20 if(k.le.rown)then - i=rowlst(k) - if((rowsta(i).le.-2).or.(rowmrk(i).eq.procn))then - rowlst(k)=rowlst(rown) - rowmrk(i)=-procn - rown=rown-1 - else - k=k+1 - endif - goto 20 - endif -c -c Extend lists -c - k=1 - do while (k.le.rown) - p1=rowbeg(rowlst(k)) - p2=rowend(rowlst(k)) - do i=p1,p2 - j=rowidx(i) - if((mrk(j).lt.0).and. - x ((procn.gt.2).or.(colbeg(j).eq.colend(j))))then - mrk(j)=procn - cnum=cnum+1 - list(cnum)=j - endif - enddo - k=k+1 - enddo -c - return - end -c -c ========================================================================== -c =========================================================================== -c - subroutine rowsng(n,m,mn,nz, - x colbeg,colend,colidx,colnzs, - x rowbeg,rowend,rowidx,rownzs, - x upb,lob,ups,los, - x rhs,obj,addobj,colsta,rowsta,prelen,prehis, - x coln,collst,colmrk,rown,rowlst,rowmrk, - x cnum,list,mrk,procn, - x ppbig,pmaxr,pmbig,pminr, - x lbig,tfeas,tzer,code) -c -c This subroutine removes singleton rows and may fixes variables -c - integer*4 n,m,mn,nz,colbeg(n),colend(n),colidx(nz), - x rowbeg(m),rowend(m),rowidx(nz),cnum,list(m),mrk(m), - x colsta(n),rowsta(m),prehis(mn),procn,prelen, - x coln,rown,collst(n),rowlst(n),colmrk(n),rowmrk(m), - x ppbig(m),pmbig(m),code -c - real*8 colnzs(nz),rownzs(nz),upb(n),lob(n),ups(m),los(m), - x rhs(m),obj(n),pmaxr(m),pminr(m),addobj,lbig,tfeas,tzer -c - integer*4 i,l,row,col,dir,crem,rrem - real*8 ub,lb,upper,lower,sol,pivot - logical traf - character*99 buff -c -c --------------------------------------------------------------------------- -c - rrem=0 - crem=0 - 10 if(cnum.ge.1)then - row=list(1) - mrk(row)=-1 - list(1)=list(cnum) - cnum=cnum-1 - if(rowbeg(row).eq.rowend(row))then -c -c Remove singleton row -c - col=rowidx(rowbeg(row)) - pivot=rownzs(rowbeg(row)) - traf=.false. - call remove(n,m,nz,row,rowidx,rownzs,colidx,colnzs, - x rowbeg,rowend,colbeg,colend,obj,lower,traf) - rrem=rrem+1 - prelen=prelen+1 - prehis(prelen)=row+n - rowsta(row)=-2-procn -c -c Calculate new bounds (ub,lb) -c - if(ups(row).lt.lbig)then - ub=rhs(row)+ups(row) - else - ub=ups(row) - endif - if(los(row).gt.-lbig)then - lb=rhs(row)+los(row) - else - lb=los(row) - endif - if(pivot.gt.0)then - if(ub.lt.lbig)ub=ub/pivot - if(lb.gt.-lbig)lb=lb/pivot - else - if(ub.lt.lbig)then - sol=ub/pivot - else - sol=-ub - endif - if(lb.gt.-lbig)then - ub=lb/pivot - else - ub=-lb - endif - lb=sol - endif -c -c update -c - upper=upb(col) - lower=lob(col) - dir=-1 - call chgmxm(colbeg(col),colend(col),upper,lower,colidx, - x colnzs,ppbig,pmaxr,pmbig,pminr,lbig,dir,m) - if(lb.gt.lower)lower=lb - if(ub.lt.upper)upper=ub -c -c Check primal feasibility -c - if((lower-upper).gt.((abs(lower)+1.0d+0)*tfeas))then - cnum=-col - code=4 - goto 100 - endif -c -c Check for fix variable -c - if((upper-lower).lt.((abs(lower)+1.0d+0)*tzer))then - prelen=prelen+1 - prehis(prelen)=col - colsta(col)=-2-procn - traf=.true. - call remove(m,n,nz,col,colidx,colnzs,rowidx,rownzs, - x colbeg,colend,rowbeg,rowend,rhs,lower,traf) - crem=crem+1 - addobj=addobj+obj(col)*lower - do i=colbeg(col),colend(col) - l=colidx(i) - if((mrk(l).lt.0).and.(rowbeg(l).eq.rowend(l)))then - mrk(l)=procn - cnum=cnum+1 - list(cnum)=l - endif - enddo - else -c -c Update bounds -c - dir=1 - call chgmxm(colbeg(col),colend(col),upper,lower,colidx, - x colnzs,ppbig,pmaxr,pmbig,pminr,lbig,dir,m) - endif - lob(col)=lower - upb(col)=upper - -c -c Update search lists -c - do i=colbeg(col),colend(col) - l=colidx(i) - if(rowmrk(l).lt.0)then - rown=rown+1 - rowlst(rown)=l - endif - rowmrk(l)=procn - enddo - if(colsta(col).gt.-2)then - if (colmrk(col).lt.0)then - coln=coln+1 - collst(coln)=col - endif - colmrk(col)=procn - endif - endif - goto 10 - endif -c - 100 if(rrem+crem.gt.0)then - write(buff,'(1x,a,i5,a,i5,a)') - x 'ROWSNG:',crem,' columns,',rrem,' rows removed' - call mprnt(buff) - endif - return - end -c -c =========================================================================== -c =========================================================================== -c - subroutine colsng(n,m,mn,nz, - x colbeg,colend,colidx,colnzs, - x rowbeg,rowend,rowidx,rownzs, - x upb,lob,ups,los, - x rhs,obj,addobj,colsta,rowsta,prelen,prehis, - x coln,collst,colmrk, - x cnum,list,mrk,procn, - x ppbig,pmaxr,pmbig,pminr, - x lbig,tfeas,tzer,code) -c -c This subroutine cheks singleton columns -c - integer*4 n,m,mn,nz,colbeg(n),colend(n),colidx(nz), - x rowbeg(m),rowend(m),rowidx(nz),cnum,list(n),mrk(n), - x colsta(n),rowsta(m),prehis(mn),procn,prelen, - x coln,collst(n),colmrk(n),ppbig(m),pmbig(m),code -c - real*8 colnzs(nz),rownzs(nz),upb(n),lob(n),ups(m),los(m), - x rhs(m),obj(n),pmaxr(m),pminr(m),addobj,lbig,tfeas,tzer -c - integer*4 i,j,k,l,row,col,crem,rrem - real*8 ub,lb,upper,lower,sol,pivot - logical traf - character*99 buff -c -c --------------------------------------------------------------------------- -c - rrem=0 - crem=0 - 10 if(cnum.ge.1)then - col=list(1) - mrk(col)=-1 - list(1)=list(cnum) - cnum=cnum-1 - if(colbeg(col).eq.colend(col))then - row=colidx(colbeg(col)) - pivot=colnzs(colbeg(col)) - if(pivot.gt.0.0d+0)then - lb=lob(col) - ub=upb(col) - sol=obj(col) - else - ub=-lob(col) - lb=-upb(col) - pivot=-pivot - sol=-obj(col) - endif - if((lb.gt.-lbig).or.(ub.lt.lbig))then -c -c Compute lower bound of the LP constraint -c - if(lb.le.-lbig)then - l=pmbig(row)-1 - lower=pminr(row) - else - l=pmbig(row) - lower=pminr(row)-lb*pivot - endif - if(ups(row).gt.lbig)then - l=l+1 - else - lower=lower-ups(row) - endif - if(l.gt.0)lower=-lbig -c -c Compute upper bound of the LP constraint -c - if(ub.gt.lbig)then - l=ppbig(row)-1 - upper=pmaxr(row) - else - l=ppbig(row) - upper=pmaxr(row)-ub*pivot - endif - if(los(row).lt.-lbig)then - l=l+1 - else - upper=upper-los(row) - endif - if(l.gt.0)upper=lbig -c -c Check new upper and lower bound -c - if(lb.gt.-lbig)then - upper=(rhs(row)-upper)/pivot - if((lb-upper).gt.(abs(lb)+1.0d+0)*tfeas)goto 10 - endif - if(ub.lt.lbig)then - lower=(rhs(row)-lower)/pivot - if((lower-ub).gt.(abs(ub)+1.0d+0)*tfeas)goto 10 - endif - endif -c -c ( Hidden ) free singleton column found, check slacks -c - pivot=sol/pivot - if(pivot.gt.tzer)then - if(los(row).lt.-lbig)then - cnum=-col - code=3 - goto 999 - endif - rhs(row)=rhs(row)+los(row) - else if(pivot.lt.-tzer)then - if(ups(row).gt.lbig)then - cnum=-col - code=3 - goto 999 - endif - rhs(row)=rhs(row)+ups(row) - endif -c -c Column administration -c - prelen=prelen+1 - prehis(prelen)=col - colsta(col)=-2-procn - traf=.false. - call remove(m,n,nz,col,colidx,colnzs,rowidx,rownzs, - x colbeg,colend,rowbeg,rowend,rhs,pivot,traf) - crem=crem+1 - addobj=addobj+rhs(row)*pivot -c -c Row administration -c - prelen=prelen+1 - prehis(prelen)=row+n - rowsta(row)=-2-procn - traf=.true. - call remove(n,m,nz,row,rowidx,rownzs,colidx,colnzs, - x rowbeg,rowend,colbeg,colend,obj,pivot,traf) - rrem=rrem+1 - j=rowbeg(row) - k=rowend(row) - do i=j,k - l=rowidx(i) - if(colmrk(l).lt.0)then - coln=coln+1 - collst(coln)=l - endif - colmrk(l)=procn - if((mrk(l).lt.0).and.(colbeg(l).eq.colend(l)))then - mrk(l)=procn - cnum=cnum+1 - list(cnum)=l - endif - enddo - endif - goto 10 - endif - 999 if(rrem+crem.gt.0)then - write(buff,'(1x,a,i5,a,i5,a)') - x 'COLSNG:',crem,' columns,',rrem,' rows removed' - call mprnt(buff) - endif - return - end -c -c =========================================================================== -c =========================================================================== -c - subroutine rowact(n,m,mn,nz, - x colbeg,colend,colidx,colnzs, - x rowbeg,rowend,rowidx,rownzs, - x upb,lob,ups,los, - x rhs,obj,addobj,colsta,rowsta,prelen,prehis, - x coln,collst,colmrk,rown,rowlst,rowmrk, - x cnum,list,mrk,procn, - x ppbig,pmaxr,pmbig,pminr, - x lbig,tfeas,code) -c -c This subroutine removes singleton rows and may fixes variables -c - integer*4 n,m,mn,nz,colbeg(n),colend(n),colidx(nz), - x rowbeg(m),rowend(m),rowidx(nz),cnum,list(m),mrk(m), - x colsta(n),rowsta(m),prehis(mn),procn,prelen, - x coln,rown,collst(n),rowlst(n),colmrk(n),rowmrk(m), - x ppbig(m),pmbig(m),code -c - real*8 colnzs(nz),rownzs(nz),upb(n),lob(n),ups(m),los(m), - x rhs(m),obj(n),pmaxr(m),pminr(m),addobj,lbig,tfeas -c - integer*4 i,j,k,l,row,col,dir,setdir,p,p1,p2,red,crem,rrem - real*8 upper,lower,pivot,eps - logical traf - character*99 buff -c -c --------------------------------------------------------------------------- -c - rrem=0 - crem=0 - 10 if(cnum.ge.1)then - row=list(1) - mrk(row)=-1 - list(1)=list(cnum) - cnum=cnum-1 -c - if(ppbig(row).le.0)then - upper=pmaxr(row)-rhs(row) - else - upper=lbig - endif - if(pmbig(row).le.0)then - lower=pminr(row)-rhs(row) - else - lower=-lbig - endif -c -c Check feasibility -c - eps=abs(rhs(row)+1.0d+0)*tfeas - if((lower-ups(row).gt.eps) .or. - x (los(row)-upper.gt.eps))then - cnum=-row-n - code=4 - goto 100 - endif -c -c Check redundancy -c - setdir=0 - red=0 - if((los(row)-lower.lt.eps) .and. - x (upper-ups(row).lt.eps))then - red=1 - endif - if(ups(row)-lower.lt.eps)then - red=1 - setdir=-1 - else if(upper-los(row).lt.eps)then - red=1 - setdir=1 - endif -c -c -c - if(red.gt.0)then - prelen=prelen+1 - prehis(prelen)=row+n - rowsta(row)=-2-procn - traf=.false. - call remove(n,m,nz,row,rowidx,rownzs,colidx,colnzs, - x rowbeg,rowend,colbeg,colend,obj,pivot,traf) - rrem=rrem+1 - if(setdir.eq.0)then - j=rowbeg(row) - k=rowend(row) - do i=j,k - l=rowidx(i) - if(colmrk(l).lt.0)then - coln=coln+1 - collst(coln)=l - endif - colmrk(l)=procn - enddo - else - dir=-1 - traf=.true. - j=rowbeg(row) - k=rowend(row) - do i=j,k - col=rowidx(i) - if(rownzs(i)*dble(setdir).gt.0.0d+0)then - pivot=upb(col) - else - pivot=lob(col) - endif - p1=colbeg(col) - p2=colend(col) - call chgmxm(p1,p2,upb(col),lob(col),colidx,colnzs, - x ppbig,pmaxr,pmbig,pminr,lbig,dir,m) - addobj=addobj+pivot*obj(col) - lob(col)=pivot - upb(col)=pivot - prelen=prelen+1 - prehis(prelen)=col - colsta(col)=-2-procn - call remove(m,n,nz,col,colidx,colnzs,rowidx,rownzs, - x colbeg,colend,rowbeg,rowend,rhs,pivot,traf) - crem=crem+1 - p1=colbeg(col) - p2=colend(col) - do p=p1,p2 - l=colidx(p) - if(rowmrk(l).lt.0)then - rown=rown+1 - rowlst(rown)=l - endif - rowmrk(l)=procn - if(mrk(l).lt.0)then - mrk(l)=procn - cnum=cnum+1 - list(cnum)=l - endif - enddo - enddo - endif - endif - goto 10 - endif -c - 100 if(rrem+crem.gt.0)then - write(buff,'(1x,a,i5,a,i5,a)') - x 'ROWACT:',crem,' columns,',rrem,' rows removed' - call mprnt(buff) - endif - return - end -c -c =========================================================================== -c =========================================================================== -c - subroutine chepdu(n,m,mn,nz, - x colbeg,colend,colidx,colnzs, - x rowbeg,rowend,rowidx,rownzs, - x upb,lob,ups,los, - x rhs,obj,addobj,colsta,rowsta,prelen,prehis, - x coln,collst,colmrk,rown,rowlst,rowmrk, - x cnum,list,mrk,procn, - x ppbig,pmaxr,pmbig,pminr, - x lbig,tzer,code) -c -c This subroutine performs the "cheap" dual tests -c - integer*4 n,m,mn,nz,colbeg(n),colend(n),colidx(nz), - x rowbeg(m),rowend(m),rowidx(nz),cnum,list(n),mrk(n), - x colsta(n),rowsta(m),prehis(mn),procn,prelen, - x coln,rown,collst(n),rowlst(n),colmrk(n),rowmrk(m), - x ppbig(m),pmbig(m),code -c - real*8 colnzs(nz),rownzs(nz),upb(n),lob(n),ups(m),los(m), - x rhs(m),obj(n),pmaxr(m),pminr(m),addobj,lbig,tzer -c - integer*4 i,j,k,l,row,col,dir,p,p1,p2,mode,crem,rrem - real*8 pivot,sol - logical traf - character*99 buff -c -c --------------------------------------------------------------------------- -c - crem=0 - rrem=0 - 10 if(cnum.ge.1)then - col=list(1) - mrk(col)=-1 - list(1)=list(cnum) - cnum=cnum-1 -c - p1=colbeg(col) - p2=colend(col) - mode=0 - do i=p1,p2 - if (abs(colnzs(i)).gt.tzer)then - row=colidx(i) - if(ups(row).gt.lbig)then - k=1 - else if(los(row).lt.-lbig)then - k=-1 - else - goto 10 - endif - if(colnzs(i).gt.0.0d+0)then - j=1 - else - j=-1 - endif - if(mode.eq.0)then - mode=j*k - if((obj(col)*dble(mode)).gt.0.0d+0)goto 10 - else - if(j*k*mode.lt.0)goto 10 - endif - endif - enddo -c -c Check the column -c - if(mode.gt.0)then - sol=upb(col) - else if(mode.lt.0)then - sol=lob(col) - else - if(obj(col).lt.0.0d+0)then - sol=upb(col) - else if(obj(col).gt.0.0) then - sol=lob(col) - else - sol=lob(col) - if(upb(col).ge.lbig)sol=upb(col) - endif - endif -c -c Adminisztracio -c - dir=-1 - call chgmxm(p1,p2,upb(col),lob(col),colidx,colnzs, - x ppbig,pmaxr,pmbig,pminr,lbig,dir,m) -c - prelen=prelen+1 - prehis(prelen)=col - colsta(col)=-2-procn - traf=.true. - if(abs(sol).gt.lbig)then - pivot=0.0d+0 - else - pivot=sol - endif - call remove(m,n,nz,col,colidx,colnzs,rowidx,rownzs, - x colbeg,colend,rowbeg,rowend,rhs,pivot,traf) - crem=crem+1 -c - if(abs(sol).gt.lbig)then - if(abs(obj(col)).gt.tzer)then - cnum=-col - code=3 - goto 999 - endif -c -c Row redundacncy with the column -c - do i=p1,p2 - row=colidx(i) - if(abs(colnzs(i)).gt.tzer)then - prelen=prelen+1 - prehis(prelen)=row+n - rowsta(row)=-2-procn - traf=.false. - call remove(n,m,nz,row,rowidx,rownzs,colidx,colnzs, - x rowbeg,rowend,colbeg,colend,obj,sol,traf) - rrem=rrem+1 - j=rowbeg(row) - k=rowend(row) - do p=j,k - l=rowidx(p) - if(colmrk(l).lt.0)then - coln=coln+1 - collst(coln)=l - endif - colmrk(l)=procn - if(mrk(l).lt.0)then - mrk(l)=procn - cnum=cnum+1 - list(cnum)=l - endif - enddo - endif - enddo - else -c -c Column is fixed to one bound -c - do i=p1,p2 - row=colidx(i) - if(rowmrk(row).lt.0)then - rown=rown+1 - rowlst(rown)=row - endif - rowmrk(row)=procn - enddo - addobj=addobj+obj(col)*sol - lob(col)=pivot - upb(col)=pivot - endif -c - goto 10 - endif - 999 if(rrem+crem.gt.0)then - write(buff,'(1x,a,i5,a,i5,a)') - x 'CHEPDU:',crem,' columns,',rrem,' rows removed' - call mprnt(buff) - endif - return - end -c -c =========================================================================== -c =========================================================================== -c - subroutine duchek(n,m,mn,nz, - x colbeg,colend,colidx,colnzs, - x rowbeg,rowend,rowidx,rownzs, - x upb,lob,ups,los, - x rhs,obj,addobj,colsta,rowsta,prelen,prehis, - x coln,collst,colmrk,rown,rowlst,rowmrk, - x cnum,clist,cmrk,rnum,rlist,rmrk,procn, - x ppbig,pmaxr,pmbig,pminr, - x p,q,pbig,mbig,maxc,minc, - x big,lbig,tfeas,tzer,bigbou,search,code,prelev) -c -c This subroutine removes singleton rows and may fixes variables -c - integer*4 n,m,mn,nz,colbeg(n),colend(n),colidx(nz), - x rowbeg(m),rowend(m),rowidx(nz),cnum,clist(n),cmrk(n), - x rnum,rlist(m),rmrk(m), - x colsta(n),rowsta(m),prehis(mn),procn,prelen, - x coln,rown,collst(n),rowlst(n),colmrk(n),rowmrk(m), - x ppbig(m),pmbig(m),pbig(n),mbig(n),search,code,prelev -c - real*8 colnzs(nz),rownzs(nz),upb(n),lob(n),ups(m),los(m), - x rhs(m),obj(n),pmaxr(m),pminr(m),p(m),q(m),maxc(n),minc(n), - x addobj,big,lbig,tfeas,tzer,bigbou -c - integer*4 i,j,up,row,col,dir,pnt1,pnt2,p1,p2,crem,rrem,up3, - x lstcnt - real*8 sol,toler,up1,up2 - logical traf - character*99 buff -c -c --------------------------------------------------------------------------- -c - crem=0 - rrem=0 - do while (rnum.ge.1) - row=rlist(1) - if (ups(row).gt.lbig)then - p(row)=0.0d+0 - else - p(row)=-big - endif - if(los(row).lt.-lbig)then - q(row)=0.0d+0 - else - q(row)=big - endif - rmrk(row)=-1 - rlist(1)=rlist(rnum) - rnum=rnum-1 - enddo - - cnum=0 - do i=1,n - if(upb(i).lt.lbig)then - mbig(i)=1 - else - mbig(i)=0 - endif - if(lob(i).gt.-lbig)then - pbig(i)=1 - else - pbig(i)=0 - endif - maxc(i)=0.0d+0 - minc(i)=0.0d+0 - if((colsta(i).gt.-2).and.(upb(i)-lob(i).gt.lbig))then - cnum=cnum+1 - cmrk(i)=1 - clist(cnum)=i - else - cmrk(i)=-2 - endif - enddo - dir=1 - do i=1,m - if(rowsta(i).gt.-2)then - call chgmxm(rowbeg(i),rowend(i),q(i),p(i),rowidx,rownzs, - x pbig,maxc,mbig,minc,lbig,dir,n) - endif - enddo -c - lstcnt=0 - do while (cnum.ne.lstcnt) - lstcnt=lstcnt+1 - if(lstcnt.gt.n)then - lstcnt=1 - search=search-1 - if(search.eq.0)goto 100 - endif - col=clist(lstcnt) - cmrk(col)=-1 - pnt1=colbeg(col) - pnt2=colend(col) - do i=pnt1,pnt2 - row=colidx(i) -c -c Compute new upper bound: up1+(obj-up2)/nzs -c - if(colnzs(i).gt.0.0d+0)then - up2=minc(col) - up3=mbig(col) - else - up2=maxc(col) - up3=pbig(col) - endif - if(p(row).lt.-lbig)then - up1=0.0d+0 - up=1 - else - up1=p(row) - up=0 - endif - if(up.eq.up3)then - sol=up1+(obj(col)-up2)/colnzs(i) - if(abs(sol).lt.bigbou)then - if(q(row)-sol.gt.(abs(sol)+1.0d+0)*tfeas)then - p1=rowbeg(row) - p2=rowend(row) - dir=1 - call modmxm(nz,p1,p2,q(row),sol,rowidx,rownzs, - x pbig,maxc,mbig,minc,lbig,dir,n) - q(row)=sol - do j=p1,p2 - if(cmrk(rowidx(j)).eq.-1)then - if(upb(rowidx(j))-lob(rowidx(j)).gt.lbig)then - cnum=cnum+1 - if(cnum.gt.n)cnum=1 - clist(cnum)=rowidx(j) - cmrk(rowidx(j))=1 - endif - endif - enddo - endif - endif - endif -c -c Compute new lower bound: up1+(obj-up2)/nzs -c - if(colnzs(i).gt.0.0d+0)then - up2=maxc(col) - up3=pbig(col) - else - up2=minc(col) - up3=mbig(col) - endif - if(q(row).gt.lbig)then - up1=0.0d+0 - up=1 - else - up1=q(row) - up=0 - endif - if(up.eq.up3)then - sol=up1+(obj(col)-up2)/colnzs(i) - if(abs(sol).lt.bigbou)then - if(sol-p(row).gt.(abs(sol)+1.0d+0)*tfeas)then - p1=rowbeg(row) - p2=rowend(row) - dir=-1 - call modmxm(nz,p1,p2,p(row),sol,rowidx,rownzs, - x pbig,maxc,mbig,minc,lbig,dir,n) - p(row)=sol - do j=p1,p2 - if(cmrk(rowidx(j)).eq.-1)then - if(upb(rowidx(j))-lob(rowidx(j)).gt.lbig)then - cnum=cnum+1 - if(cnum.gt.n)cnum=1 - clist(cnum)=rowidx(j) - cmrk(rowidx(j))=1 - endif - endif - enddo - endif - endif - endif - enddo - enddo -c -c Dual feasibility check -c - 100 do while (cnum.ne.lstcnt) - lstcnt=lstcnt+1 - if(lstcnt.gt.n)lstcnt=1 - cmrk(clist(lstcnt))=-1 - enddo - cnum=0 - do row=1,m - if(rowsta(row).gt.-2)then - if((p(row)-q(row)).gt.(abs(p(row))+1.0d+0)*tfeas)then - code=3 - cnum=-row-n - goto 999 - else if (iand(prelev,512).gt.0)then - if(q(row)-p(row).lt.(abs(p(row))+1.0d+0)*tfeas)then - sol=(p(row)+q(row))/2.0d+0 - prelen=prelen+1 - prehis(prelen)=row - rowsta(row)=-2-procn - traf=.true. - call remove(n,m,nz,row,rowidx,rownzs,colidx,colnzs, - x rowbeg,rowend,colbeg,colend,obj,sol,traf) - addobj=addobj+rhs(row)*sol - do i=rowbeg(row),rowend(row) - col=rowidx(i) - if(colmrk(col).lt.0)then - coln=coln+1 - collst(coln)=col - endif - colmrk(col)=procn - enddo - rrem=rrem+1 - endif - endif - endif - enddo -c -c Checking variables -c - do 10 col=1,n - if(colsta(col).le.-2)goto 10 - toler=(abs(obj(col))+1.0d+0)*tfeas - if(upb(col).lt.lbig)then - i=1 - else - i=0 - endif - if(lob(col).gt.-lbig)then - j=1 - else - j=0 - endif - if((mbig(col).eq.i).and.(obj(col)-minc(col).lt.-toler))then - sol=upb(col) - else if((pbig(col).eq.j).and.(obj(col)-maxc(col).ge.toler))then - sol=lob(col) - else - goto 10 - endif -c -c Variable is set to a bound -c - if(abs(sol).gt.lbig)then - if(abs(obj(col)).gt.tzer)then - cnum=-col - code=3 - goto 999 - endif - endif - prelen=prelen+1 - prehis(prelen)=col - colsta(col)=-2-procn - traf=.true. - call remove(m,n,nz,col,colidx,colnzs,rowidx,rownzs, - x colbeg,colend,rowbeg,rowend,rhs,sol,traf) - crem=crem+1 - addobj=addobj+obj(col)*sol - do i=colbeg(col),colend(col) - j=colidx(i) - if(rowmrk(j).lt.0)then - rown=rown+1 - rowlst(rown)=j - endif - rowmrk(j)=procn - enddo - dir=-1 - call chgmxm(colbeg(col),colend(col),upb(col),lob(col),colidx, - x colnzs,ppbig,pmaxr,pmbig,pminr,lbig,dir,m) - upb(col)=sol - lob(col)=sol - 10 continue -c - 999 if(rrem+crem.gt.0)then - write(buff,'(1x,a,i5,a,i5,a)') - x 'DUCHEK:',crem,' columns,',rrem,' rows removed' - call mprnt(buff) - endif - return - end -c -c =========================================================================== -c =========================================================================== -c - subroutine bndchk(n,m,mn,nz, - x colbeg,colend,colidx,colnzs, - x rowbeg,rowend,rowidx,rownzs, - x upb,lob,ups,los, - x rhs,obj,addobj,colsta,rowsta,prelen,prehis, - x cnum,list,mrk,procn,oldlob,oldupb, - x ppbig,pmaxr,pmbig,pminr,chglob,chgupb, - x big,lbig,tfeas,search,chgmax,bigbou,code) -c -c This subroutine checks bounds on variables -c NOTE : this subroutine destroys min and max row activity counters ! -c - integer*4 n,m,mn,nz,colbeg(n),colend(n),colidx(nz), - x rowbeg(m),rowend(m),rowidx(nz),cnum,list(n),mrk(n), - x colsta(n),rowsta(m),prehis(mn),procn,prelen, - x ppbig(m),pmbig(m),chglob(n),chgupb(n),search,chgmax,code -c - real*8 colnzs(nz),rownzs(nz),upb(n),lob(n),ups(m),los(m), - x rhs(m),obj(n),pmaxr(m),pminr(m),addobj,big,lbig,bigbou, - x tfeas,oldlob(n),oldupb(n) -c - integer*4 i,j,up,row,col,dir,pnt1,pnt2,p1,p2,crem,rrem,up3,lstcnt - real*8 sol,toler,up1,up2 - logical traf - character*99 buff -c -c --------------------------------------------------------------------------- -c - crem=0 - rrem=0 - cnum=0 - do i=1,n - chglob(i)=0 - chgupb(i)=0 - oldupb(i)=upb(i) - oldlob(i)=lob(i) - enddo - do i=1,m - if(ups(i).gt.lbig)then - pmbig(i)=pmbig(i)+1 - else - pminr(i)=pminr(i)-ups(i) - endif - if(los(i).lt.-lbig)then - ppbig(i)=ppbig(i)+1 - else - pmaxr(i)=pmaxr(i)-los(i) - endif - if(rowsta(i).gt.-2)then - cnum=cnum+1 - mrk(i)=1 - list(cnum)=i - else - mrk(i)=-2 - endif - enddo -c - lstcnt=0 - do while (cnum.ne.lstcnt) - lstcnt=lstcnt+1 - if(lstcnt.gt.m)then - lstcnt=1 - search=search-1 - if(search.eq.0)goto 100 - endif - row=list(lstcnt) - mrk(row)=-1 - pnt1=rowbeg(row) - pnt2=rowend(row) -c - do i=pnt1,pnt2 - col=rowidx(i) -c -c Compute new upper bound: lo1+(rhs-up2)/nzs -c - if(rownzs(i).gt.0.0d+0)then - up2=pminr(row) - up3=pmbig(row) - else - up2=pmaxr(row) - up3=ppbig(row) - endif - if(lob(col).lt.-lbig)then - up1=0.0d+0 - up=1 - else - up1=lob(col) - up=0 - endif - if(up.eq.up3)then - sol=up1+(rhs(row)-up2)/rownzs(i) - toler=(abs(sol)+1.0d+0)*tfeas - if(abs(sol).lt.bigbou)then - if(upb(col)-sol.gt.toler)then - chgupb(col)=chgupb(col)+1 - p1=colbeg(col) - p2=colend(col) - dir=1 - if(lob(col)-sol.gt.toler)then - cnum=-col - code=4 - goto 999 - endif - if(sol-lob(col).lt.toler)then - sol=lob(col) - endif - call modmxm(nz,p1,p2,upb(col),sol,colidx,colnzs, - x ppbig,pmaxr,pmbig,pminr,lbig,dir,m) - upb(col)=sol - if(chgupb(col).lt.chgmax)then - do j=p1,p2 - if(mrk(colidx(j)).eq.-1)then - cnum=cnum+1 - if(cnum.gt.m)cnum=1 - list(cnum)=colidx(j) - mrk(colidx(j))=1 - endif - enddo - endif - endif - endif - endif -c -c Compute new lower bound: up1+(rhs-up2)/nzs -c - if(rownzs(i).gt.0.0d+0)then - up2=pmaxr(row) - up3=ppbig(row) - else - up2=pminr(row) - up3=pmbig(row) - endif - if(upb(col).gt.lbig)then - up1=0.0d+0 - up=1 - else - up1=upb(col) - up=0 - endif - if(up.eq.up3)then - sol=up1+(rhs(row)-up2)/rownzs(i) - toler=(abs(sol)+1.0d+0)*tfeas - if(abs(sol).lt.bigbou)then - if(sol-lob(col).gt.(abs(sol)+1.0d+0)*tfeas)then - chglob(col)=chglob(col)+1 - p1=colbeg(col) - p2=colend(col) - dir=-1 - if((sol-upb(col)).gt.toler)then - cnum=-col - code=4 - goto 999 - endif - if(upb(col)-sol.lt.toler)then - sol=upb(col) - endif - call modmxm(nz,p1,p2,lob(col),sol,colidx,colnzs, - x ppbig,pmaxr,pmbig,pminr,lbig,dir,m) - lob(col)=sol - if(chglob(col).lt.chgmax)then - do j=p1,p2 - if(mrk(colidx(j)).eq.-1)then - cnum=cnum+1 - if(cnum.gt.m)cnum=1 - list(cnum)=colidx(j) - mrk(colidx(j))=1 - endif - enddo - endif - endif - endif - endif - enddo - enddo -c -c Checking row feasibility -c - 100 cnum=0 - do row=1,m - if(rowsta(row).gt.-2)then - sol=(abs(rhs(row))+1.0d+0)*tfeas - if((ppbig(row).eq.0).and.(pmaxr(row)-rhs(row).lt.-sol))then - code=3 - cnum=-row-n - goto 999 - endif - if((pmbig(row).eq.0).and.(rhs(row)-pminr(row).lt.-sol))then - code=3 - cnum=-row-n - goto 999 - endif - endif - enddo -c -c Bound check and modification -c - do col=1,n - if(colsta(col).gt.-2)then - if((lob(col)-upb(col)).gt.(abs(lob(col))+1.0d+0)*tfeas)then - code=4 - cnum=-col - goto 999 - else if(upb(col)-lob(col).lt.abs(lob(col)+1.0d+0)*tfeas)then - sol=(upb(col)+lob(col))/2.0d+0 - prelen=prelen+1 - prehis(prelen)=col - colsta(col)=-2-procn - traf=.true. - call remove(m,n,nz,col,colidx,colnzs,rowidx,rownzs, - x colbeg,colend,rowbeg,rowend,rhs,sol,traf) - crem=crem+1 - addobj=addobj+obj(col)*sol - upb(col)=sol - lob(col)=sol - else - if(chglob(col).gt.0)then - if(oldlob(col).gt.-lbig)rrem=rrem+1 - lob(col)=-big - endif - if(chgupb(col).gt.0)then - if(oldupb(col).lt.lbig)rrem=rrem+1 - upb(col)=big - endif - endif - endif - enddo -c - 999 if(rrem+crem.gt.0)then - write(buff,'(1x,a,i5,a,i5,a)') - x 'BNDCHK:',crem,' columns,',rrem,' bounds removed' - call mprnt(buff) - endif - return - end -c -c =========================================================================== -c ============================================================================ -c - subroutine coldbl(n,m,mn,nz, - x colbeg,colend,colidx,colnzs, - x rowbeg,rowend,rowidx,rownzs, - x upb,lob,obj,colsta, - x prelen,prehis,procn,mark,valc,vartyp, - x big,lbig,tfeas,tzer) -c - integer*4 n,m,mn,nz,colbeg(n),colend(n),colidx(nz), - x rowbeg(m),rowend(m),rowidx(nz),colsta(n), - x prelen,prehis(mn),procn,mark(m),vartyp(n) - real*8 obj(n),lob(n),upb(n),colnzs(nz),rownzs(nz),valc(m), - x big,lbig,tfeas,tzer -c - integer*4 i,j,k,l,col,row,pcol,pnt1,pnt2,ppnt1,ppnt2,pntt1,pntt2, - x crem,rrem,collen - real*8 sd,toler,obj1,obj2,lo1,lo2,up1,up2,sol - logical traf - character*99 buff -c -c ============================================================================ -c - crem=0 - rrem=0 - do i=1,m - mark(i)=0 - enddo -c -c Start search -c - do 25 col=1,n - if((colsta(col).gt.-2).and.(colend(col).ge.colbeg(col)))then - pnt1=colbeg(col) - pnt2=colend(col) - collen=pnt2-pnt1 - do i=pnt1,pnt2 - mark(colidx(i))=col - valc(colidx(i))=colnzs(i) - enddo -c -c Select row -c - row=0 - l=n+1 - do j=pnt1,pnt2 - k=colidx(j) - if(rowend(k)-rowbeg(k).lt.l)then - l=rowend(k)-rowbeg(k) - row=k - endif - enddo -c -c Start search in the row -c - if(row.ne.0)then - pntt1=rowbeg(row) - pntt2=rowend(row) - do 15 l=pntt1,pntt2 - pcol=rowidx(l) - ppnt1=colbeg(pcol) - ppnt2=colend(pcol) - if((pcol.le.col).or.(collen.ne.ppnt2-ppnt1))goto 15 - do i=ppnt1,ppnt2 - if(mark(colidx(i)).ne.col)goto 15 - enddo -c -c Nonzero structure is O.K. -c - sd=valc(colidx(ppnt1))/colnzs(ppnt1) - toler=(abs(sd)+1.0d+0)*tzer - do i=ppnt1,ppnt2 - if(abs(valc(colidx(i))/colnzs(i)-sd).gt.toler)goto 15 - enddo -c -c Nonzeros are dependent, factor : sd, columns: col,pcol -c - obj1=obj(col) - obj2=obj(pcol)*sd -c -c Identical columns found -c - if(abs(obj1-obj2).le.(abs(obj1)+1.0d+0)*tfeas)then - lo1=lob(pcol) - up1=upb(pcol) - if(lob(col).lt.-lbig)then - if(sd.gt.0.0d+0)then - lo2=lob(col) - else - lo2=-lob(col) - endif - else - lo2=lob(col)/sd - endif - if(upb(col).gt.lbig)then - if(sd.gt.0.0d+0)then - up2=upb(col) - else - up2=-upb(col) - endif - else - up2=upb(col)/sd - endif - if(sd.lt.0.0d+0)then - sol=up2 - up2=lo2 - lo2=sol - endif -c -c Store factor and old bound info -c - obj(col)=sd - vartyp(col)=0 - if(lo2.lt.-lbig)then - vartyp(col)=4 - lob(col)=lo1 - else - lob(col)=lo2 - endif - if(up2.gt.lbig)then - vartyp(col)=vartyp(col)+8 - upb(col)=up1 - else - upb(col)=up2 - endif - if((lo1.gt.-lbig).and.(lo2.gt.-lbig))then - lob(pcol)=lo1+lo2 - else - lob(pcol)=-big - endif - if((up1.lt.lbig).and.(up2.lt.lbig))then - upb(pcol)=up1+up2 - else - upb(pcol)=big - endif - prelen=prelen+1 - prehis(prelen)=col - colsta(col)=-2-procn-pcol-10 - traf=.false. - call remove(m,n,nz,col,colidx,colnzs,rowidx,rownzs, - x colbeg,colend,rowbeg,rowend,obj,sol,traf) - crem=crem+1 - goto 25 - endif - 15 continue - endif - endif - 25 continue - if(rrem+crem.gt.0)then - write(buff,'(1x,a,i5,a,i5,a)') - x 'COLDBL:',crem,' columns,',rrem,' rows removed' - call mprnt(buff) - endif - return - end -c ============================================================================ -c ======================================================================== -c - subroutine aggreg(colpnt,colidx,colnzs,rowidx, - x colsta,rowsta,colbeg,colend,rowbeg,rowend, - x rhs,obj,prehis,prelen,mrk,vartyp,slktyp,iwrk1,iwrk2, - x iwrk3,pivcol,pivrow,rwork,addobj,prelev,code) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - common/numer/ tplus,tzer - real*8 tplus,tzer -c - integer*4 colpnt(n1),colidx(cfree),rowidx(rfree), - x colbeg(n),colend(n),rowbeg(m),rowend(m),slktyp(m), - x colsta(n),rowsta(m),prehis(mn),prelen,prelev,code,mrk(mn), - x iwrk1(mn),iwrk2(mn),iwrk3(mn),pivcol(n),pivrow(m),vartyp(n) - real*8 colnzs(cfree),addobj,rhs(m),obj(n), - x rwork(m) -c - real*8 reltol,abstol,redtol,filtol - integer*4 i,j,k,pnt1,pnt2,nfill,pnt,pnto,procn,fpnt - character*99 buff -c - reltol=1.0d-3 - abstol=1.0d-5 - redtol=1.0d-4 - filtol=4.0d+0 -c - if(iand(prelev,128).gt.0)then - procn=8 - pnto=colpnt(1) - pnt=nz+1 - do i=1,n - if(colsta(i).gt.-2)then - pnt1=colbeg(i) - pnt2=colend(i) - colbeg(i)=pnt - do j=pnt1,pnt2 - colidx(pnt)=colidx(j) - colnzs(pnt)=colnzs(j) - pnt=pnt+1 - enddo - colend(i)=pnt-1 - pnt1=pnt2+1 - else - pnt1=colpnt(i) - endif - pnt2=colpnt(i+1)-1 - colpnt(i)=pnto - do j=pnt1,pnt2 - colidx(pnto)=colidx(j) - colnzs(pnto)=colnzs(j) - pnto=pnto+1 - enddo - enddo - colpnt(n+1)=pnto - call elimin(m,n,nz,cfree,rfree, - x colbeg,colend,rowbeg,rowend,colidx,rowidx,colnzs,colsta,rowsta, - x obj,rhs,vartyp,slktyp, - x iwrk1,iwrk2,iwrk1(n+1),iwrk2(n+1),mrk,mrk(n+1), - x iwrk3,iwrk3(n+1),rwork,pivcol,pivrow,abstol,reltol,filtol, - x pivotn,nfill,addobj,fpnt,code) - if(code.ne.0)goto 999 -c -c Compute new column lengths -c - do i=1,n - iwrk1(i)=colpnt(i+1)-colpnt(i) - if(colsta(i).gt.-2)iwrk1(i)=iwrk1(i)+colend(i)-colbeg(i)+1 - enddo - do j=1,pivotn - i=pivrow(j) - pnt1=rowbeg(i) - pnt2=rowend(i) - do k=pnt1,pnt2 - iwrk1(colidx(k))=iwrk1(colidx(k))+1 - enddo - enddo -c -c Generate new pointers for columns -c - pnt=1 - do i=1,n - iwrk2(i)=pnt - pnt=pnt+iwrk1(i) - enddo - if(pnt.gt.fpnt)then - code=-2 - write(buff,'(1x,a)')'Ran out of RERAL memory' - call mprnt(buff) - goto 999 - endif -c -c Assemble the transformed matrix -c - do i=n,1,-1 - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - pnt=iwrk2(i)+iwrk1(i)-1 - do j=pnt2,pnt1,-1 - colidx(pnt)=colidx(j) - colnzs(pnt)=colnzs(j) - pnt=pnt-1 - enddo - if(colsta(i).gt.-2)then - fpnt=iwrk2(i) - pnt1=colbeg(i) - pnt2=colend(i) - do j=pnt1,pnt2 - colidx(fpnt)=colidx(j) - colnzs(fpnt)=colnzs(j) - fpnt=fpnt+1 - enddo - iwrk3(i)=fpnt - endif - enddo - colpnt(1)=1 - do i=1,n - colbeg(i)=iwrk2(i) - colend(i)=iwrk3(i)-1 - colpnt(i+1)=colpnt(i)+iwrk1(i) - enddo - do j=1,pivotn - i=pivrow(j) - pnt1=rowbeg(i) - pnt2=rowend(i) - do k=pnt1,pnt2 - pnt=iwrk3(colidx(k)) - colidx(pnt)=i - colnzs(pnt)=colnzs(k) - iwrk3(colidx(k))=pnt+1 - enddo - enddo -c - do i=1,pivotn - prelen=prelen+1 - prehis(prelen)=pivcol(i) - colsta(pivcol(i))=-2-procn - prelen=prelen+1 - prehis(prelen)=pivrow(i)+n - rowsta(pivrow(i))=-2-procn - enddo - write(buff,'(1x,i5,a,i5,a)')pivotn,' row/cols eliminated, ', - x nfill,' fill-in created.' - call mprnt(buff) - nz=colpnt(n+1)-1 - if(cfree.lt.nz*2)then - code=-2 - write(buff,'(1x,a)')'Ran out of RERAL memory' - call mprnt(buff) - endif - endif -c - if(iand(prelev,256).gt.0)then - do i=1,m - rowend(i)=rowbeg(i)-1 - enddo - do i=1,n - if(colsta(i).gt.-2)then - pnt1=colbeg(i) - pnt2=colend(i) - do j=pnt1,pnt2 - rowend(colidx(j))=rowend(colidx(j))+1 - rowidx(rowend(colidx(j)))=i - colnzs(nz+rowend(colidx(j)))=colnzs(j) - enddo - endif - enddo - call sparser(n,n1,m,nz,colpnt,colbeg,colend,colidx,colnzs, - x rowbeg,rowend,rowidx,colnzs(nz+1),colsta,rowsta,rhs,slktyp, - x mrk,mrk(n+1),tplus,tzer,redtol,reltol,abstol) - endif -c - 999 return - end -c -c ============================================================================ -c -c Numerically more stable version -c -c =========================================================================== -c - subroutine sparser(n,n1,m,nz,colpnt, - x colbeg,colend,colidx,colnzs, - x rowbeg,rowend,rowidx,rownzs, - x colsta,rowsta,rhs,slktyp, - x mark,rflag,tplus,tzer,redtol,reltol,abstol) -c - integer*4 n,n1,m,nz,colpnt(n1),colbeg(n),colend(n),colidx(nz), - x rowbeg(m),rowend(m),rowidx(nz),colsta(n),rowsta(m), - x rflag(m),mark(n),slktyp(m) - real*8 colnzs(nz),rownzs(nz),rhs(m), - x tplus,tzer,redtol,reltol,abstol -c - integer*4 i,j,k,pnt1,pnt2,rpnt1,rpnt2,row,col,prow,pcol, - x pnt,ppnt1,ppnt2,elim,total,totaln,iw,rowlen - real*8 pivot,nval,tol - character*99 buff -c -c --------------------------------------------------------------------------- -c - total=0 - totaln=0 - tol=1.0d+0/reltol - do i=1,m - if(rowsta(i).gt.-2)then - rflag(i)=0 - totaln=totaln+rowend(i)-rowbeg(i)+1 - else - rflag(i)=2 - endif - enddo - do i=1,n - mark(i)=0 - enddo -c - 100 elim=0 - do 20 row=1,m - if((rflag(row).lt.2).and.(slktyp(row).eq.0))then - iw=rflag(row) - pnt1=rowbeg(row) - pnt2=rowend(row) - rowlen=pnt2-pnt1 -c -c Select the shortest column -c - col=0 - k=m+1 - do j=pnt1,pnt2 - i=rowidx(j) - mark(i)=j - if(colend(i)-colbeg(i).lt.k)then - col=i - k=colend(i)-colbeg(i) - endif - enddo - if(col.eq.0)then - rflag(row)=1 - goto 20 - endif -c -c Scan the selected column -c - ppnt1=colbeg(col) - ppnt2=colend(col) - do 30 i=ppnt1,ppnt2 - prow=colidx(i) - rpnt1=rowbeg(prow) - rpnt2=rowend(prow) - if((rowlen.gt.rpnt2-rpnt1).or.(iw+rflag(prow).ge.2).or. - x (row.eq.prow))goto 30 - k=-1 - do pnt=rpnt1,rpnt2 - if(mark(rowidx(pnt)).gt.0)k=k+1 - enddo - if(k.ne.rowlen)goto 30 -c -c Select pivot -c - pcol=0 - pivot=tol - do pnt=rpnt1,rpnt2 - if(mark(rowidx(pnt)).gt.0)then - if(abs(rownzs(mark(rowidx(pnt)))).gt.abstol)then - nval=-rownzs(pnt)/rownzs(mark(rowidx(pnt))) - if(abs(nval).lt.abs(pivot))then - pivot=nval - pcol=rowidx(pnt) - endif - endif - endif - enddo - if(pcol.eq.0)goto 20 -c -c Transformation -c - rflag(prow)=0 - rhs(prow)=rhs(prow)+pivot*rhs(row) - do pnt=rpnt1,rpnt2 - if(mark(rowidx(pnt)).gt.0)then - nval=rownzs(pnt)+pivot*rownzs(mark(rowidx(pnt))) - if(abs(nval).lt.tplus*(abs(rownzs(pnt))))nval=0.0d+0 - rownzs(pnt)=nval - endif - enddo - do while (rpnt1.le.rpnt2) - if(abs(rownzs(rpnt1)).lt.tzer)then - k=rowidx(rpnt1) - rownzs(rpnt1)=rownzs(rpnt2) - rowidx(rpnt1)=rowidx(rpnt2) - rownzs(rpnt2)=0.0d+0 - rowidx(rpnt2)=k - rpnt2=rpnt2-1 - elim=elim+1 - else - rpnt1=rpnt1+1 - endif - enddo - rowend(prow)=rpnt2 - 30 continue - do j=pnt1,pnt2 - mark(rowidx(j))=0 - enddo - rflag(row)=1 - endif - 20 continue - total=total+elim - totaln=totaln-elim - if(dble(elim)/(dble(totaln)+1.0d+0).gt.redtol)goto 100 -c -c making modification in the column file -c - if(total.gt.0)then - do i=1,n - mark(i)=colbeg(i)-1 - enddo - do i=1,m - if(rowsta(i).gt.-2)then - pnt1=rowbeg(i) - pnt2=rowend(i) - do j=pnt1,pnt2 - col=rowidx(j) - mark(col)=mark(col)+1 - colidx(mark(col))=i - colnzs(mark(col))=rownzs(j) - enddo - endif - enddo - pnt=colpnt(1) - do i=1,n - iw=pnt - if(colsta(i).gt.-2)then - pnt1=colbeg(i) - pnt2=mark(i) - colbeg(i)=pnt - do j=pnt1,pnt2 - colnzs(pnt)=colnzs(j) - colidx(pnt)=colidx(j) - pnt=pnt+1 - enddo - pnt1=colend(i)+1 - colend(i)=pnt-1 - else - pnt1=colpnt(i) - endif - pnt2=colpnt(i+1)-1 - do j=pnt1,pnt2 - colnzs(pnt)=colnzs(j) - colidx(pnt)=colidx(j) - pnt=pnt+1 - enddo - colpnt(i)=iw - enddo - colpnt(n+1)=pnt - endif -c - write(buff,'(1x,i5,a)')total,' nonzeros eliminated' - call mprnt(buff) - return - end -c -c =========================================================================== -c =========================================================================== -c - subroutine elimin(m,n,nz,cfre,rfre, - x colbeg,ccol,rowbeg,crow,colidx,rowidx,colnzs,colsta,rowsta, - x obj,rhs,vartyp,slktyp,cpermf,cpermb,rpermf,rpermb,colcan, - x mark,cfill,rfill,workr,pivcol,pivrow,abstol,reltol,filtol, - x pivotn,nfill,addobj,pnt,code) -c - integer*4 m,n,nz,cfre,rfre,colbeg(n),ccol(n),rowbeg(m), - x crow(m),colidx(cfre),rowidx(rfre),colsta(n),rowsta(m), - x cpermf(n),cpermb(n),rpermf(m),rpermb(m),colcan(n),mark(m), - x cfill(n),rfill(m),pivcol(n),pivrow(m),pivotn,code,vartyp(n), - x slktyp(m),nfill,pnt - real*8 workr(m),obj(n),rhs(m),colnzs(cfre),abstol,reltol, - x filtol,addobj -c - integer*4 i,j,k,l,p,pnt1,pnt2,ppnt1,ppnt2,pcol,prow, - x fren,cfirst,rfirst,clast,rlast,endmem,prewcol,mn,fill, - x ccfre,rcfre,rpnt1,rpnt2,ii - real*8 pivot,s -c -c --------------------------------------------------------------------------- -c -c cpermf oszloplista elore lancolasa, fejmutato cfirst -c cpermb oszloplista hatra lancolasa, fejmutato clast -c rpermf sorlista elore lancolase, fejmutato rfirst -c rpermb sorlista hatra lancolasa, fejmutato rlast -c colcan lehetseges pivot oszlopok -c ccol oszlopszamlalok -c crow sorszamlalok (vcstat) -c colbeg oszlopmutatok -c rowbeg sormutatok -c mark eliminacios integer segedtomb -c workr eliminacios real segedtomb -c cfill a sorfolytonos tarolas update-elesehez segedtomb -c rfill a sorfolytonos tarolas update-elesehez segedtomb -c pivcol -c pivrow -c -c -------------------------------------------------------------------------- - pivot=0 - ppnt1=0 -c -c initialization -c - nfill=0 - mn=m+n - endmem=cfre - fren =0 - pivotn=0 - cfirst=0 - clast =0 - rfirst=0 - rlast =0 - do i=1,n - if(colsta(i).gt.-2)then - if(cfirst.eq.0)then - cfirst=i - else - cpermf(clast)=i - endif - cpermb(i)=clast - clast=i - ccol(i)=ccol(i)-colbeg(i)+1 - if(vartyp(i).eq.0)then - fren=fren+1 - colcan(fren)=i - endif - endif - enddo -C CMSSW: Bugfix for an empty matrix, where now clast=0 causes an invalid -C memory access - if(clast.ne.0)then - cpermf(clast)=0 - endif - do i=1,m - mark(i)=0 - if(rowsta(i).gt.-2)then - if(rfirst.eq.0)then - rfirst=i - else - rpermf(rlast)=i - endif - rpermb(i)=rlast - rlast=i - crow(i)=crow(i)-rowbeg(i)+1 - endif - enddo - rpermf(rlast)=0 -c -c Elimination loop -c - 50 pcol=0 - prow=0 - i=-1 -c -c Find pivot -c - do ii=1,fren - p=colcan(ii) - pnt1=colbeg(p) - pnt2=pnt1+ccol(p)-1 - s=0.0d+0 - do j=pnt1,pnt2 - if(s.lt.abs(colnzs(j)))s=abs(colnzs(j)) - enddo - s=s*reltol - do j=pnt1,pnt2 - if(slktyp(colidx(j)).eq.0)then - if(abs(colnzs(j)).gt.abstol)then - k=(ccol(p)-1)*(crow(colidx(j))-1) - if(dble(k).lt.filtol*dble(ccol(p)+crow(colidx(j))-1))then - if((i.lt.0).or.(k.lt.i))then - if(abs(colnzs(j)).gt.s)then - i=k - pcol=p - prow=colidx(j) - pivot=colnzs(j) - ppnt1=ii - endif - else if((k.eq.i).and.(abs(pivot).lt.abs(colnzs(j))))then - pcol=p - prow=colidx(j) - pivot=colnzs(j) - ppnt1=ii - endif - endif - endif - endif - enddo - enddo - if (pcol.eq.0)goto 900 - colcan(ppnt1)=colcan(fren) - fren=fren-1 - pivot=1.0d+0/pivot - rcfre=rfre-rowbeg(rlast)-crow(rlast) - ccfre=endmem-colbeg(clast)-ccol(clast) -c -c compress column file -c - if(ccfre.lt.mn)then - call ccomprs(mn,cfre,ccfre,endmem,nz, - x colbeg,ccol,cfirst,cpermf,colidx,colnzs,code) - if(code.lt.0)goto 999 - endif -c -c remove pcol from the cpermf lists -c - j=cpermb(pcol) - i=cpermf(pcol) - if(j.ne.0)then - cpermf(j)=i - else - cfirst=i - endif - if(i.eq.0)then - clast=j - else - cpermb(i)=j - endif -c -c remove prow from the rpermf lists -c - j=rpermb(prow) - i=rpermf(prow) - if(j.ne.0)then - rpermf(j)=i - else - rfirst=i - endif - if(i.eq.0)then - rlast=j - else - rpermb(i)=j - endif -c -c administration -c - pivotn=pivotn+1 - pivcol(pivotn)=pcol - pivrow(pivotn)=prow - addobj=addobj+obj(pcol)*rhs(prow)*pivot -c -c Create pivot column -c - pnt1=colbeg(pcol) - pnt2=pnt1+ccol(pcol)-1 - ppnt1=endmem-ccol(pcol) - ppnt2=ppnt1+ccol(pcol)-1 - pnt=ppnt1 - do j=pnt1,pnt2 - k=colidx(j) - mark(k)=1 - colidx(pnt)=k - colnzs(pnt)=colnzs(j) - if(k.eq.prow)then - p=pnt - workr(k)=pivot - else - workr(k)=-colnzs(j)*pivot - rhs(k)=rhs(k)+rhs(prow)*workr(k) - endif - pnt=pnt+1 -c - i=rowbeg(k) - do while(rowidx(i).ne.pcol) - i=i+1 - enddo - rowidx(i)=rowidx(rowbeg(k)+crow(k)-1) - rfill(k)=-1 - enddo -c - colbeg(pcol)=ppnt1 - j=colidx(ppnt1) - s=colnzs(ppnt1) - colidx(ppnt1)=colidx(p) - colnzs(ppnt1)=colnzs(p) - colidx(p)=j - colnzs(p)=s - ppnt1=ppnt1+1 -c -c create pivot row -c - pnt1=rowbeg(prow) - crow(prow)=crow(prow)-1 - pnt2=pnt1+crow(prow)-1 - rowbeg(prow)=colbeg(pcol)-crow(prow) - pnt=rowbeg(prow) - do i=pnt1,pnt2 - k=rowidx(i) - j=colbeg(k) - do while(colidx(j).ne.prow) - j=j+1 - enddo - colidx(pnt)=k - colnzs(pnt)=colnzs(j) - pnt=pnt+1 - colidx(j)=colidx(colbeg(k)+ccol(k)-1) - colnzs(j)=colnzs(colbeg(k)+ccol(k)-1) - cfill(k)=ccol(k)-1 - enddo - endmem=endmem-ccol(pcol)-crow(prow) - ccfre=ccfre-ccol(pcol)-crow(prow) -c -c elimination loop -c - rpnt1=rowbeg(prow) - rpnt2=rpnt1+crow(prow)-1 - do p=rpnt1,rpnt2 - i=colidx(p) - s=colnzs(p) - obj(i)=obj(i)-s*obj(pcol)*pivot - fill=ccol(pcol)-1 - pnt1=colbeg(i) - pnt2=pnt1+cfill(i)-1 - do j=pnt1,pnt2 - k=colidx(j) - if(mark(k).ne.0)then - colnzs(j)=colnzs(j)+s*workr(k) - fill=fill-1 - mark(k)=0 - endif - enddo -c -c compute the free space -c - j=cpermf(i) - if(j.eq.0)then - k=endmem-pnt2-1 - else - k=colbeg(j)-pnt2-1 - endif -c -c move column to the end of the column file -c - if(fill.gt.k)then - if (ccfre.lt.m)then - call ccomprs(mn,cfre,ccfre,endmem,nz, - x colbeg,ccol,cfirst,cpermf,colidx,colnzs,code) - if(code.lt.0)goto 999 - pnt1=colbeg(i) - pnt2=pnt1+cfill(i)-1 - endif - if(i.ne.clast)then - j=colbeg(clast)+ccol(clast) - colbeg(i)=j - do k=pnt1,pnt2 - colidx(j)=colidx(k) - colnzs(j)=colnzs(k) - j=j+1 - enddo - pnt1=colbeg(i) - pnt2=j-1 - k=cpermf(i) - j=cpermb(i) - if(j.eq.0)then - cfirst=k - else - cpermf(j)=k - endif - cpermb(k)=j - cpermf(clast)=i - cpermb(i)=clast - clast=i - cpermf(clast)=0 - endif - endif -c -c create fill-in -c - do k=ppnt1,ppnt2 - j=colidx(k) - if(mark(j).eq.0)then - mark(j)=1 - else - pnt2=pnt2+1 - colnzs(pnt2)=s*workr(j) - colidx(pnt2)=j - rfill(j)=rfill(j)+1 - endif - enddo - ccol(i)=pnt2-pnt1+1 - if(i.eq.clast)then - ccfre=endmem-pnt2 - endif - enddo -c -c make space for fills in the row file -c - do j=ppnt1,ppnt2 - i=colidx(j) - mark(i)=0 -c -c compute the free space -c - pnt2=rowbeg(i)+crow(i)-1 - p=rpermf(i) - if(p.eq.0)then - k=rfre-pnt2-1 - else - k=rowbeg(p)-pnt2-1 - endif -c -c move row to the end of the row file -c - if(k.lt.rfill(i))then - if(rcfre.lt.n)then - call rcomprs(mn,rfre, - x rcfre,rowbeg,crow,rfirst,rpermf,rowidx,code) - if(code.lt.0)goto 999 - endif - if(p.ne.0)then - pnt1=rowbeg(i) - pnt2=pnt1+crow(i)-1 - pnt=rowbeg(rlast)+crow(rlast) - rowbeg(i)=pnt - do l=pnt1,pnt2 - rowidx(pnt)=rowidx(l) - pnt=pnt+1 - enddo - prewcol=rpermb(i) - if(prewcol.eq.0)then - rfirst=p - else - rpermf(prewcol)=p - endif - rpermb(p)=prewcol - rpermf(rlast)=i - rpermb(i)=rlast - rlast=i - rpermf(rlast)=0 - endif - endif - crow(i)=crow(i)+rfill(i) - if(i.eq.rlast)rcfre=rfre-crow(i)-rowbeg(i) - nfill=nfill+rfill(i)+1 - enddo -c -c make pointers to the end of the filled rows -c - do j=ppnt1,ppnt2 - rfill(colidx(j))=rowbeg(colidx(j))+crow(colidx(j))-1 - enddo -c -c generate fill-in the row file -c - do j=rpnt1,rpnt2 - i=colidx(j) - pnt1=colbeg(i)+cfill(i) - pnt2=colbeg(i)+ccol(i)-1 - do k=pnt1,pnt2 - rowidx(rfill(colidx(k)))=i - rfill(colidx(k))=rfill(colidx(k))-1 - enddo - enddo - goto 50 -c -c End of the elimination, compress arrays -c - 900 call rcomprs(mn,rfre,rcfre,rowbeg,crow,rfirst,rpermf,rowidx,code) - pnt=endmem - i=clast - do while(i.ne.0) - pnt1=colbeg(i) - pnt2=pnt1+ccol(i)-1 - do j=pnt2,pnt1,-1 - pnt=pnt-1 - colidx(pnt)=colidx(j) - colnzs(pnt)=colnzs(j) - enddo - colbeg(i)=pnt - i=cpermb(i) - enddo -c -c Make pointers form counters -c - do i=1,n - ccol(i)=colbeg(i)+ccol(i)-1 - enddo - do i=1,m - crow(i)=rowbeg(i)+crow(i)-1 - enddo - 999 return - end -c -c =========================================================================== -c This is a POSTSOLV procedure -c -c ======================================================================== -c - subroutine pstsol(colpnt,colidx,colnzs,colsta,rowsta, - x vartyp,slktyp,upb,lob,ups,los,rhs,obj,xs, - x status,rowval,prehis,prelen,big) -c - common/dims/ n,n1,m,mn,nz,cfree,pivotn,denwin,rfree - integer*4 n,n1,m,mn,nz,cfree,pivotn,denwin,rfree -c - integer*4 colpnt(n1),colidx(nz),colsta(n),rowsta(m), - x prehis(mn),prelen,vartyp(n),slktyp(m),status(mn) - real*8 colnzs(nz),upb(n),lob(n),ups(m),los(m), - x rhs(m),obj(n),rowval(m),xs(n),big -c - integer*4 i,j,k,l,p,pnt1,pnt2,row,col - real*8 sol,lo1,lo2,up1,up2,lbig,sol1,sol2,s -c -C CMSSW: Explicit initialization needed - sol=0 - - lbig=0.9d+0*big - do i=1,mn - if(i.le.n)then - j=colsta(i) - else - j=rowsta(i-n) - endif - if(j.eq.-3)then - status(i)=0 - else - status(i)=prelen+1 - endif - enddo -c - do i=1,prelen - status(prehis(i))=i - enddo -c - do i=1,m - rowval(i)=0.0d+0 - if(abs(slktyp(i)).eq.2)rhs(i)=-rhs(i) - enddo -c - do i=1,n - pnt1=colpnt(i) - pnt2=colpnt(i+1)-1 - do j=pnt1,pnt2 - if(abs(slktyp(colidx(j))).eq.2)then - colnzs(j)=-colnzs(j) - endif - enddo - if((status(i).gt.prelen).or.(status(i).eq.0))then - if(vartyp(i).ne.0)then - if(upb(i).lt.lbig)upb(i)=upb(i)+lob(i) - xs(i)=xs(i)+lob(i) - do j=pnt1,pnt2 - rhs(colidx(j))=rhs(colidx(j))+colnzs(j)*lob(i) - enddo - endif - if(abs(vartyp(i)).eq.2)then - obj(i)=-obj(i) - upb(i)=-lob(i) - lob(i)=-big - xs(i)=-xs(i) - do j=pnt1,pnt2 - colnzs(j)=-colnzs(j) - enddo - endif - do j=pnt1,pnt2 - rowval(colidx(j))=rowval(colidx(j))+xs(i)*colnzs(j) - enddo - endif - enddo -c - i=prelen - do while(i.ge.1) - j=prehis(i) - if(j.le.n)then - k=-colsta(j)-2 - if((k.eq.1).or.(k.eq.3).or.(k.eq.5).or.(k.eq.6))then - sol=lob(j) - xs(j)=sol - else if((k.eq.2).or.(k.eq.8))then - row=prehis(i+1)-n - l=colpnt(j) - do while(l.lt.colpnt(j+1)) - if(colidx(l).eq.row)then - sol=colnzs(l) - l=colpnt(j+1) - endif - l=l+1 - enddo - sol=(rhs(row)-rowval(row))/sol - xs(j)=sol - else if(k.eq.4)then - k=0 - sol1=lob(j) - sol2=upb(j) - p=i+1 - do while ((p.le.prelen).and.(prehis(p).gt.n).and. - x (-rowsta(prehis(p)-n)-2.eq.4)) - row=prehis(p)-n - l=colpnt(j) - do while(l.lt.colpnt(j+1)) - if(colidx(l).eq.row)then - sol=colnzs(l) - l=colpnt(j+1) - endif - l=l+1 - enddo - if(los(row).gt.-lbig)then - s=(rhs(row)-rowval(row)+los(row))/sol - if((sol.gt.0.0d+0).and.(s.gt.sol1))then - k=1 - sol1=s - endif - if((sol.lt.0.0d+0).and.(s.lt.sol2))then - k=2 - sol2=s - endif - endif - if(ups(row).lt.lbig)then - s=(rhs(row)-rowval(row)+ups(row))/sol - if((sol.gt.0.0d+0).and.(s.lt.sol2))then - k=2 - sol2=s - endif - if((sol.lt.0.0d+0).and.(s.gt.sol1))then - k=1 - sol1=s - endif - endif - p=p+1 - enddo - if(k.eq.1)sol=sol1 - if(k.eq.2)sol=sol2 - if(k.eq.0)then - sol=sol1 - if(sol.lt.-lbig)sol=sol2 - if(sol.gt.lbig)sol=0.0d+0 - endif - xs(j)=sol - else if(k.gt.17)then - col=k-17 - if((vartyp(j).eq.4).or.(vartyp(j).eq.12))then - lo2=-big - lo1=lob(j) - else - lo2=lob(j) - if((lo2.gt.-lbig).and.(lob(col).gt.-lbig))then - lo1=lob(col)-lo2 - else - lo1=-big - endif - endif - if((vartyp(j).eq.8).or.(vartyp(j).eq.12))then - up2=big - up1=upb(j) - else - up2=upb(j) - if((up2.lt.lbig).and.(upb(col).lt.lbig))then - up1=upb(col)-up2 - else - up1=big - endif - endif - lob(col)=lo1 - upb(col)=up1 - sol=0.0d+0 - if(sol.lt.lo2)sol=lo2 - if(sol.gt.up2)sol=up2 - if(xs(col)-sol.lt.lo1)sol=xs(col)-lo1 - if(xs(col)-sol.gt.up1)sol=xs(col)-up1 - xs(j)=sol*obj(j) - xs(col)=xs(col)-sol - sol=0.0d+0 - endif - l=colpnt(j) - do while(l.lt.colpnt(j+1)) - row=colidx(l) - if(status(row+n).gt.status(j))then - rhs(row)=rhs(row)+colnzs(l)*sol - else - rowval(row)=rowval(row)+colnzs(l)*sol - endif - l=l+1 - enddo - endif - i=i-1 - enddo -c - return - end -c -c ============================================================================ - subroutine mprnt(buff) - character*99 buff - common/logprt/ loglog,lfile - integer*4 loglog,lfile -c - 1 format(a79) - if((loglog.eq.1).or.(loglog.eq.3))then - write(*,1)buff - endif - if((loglog.eq.2).or.(loglog.eq.3))then - write(lfile,1)buff - endif -c - return - end -c ========================================================================== -c - subroutine timer(i) - implicit none - integer*4 i - real t -c -c -------------------------------------------------------------------------- -c -c Implementation based on the Fortran 95 cpu_time() - call cpu_time(t) - i=nint(t*100.0) - end -c -c ========================================================================= diff --git a/RecoHI/HiJetAlgos/test/step3_RAW2DIGI_L1Reco_RECO_VALIDATION_DQM.py b/RecoHI/HiJetAlgos/test/step3_RAW2DIGI_L1Reco_RECO_VALIDATION_DQM.py deleted file mode 100644 index 10c932ae906c4..0000000000000 --- a/RecoHI/HiJetAlgos/test/step3_RAW2DIGI_L1Reco_RECO_VALIDATION_DQM.py +++ /dev/null @@ -1,100 +0,0 @@ -# Auto generated configuration file -# using: -# Revision: 1.19 -# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v -# with command line options: step3 --datatier GEN-SIM-RECO,DQMIO --conditions auto:starthi_HIon -s RAW2DIGI,L1Reco,RECO,VALIDATION,DQM --scenario HeavyIons --eventcontent RECOSIM,DQM -n 100 --no_exec -import FWCore.ParameterSet.Config as cms - -process = cms.Process('RECO') - -# import of standard configurations -process.load('Configuration.StandardSequences.Services_cff') -process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') -process.load('FWCore.MessageService.MessageLogger_cfi') -process.load('Configuration.EventContent.EventContentHeavyIons_cff') -process.load('SimGeneral.MixingModule.mixNoPU_cfi') -process.load('Configuration.StandardSequences.GeometryRecoDB_cff') -process.load('Configuration.StandardSequences.MagneticField_38T_cff') -process.load('Configuration.StandardSequences.RawToDigi_cff') -process.load('Configuration.StandardSequences.L1Reco_cff') -process.load('Configuration.StandardSequences.ReconstructionHeavyIons_cff') -process.load('Configuration.StandardSequences.ValidationHeavyIons_cff') -process.load('DQMOffline.Configuration.DQMOfflineHeavyIonsMC_cff') -process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') - -process.maxEvents = cms.untracked.PSet( - input = cms.untracked.int32(5) -) - -# Input source -process.source = cms.Source("PoolSource", - secondaryFileNames = cms.untracked.vstring(), - fileNames = cms.untracked.vstring('/store/relval/CMSSW_7_2_0_pre5/RelValHydjetQ_MinBias_2760GeV/GEN-SIM-DIGI-RAW-HLTDEBUG/STARTHI72_V1-v1/00000/CE04360B-DB2F-E411-8AA5-02163E00FEB9.root') -) - -process.options = cms.untracked.PSet( - -) - -# Production Info -process.configurationMetadata = cms.untracked.PSet( - version = cms.untracked.string('$Revision: 1.19 $'), - annotation = cms.untracked.string('step3 nevts:100'), - name = cms.untracked.string('Applications') -) - -# Output definition - -process.RECOSIMoutput = cms.OutputModule("PoolOutputModule", - splitLevel = cms.untracked.int32(0), - eventAutoFlushCompressedSize = cms.untracked.int32(5242880), - outputCommands = process.RECOSIMEventContent.outputCommands, - fileName = cms.untracked.string('step3_RAW2DIGI_L1Reco_RECO_VALIDATION_DQM.root'), - dataset = cms.untracked.PSet( - filterName = cms.untracked.string(''), - dataTier = cms.untracked.string('GEN-SIM-RECO') - ) -) - -process.DQMoutput = cms.OutputModule("DQMRootOutputModule", - splitLevel = cms.untracked.int32(0), - outputCommands = process.DQMEventContent.outputCommands, - fileName = cms.untracked.string('step3_RAW2DIGI_L1Reco_RECO_VALIDATION_DQM_inDQM.root'), - dataset = cms.untracked.PSet( - filterName = cms.untracked.string(''), - dataTier = cms.untracked.string('DQMIO') - ) -) - -# Additional output definition - -# Other statements -process.mix.playback = True -process.mix.digitizers = cms.PSet() -for a in process.aliases: delattr(process, a) -process.RandomNumberGeneratorService.restoreStateLabel=cms.untracked.string("randomEngineStateProducer") -from Configuration.AlCa.GlobalTag import GlobalTag -process.GlobalTag = GlobalTag(process.GlobalTag, 'STARTHI72_V1::All', '') - -# Path and EndPath definitions -process.raw2digi_step = cms.Path(process.RawToDigi) -process.L1Reco_step = cms.Path(process.L1Reco) -process.reconstruction_step = cms.Path(process.reconstructionHeavyIons) -process.prevalidation_step = cms.Path(process.prevalidation) -process.dqmoffline_step = cms.Path(process.DQMOfflineHeavyIons) -process.validation_step = cms.EndPath(process.validation) -process.RECOSIMoutput_step = cms.EndPath(process.RECOSIMoutput) -process.DQMoutput_step = cms.EndPath(process.DQMoutput) - - -# Schedule definition -process.schedule = cms.Schedule(process.raw2digi_step,process.L1Reco_step,process.reconstruction_step,process.prevalidation_step,process.validation_step,process.dqmoffline_step,process.RECOSIMoutput_step,process.DQMoutput_step) - - -# Automatic addition of the customisation function from SimGeneral.MixingModule.fullMixCustomize_cff -from SimGeneral.MixingModule.fullMixCustomize_cff import setCrossingFrameOn - -#call to customisation function setCrossingFrameOn imported from SimGeneral.MixingModule.fullMixCustomize_cff -process = setCrossingFrameOn(process) - -# End of customisation functions diff --git a/RecoHI/HiMuonAlgos/python/HiRegionalRecoMuon_cff.py b/RecoHI/HiMuonAlgos/python/HiReRecoMuon_cff.py similarity index 97% rename from RecoHI/HiMuonAlgos/python/HiRegionalRecoMuon_cff.py rename to RecoHI/HiMuonAlgos/python/HiReRecoMuon_cff.py index cf12979e6a776..c6cb290020fb4 100644 --- a/RecoHI/HiMuonAlgos/python/HiRegionalRecoMuon_cff.py +++ b/RecoHI/HiMuonAlgos/python/HiReRecoMuon_cff.py @@ -69,4 +69,4 @@ reMuonTrackRecoPbPb = cms.Sequence(muontracking_re) # HI muon sequence (passed to RecoHI.Configuration.Reconstruction_HI_cff) -regionalMuonRecoPbPb = cms.Sequence(muonreco_plus_isolation_re) +reMuonRecoPbPb = cms.Sequence(muonreco_plus_isolation_re) diff --git a/RecoHI/HiMuonAlgos/python/HiRecoMuon_cff.py b/RecoHI/HiMuonAlgos/python/HiRecoMuon_cff.py index 07a0dcf9001af..bf382638fabe8 100644 --- a/RecoHI/HiMuonAlgos/python/HiRecoMuon_cff.py +++ b/RecoHI/HiMuonAlgos/python/HiRecoMuon_cff.py @@ -2,14 +2,13 @@ from RecoMuon.Configuration.RecoMuonPPonly_cff import * -hiTracks = 'hiGeneralTracks' #heavy ion track label +hiTracks = 'hiSelectedTracks' #heavy ion track label # replace with heavy ion track label muons = muons1stStep.clone() muons.inputCollectionLabels = [hiTracks, 'globalMuons', 'standAloneMuons:UpdatedAtVtx','tevMuons:firstHit','tevMuons:picky','tevMuons:dyt'] muons.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks','tev firstHit', 'tev picky', 'tev dyt'] muons.TrackExtractorPSet.inputTrackCollection = hiTracks -muons.minPt = cms.double(0.8) #muons.fillGlobalTrackRefits = False muonEcalDetIds.inputCollection = "muons" diff --git a/RecoHI/HiMuonAlgos/python/HiRegitMuonDetachedTripletStep_cff.py b/RecoHI/HiMuonAlgos/python/HiRegitMuonDetachedTripletStep_cff.py index 9587b97266874..44763a89a19fe 100644 --- a/RecoHI/HiMuonAlgos/python/HiRegitMuonDetachedTripletStep_cff.py +++ b/RecoHI/HiMuonAlgos/python/HiRegitMuonDetachedTripletStep_cff.py @@ -26,7 +26,7 @@ ) # SEEDING LAYERS -hiRegitMuDetachedTripletStepSeedLayers = RecoHI.HiTracking.hiRegitDetachedTripletStep_cff.hiRegitDetachedTripletStepSeedLayers.clone() +hiRegitMuDetachedTripletStepSeedLayers = RecoHI.HiTracking.hiRegitDetachedTripletStep_cff.hiRegitDetachedTripletStepSeedLayers.clone() hiRegitMuDetachedTripletStepSeedLayers.BPix.skipClusters = cms.InputTag('hiRegitMuDetachedTripletStepClusters') hiRegitMuDetachedTripletStepSeedLayers.FPix.skipClusters = cms.InputTag('hiRegitMuDetachedTripletStepClusters') @@ -48,14 +48,13 @@ hiRegitMuDetachedTripletStepTrajectoryFilter.minPt = 0.8 # after each new hit, apply pT cut for traj w/ at least minHitsMinPt = cms.int32(3), hiRegitMuDetachedTripletStepTrajectoryBuilder = RecoHI.HiTracking.hiRegitDetachedTripletStep_cff.hiRegitDetachedTripletStepTrajectoryBuilder.clone( - trajectoryFilter = cms.PSet(refToPSet_ = cms.string('hiRegitMuDetachedTripletStepTrajectoryFilter')), + trajectoryFilter = cms.PSet(refToPSet_ = cms.string('hiRegitMuDetachedTripletStepTrajectoryFilter')), clustersToSkip = cms.InputTag('hiRegitMuDetachedTripletStepClusters') ) hiRegitMuDetachedTripletStepTrackCandidates = RecoHI.HiTracking.hiRegitDetachedTripletStep_cff.hiRegitDetachedTripletStepTrackCandidates.clone( src = cms.InputTag('hiRegitMuDetachedTripletStepSeeds'), - TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('hiRegitDetachedTripletStepTrajectoryBuilder')), - maxNSeeds=100000 + TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('hiRegitMuDetachedTripletStepTrajectoryBuilder')) ) # fitting: feed new-names diff --git a/RecoHI/HiMuonAlgos/python/HiRegitMuonInitialStep_cff.py b/RecoHI/HiMuonAlgos/python/HiRegitMuonInitialStep_cff.py index 439a72f81614e..cff26f6ad0899 100644 --- a/RecoHI/HiMuonAlgos/python/HiRegitMuonInitialStep_cff.py +++ b/RecoHI/HiMuonAlgos/python/HiRegitMuonInitialStep_cff.py @@ -51,11 +51,12 @@ # building: feed the new-named seeds -hiRegitMuInitialStepTrajectoryFilter = RecoHI.HiTracking.hiRegitInitialStep_cff.hiRegitInitialStepTrajectoryFilter.clone() +hiRegitMuInitialStepTrajectoryFilter = RecoHI.HiTracking.hiRegitInitialStep_cff.hiRegitInitialStepTrajectoryFilter.clone() hiRegitMuInitialStepTrajectoryFilter.minPt = 2.5 # after each new hit, apply pT cut for traj w/ at least minHitsMinPt = cms.int32(3), + hiRegitMuInitialStepTrajectoryBuilder = RecoHI.HiTracking.hiRegitInitialStep_cff.hiRegitInitialStepTrajectoryBuilder.clone( - trajectoryFilter = cms.PSet(refToPSet_ = cms.string('hiRegitMuInitialStepTrajectoryFilter')), + trajectoryFilter = cms.PSet(refToPSet_ = cms.string('hiRegitMuInitialStepTrajectoryFilter')), clustersToSkip = cms.InputTag('hiRegitMuInitialStepClusters') ) diff --git a/RecoHI/HiMuonAlgos/python/HiRegitMuonLowPtTripletStep_cff.py b/RecoHI/HiMuonAlgos/python/HiRegitMuonLowPtTripletStep_cff.py index 3e8f58dd5c0c7..dd85efe2c4f58 100644 --- a/RecoHI/HiMuonAlgos/python/HiRegitMuonLowPtTripletStep_cff.py +++ b/RecoHI/HiMuonAlgos/python/HiRegitMuonLowPtTripletStep_cff.py @@ -40,9 +40,10 @@ import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi hiRegitMuLowPtTripletStepSeeds.OrderedHitsFactoryPSet.GeneratorPSet.SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor + # building: feed the new-named seeds hiRegitMuLowPtTripletStepTrajectoryFilter = RecoHI.HiTracking.hiRegitLowPtTripletStep_cff.hiRegitLowPtTripletStepTrajectoryFilter.clone() -hiRegitMuLowPtTripletStepTrajectoryFilter.minPt = 0.8 # after each new hit, apply pT cut for traj w/ at least minHitsMinPt = cms.int32(3), +hiRegitMuLowPtTripletStepTrajectoryFilter.minPt = 0.8 # after each new hit, apply pT cut for traj w/ at least minHitsMinPt = cms.int32(3), hiRegitMuLowPtTripletStepTrajectoryBuilder = RecoHI.HiTracking.hiRegitLowPtTripletStep_cff.hiRegitLowPtTripletStepTrajectoryBuilder.clone( @@ -53,7 +54,7 @@ # track candidates hiRegitMuLowPtTripletStepTrackCandidates = RecoHI.HiTracking.hiRegitLowPtTripletStep_cff.hiRegitLowPtTripletStepTrackCandidates.clone( src = cms.InputTag('hiRegitMuLowPtTripletStepSeeds'), - TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('hiRegitLowPtTripletStepTrajectoryBuilder')), + TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('hiRegitMuLowPtTripletStepTrajectoryBuilder')), maxNSeeds = cms.uint32(1000000) ) @@ -69,14 +70,17 @@ trackSelectors= cms.VPSet( RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiLooseMTS.clone( name = 'hiRegitMuLowPtTripletStepLoose', + # minNumberLayers = 10 ), #end of pset RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiTightMTS.clone( name = 'hiRegitMuLowPtTripletStepTight', preFilterName = 'hiRegitMuLowPtTripletStepLoose', + # minNumberLayers = 10 ), RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiHighpurityMTS.clone( name = 'hiRegitMuLowPtTripletStep', preFilterName = 'hiRegitMuLowPtTripletStepTight', + # minNumberLayers = 10 ), ) #end of vpset ) diff --git a/RecoHI/HiMuonAlgos/python/HiRegitMuonMixedTripletStep_cff.py b/RecoHI/HiMuonAlgos/python/HiRegitMuonMixedTripletStep_cff.py index 40a9ef44fdba9..165f0aa6c54e7 100644 --- a/RecoHI/HiMuonAlgos/python/HiRegitMuonMixedTripletStep_cff.py +++ b/RecoHI/HiMuonAlgos/python/HiRegitMuonMixedTripletStep_cff.py @@ -68,20 +68,20 @@ hiRegitMuMixedTripletStepTrajectoryFilter = RecoTracker.IterativeTracking.MixedTripletStep_cff.mixedTripletStepTrajectoryFilter.clone() hiRegitMuMixedTripletStepTrajectoryFilter.minPt = 1. hiRegitMuMixedTripletStepTrajectoryFilter.minimumNumberOfHits = 6 -hiRegitMuMixedTripletStepTrajectoryFilter.minHitsMinPt = 4 +hiRegitMuMixedTripletStepTrajectoryFilter.minHitsMinPt = 4 # after each new hit, apply pT cut for traj w/ at least minHitsMinPt = cms.int32(3), hiRegitMuMixedTripletStepTrajectoryBuilder = RecoTracker.IterativeTracking.MixedTripletStep_cff.mixedTripletStepTrajectoryBuilder.clone( - trajectoryFilter = cms.PSet(refToPSet_ = cms.string('hiRegitMuMixedTripletStepTrajectoryFilter')), + trajectoryFilter = cms.PSet(refToPSet_ = cms.string('hiRegitMuMixedTripletStepTrajectoryFilter')), clustersToSkip = cms.InputTag('hiRegitMuMixedTripletStepClusters'), minNrOfHitsForRebuild = 6 #change from default 4 ) hiRegitMuMixedTripletStepTrackCandidates = RecoTracker.IterativeTracking.MixedTripletStep_cff.mixedTripletStepTrackCandidates.clone( src = cms.InputTag('hiRegitMuMixedTripletStepSeeds'), - TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('hiMixedTripletTrajectoryBuilder')), + TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('hiRegitMuMixedTripletStepTrajectoryBuilder')), maxNSeeds = cms.uint32(1000000) ) @@ -112,11 +112,11 @@ ) #end of clone hiRegitMuonMixedTripletStep = cms.Sequence(hiRegitMuMixedTripletStepClusters* - hiRegitMixedTripletStepSeedLayersA* - hiRegitMuMixedTripletStepSeedsA* - hiRegitMixedTripletStepSeedLayersB* - hiRegitMuMixedTripletStepSeedsB* - hiRegitMuMixedTripletStepSeeds* - hiRegitMuMixedTripletStepTrackCandidates* - hiRegitMuMixedTripletStepTracks* - hiRegitMuMixedTripletStepSelector) + hiRegitMuMixedTripletStepSeedLayersA* + hiRegitMuMixedTripletStepSeedsA* + hiRegitMuMixedTripletStepSeedLayersB* + hiRegitMuMixedTripletStepSeedsB* + hiRegitMuMixedTripletStepSeeds* + hiRegitMuMixedTripletStepTrackCandidates* + hiRegitMuMixedTripletStepTracks* + hiRegitMuMixedTripletStepSelector) diff --git a/RecoHI/HiMuonAlgos/python/HiRegitMuonPixelLessStep_cff.py b/RecoHI/HiMuonAlgos/python/HiRegitMuonPixelLessStep_cff.py index cb74d8f7ccdfc..d87dc9e6be019 100644 --- a/RecoHI/HiMuonAlgos/python/HiRegitMuonPixelLessStep_cff.py +++ b/RecoHI/HiMuonAlgos/python/HiRegitMuonPixelLessStep_cff.py @@ -43,12 +43,12 @@ # building: feed the new-named seeds hiRegitMuPixelLessStepTrajectoryFilter = RecoTracker.IterativeTracking.PixelLessStep_cff.pixelLessStepTrajectoryFilter.clone() -hiRegitMuPixelLessStepTrajectoryFilter.minPt = 1.7 -hiRegitMuPixelLessStepTrajectoryFilter.minimumNumberOfHits = 6 -hiRegitMuPixelLessStepTrajectoryFilter.minHitsMinPt = 4 +hiRegitMuPixelLessStepTrajectoryFilter.minPt = 1.7 +hiRegitMuPixelLessStepTrajectoryFilter.minimumNumberOfHits = 6 +hiRegitMuPixelLessStepTrajectoryFilter.minHitsMinPt = 4 hiRegitMuPixelLessStepTrajectoryBuilder = RecoTracker.IterativeTracking.PixelLessStep_cff.pixelLessStepTrajectoryBuilder.clone( - trajectoryFilter = cms.PSet(refToPSet_ = cms.string('hiRegitMuPixelLessStepTrajectoryFilter')), + trajectoryFilter = cms.PSet(refToPSet_ = cms.string('hiRegitMuPixelLessStepTrajectoryFilter')), clustersToSkip = cms.InputTag('hiRegitMuPixelLessStepClusters'), minNrOfHitsForRebuild = 6 #change from default 4 ) diff --git a/RecoHI/HiMuonAlgos/python/HiRegitMuonPixelPairStep_cff.py b/RecoHI/HiMuonAlgos/python/HiRegitMuonPixelPairStep_cff.py index fc8448d29b347..2924ddaf6af16 100644 --- a/RecoHI/HiMuonAlgos/python/HiRegitMuonPixelPairStep_cff.py +++ b/RecoHI/HiMuonAlgos/python/HiRegitMuonPixelPairStep_cff.py @@ -45,15 +45,16 @@ # building: feed the new-named seeds -hiRegitMuPixelPairStepTrajectoryFilter = RecoHI.HiTracking.hiRegitPixelPairStep_cff.hiRegitPixelPairStepTrajectoryFilter.clone() -hiRegitMuPixelPairStepTrajectoryFilter.minPt = 0.8 -hiRegitMuPixelPairStepTrajectoryFilter.minimumNumberOfHits = 6 -hiRegitMuPixelPairStepTrajectoryFilter.minHitsMinPt = 4 +hiRegitMuPixelPairStepTrajectoryFilter = RecoHI.HiTracking.hiRegitPixelPairStep_cff.hiRegitPixelPairStepTrajectoryFilter.clone() +hiRegitMuPixelPairStepTrajectoryFilter.minPt = 0.8 +hiRegitMuPixelPairStepTrajectoryFilter.minimumNumberOfHits = 6 +hiRegitMuPixelPairStepTrajectoryFilter.minHitsMinPt = 4 hiRegitMuPixelPairStepTrajectoryBuilder = RecoHI.HiTracking.hiRegitPixelPairStep_cff.hiRegitPixelPairStepTrajectoryBuilder.clone( - trajectoryFilter = cms.PSet(refToPSet_ = cms.string('hiRegitMuPixelPairStepTrajectoryFilter')), + trajectoryFilter = cms.PSet(refToPSet_ = cms.string('hiRegitMuPixelPairStepTrajectoryFilter')), + clustersToSkip = cms.InputTag('hiRegitMuPixelPairStepClusters'), minNrOfHitsForRebuild = 6 #change from default 4 ) @@ -89,7 +90,7 @@ ) hiRegitMuonPixelPairStep = cms.Sequence(hiRegitMuPixelPairStepClusters* - hiRegitPixelPairStepSeedLayers* + hiRegitMuPixelPairStepSeedLayers* hiRegitMuPixelPairStepSeeds* hiRegitMuPixelPairStepTrackCandidates* hiRegitMuPixelPairStepTracks* diff --git a/RecoHI/HiMuonAlgos/python/HiRegitMuonTobTecStep_cff.py b/RecoHI/HiMuonAlgos/python/HiRegitMuonTobTecStep_cff.py index 6fec7c9c5321c..6dbdbab9dadf5 100644 --- a/RecoHI/HiMuonAlgos/python/HiRegitMuonTobTecStep_cff.py +++ b/RecoHI/HiMuonAlgos/python/HiRegitMuonTobTecStep_cff.py @@ -24,14 +24,14 @@ ) # SEEDING LAYERS -hiRegitMuTobTecStepSeedLayers = RecoTracker.IterativeTracking.TobTecStep_cff.tobTecStepSeedLayersPair.clone() +hiRegitMuTobTecStepSeedLayers = RecoTracker.IterativeTracking.TobTecStep_cff.tobTecStepSeedLayersPair.clone() hiRegitMuTobTecStepSeedLayers.layerList.append('TOB1+TOB2') hiRegitMuTobTecStepSeedLayers.TOB.skipClusters = cms.InputTag('hiRegitMuTobTecStepClusters') hiRegitMuTobTecStepSeedLayers.TEC.skipClusters = cms.InputTag('hiRegitMuTobTecStepClusters') # seeding -hiRegitMuTobTecStepSeeds = RecoTracker.IterativeTracking.TobTecStep_cff.tobTecStepSeedsPair.clone() +hiRegitMuTobTecStepSeeds = RecoTracker.IterativeTracking.TobTecStep_cff.tobTecStepSeedsPair.clone() hiRegitMuTobTecStepSeeds.RegionFactoryPSet = HiTrackingRegionFactoryFromSTAMuonsBlock.clone() hiRegitMuTobTecStepSeeds.ClusterCheckPSet.doClusterCheck = False # do not check for max number of clusters pixel or strips hiRegitMuTobTecStepSeeds.RegionFactoryPSet.MuonTrackingRegionBuilder.EscapePt = 2.0 @@ -45,17 +45,17 @@ hiRegitMuTobTecStepInOutTrajectoryFilter = RecoTracker.IterativeTracking.TobTecStep_cff.tobTecStepInOutTrajectoryFilter.clone() hiRegitMuTobTecStepInOutTrajectoryFilter.minPt = 1.7 hiRegitMuTobTecStepInOutTrajectoryFilter.minimumNumberOfHits = 6 -hiRegitMuTobTecStepInOutTrajectoryFilter.minHitsMinPt = 4 +hiRegitMuTobTecStepInOutTrajectoryFilter.minHitsMinPt = 4 hiRegitMuTobTecStepTrajectoryFilter = RecoTracker.IterativeTracking.TobTecStep_cff.tobTecStepTrajectoryFilter.clone() -hiRegitMuTobTecStepTrajectoryFilter.minPt = 1.7 +hiRegitMuTobTecStepTrajectoryFilter.minPt = 1.7 hiRegitMuTobTecStepTrajectoryFilter.minimumNumberOfHits = 6 -hiRegitMuTobTecStepTrajectoryFilter.minHitsMinPt = 4 +hiRegitMuTobTecStepTrajectoryFilter.minHitsMinPt = 4 hiRegitMuTobTecStepTrajectoryBuilder = RecoTracker.IterativeTracking.TobTecStep_cff.tobTecStepTrajectoryBuilder.clone( - trajectoryFilter = cms.PSet(refToPSet_ = cms.string('hiRegitMuTobTecStepTrajectoryFilter')), - inOutTrajectoryFilter = cms.PSet(refToPSet_ = cms.string('hiRegitMuTobTecStepInOutTrajectoryFilter')), + trajectoryFilter = cms.PSet(refToPSet_ = cms.string('hiRegitMuTobTecStepTrajectoryFilter')), + inOutTrajectoryFilter = cms.PSet(refToPSet_ = cms.string('hiRegitMuTobTecStepInOutTrajectoryFilter')), clustersToSkip = cms.InputTag('hiRegitMuTobTecStepClusters'), ) diff --git a/RecoHI/HiTracking/interface/HIBestVertexProducer.h b/RecoHI/HiTracking/interface/HIBestVertexProducer.h index 7a326a0ae561f..4da6b36d952b0 100644 --- a/RecoHI/HiTracking/interface/HIBestVertexProducer.h +++ b/RecoHI/HiTracking/interface/HIBestVertexProducer.h @@ -3,9 +3,6 @@ #include "FWCore/Framework/interface/EDProducer.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "DataFormats/BeamSpot/interface/BeamSpot.h" -#include "DataFormats/VertexReco/interface/Vertex.h" -#include "DataFormats/VertexReco/interface/VertexFwd.h" namespace edm { class Event; class EventSetup; } @@ -19,8 +16,8 @@ class HIBestVertexProducer : public edm::EDProducer private: void beginJob(); edm::ParameterSet theConfig; - edm::EDGetTokenT theBeamSpotTag; - edm::EDGetTokenT theMedianVertexCollection; - edm::EDGetTokenT theAdaptiveVertexCollection; + edm::InputTag theBeamSpotTag; + edm::InputTag theMedianVertexCollection; + edm::InputTag theAdaptiveVertexCollection; }; #endif diff --git a/RecoHI/HiTracking/interface/HICaloCompatibleTrackSelector.h b/RecoHI/HiTracking/interface/HICaloCompatibleTrackSelector.h index 380f0a814906a..60313e3dac783 100644 --- a/RecoHI/HiTracking/interface/HICaloCompatibleTrackSelector.h +++ b/RecoHI/HiTracking/interface/HICaloCompatibleTrackSelector.h @@ -17,6 +17,7 @@ #include "FWCore/Framework/interface/EDProducer.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Utilities/interface/InputTag.h" #include "DataFormats/TrackReco/interface/TrackFwd.h" #include "DataFormats/TrackReco/interface/Track.h" @@ -24,21 +25,11 @@ #include "DataFormats/VertexReco/interface/VertexFwd.h" #include "DataFormats/VertexReco/interface/Vertex.h" #include "DataFormats/BeamSpot/interface/BeamSpot.h" -#include "SimDataFormats/TrackingAnalysis/interface/TrackingParticle.h" -#include "SimDataFormats/TrackingAnalysis/interface/TrackingParticleFwd.h" - -#include "DataFormats/ParticleFlowReco/interface/PFBlock.h" -#include "DataFormats/ParticleFlowReco/interface/PFCluster.h" -#include "DataFormats/ParticleFlowReco/interface/PFClusterFwd.h" -#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" - -#include "DataFormats/CaloTowers/interface/CaloTower.h" -#include "DataFormats/CaloTowers/interface/CaloTowerFwd.h" -#include "DataFormats/CaloTowers/interface/CaloTowerCollection.h" - #include "TrackingTools/PatternTools/interface/Trajectory.h" #include "TrackingTools/PatternTools/interface/TrajTrackAssociation.h" +#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" +#include "DataFormats/CaloTowers/interface/CaloTowerCollection.h" // ROOT includes #include "TF1.h" @@ -69,12 +60,10 @@ namespace reco { namespace modules { bool selectByTowers(TI ti, const edm::Handle hSrcTrack, const edm::Handle towers, bool isTowerThere); /// source collection label - edm::EDGetTokenT srcTracks_; - edm::EDGetTokenT srcPFCands_; - edm::EDGetTokenT srcTower_; - edm::EDGetTokenT > srcTrackTrajs_; - edm::EDGetTokenT srcTrackTrajAssoc_; - + edm::InputTag srcTracks_; + edm::InputTag srcPFCands_; + edm::InputTag srcTower_; + // bool applyPtDepCut_; bool usePFCandMatching_; diff --git a/RecoHI/HiTracking/plugins/HIBestVertexProducer.cc b/RecoHI/HiTracking/plugins/HIBestVertexProducer.cc index 0a48effdc0797..9367e13944b32 100644 --- a/RecoHI/HiTracking/plugins/HIBestVertexProducer.cc +++ b/RecoHI/HiTracking/plugins/HIBestVertexProducer.cc @@ -5,6 +5,9 @@ #include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Framework/interface/Event.h" +#include "DataFormats/VertexReco/interface/Vertex.h" +#include "DataFormats/VertexReco/interface/VertexFwd.h" +#include "DataFormats/BeamSpot/interface/BeamSpot.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include @@ -15,9 +18,9 @@ using namespace edm; /*****************************************************************************/ HIBestVertexProducer::HIBestVertexProducer (const edm::ParameterSet& ps) : theConfig(ps), - theBeamSpotTag(consumes(ps.getParameter("beamSpotLabel"))), - theMedianVertexCollection(consumes(ps.getParameter("medianVertexCollection"))), - theAdaptiveVertexCollection(consumes(ps.getParameter("adaptiveVertexCollection"))) + theBeamSpotTag(ps.getParameter("beamSpotLabel")), + theMedianVertexCollection(ps.getParameter("medianVertexCollection")), + theAdaptiveVertexCollection(ps.getParameter("adaptiveVertexCollection")) { produces(); } @@ -47,7 +50,7 @@ void HIBestVertexProducer::produce //** Get precise adaptive vertex **/ edm::Handle vc1; - ev.getByToken(theAdaptiveVertexCollection, vc1); + ev.getByLabel(theAdaptiveVertexCollection, vc1); const reco::VertexCollection *vertices1 = vc1.product(); if(vertices1->size()==0) @@ -67,18 +70,18 @@ void HIBestVertexProducer::produce //** Get fast median vertex **/ edm::Handle vc2; - ev.getByToken(theMedianVertexCollection, vc2); + ev.getByLabel(theMedianVertexCollection, vc2); const reco::VertexCollection * vertices2 = vc2.product(); //** Get beam spot position and error **/ reco::BeamSpot beamSpot; edm::Handle beamSpotHandle; - ev.getByToken(theBeamSpotTag, beamSpotHandle); + ev.getByLabel(theBeamSpotTag, beamSpotHandle); if( beamSpotHandle.isValid() ) beamSpot = *beamSpotHandle; else - LogError("HeavyIonVertexing") << "no beamspot found " << endl; + LogError("HeavyIonVertexing") << "no beamspot with name: '" << theBeamSpotTag << "'" << endl; if(vertices2->size() > 0) { diff --git a/RecoHI/HiTracking/plugins/HIPixelClusterVtxProducer.cc b/RecoHI/HiTracking/plugins/HIPixelClusterVtxProducer.cc index aff27c89c8dca..3dc286de45531 100644 --- a/RecoHI/HiTracking/plugins/HIPixelClusterVtxProducer.cc +++ b/RecoHI/HiTracking/plugins/HIPixelClusterVtxProducer.cc @@ -14,6 +14,8 @@ #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" #include "Geometry/CommonDetUnit/interface/GeomDet.h" +#include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h" + #include "DataFormats/GeometryVector/interface/LocalPoint.h" #include "DataFormats/GeometryVector/interface/GlobalPoint.h" @@ -27,7 +29,7 @@ /*****************************************************************************/ HIPixelClusterVtxProducer::HIPixelClusterVtxProducer(const edm::ParameterSet& ps) - : srcPixelsString_(ps.getParameter("pixelRecHits")), + : srcPixels_(ps.getParameter("pixelRecHits")), minZ_(ps.getParameter("minZ")), maxZ_(ps.getParameter("maxZ")), zStep_(ps.getParameter("zStep")) @@ -35,8 +37,6 @@ HIPixelClusterVtxProducer::HIPixelClusterVtxProducer(const edm::ParameterSet& ps { // Constructor produces(); - srcPixels_ = (consumes(srcPixelsString_)); - } @@ -56,7 +56,7 @@ void HIPixelClusterVtxProducer::produce(edm::Event& ev, const edm::EventSetup& e // get pixel rechits edm::Handle hRecHits; - ev.getByToken(srcPixels_,hRecHits); + ev.getByLabel(edm::InputTag(srcPixels_),hRecHits); // get tracker geometry if (hRecHits.isValid()) { diff --git a/RecoHI/HiTracking/plugins/HIPixelClusterVtxProducer.h b/RecoHI/HiTracking/plugins/HIPixelClusterVtxProducer.h index 37a4e8d6a231d..f19bc8047072d 100644 --- a/RecoHI/HiTracking/plugins/HIPixelClusterVtxProducer.h +++ b/RecoHI/HiTracking/plugins/HIPixelClusterVtxProducer.h @@ -4,8 +4,6 @@ #include "FWCore/Framework/interface/EDProducer.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h" - namespace edm { class Run; class Event; class EventSetup; } class TrackerGeometry; @@ -27,8 +25,7 @@ class HIPixelClusterVtxProducer : public edm::EDProducer virtual void produce(edm::Event& ev, const edm::EventSetup& es); int getContainedHits(const std::vector &hits, double z0, double &chi); - std::string srcPixelsString_; //pixel rec hits - edm::EDGetTokenT srcPixels_; + std::string srcPixels_; //pixel rec hits double minZ_; double maxZ_; diff --git a/RecoHI/HiTracking/plugins/HIPixelMedianVtxProducer.cc b/RecoHI/HiTracking/plugins/HIPixelMedianVtxProducer.cc index ffc7635676b86..2ed02936bcfe6 100644 --- a/RecoHI/HiTracking/plugins/HIPixelMedianVtxProducer.cc +++ b/RecoHI/HiTracking/plugins/HIPixelMedianVtxProducer.cc @@ -19,7 +19,7 @@ /*****************************************************************************/ HIPixelMedianVtxProducer::HIPixelMedianVtxProducer(const edm::ParameterSet& ps) : - theTrackCollection(consumes(ps.getParameter("TrackCollection"))), + theTrackCollection(ps.getParameter("TrackCollection")), thePtMin(ps.getParameter("PtMin")), thePeakFindThresh(ps.getParameter("PeakFindThreshold")), thePeakFindMaxZ(ps.getParameter("PeakFindMaxZ")), @@ -37,7 +37,7 @@ void HIPixelMedianVtxProducer::produce { // Get pixel tracks edm::Handle trackCollection; - ev.getByToken(theTrackCollection, trackCollection); + ev.getByLabel(theTrackCollection, trackCollection); const reco::TrackCollection tracks_ = *(trackCollection.product()); // Select tracks above minimum pt diff --git a/RecoHI/HiTracking/plugins/HIPixelMedianVtxProducer.h b/RecoHI/HiTracking/plugins/HIPixelMedianVtxProducer.h index c58d701769498..849b6d3d8db9b 100644 --- a/RecoHI/HiTracking/plugins/HIPixelMedianVtxProducer.h +++ b/RecoHI/HiTracking/plugins/HIPixelMedianVtxProducer.h @@ -7,6 +7,8 @@ #include "DataFormats/TrackReco/interface/Track.h" #include "DataFormats/TrackReco/interface/TrackFwd.h" +#include "FWCore/Utilities/interface/InputTag.h" + namespace edm { class Event; class EventSetup; } class HIPixelMedianVtxProducer : public edm::EDProducer @@ -19,7 +21,7 @@ class HIPixelMedianVtxProducer : public edm::EDProducer private: void beginJob(){}; - edm::EDGetTokenT theTrackCollection; + edm::InputTag theTrackCollection; double thePtMin; unsigned int thePeakFindThresh; double thePeakFindMaxZ; diff --git a/RecoHI/HiTracking/python/HILowPtConformalPixelTracks_cfi.py b/RecoHI/HiTracking/python/HILowPtConformalPixelTracks_cfi.py deleted file mode 100644 index fb126a39233d9..0000000000000 --- a/RecoHI/HiTracking/python/HILowPtConformalPixelTracks_cfi.py +++ /dev/null @@ -1,51 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -from RecoPixelVertexing.PixelTriplets.PixelTripletHLTGenerator_cfi import * -from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * -from RecoHI.HiTracking.HIPixelTrackFilter_cfi import * -from RecoHI.HiTracking.HITrackingRegionProducer_cfi import * - -from RecoPixelVertexing.PixelTrackFitting.PixelFitterByConformalMappingAndLine_cfi import * - -hiConformalPixelTracks = cms.EDProducer("PixelTrackProducer", - - #passLabel = cms.string('Pixel triplet low-pt tracks with vertex constraint'), - - # Region - RegionFactoryPSet = cms.PSet( - ComponentName = cms.string("GlobalTrackingRegionWithVerticesProducer"), - RegionPSet = cms.PSet( - HiLowPtTrackingRegionWithVertexBlock - ) - ), - - # Ordered Hits - OrderedHitsFactoryPSet = cms.PSet( - ComponentName = cms.string( "StandardHitTripletGenerator" ), - SeedingLayers = cms.string( "PixelLayerTriplets" ), - GeneratorPSet = cms.PSet( - PixelTripletHLTGenerator - ) - ), - - # Fitter - FitterPSet = cms.PSet( PixelFitterByConformalMappingAndLine - ), - - # Filter - useFilterWithES = cms.bool( True ), - FilterPSet = cms.PSet( - HiConformalPixelFilterBlock - ), - - # Cleaner - CleanerPSet = cms.PSet( - ComponentName = cms.string( "TrackCleaner" ) - ) - ) - -# increase threshold for triplets in generation step (default: 10000) -hiConformalPixelTracks.OrderedHitsFactoryPSet.GeneratorPSet.maxElement = 5000000 - -hiConformalPixelTracks.FitterPSet.fixImpactParameter = cms.double(0.0) -hiConformalPixelTracks.FitterPSet.TTRHBuilder = cms.string('TTRHBuilderWithoutAngle4PixelTriplets') diff --git a/RecoHI/HiTracking/python/HIPixelTrackFilter_cfi.py b/RecoHI/HiTracking/python/HIPixelTrackFilter_cfi.py index cd562a7641170..31f80ac662ea8 100644 --- a/RecoHI/HiTracking/python/HIPixelTrackFilter_cfi.py +++ b/RecoHI/HiTracking/python/HIPixelTrackFilter_cfi.py @@ -37,15 +37,3 @@ beamSpot = cms.InputTag( "offlineBeamSpot" ), siPixelRecHits = cms.InputTag( "siPixelRecHits" ) ) - -HiConformalPixelFilterBlock = cms.PSet( - ComponentName = cms.string( "HIPixelTrackFilter" ), - ptMin = cms.double( 0.2 ), - chi2 = cms.double( 80.0 ), - useClusterShape = cms.bool( False ), - VertexCollection = cms.InputTag("hiSelectedVertex"), - nSigmaTipMaxTolerance = cms.double( 999.0 ), - tipMax = cms.double( 999.0 ), - nSigmaLipMaxTolerance = cms.double( 14.0 ), - lipMax = cms.double( 999.0 ) - ) diff --git a/RecoHI/HiTracking/python/HISelectedTracks_cfi.py b/RecoHI/HiTracking/python/HISelectedTracks_cfi.py index f42849b32eff1..e6ddfdee46d5c 100644 --- a/RecoHI/HiTracking/python/HISelectedTracks_cfi.py +++ b/RecoHI/HiTracking/python/HISelectedTracks_cfi.py @@ -36,5 +36,4 @@ #complete sequence hiTracksWithQuality = cms.Sequence(hiInitialStepSelector - #* hiSelectedTracks -) + * hiSelectedTracks) diff --git a/RecoHI/HiTracking/python/HITrackingRegionProducer_cfi.py b/RecoHI/HiTracking/python/HITrackingRegionProducer_cfi.py index 687652f0fb2b9..7600db6ef47fc 100644 --- a/RecoHI/HiTracking/python/HITrackingRegionProducer_cfi.py +++ b/RecoHI/HiTracking/python/HITrackingRegionProducer_cfi.py @@ -14,21 +14,6 @@ sigmaZVertex = cms.double(3.0) ) - -# global tracking region for low-pt pixel tracks -HiLowPtTrackingRegionWithVertexBlock = cms.PSet( - ptMin = cms.double(0.2), - originRadius = cms.double(0.2), - nSigmaZ = cms.double(3.0), - beamSpot = cms.InputTag("offlineBeamSpot"), - precise = cms.bool(True), - useFoundVertices = cms.bool(True), - VertexCollection = cms.InputTag("hiSelectedVertex"), - useFixedError = cms.bool(True), - fixedError = cms.double(0.2), - sigmaZVertex = cms.double(3.0) - ) - # limited tracking region for pixel proto-tracks passed to vertexing HiTrackingRegionForPrimaryVertexBlock = cms.PSet( ptMin = cms.double( 0.7 ), diff --git a/RecoHI/HiTracking/python/HiTracking_cff.py b/RecoHI/HiTracking/python/HiTracking_cff.py deleted file mode 100644 index b47aeab2ca589..0000000000000 --- a/RecoHI/HiTracking/python/HiTracking_cff.py +++ /dev/null @@ -1,23 +0,0 @@ - -from RecoHI.HiTracking.HILowPtConformalPixelTracks_cfi import * -from RecoHI.HiTracking.LowPtTracking_PbPb_cff import * -from RecoHI.HiTracking.hiSecondPixelTripletStep_cff import * -from RecoHI.HiTracking.hiMixedTripletStep_cff import * -from RecoHI.HiTracking.hiPixelPairStep_cff import * -from RecoHI.HiTracking.MergeTrackCollectionsHI_cff import * - -hiTracking = cms.Sequence( - hiBasicTracking - *hiSecondPixelTripletStep - *hiPixelPairStep - *hiGeneralTracks - ) - -hiTracking_wConformalPixel = cms.Sequence( - hiBasicTracking - *hiSecondPixelTripletStep - *hiPixelPairStep - *hiGeneralTracks - *hiConformalPixelTracks - ) - diff --git a/RecoHI/HiTracking/python/HighPtTracking_PbPb_cff.py b/RecoHI/HiTracking/python/HighPtTracking_PbPb_cff.py index 8a72c2e2ebae8..65f832630a992 100644 --- a/RecoHI/HiTracking/python/HighPtTracking_PbPb_cff.py +++ b/RecoHI/HiTracking/python/HighPtTracking_PbPb_cff.py @@ -20,14 +20,14 @@ hiGlobalPrimTracks = RecoTracker.TrackProducer.CTFFinalFitWithMaterial_cfi.ctfWithMaterialTracks.clone( src = 'hiPrimTrackCandidates', useHitsSplitting=True, - AlgorithmName = 'initialStep' + AlgorithmName = 'iter0' ) ### track quality cuts from RecoHI.HiTracking.HISelectedTracks_cfi import * ### paths -hiBasicTracking = cms.Sequence(hiPixelVertices +heavyIonTracking = cms.Sequence(hiPixelVertices * hiPrimSeeds * hiPrimTrackCandidates * hiGlobalPrimTracks diff --git a/RecoHI/HiTracking/python/RecoHiTracker_EventContent_cff.py b/RecoHI/HiTracking/python/RecoHiTracker_EventContent_cff.py index 384e0872d28a5..5e812593bf047 100644 --- a/RecoHI/HiTracking/python/RecoHiTracker_EventContent_cff.py +++ b/RecoHI/HiTracking/python/RecoHiTracker_EventContent_cff.py @@ -3,8 +3,7 @@ #Full Event content RecoHiTrackerFEVT = cms.PSet( outputCommands = cms.untracked.vstring( - 'keep *_hiGeneralTracks_*_*', - 'keep *_hiConformalPixelTracks_*_*', + 'keep *_hiSelectedTracks_*_*', 'keep *_hiPixel3PrimTracks_*_*', 'keep *_hiPixel3ProtoTracks_*_*', 'keep *_hiSelectedProtoTracks_*_*', @@ -26,8 +25,8 @@ #RECO content RecoHiTrackerRECO = cms.PSet( outputCommands = cms.untracked.vstring( - 'keep *_hiGeneralTracks_*_*', - 'keep *_hiConformalPixelTracks_*_*', + 'keep *_hiSelectedTracks_*_*', + #'keep *_hiPixel3PrimTracks_*_*', 'keep recoVertexs_hiPixelMedianVertex_*_*', 'keep recoVertexs_hiPixelAdaptiveVertex_*_*', 'keep recoVertexs_hiSelectedVertex_*_*', @@ -45,8 +44,7 @@ #AOD content RecoHiTrackerAOD = cms.PSet( - outputCommands = cms.untracked.vstring('keep recoTracks_hiGeneralTracks_*_*', - 'keep recoTracks_hiConformalPixelTracks_*_*', - 'keep recoVertexs_hiSelectedVertex_*_*' + outputCommands = cms.untracked.vstring('keep recoTracks_hiSelectedTracks_*_*', + 'keep recoVertexs_hiSelectedVertex_*_*' ) ) diff --git a/RecoHI/HiTracking/python/hiIterTracking_cff.py b/RecoHI/HiTracking/python/hiIterTracking_cff.py new file mode 100644 index 0000000000000..014f1fc7b5e49 --- /dev/null +++ b/RecoHI/HiTracking/python/hiIterTracking_cff.py @@ -0,0 +1,10 @@ +from RecoHI.HiTracking.hiSecondPixelTripletStep_cff import * +from RecoHI.HiTracking.hiMixedTripletStep_cff import * +from RecoHI.HiTracking.hiPixelPairStep_cff import * +from RecoHI.HiTracking.MergeTrackCollectionsHI_cff import * + +hiIterTracking = cms.Sequence( + hiSecondPixelTripletStep + *hiPixelPairStep + *hiGeneralTracks + ) diff --git a/RecoHI/HiTracking/python/hiMixedTripletStep_cff.py b/RecoHI/HiTracking/python/hiMixedTripletStep_cff.py index 21c2697be287a..b7c4434088cfe 100644 --- a/RecoHI/HiTracking/python/hiMixedTripletStep_cff.py +++ b/RecoHI/HiTracking/python/hiMixedTripletStep_cff.py @@ -162,7 +162,7 @@ # TRACK FITTING import RecoTracker.TrackProducer.TrackProducer_cfi hiMixedTripletGlobalPrimTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone( - AlgorithmName = cms.string('mixedTripletStep'), + AlgorithmName = cms.string('iter4'), src = 'hiMixedTripletTrackCandidates' ) diff --git a/RecoHI/HiTracking/python/hiPixelPairStep_cff.py b/RecoHI/HiTracking/python/hiPixelPairStep_cff.py index f5cb4a3950f42..e5451c28d8994 100644 --- a/RecoHI/HiTracking/python/hiPixelPairStep_cff.py +++ b/RecoHI/HiTracking/python/hiPixelPairStep_cff.py @@ -9,7 +9,6 @@ trajectories = cms.InputTag("hiSecondPixelTripletGlobalPrimTracks"), overrideTrkQuals = cms.InputTag('hiSecondPixelTripletStepSelector','hiSecondPixelTripletStep'), TrackQuality = cms.string('highPurity'), - minNumberOfLayersWithMeasBeforeFiltering = cms.int32(0), pixelClusters = cms.InputTag("siPixelClusters"), stripClusters = cms.InputTag("siStripClusters"), Common = cms.PSet( @@ -30,16 +29,6 @@ 'BPix1+FPix1_pos', 'BPix1+FPix1_neg', 'BPix2+FPix1_pos', 'BPix2+FPix1_neg', 'FPix1_pos+FPix2_pos', 'FPix1_neg+FPix2_neg'), - BPix = cms.PSet( - TTRHBuilder = cms.string('TTRHBuilderWithoutAngle4PixelPairs'), - HitProducer = cms.string('siPixelRecHits'), - skipClusters = cms.InputTag('hiPixelPairClusters') - ), - FPix = cms.PSet( - TTRHBuilder = cms.string('TTRHBuilderWithoutAngle4PixelPairs'), - HitProducer = cms.string('siPixelRecHits'), - skipClusters = cms.InputTag('hiPixelPairClusters') - ) ) # SEEDS @@ -56,8 +45,6 @@ hiPixelPairSeeds.OrderedHitsFactoryPSet.maxElement = 5000000 hiPixelPairSeeds.ClusterCheckPSet.MaxNumberOfPixelClusters = 5000000 hiPixelPairSeeds.ClusterCheckPSet.MaxNumberOfCosmicClusters = 50000000 -hiPixelPairSeeds.ClusterCheckPSet.MaxNumberOfCosmicClusters = 50000000 -del hiPixelPairSeeds.ClusterCheckPSet.cut hiPixelPairSeeds.SeedComparitorPSet = cms.PSet( ComponentName = cms.string('PixelClusterShapeSeedComparitor'), @@ -78,43 +65,34 @@ import TrackingTools.KalmanUpdators.Chi2MeasurementEstimatorESProducer_cfi hiPixelPairChi2Est = TrackingTools.KalmanUpdators.Chi2MeasurementEstimatorESProducer_cfi.Chi2MeasurementEstimator.clone( - ComponentName = cms.string('hiPixelPairChi2Est'), - nSigma = cms.double(3.0), - MaxChi2 = cms.double(9.0), - minGoodStripCharge = cms.double(2069), - pTChargeCutThreshold = cms.double(15.) - ) + ComponentName = cms.string('hiPixelPairChi2Est'), + nSigma = cms.double(3.0), + MaxChi2 = cms.double(9.0) + ) # TRACK BUILDING import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi hiPixelPairTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone( MeasurementTrackerName = '', trajectoryFilter = cms.PSet(refToPSet_ = cms.string('hiPixelPairTrajectoryFilter')), + clustersToSkip = cms.InputTag('hiPixelPairClusters'), maxCand = 3, - estimator = cms.string('hiPixelPairChi2Est'), - maxDPhiForLooperReconstruction = cms.double(2.0), - maxPtForLooperReconstruction = cms.double(0.7) + #estimator = cms.string('hiPixelPairChi2Est') ) # MAKING OF TRACK CANDIDATES import RecoTracker.CkfPattern.CkfTrackCandidates_cfi hiPixelPairTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone( src = cms.InputTag('hiPixelPairSeeds'), - clustersToSkip = cms.InputTag('hiPixelPairClusters'), - TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('hiPixelPairTrajectoryBuilder')), - ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput - numHitsForSeedCleaner = cms.int32(50), - onlyPixelHitsForSeedCleaner = cms.bool(True), - + TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('hiPixelPairTrajectoryBuilder')) ) # TRACK FITTING import RecoTracker.TrackProducer.TrackProducer_cfi hiPixelPairGlobalPrimTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone( - AlgorithmName = cms.string('pixelPairStep'), src = 'hiPixelPairTrackCandidates', - Fitter = cms.string('FlexibleKFFittingSmoother') + AlgorithmName = cms.string('iter2') ) diff --git a/RecoHI/HiTracking/python/hiRegitDetachedTripletStep_cff.py b/RecoHI/HiTracking/python/hiRegitDetachedTripletStep_cff.py index f3d6dd66bd0fd..054f44e7d9792 100644 --- a/RecoHI/HiTracking/python/hiRegitDetachedTripletStep_cff.py +++ b/RecoHI/HiTracking/python/hiRegitDetachedTripletStep_cff.py @@ -62,8 +62,8 @@ # fitting: feed new-names hiRegitDetachedTripletStepTracks = RecoTracker.IterativeTracking.DetachedTripletStep_cff.detachedTripletStepTracks.clone( src = 'hiRegitDetachedTripletStepTrackCandidates', - #AlgorithmName = cms.string('jetCoreRegionalStep'), - AlgorithmName = cms.string('detachedTripletStep'), + #AlgorithmName = cms.string('iter7'), + AlgorithmName = cms.string('iter3'), ) diff --git a/RecoHI/HiTracking/python/hiRegitInitialStep_cff.py b/RecoHI/HiTracking/python/hiRegitInitialStep_cff.py index 5a0c859af073c..5d7f27df29d01 100644 --- a/RecoHI/HiTracking/python/hiRegitInitialStep_cff.py +++ b/RecoHI/HiTracking/python/hiRegitInitialStep_cff.py @@ -58,7 +58,7 @@ # fitting: feed new-names hiRegitInitialStepTracks = RecoTracker.IterativeTracking.InitialStep_cff.initialStepTracks.clone( src = 'hiRegitInitialStepTrackCandidates', - AlgorithmName = cms.string('initialStep') + AlgorithmName = cms.string('iter0') ) diff --git a/RecoHI/HiTracking/python/hiRegitLowPtTripletStep_cff.py b/RecoHI/HiTracking/python/hiRegitLowPtTripletStep_cff.py index 716cc27568ad5..9fe61ae5603f1 100644 --- a/RecoHI/HiTracking/python/hiRegitLowPtTripletStep_cff.py +++ b/RecoHI/HiTracking/python/hiRegitLowPtTripletStep_cff.py @@ -64,8 +64,8 @@ # fitting: feed new-names hiRegitLowPtTripletStepTracks = RecoTracker.IterativeTracking.LowPtTripletStep_cff.lowPtTripletStepTracks.clone( src = 'hiRegitLowPtTripletStepTrackCandidates', - #AlgorithmName = cms.string('pixelLessStep') - AlgorithmName = cms.string('lowPtTripletStep') + #AlgorithmName = cms.string('iter5') + AlgorithmName = cms.string('iter1') ) diff --git a/RecoHI/HiTracking/python/hiRegitMixedTripletStep_cff.py b/RecoHI/HiTracking/python/hiRegitMixedTripletStep_cff.py index 4b758ddf8baa7..78ad96779062a 100644 --- a/RecoHI/HiTracking/python/hiRegitMixedTripletStep_cff.py +++ b/RecoHI/HiTracking/python/hiRegitMixedTripletStep_cff.py @@ -85,8 +85,8 @@ # fitting: feed new-names hiRegitMixedTripletStepTracks = RecoTracker.IterativeTracking.MixedTripletStep_cff.mixedTripletStepTracks.clone( src = 'hiRegitMixedTripletStepTrackCandidates', - #AlgorithmName = cms.string('conversionStep'), - AlgorithmName = cms.string('mixedTripletStep'), + #AlgorithmName = cms.string('iter8'), + AlgorithmName = cms.string('iter4'), ) # Track selection diff --git a/RecoHI/HiTracking/python/hiRegitPixelPairStep_cff.py b/RecoHI/HiTracking/python/hiRegitPixelPairStep_cff.py index 5d5ce1892e918..8c9b785938423 100644 --- a/RecoHI/HiTracking/python/hiRegitPixelPairStep_cff.py +++ b/RecoHI/HiTracking/python/hiRegitPixelPairStep_cff.py @@ -62,7 +62,8 @@ # fitting: feed new-names hiRegitPixelPairStepTracks = RecoTracker.IterativeTracking.PixelPairStep_cff.pixelPairStepTracks.clone( src = 'hiRegitPixelPairStepTrackCandidates', - AlgorithmName = cms.string('pixelPairStep'), + #AlgorithmName = cms.string('iter6'), + AlgorithmName = cms.string('iter2'), ) diff --git a/RecoHI/HiTracking/python/hiRegitTracking_cff.py b/RecoHI/HiTracking/python/hiRegitTracking_cff.py index e16f1dd703a70..8e476e8ebba54 100644 --- a/RecoHI/HiTracking/python/hiRegitTracking_cff.py +++ b/RecoHI/HiTracking/python/hiRegitTracking_cff.py @@ -21,30 +21,30 @@ hiRegitInitialStepSeeds.RegionFactoryPSet.RegionPSet.originRadius = 0.02 hiRegitLowPtTripletStepSeeds.RegionFactoryPSet.RegionPSet.originRadius = 0.02 -hiRegitPixelPairStepSeeds.RegionFactoryPSet.RegionPSet.originRadius = 0.015 +hiRegitPixelPairStepSeeds.RegionFactoryPSet.RegionPSet.originRadius = 0.02 hiRegitDetachedTripletStepSeeds.RegionFactoryPSet.RegionPSet.originRadius = 1.5 -hiRegitMixedTripletStepSeedsA.RegionFactoryPSet.RegionPSet.originRadius = 0.5 +hiRegitMixedTripletStepSeedsA.RegionFactoryPSet.RegionPSet.originRadius = 1.0 hiRegitMixedTripletStepSeedsB.RegionFactoryPSet.RegionPSet.originRadius = 0.5 hiRegitInitialStepSeeds.RegionFactoryPSet.RegionPSet.originHalfLength = 0.02 hiRegitLowPtTripletStepSeeds.RegionFactoryPSet.RegionPSet.originHalfLength = 0.02 -hiRegitPixelPairStepSeeds.RegionFactoryPSet.RegionPSet.originHalfLength = 0.015 +hiRegitPixelPairStepSeeds.RegionFactoryPSet.RegionPSet.originHalfLength = 0.02 hiRegitDetachedTripletStepSeeds.RegionFactoryPSet.RegionPSet.originHalfLength = 1.5 -hiRegitMixedTripletStepSeedsA.RegionFactoryPSet.RegionPSet.originHalfLength = 0.5 +hiRegitMixedTripletStepSeedsA.RegionFactoryPSet.RegionPSet.originHalfLength = 1.0 hiRegitMixedTripletStepSeedsB.RegionFactoryPSet.RegionPSet.originHalfLength = 0.5 -hiRegitInitialStepSeeds.RegionFactoryPSet.RegionPSet.deltaPhiRegion = 0.4 -hiRegitInitialStepSeeds.RegionFactoryPSet.RegionPSet.deltaEtaRegion = 0.4 -hiRegitLowPtTripletStepSeeds.RegionFactoryPSet.RegionPSet.deltaPhiRegion = 0.4 -hiRegitLowPtTripletStepSeeds.RegionFactoryPSet.RegionPSet.deltaEtaRegion = 0.4 -hiRegitPixelPairStepSeeds.RegionFactoryPSet.RegionPSet.deltaPhiRegion = 0.4 -hiRegitPixelPairStepSeeds.RegionFactoryPSet.RegionPSet.deltaEtaRegion = 0.4 -hiRegitDetachedTripletStepSeeds.RegionFactoryPSet.RegionPSet.deltaPhiRegion = 0.4 -hiRegitDetachedTripletStepSeeds.RegionFactoryPSet.RegionPSet.deltaEtaRegion = 0.4 -hiRegitMixedTripletStepSeedsA.RegionFactoryPSet.RegionPSet.deltaPhiRegion = 0.4 -hiRegitMixedTripletStepSeedsA.RegionFactoryPSet.RegionPSet.deltaEtaRegion = 0.4 -hiRegitMixedTripletStepSeedsB.RegionFactoryPSet.RegionPSet.deltaPhiRegion = 0.4 -hiRegitMixedTripletStepSeedsB.RegionFactoryPSet.RegionPSet.deltaEtaRegion = 0.4 +hiRegitInitialStepSeeds.RegionFactoryPSet.RegionPSet.deltaPhiRegion = 0.3 +hiRegitInitialStepSeeds.RegionFactoryPSet.RegionPSet.deltaEtaRegion = 0.3 +hiRegitLowPtTripletStepSeeds.RegionFactoryPSet.RegionPSet.deltaPhiRegion = 0.3 +hiRegitLowPtTripletStepSeeds.RegionFactoryPSet.RegionPSet.deltaEtaRegion = 0.3 +hiRegitPixelPairStepSeeds.RegionFactoryPSet.RegionPSet.deltaPhiRegion = 0.3 +hiRegitPixelPairStepSeeds.RegionFactoryPSet.RegionPSet.deltaEtaRegion = 0.3 +hiRegitDetachedTripletStepSeeds.RegionFactoryPSet.RegionPSet.deltaPhiRegion = 0.3 +hiRegitDetachedTripletStepSeeds.RegionFactoryPSet.RegionPSet.deltaEtaRegion = 0.3 +hiRegitMixedTripletStepSeedsA.RegionFactoryPSet.RegionPSet.deltaPhiRegion = 0.3 +hiRegitMixedTripletStepSeedsA.RegionFactoryPSet.RegionPSet.deltaEtaRegion = 0.3 +hiRegitMixedTripletStepSeedsB.RegionFactoryPSet.RegionPSet.deltaPhiRegion = 0.3 +hiRegitMixedTripletStepSeedsB.RegionFactoryPSet.RegionPSet.deltaEtaRegion = 0.3 diff --git a/RecoHI/HiTracking/python/hiSecondPixelTripletStep_cff.py b/RecoHI/HiTracking/python/hiSecondPixelTripletStep_cff.py index a8eedd9d15093..08a31046a82d7 100644 --- a/RecoHI/HiTracking/python/hiSecondPixelTripletStep_cff.py +++ b/RecoHI/HiTracking/python/hiSecondPixelTripletStep_cff.py @@ -1,24 +1,27 @@ import FWCore.ParameterSet.Config as cms +# Filter on quality tracks +hiFirstStepFilter = cms.EDProducer("QualityFilter", + TrackQuality = cms.string('highPurity'), + recTracks = cms.InputTag("hiSelectedTracks") + ) # NEW CLUSTERS (remove previously used clusters) hiSecondPixelTripletClusters = cms.EDProducer("TrackClusterRemover", - clusterLessSolution= cms.bool(True), - trajectories = cms.InputTag("hiGlobalPrimTracks"), - overrideTrkQuals = cms.InputTag("hiInitialStepSelector","hiInitialStep"), - TrackQuality = cms.string('highPurity'), - minNumberOfLayersWithMeasBeforeFiltering = cms.int32(0), - pixelClusters = cms.InputTag("siPixelClusters"), - stripClusters = cms.InputTag("siStripClusters"), - Common = cms.PSet( - maxChi2 = cms.double(9.0) - ), - Strip = cms.PSet( - #Yen-Jie's mod to preserve merged clusters - maxSize = cms.uint32(2), - maxChi2 = cms.double(9.0) - ) - ) + clusterLessSolution= cms.bool(True), + trajectories = cms.InputTag("hiFirstStepFilter"), + TrackQuality = cms.string('highPurity'), + pixelClusters = cms.InputTag("siPixelClusters"), + stripClusters = cms.InputTag("siStripClusters"), + Common = cms.PSet( + maxChi2 = cms.double(9.0) + ), + Strip = cms.PSet( + #Yen-Jie's mod to preserve merged clusters + maxSize = cms.uint32(2), + maxChi2 = cms.double(9.0) + ) + ) # SEEDING LAYERS @@ -32,19 +35,12 @@ from RecoTracker.TkTrackingRegions.GlobalTrackingRegionFromBeamSpot_cfi import RegionPsetFomBeamSpotBlock hiSecondPixelTripletSeeds = RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff.globalSeedsFromTriplets.clone( RegionFactoryPSet = RegionPsetFomBeamSpotBlock.clone( - ComponentName = cms.string('GlobalTrackingRegionWithVerticesProducer'), - RegionPSet = cms.PSet( - precise = cms.bool(True), - beamSpot = cms.InputTag("offlineBeamSpot"), - useFixedError = cms.bool(False), #def value True - nSigmaZ = cms.double(4.0), - sigmaZVertex = cms.double(4.0), #def value 3 - fixedError = cms.double(0.2), - VertexCollection = cms.InputTag("hiSelectedVertex"), - ptMin = cms.double(0.4), - useFoundVertices = cms.bool(True), - originRadius = cms.double(0.02) - ) + ComponentName = cms.string('GlobalRegionProducerFromBeamSpot'), + RegionPSet = RegionPsetFomBeamSpotBlock.RegionPSet.clone( + ptMin = 4.0, + originRadius = 0.005, + nSigmaZ = 4.0 + ) ) ) @@ -52,18 +48,18 @@ hiSecondPixelTripletSeeds.OrderedHitsFactoryPSet.GeneratorPSet.maxElement = 5000000 hiSecondPixelTripletSeeds.ClusterCheckPSet.MaxNumberOfPixelClusters = 5000000 hiSecondPixelTripletSeeds.ClusterCheckPSet.MaxNumberOfCosmicClusters = 50000000 -del hiSecondPixelTripletSeeds.ClusterCheckPSet.cut from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import * import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi hiSecondPixelTripletSeeds.OrderedHitsFactoryPSet.GeneratorPSet.SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor + # QUALITY CUTS DURING TRACK BUILDING import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff hiSecondPixelTripletTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone( maxLostHits = 1, minimumNumberOfHits = 6, - minPt = 0.4 + minPt = 1.0 ) import TrackingTools.KalmanUpdators.Chi2MeasurementEstimatorESProducer_cfi @@ -73,28 +69,23 @@ MaxChi2 = cms.double(9.0) ) + # TRACK BUILDING import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi hiSecondPixelTripletTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone( MeasurementTrackerName = '', trajectoryFilter = cms.PSet(refToPSet_ = cms.string('hiSecondPixelTripletTrajectoryFilter')), + clustersToSkip = cms.InputTag('hiSecondPixelTripletClusters'), maxCand = 3, - estimator = cms.string('hiSecondPixelTripletChi2Est'), - maxDPhiForLooperReconstruction = cms.double(2.0), - # 0.63 GeV is the maximum pT for a charged particle to loop within the 1.1m radius - # of the outermost Tracker barrel layer (with B=3.8T) - maxPtForLooperReconstruction = cms.double(0.7) + #estimator = cms.string('hiSecondPixelTripletChi2Est') ) + # MAKING OF TRACK CANDIDATES import RecoTracker.CkfPattern.CkfTrackCandidates_cfi hiSecondPixelTripletTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone( src = cms.InputTag('hiSecondPixelTripletSeeds'), - ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput - numHitsForSeedCleaner = cms.int32(50), - onlyPixelHitsForSeedCleaner = cms.bool(True), TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('hiSecondPixelTripletTrajectoryBuilder')), - clustersToSkip = cms.InputTag('hiSecondPixelTripletClusters'), doSeedingRegionRebuilding = True, useHitsSplitting = True ) @@ -103,8 +94,7 @@ import RecoTracker.TrackProducer.TrackProducer_cfi hiSecondPixelTripletGlobalPrimTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone( src = 'hiSecondPixelTripletTrackCandidates', - AlgorithmName = cms.string('lowPtTripletStep'), - Fitter=cms.string('FlexibleKFFittingSmoother') + AlgorithmName = cms.string('iter1') ) @@ -124,7 +114,7 @@ RecoHI.HiTracking.hiMultiTrackSelector_cfi.hiHighpurityMTS.clone( name = 'hiSecondPixelTripletStep', preFilterName = 'hiSecondPixelTripletStepTight', - # min_nhits = 14 + min_nhits = 14 ), ) #end of vpset ) #end of clone @@ -142,7 +132,8 @@ # Final sequence -hiSecondPixelTripletStep = cms.Sequence(hiSecondPixelTripletClusters* +hiSecondPixelTripletStep = cms.Sequence(hiFirstStepFilter* + hiSecondPixelTripletClusters* hiSecondPixelTripletSeedLayers* hiSecondPixelTripletSeeds* hiSecondPixelTripletTrackCandidates* diff --git a/RecoHI/HiTracking/src/HICaloCompatibleTrackSelector.cc b/RecoHI/HiTracking/src/HICaloCompatibleTrackSelector.cc index f51d8762c8c47..4234cce03c0fb 100644 --- a/RecoHI/HiTracking/src/HICaloCompatibleTrackSelector.cc +++ b/RecoHI/HiTracking/src/HICaloCompatibleTrackSelector.cc @@ -18,9 +18,21 @@ // Basic inclusion #include "RecoHI/HiTracking/interface/HICaloCompatibleTrackSelector.h" +#include "DataFormats/TrackReco/interface/Track.h" +#include "DataFormats/TrackReco/interface/TrackFwd.h" + +#include "DataFormats/ParticleFlowReco/interface/PFBlock.h" +#include "DataFormats/ParticleFlowReco/interface/PFCluster.h" +#include "DataFormats/ParticleFlowReco/interface/PFClusterFwd.h" + #include "DataFormats/RecoCandidate/interface/TrackAssociation.h" #include "SimTracker/Records/interface/TrackAssociatorRecord.h" #include "SimTracker/TrackAssociation/interface/TrackAssociatorByHits.h" +#include "SimDataFormats/TrackingAnalysis/interface/TrackingParticle.h" +#include "SimDataFormats/TrackingAnalysis/interface/TrackingParticleFwd.h" + +#include "DataFormats/CaloTowers/interface/CaloTower.h" +#include "DataFormats/CaloTowers/interface/CaloTowerFwd.h" #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/Framework/interface/ESHandle.h" @@ -33,9 +45,9 @@ using reco::modules::HICaloCompatibleTrackSelector; HICaloCompatibleTrackSelector::HICaloCompatibleTrackSelector( const edm::ParameterSet & cfg ) : - srcTracks_(consumes(cfg.getParameter("srcTracks"))), - srcPFCands_(consumes(cfg.getParameter("srcPFCands"))), - srcTower_(consumes(cfg.getParameter("srcTower"))), + srcTracks_(cfg.getParameter("srcTracks")), + srcPFCands_(cfg.getParameter("srcPFCands")), + srcTower_(cfg.getParameter("srcTower")), usePFCandMatching_(cfg.getUntrackedParameter("usePFCandMatching", true)), trkMatchPtMin_(cfg.getUntrackedParameter("trkMatchPtMin",10.0)), trkCompPtMin_(cfg.getUntrackedParameter("trkCompPtMin",35.0)), @@ -64,8 +76,6 @@ HICaloCompatibleTrackSelector::HICaloCompatibleTrackSelector( const edm::Paramet if (copyTrajectories_) { produces< std::vector >().setBranchAlias( alias + "Trajectories"); produces< TrajTrackAssociationCollection >().setBranchAlias( alias + "TrajectoryTrackAssociations"); - srcTrackTrajs_ = (consumes >(cfg.getParameter("srcTracks"))); - srcTrackTrajAssoc_ = (consumes(cfg.getParameter("srcTracks"))); } // pt dependence of delta R matching requirement @@ -94,7 +104,7 @@ void HICaloCompatibleTrackSelector::produce( edm::Event& evt, const edm::EventSe Handle< vector > hTrajP; Handle< TrajTrackAssociationCollection > hTTAss; - evt.getByToken(srcTracks_,hSrcTrack); + evt.getByLabel(srcTracks_,hSrcTrack); selTracks_ = auto_ptr(new TrackCollection()); rTracks_ = evt.getRefBeforePut(); @@ -115,8 +125,8 @@ void HICaloCompatibleTrackSelector::produce( edm::Event& evt, const edm::EventSe bool isPFThere = false; bool isTowerThere = false; - if(usePFCandMatching_) isPFThere = evt.getByToken(srcPFCands_, pfCandidates); - else isTowerThere = evt.getByToken(srcTower_, towers); + if(usePFCandMatching_) isPFThere = evt.getByLabel(srcPFCands_, pfCandidates); + else isTowerThere = evt.getByLabel(srcTower_, towers); size_t current = 0; for (TI ti = hSrcTrack->begin(), ed = hSrcTrack->end(); ti != ed; ++ti, ++current) { @@ -163,8 +173,8 @@ void HICaloCompatibleTrackSelector::produce( edm::Event& evt, const edm::EventSe if ( copyTrajectories_ ) { Handle< vector > hTraj; Handle< TrajTrackAssociationCollection > hTTAss; - evt.getByToken(srcTrackTrajs_, hTTAss); - evt.getByToken(srcTrackTrajAssoc_, hTraj); + evt.getByLabel(srcTracks_, hTTAss); + evt.getByLabel(srcTracks_, hTraj); selTrajs_ = auto_ptr< vector >(new vector()); rTrajectories_ = evt.getRefBeforePut< vector >(); selTTAss_ = auto_ptr< TrajTrackAssociationCollection >(new TrajTrackAssociationCollection()); diff --git a/RecoHI/HiTracking/test/HIPixelClusterVtxAnalyzer.cc b/RecoHI/HiTracking/test/HIPixelClusterVtxAnalyzer.cc index 3eae42dd3219f..9730ecd56bd8f 100644 --- a/RecoHI/HiTracking/test/HIPixelClusterVtxAnalyzer.cc +++ b/RecoHI/HiTracking/test/HIPixelClusterVtxAnalyzer.cc @@ -14,6 +14,8 @@ #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" #include "Geometry/CommonDetUnit/interface/GeomDet.h" +#include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h" + #include "DataFormats/GeometryVector/interface/LocalPoint.h" #include "DataFormats/GeometryVector/interface/GlobalPoint.h" @@ -26,7 +28,7 @@ /*****************************************************************************/ HIPixelClusterVtxAnalyzer::HIPixelClusterVtxAnalyzer(const edm::ParameterSet& ps) - : srcPixels_(consumes(ps.getParameter("pixelRecHits"))), + : srcPixels_(ps.getParameter("pixelRecHits")), minZ_(ps.getParameter("minZ")), maxZ_(ps.getParameter("maxZ")), zStep_(ps.getParameter("zStep")), @@ -63,7 +65,7 @@ void HIPixelClusterVtxAnalyzer::analyze(const edm::Event& ev, const edm::EventSe // get pixel rechits edm::Handle hRecHits; try { - ev.getByToken(srcPixels_,hRecHits); + ev.getByLabel(srcPixels_,hRecHits); } catch (...) {} // get tracker geometry diff --git a/RecoHI/HiTracking/test/HIPixelClusterVtxAnalyzer.h b/RecoHI/HiTracking/test/HIPixelClusterVtxAnalyzer.h index dc9bca99cd865..251c341a07a0e 100644 --- a/RecoHI/HiTracking/test/HIPixelClusterVtxAnalyzer.h +++ b/RecoHI/HiTracking/test/HIPixelClusterVtxAnalyzer.h @@ -5,10 +5,10 @@ #include "FWCore/Framework/interface/EDAnalyzer.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Utilities/interface/InputTag.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/ServiceRegistry/interface/Service.h" #include "CommonTools/UtilAlgos/interface/TFileService.h" -#include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h" // ROOT includes #include @@ -34,7 +34,7 @@ class HIPixelClusterVtxAnalyzer : public edm::EDAnalyzer virtual void analyze(const edm::Event& ev, const edm::EventSetup& es); int getContainedHits(const std::vector &hits, double z0, double &chi); - edm::EDGetTokenT srcPixels_; //pixel rec hits + edm::InputTag srcPixels_; //pixel rec hits double minZ_; double maxZ_; diff --git a/RecoHI/HiTracking/test/runIterCaloMatching_cfg.py b/RecoHI/HiTracking/test/runIterCaloMatching_cfg.py index 3a7978da946dd..f202ccae8a439 100644 --- a/RecoHI/HiTracking/test/runIterCaloMatching_cfg.py +++ b/RecoHI/HiTracking/test/runIterCaloMatching_cfg.py @@ -109,9 +109,9 @@ process.hiTrackReco *process.muonRecoPbPb *process.electronGsfTrackingHi - *process.hiParticleFlowLocalReco + *process.HiParticleFlowLocalReco *process.gsfEcalDrivenElectronSequence - *process.hiParticleFlowReco + *process.HiParticleFlowReco *process.PFTowers ) else: @@ -141,7 +141,7 @@ srcTracks = 'hiGeneralTracks' ) -process.hiParticleFlowReco *= process.hiGeneralCaloMatchedTracks +process.HiParticleFlowReco *= process.hiGeneralCaloMatchedTracks process.hiCaloMatchFilteredTracks = cms.EDFilter("TrackSelector", src = cms.InputTag("hiGeneralCaloMatchedTracks"), @@ -149,7 +149,7 @@ 'quality("highPuritySetWithPV")') ) -process.hiParticleFlowReco*=process.hiCaloMatchFilteredTracks +process.HiParticleFlowReco*=process.hiCaloMatchFilteredTracks diff --git a/RecoJets/JetProducers/interface/PileUpSubtractor.h b/RecoJets/JetProducers/interface/PileUpSubtractor.h index 5efe5cbfedf33..bf36b91aaafc8 100644 --- a/RecoJets/JetProducers/interface/PileUpSubtractor.h +++ b/RecoJets/JetProducers/interface/PileUpSubtractor.h @@ -11,7 +11,6 @@ #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/Framework/interface/ConsumesCollector.h" #include "DataFormats/JetReco/interface/CaloJet.h" #include "DataFormats/HcalDetId/interface/HcalDetId.h" @@ -27,7 +26,7 @@ class PileUpSubtractor{ typedef boost::shared_ptr RangeDefPtr; typedef boost::shared_ptr JetDefPtr; - PileUpSubtractor(const edm::ParameterSet& iConfig, edm::ConsumesCollector && iC); + PileUpSubtractor(const edm::ParameterSet& iConfig); virtual ~PileUpSubtractor(){;} virtual void setDefinition(JetDefPtr const & jetDef); @@ -86,7 +85,7 @@ virtual double getPileUpEnergy(int ijet) const {return jetOffset_[ijet];} }; #include "FWCore/PluginManager/interface/PluginFactory.h" -namespace edm {class ParameterSet; class EventSetup; class ConsumesCollector;} -typedef edmplugin::PluginFactory PileUpSubtractorFactory; +namespace edm {class ParameterSet; class EventSetup; } +typedef edmplugin::PluginFactory PileUpSubtractorFactory; #endif diff --git a/RecoJets/JetProducers/plugins/VirtualJetProducer.cc b/RecoJets/JetProducers/plugins/VirtualJetProducer.cc index 437f59bd236c2..7b242f1ca7ab7 100644 --- a/RecoJets/JetProducers/plugins/VirtualJetProducer.cc +++ b/RecoJets/JetProducers/plugins/VirtualJetProducer.cc @@ -17,7 +17,6 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/Framework/interface/MakerMacros.h" #include "FWCore/Utilities/interface/isFinite.h" -#include "FWCore/Framework/interface/ConsumesCollector.h" #include "DataFormats/Common/interface/View.h" #include "DataFormats/Common/interface/Handle.h" @@ -183,15 +182,18 @@ VirtualJetProducer::VirtualJetProducer(const edm::ParameterSet& iConfig) } if ( doPUOffsetCorr_ ) { - + if ( jetTypeE != JetType::CaloJet && jetTypeE != JetType::BasicJet) { + throw cms::Exception("InvalidInput") << "Can only offset correct jets of type CaloJet or BasicJet"; + } + if(iConfig.exists("subtractorName")) puSubtractorName_ = iConfig.getParameter ("subtractorName"); else puSubtractorName_ = std::string(); if(puSubtractorName_.empty()){ edm::LogWarning("VirtualJetProducer") << "Pile Up correction on; however, pile up type is not specified. Using default... \n"; - subtractor_ = boost::shared_ptr(new PileUpSubtractor(iConfig, consumesCollector())); + subtractor_ = boost::shared_ptr(new PileUpSubtractor(iConfig)); }else{ - subtractor_ = boost::shared_ptr(PileUpSubtractorFactory::get()->create( puSubtractorName_, iConfig, consumesCollector())); + subtractor_ = boost::shared_ptr(PileUpSubtractorFactory::get()->create( puSubtractorName_, iConfig)); } } diff --git a/RecoJets/JetProducers/src/PileUpSubtractor.cc b/RecoJets/JetProducers/src/PileUpSubtractor.cc index bec1da4af5376..1fa9b8ca0a25c 100644 --- a/RecoJets/JetProducers/src/PileUpSubtractor.cc +++ b/RecoJets/JetProducers/src/PileUpSubtractor.cc @@ -15,7 +15,7 @@ #include using namespace std; -PileUpSubtractor::PileUpSubtractor(const edm::ParameterSet& iConfig, edm::ConsumesCollector && iC) : +PileUpSubtractor::PileUpSubtractor(const edm::ParameterSet& iConfig) : reRunAlgo_ (iConfig.getUntrackedParameter("reRunAlgo",false)), doAreaFastjet_ (iConfig.getParameter ("doAreaFastjet")), doRhoFastjet_ (iConfig.getParameter ("doRhoFastjet")), diff --git a/RecoLocalCalo/EcalRecAlgos/src/ESRecHitSimAlgo.cc b/RecoLocalCalo/EcalRecAlgos/src/ESRecHitSimAlgo.cc index a2af73b81c822..89c9fef2fb8ff 100644 --- a/RecoLocalCalo/EcalRecAlgos/src/ESRecHitSimAlgo.cc +++ b/RecoLocalCalo/EcalRecAlgos/src/ESRecHitSimAlgo.cc @@ -51,11 +51,7 @@ EcalRecHit::ESFlags ESRecHitSimAlgo::evalAmplitude(float * results, const ESData // A from analytical formula: constexpr float t1 = 20.; - #ifdef __clang__ - const float A_1 = 1./( std::pow(w/n*(t1),n) * std::exp(n-w*(t1)) ); - #else constexpr float A_1 = 1./( std::pow(w/n*(t1),n) * std::exp(n-w*(t1)) ); - #endif auto AA1 = A1 * A_1 ; if (adc[1] > 2800.f && adc[2] > 2800.f) status = EcalRecHit::kESSaturated; diff --git a/RecoLocalCalo/HcalRecAlgos/src/HcalSeverityLevelComputer.cc b/RecoLocalCalo/HcalRecAlgos/src/HcalSeverityLevelComputer.cc index 8fbc8bb416dfe..2ad8e5442e215 100644 --- a/RecoLocalCalo/HcalRecAlgos/src/HcalSeverityLevelComputer.cc +++ b/RecoLocalCalo/HcalRecAlgos/src/HcalSeverityLevelComputer.cc @@ -45,8 +45,6 @@ bool HcalSeverityLevelComputer::getRecHitFlag(HcalSeverityDefinition& mydef, else if (mybit == "HBHESpikeNoise") setBit(HcalCaloFlagLabels::HBHESpikeNoise, mydef.HBHEFlagMask); else if (mybit == "HBHETriangleNoise") setBit(HcalCaloFlagLabels::HBHETriangleNoise, mydef.HBHEFlagMask); else if (mybit == "HBHETS4TS5Noise") setBit(HcalCaloFlagLabels::HBHETS4TS5Noise, mydef.HBHEFlagMask); - else if (mybit == "HBHENegativeNoise") setBit(HcalCaloFlagLabels::HBHENegativeNoise, mydef.HBHEFlagMask); - // These are multi-bit counters; we may have to revisit how to set them in the SLComputer in the future else if (mybit=="HBHETimingTrustBits") setBit(HcalCaloFlagLabels::HBHETimingTrustBits, mydef.HBHEFlagMask ); diff --git a/RecoLocalTracker/SiPixelRecHits/interface/PixelCPEGeneric.h b/RecoLocalTracker/SiPixelRecHits/interface/PixelCPEGeneric.h index b7a88ba0421f8..1343a3bb8d6f5 100644 --- a/RecoLocalTracker/SiPixelRecHits/interface/PixelCPEGeneric.h +++ b/RecoLocalTracker/SiPixelRecHits/interface/PixelCPEGeneric.h @@ -43,7 +43,7 @@ #include #include -#define NEW_CPEERROR // must be constistent with base.cc, generic cc/h and genericProducer.cc +//#define NEW_CPEERROR // must be constistent with base.cc, generic cc/h and genericProducer.cc #if 0 /** \class PixelCPEGeneric diff --git a/RecoLocalTracker/SiPixelRecHits/plugins/PixelCPEGenericESProducer.cc b/RecoLocalTracker/SiPixelRecHits/plugins/PixelCPEGenericESProducer.cc index ce0b6eb4bf769..74d610d4e811d 100644 --- a/RecoLocalTracker/SiPixelRecHits/plugins/PixelCPEGenericESProducer.cc +++ b/RecoLocalTracker/SiPixelRecHits/plugins/PixelCPEGenericESProducer.cc @@ -17,7 +17,7 @@ #include #include -#define NEW_CPEERROR // must be constistent with base.cc, generic cc/h and genericProducer.cc +//#define NEW_CPEERROR // must be constistent with base.cc, generic cc/h and genericProducer.cc using namespace edm; diff --git a/RecoLocalTracker/SiPixelRecHits/python/PixelCPEGeneric_cfi.py b/RecoLocalTracker/SiPixelRecHits/python/PixelCPEGeneric_cfi.py index 7be1c32e3b942..b3637b7fa6453 100644 --- a/RecoLocalTracker/SiPixelRecHits/python/PixelCPEGeneric_cfi.py +++ b/RecoLocalTracker/SiPixelRecHits/python/PixelCPEGeneric_cfi.py @@ -49,8 +49,8 @@ #lAWidthFPix = cms.double(0.0), # Flag to select the source of LA-Width - # Normal = True, use LA from DB - useLAWidthFromDB = cms.bool(True), + # Normal = True, use LA from DB, not ready yet + useLAWidthFromDB = cms.bool(False), # if lAWith=0 and useLAWidthFromDB=false than width is calculated from lAOffset. # Use the LA-Offsets from Alignment instead of our calibration useLAAlignmentOffsets = cms.bool(False), diff --git a/RecoLocalTracker/SiPixelRecHits/python/PixelCPETemplateReco_cfi.py b/RecoLocalTracker/SiPixelRecHits/python/PixelCPETemplateReco_cfi.py index ddf769857e856..a3e543472930c 100644 --- a/RecoLocalTracker/SiPixelRecHits/python/PixelCPETemplateReco_cfi.py +++ b/RecoLocalTracker/SiPixelRecHits/python/PixelCPETemplateReco_cfi.py @@ -12,8 +12,8 @@ # gavril DoCosmics = cms.bool(False), # The flag to regulate if the LA offset is taken from Alignment - # True in Run II for offline RECO - DoLorentz = cms.bool(True), + # Will be True in the future for offline RECO. kevin + DoLorentz = cms.bool(False), LoadTemplatesFromDB = cms.bool(True) diff --git a/RecoLocalTracker/SiPixelRecHits/src/PixelCPEBase.cc b/RecoLocalTracker/SiPixelRecHits/src/PixelCPEBase.cc index 5ee766f8d0bf9..7c1c309788899 100644 --- a/RecoLocalTracker/SiPixelRecHits/src/PixelCPEBase.cc +++ b/RecoLocalTracker/SiPixelRecHits/src/PixelCPEBase.cc @@ -25,7 +25,7 @@ using namespace std; -#define NEW_CPEERROR // must be constistent with base.cc, generic cc/h and genericProducer.cc +//#define NEW_CPEERROR // must be constistent with base.cc, generic cc/h and genericProducer.cc namespace { #ifndef NEW_CPEERROR diff --git a/RecoLocalTracker/SiPixelRecHits/src/PixelCPEGeneric.cc b/RecoLocalTracker/SiPixelRecHits/src/PixelCPEGeneric.cc index 548a8b4958102..d16a3f96e51f0 100644 --- a/RecoLocalTracker/SiPixelRecHits/src/PixelCPEGeneric.cc +++ b/RecoLocalTracker/SiPixelRecHits/src/PixelCPEGeneric.cc @@ -18,7 +18,7 @@ #include using namespace std; -#define NEW_CPEERROR // must be constistent with base.cc, generic cc/h and genericProducer.cc +//#define NEW_CPEERROR // must be constistent with base.cc, generic cc/h and genericProducer.cc namespace { constexpr float micronsToCm = 1.0e-4; diff --git a/RecoParticleFlow/Benchmark/src/PFJetBenchmark.cc b/RecoParticleFlow/Benchmark/src/PFJetBenchmark.cc index 24fdc3523d34d..28b208b308ff5 100644 --- a/RecoParticleFlow/Benchmark/src/PFJetBenchmark.cc +++ b/RecoParticleFlow/Benchmark/src/PFJetBenchmark.cc @@ -316,28 +316,28 @@ void PFJetBenchmark::process(const reco::PFJetCollection& pfJets, const reco::Ge unsigned int iter = 0; switch (trackRef->algo()) { case TrackBase::ctf: - case TrackBase::initialStep: + case TrackBase::iter0: iter = 0; break; - case TrackBase::lowPtTripletStep: + case TrackBase::iter1: iter = 1; break; - case TrackBase::pixelPairStep: + case TrackBase::iter2: iter = 2; break; - case TrackBase::detachedTripletStep: + case TrackBase::iter3: iter = 3; break; - case TrackBase::mixedTripletStep: + case TrackBase::iter4: iter = 4; break; - case TrackBase::pixelLessStep: + case TrackBase::iter5: iter = 5; break; - case TrackBase::tobTecStep: + case TrackBase::iter6: iter = 6; break; - case TrackBase::conversionStep: + case TrackBase::iter8: iter = 7; //std::cout << "Warning in entry " << entry_ << " : iter = " << trackRef->algo() << std::endl; //std::cout << ic << " " << *(constituents[ic]) << std::endl; diff --git a/RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.cc b/RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.cc index bab6a0c6e351f..aff3264c6ea2c 100644 --- a/RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.cc +++ b/RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.cc @@ -230,10 +230,10 @@ PFChargedHadronAnalyzer::analyze(const Event& iEvent, unsigned int pxdN = 0; const reco::HitPattern& hp = et.trackRef()->hitPattern(); switch ( et.trackRef()->algo() ) { - case TrackBase::initialStep: - case TrackBase::lowPtTripletStep: - case TrackBase::pixelPairStep: - case TrackBase::detachedTripletStep: + case TrackBase::iter0: + case TrackBase::iter1: + case TrackBase::iter2: + case TrackBase::iter3: tobN += hp.numberOfValidStripTOBHits(); tecN += hp.numberOfValidStripTECHits(); tibN += hp.numberOfValidStripTIBHits(); @@ -241,12 +241,12 @@ PFChargedHadronAnalyzer::analyze(const Event& iEvent, pxbN += hp.numberOfValidPixelBarrelHits(); pxdN += hp.numberOfValidPixelEndcapHits(); break; - case TrackBase::mixedTripletStep: - case TrackBase::pixelLessStep: - case TrackBase::tobTecStep: - case TrackBase::jetCoreRegionalStep: - case TrackBase::muonSeededStepInOut: - case TrackBase::muonSeededStepOutIn: + case TrackBase::iter4: + case TrackBase::iter5: + case TrackBase::iter6: + case TrackBase::iter7: + case TrackBase::iter9: + case TrackBase::iter10: default: break; } diff --git a/RecoParticleFlow/PFProducer/plugins/importers/GeneralTracksImporter.cc b/RecoParticleFlow/PFProducer/plugins/importers/GeneralTracksImporter.cc index 0a92871037ec6..7a510b3a1e4ba 100644 --- a/RecoParticleFlow/PFProducer/plugins/importers/GeneralTracksImporter.cc +++ b/RecoParticleFlow/PFProducer/plugins/importers/GeneralTracksImporter.cc @@ -153,24 +153,24 @@ goodPtResolution( const reco::TrackRef& trackref) const { unsigned int Algo = 0; switch (trackref->algo()) { case reco::TrackBase::ctf: - case reco::TrackBase::initialStep: - case reco::TrackBase::lowPtTripletStep: - case reco::TrackBase::pixelPairStep: - case reco::TrackBase::jetCoreRegionalStep: - case reco::TrackBase::muonSeededStepInOut: - case reco::TrackBase::muonSeededStepOutIn: + case reco::TrackBase::iter0: + case reco::TrackBase::iter1: + case reco::TrackBase::iter2: + case reco::TrackBase::iter7: + case reco::TrackBase::iter9: + case reco::TrackBase::iter10: Algo = 0; break; - case reco::TrackBase::detachedTripletStep: + case reco::TrackBase::iter3: Algo = 1; break; - case reco::TrackBase::mixedTripletStep: + case reco::TrackBase::iter4: Algo = 2; break; - case reco::TrackBase::pixelLessStep: + case reco::TrackBase::iter5: Algo = 3; break; - case reco::TrackBase::tobTecStep: + case reco::TrackBase::iter6: Algo = 4; break; default: diff --git a/RecoParticleFlow/PFProducer/src/PFAlgo.cc b/RecoParticleFlow/PFProducer/src/PFAlgo.cc index 89d70d08dfa28..e53d40598309f 100644 --- a/RecoParticleFlow/PFProducer/src/PFAlgo.cc +++ b/RecoParticleFlow/PFProducer/src/PFAlgo.cc @@ -1136,10 +1136,11 @@ void PFAlgo::processBlock( const reco::PFBlockRef& blockref, if ( rejectTracks_Step45_ && ecalElems.empty() && trackMomentum > 30. && Dpt > 0.5 && - ( trackRef->algo() == TrackBase::mixedTripletStep || - trackRef->algo() == TrackBase::pixelLessStep || - trackRef->algo() == TrackBase::tobTecStep ) ) { + ( trackRef->algo() == TrackBase::iter4 || + trackRef->algo() == TrackBase::iter5 || + trackRef->algo() == TrackBase::iter6 ) ) { + // double dptRel = Dpt/trackRef->pt()*100; bool isPrimaryOrSecondary = isFromSecInt(elements[iTrack], "all"); @@ -1936,20 +1937,20 @@ void PFAlgo::processBlock( const reco::PFBlockRef& blockref, double blowError = 1.; switch (trackRef->algo()) { case TrackBase::ctf: - case TrackBase::initialStep: - case TrackBase::lowPtTripletStep: - case TrackBase::pixelPairStep: - case TrackBase::detachedTripletStep: - case TrackBase::mixedTripletStep: - case TrackBase::jetCoreRegionalStep: - case TrackBase::muonSeededStepInOut: - case TrackBase::muonSeededStepOutIn: + case TrackBase::iter0: + case TrackBase::iter1: + case TrackBase::iter2: + case TrackBase::iter3: + case TrackBase::iter4: + case TrackBase::iter7: + case TrackBase::iter9: + case TrackBase::iter10: blowError = 1.; break; - case TrackBase::pixelLessStep: + case TrackBase::iter5: blowError = factors45_[0]; break; - case TrackBase::tobTecStep: + case TrackBase::iter6: blowError = factors45_[1]; break; default: @@ -2398,20 +2399,20 @@ void PFAlgo::processBlock( const reco::PFBlockRef& blockref, if (isPrimaryOrSecondary && dptRel < dptRel_DispVtx_) continue; - + // switch (trackref->algo()) { case TrackBase::ctf: - case TrackBase::initialStep: - case TrackBase::lowPtTripletStep: - case TrackBase::pixelPairStep: - case TrackBase::detachedTripletStep: - case TrackBase::mixedTripletStep: - case TrackBase::jetCoreRegionalStep: - case TrackBase::muonSeededStepInOut: - case TrackBase::muonSeededStepOutIn: + case TrackBase::iter0: + case TrackBase::iter1: + case TrackBase::iter2: + case TrackBase::iter3: + case TrackBase::iter4: + case TrackBase::iter7: + case TrackBase::iter9: + case TrackBase::iter10: break; - case TrackBase::pixelLessStep: - case TrackBase::tobTecStep: + case TrackBase::iter5: + case TrackBase::iter6: active[iTrack] = false; totalChargedMomentum -= trackref->p(); diff --git a/RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc b/RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc index dab6cf215aaf3..f1b45399b42d2 100644 --- a/RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc +++ b/RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc @@ -2516,24 +2516,24 @@ unsigned int PFEGammaAlgo::whichTrackAlgo(const reco::TrackRef& trackRef) { unsigned int Algo = 0; switch (trackRef->algo()) { case TrackBase::ctf: - case TrackBase::initialStep: - case TrackBase::lowPtTripletStep: - case TrackBase::pixelPairStep: - case TrackBase::jetCoreRegionalStep: - case TrackBase::muonSeededStepInOut: - case TrackBase::muonSeededStepOutIn: + case TrackBase::iter0: + case TrackBase::iter1: + case TrackBase::iter2: + case TrackBase::iter7: + case TrackBase::iter9: + case TrackBase::iter10: Algo = 0; break; - case TrackBase::detachedTripletStep: + case TrackBase::iter3: Algo = 1; break; - case TrackBase::mixedTripletStep: + case TrackBase::iter4: Algo = 2; break; - case TrackBase::pixelLessStep: + case TrackBase::iter5: Algo = 3; break; - case TrackBase::tobTecStep: + case TrackBase::iter6: Algo = 4; break; default: diff --git a/RecoParticleFlow/PFProducer/src/PFEGammaFilters.cc b/RecoParticleFlow/PFProducer/src/PFEGammaFilters.cc index ce6d8f376d0f5..8884013898361 100644 --- a/RecoParticleFlow/PFProducer/src/PFEGammaFilters.cc +++ b/RecoParticleFlow/PFProducer/src/PFEGammaFilters.cc @@ -365,24 +365,24 @@ unsigned int PFEGammaFilters::whichTrackAlgo(const reco::TrackRef& trackRef) { unsigned int Algo = 0; switch (trackRef->algo()) { case TrackBase::ctf: - case TrackBase::initialStep: - case TrackBase::lowPtTripletStep: - case TrackBase::pixelPairStep: - case TrackBase::jetCoreRegionalStep: - case TrackBase::muonSeededStepInOut: - case TrackBase::muonSeededStepOutIn: + case TrackBase::iter0: + case TrackBase::iter1: + case TrackBase::iter2: + case TrackBase::iter7: + case TrackBase::iter9: + case TrackBase::iter10: Algo = 0; break; - case TrackBase::detachedTripletStep: + case TrackBase::iter3: Algo = 1; break; - case TrackBase::mixedTripletStep: + case TrackBase::iter4: Algo = 2; break; - case TrackBase::pixelLessStep: + case TrackBase::iter5: Algo = 3; break; - case TrackBase::tobTecStep: + case TrackBase::iter6: Algo = 4; break; default: diff --git a/RecoParticleFlow/PFProducer/src/PFElectronAlgo.cc b/RecoParticleFlow/PFProducer/src/PFElectronAlgo.cc index f2ece55601407..92afe299d7c6d 100644 --- a/RecoParticleFlow/PFProducer/src/PFElectronAlgo.cc +++ b/RecoParticleFlow/PFProducer/src/PFElectronAlgo.cc @@ -2666,24 +2666,24 @@ unsigned int PFElectronAlgo::whichTrackAlgo(const reco::TrackRef& trackRef) { unsigned int Algo = 0; switch (trackRef->algo()) { case TrackBase::ctf: - case TrackBase::initialStep: - case TrackBase::lowPtTripletStep: - case TrackBase::pixelPairStep: - case TrackBase::jetCoreRegionalStep: - case TrackBase::muonSeededStepInOut: - case TrackBase::muonSeededStepOutIn: + case TrackBase::iter0: + case TrackBase::iter1: + case TrackBase::iter2: + case TrackBase::iter7: + case TrackBase::iter9: + case TrackBase::iter10: Algo = 0; break; - case TrackBase::detachedTripletStep: + case TrackBase::iter3: Algo = 1; break; - case TrackBase::mixedTripletStep: + case TrackBase::iter4: Algo = 2; break; - case TrackBase::pixelLessStep: + case TrackBase::iter5: Algo = 3; break; - case TrackBase::tobTecStep: + case TrackBase::iter6: Algo = 4; break; default: diff --git a/RecoParticleFlow/PFTracking/plugins/PFElecTkProducer.cc b/RecoParticleFlow/PFTracking/plugins/PFElecTkProducer.cc index 9a9ecfe20a899..12291a4bfd1a8 100644 --- a/RecoParticleFlow/PFTracking/plugins/PFElecTkProducer.cc +++ b/RecoParticleFlow/PFTracking/plugins/PFElecTkProducer.cc @@ -497,24 +497,24 @@ bool PFElecTkProducer::isFifthStep(reco::PFRecTrackRef pfKfTrack) { switch (kfref->algo()) { case TrackBase::undefAlgorithm: case TrackBase::ctf: - case TrackBase::initialStep: - case TrackBase::lowPtTripletStep: - case TrackBase::pixelPairStep: - case TrackBase::jetCoreRegionalStep: - case TrackBase::muonSeededStepInOut: - case TrackBase::muonSeededStepOutIn: + case TrackBase::iter0: + case TrackBase::iter1: + case TrackBase::iter2: + case TrackBase::iter7: + case TrackBase::iter9: + case TrackBase::iter10: Algo = 0; break; - case TrackBase::detachedTripletStep: + case TrackBase::iter3: Algo = 1; break; - case TrackBase::mixedTripletStep: + case TrackBase::iter4: Algo = 2; break; - case TrackBase::pixelLessStep: + case TrackBase::iter5: Algo = 3; break; - case TrackBase::tobTecStep: + case TrackBase::iter6: Algo = 4; break; default: diff --git a/RecoPixelVertexing/PixelLowPtUtilities/plugins/TrackListCombiner.cc b/RecoPixelVertexing/PixelLowPtUtilities/plugins/TrackListCombiner.cc index 0f3c1fdf90c5b..466efb9bf1583 100644 --- a/RecoPixelVertexing/PixelLowPtUtilities/plugins/TrackListCombiner.cc +++ b/RecoPixelVertexing/PixelLowPtUtilities/plugins/TrackListCombiner.cc @@ -58,9 +58,9 @@ void TrackListCombiner::produce(edm::Event& ev, const edm::EventSetup& es) reco::TrackBase::TrackAlgorithm algo; switch(i) { - case 1: algo = reco::TrackBase::lowPtTripletStep; break; - case 2: algo = reco::TrackBase::pixelPairStep; break; - case 3: algo = reco::TrackBase::detachedTripletStep; break; + case 1: algo = reco::TrackBase::iter1; break; + case 2: algo = reco::TrackBase::iter2; break; + case 3: algo = reco::TrackBase::iter3; break; default: algo = reco::TrackBase::undefAlgorithm; } diff --git a/RecoPixelVertexing/PixelTriplets/plugins/BuildFile.xml b/RecoPixelVertexing/PixelTriplets/plugins/BuildFile.xml index b09db85bc33ac..c5a2f84b2dfef 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/BuildFile.xml +++ b/RecoPixelVertexing/PixelTriplets/plugins/BuildFile.xml @@ -5,4 +5,4 @@ - + diff --git a/RecoPixelVertexing/PixelTriplets/plugins/PixelTripletHLTGenerator.cc b/RecoPixelVertexing/PixelTriplets/plugins/PixelTripletHLTGenerator.cc index 85f07775992de..e2c4410010c23 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/PixelTripletHLTGenerator.cc +++ b/RecoPixelVertexing/PixelTriplets/plugins/PixelTripletHLTGenerator.cc @@ -86,11 +86,7 @@ void PixelTripletHLTGenerator::hitTriplets(const TrackingRegion& region, float regOffset = region.origin().perp(); //try to take account of non-centrality (?) int size = theLayers.size(); - #ifdef __clang__ - std::vector> preds(size); - #else ThirdHitRZPrediction preds[size]; - #endif const RecHitsSortedInPhi * thirdHitMap[size]; typedef RecHitsSortedInPhi::Hit Hit; @@ -100,11 +96,7 @@ void PixelTripletHLTGenerator::hitTriplets(const TrackingRegion& region, std::vector foundNodes; // re-used thoughout foundNodes.reserve(100); - #ifdef __clang__ - std::vector> hitTree(size); - #else KDTreeLinkerAlgo hitTree[size]; - #endif float rzError[size]; //save maximum errors float maxphi = Geom::ftwoPi(), minphi = -maxphi; // increase to cater for any range diff --git a/RecoPixelVertexing/PixelTriplets/plugins/PixelTripletLargeTipGenerator.cc b/RecoPixelVertexing/PixelTriplets/plugins/PixelTripletLargeTipGenerator.cc index 8130c1c957e5d..e33e87c00e9a4 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/PixelTripletLargeTipGenerator.cc +++ b/RecoPixelVertexing/PixelTriplets/plugins/PixelTripletLargeTipGenerator.cc @@ -107,17 +107,12 @@ void PixelTripletLargeTipGenerator::hitTriplets(const TrackingRegion& region, std::vector layerTree; // re-used throughout std::vector foundNodes; // re-used throughout foundNodes.reserve(100); - #ifdef __clang__ - std::vector> hitTree(size); - std::vector mapPred(size); - #else KDTreeLinkerAlgo hitTree[size]; - LayerRZPredictions mapPred[size]; - #endif float rzError[size]; //save maximum errors float maxphi = Geom::ftwoPi(), minphi = -maxphi; //increase to cater for any range + LayerRZPredictions mapPred[size]; const RecHitsSortedInPhi * thirdHitMap[size]; diff --git a/RecoTracker/ConversionSeedGenerators/python/ConversionStep2_cff.py b/RecoTracker/ConversionSeedGenerators/python/ConversionStep2_cff.py index 280dee9c0225e..e3035cd73d852 100644 --- a/RecoTracker/ConversionSeedGenerators/python/ConversionStep2_cff.py +++ b/RecoTracker/ConversionSeedGenerators/python/ConversionStep2_cff.py @@ -235,7 +235,7 @@ import RecoTracker.TrackProducer.TrackProducer_cfi conv2StepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone( src = 'conv2TrackCandidates', - AlgorithmName = cms.string('conversionStep'), + AlgorithmName = cms.string('iter9'), Fitter = 'conv2StepFitterSmoother', ) diff --git a/RecoTracker/ConversionSeedGenerators/python/ConversionStep_cff.py b/RecoTracker/ConversionSeedGenerators/python/ConversionStep_cff.py index e120fb82e835d..627f7f2b06dfd 100644 --- a/RecoTracker/ConversionSeedGenerators/python/ConversionStep_cff.py +++ b/RecoTracker/ConversionSeedGenerators/python/ConversionStep_cff.py @@ -250,7 +250,7 @@ import RecoTracker.TrackProducer.TrackProducer_cfi convStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone( src = 'convTrackCandidates', - AlgorithmName = cms.string('conversionStep'), + AlgorithmName = cms.string('iter8'), Fitter = 'convStepFitterSmoother', ) diff --git a/RecoTracker/ConversionSeedGenerators/python/Phase1PU140_ConversionStep_cff.py b/RecoTracker/ConversionSeedGenerators/python/Phase1PU140_ConversionStep_cff.py index 78ed1ca3ab084..9260128b2b836 100644 --- a/RecoTracker/ConversionSeedGenerators/python/Phase1PU140_ConversionStep_cff.py +++ b/RecoTracker/ConversionSeedGenerators/python/Phase1PU140_ConversionStep_cff.py @@ -250,7 +250,7 @@ import RecoTracker.TrackProducer.TrackProducer_cfi convStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone( src = 'convTrackCandidates', - AlgorithmName = cms.string('conversionStep'), + AlgorithmName = cms.string('iter8'), Fitter = 'convStepFitterSmoother', TTRHBuilder=cms.string('WithTrackAngle') ) diff --git a/RecoTracker/ConversionSeedGenerators/python/Phase1PU70_ConversionStep_cff.py b/RecoTracker/ConversionSeedGenerators/python/Phase1PU70_ConversionStep_cff.py index cf00fb57ee56b..3f13dd37701b9 100644 --- a/RecoTracker/ConversionSeedGenerators/python/Phase1PU70_ConversionStep_cff.py +++ b/RecoTracker/ConversionSeedGenerators/python/Phase1PU70_ConversionStep_cff.py @@ -250,7 +250,7 @@ import RecoTracker.TrackProducer.TrackProducer_cfi convStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone( src = 'convTrackCandidates', - AlgorithmName = cms.string('conversionStep'), + AlgorithmName = cms.string('iter8'), Fitter = 'convStepFitterSmoother', TTRHBuilder=cms.string('WithTrackAngle') ) diff --git a/RecoTracker/ConversionSeedGenerators/python/PostLS1_ConversionStep_cff.py b/RecoTracker/ConversionSeedGenerators/python/PostLS1_ConversionStep_cff.py index 6931cd591c846..77ad9398b77b7 100644 --- a/RecoTracker/ConversionSeedGenerators/python/PostLS1_ConversionStep_cff.py +++ b/RecoTracker/ConversionSeedGenerators/python/PostLS1_ConversionStep_cff.py @@ -250,7 +250,7 @@ import RecoTracker.TrackProducer.TrackProducer_cfi convStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone( src = 'convTrackCandidates', - AlgorithmName = cms.string('conversionStep'), + AlgorithmName = cms.string('iter8'), Fitter = 'convStepFitterSmoother', ) diff --git a/RecoTracker/FinalTrackSelectors/plugins/TrackListMerger.cc b/RecoTracker/FinalTrackSelectors/plugins/TrackListMerger.cc index 206b9e341744d..a813f0d41910d 100644 --- a/RecoTracker/FinalTrackSelectors/plugins/TrackListMerger.cc +++ b/RecoTracker/FinalTrackSelectors/plugins/TrackListMerger.cc @@ -407,11 +407,7 @@ namespace { //cache the id and rechits of valid hits typedef std::pair IHit; - #ifdef __clang__ - std::vector> rh1(ngood); // an array of vectors! - #else std::vector rh1[ngood]; // an array of vectors! - #endif //const TrackingRecHit* fh1[ngood]; // first hit... uint8_t algo[ngood]; float score[ngood]; @@ -639,13 +635,8 @@ namespace { // output selected tracks - if any // - #ifdef __clang__ - std::vector trackRefs(rSize); - std::vector> seedsRefs(rSize); - #else reco::TrackRef trackRefs[rSize]; edm::RefToBase seedsRefs[rSize]; - #endif unsigned int nToWrite=0; for ( unsigned int i=0; i > layerTree; // re-used throughout std::vector foundNodes; // re-used thoughout foundNodes.reserve(100); - #ifdef __clang__ - std::vector> hitTree(size); - #else KDTreeLinkerAlgo hitTree[size]; - #endif float rzError[size]; //save maximum errors double maxphi = Geom::twoPi(), minphi = -maxphi; //increase to cater for any range diff --git a/RecoVertex/BeamSpotProducer/python/d0_phi_analyzer_cff.py b/RecoVertex/BeamSpotProducer/python/d0_phi_analyzer_cff.py index 013f24ac94ae1..1600d1bd0fbf2 100644 --- a/RecoVertex/BeamSpotProducer/python/d0_phi_analyzer_cff.py +++ b/RecoVertex/BeamSpotProducer/python/d0_phi_analyzer_cff.py @@ -28,7 +28,7 @@ MinimumTotalLayers = cms.untracked.int32(11), MinimumPixelLayers = cms.untracked.int32(3), MaximumNormChi2 = cms.untracked.double(2.0), - TrackAlgorithm = cms.untracked.vstring('initialStep'), ## ctf,rs,cosmics,initialStep,lowPtTripletStep...; for all algos, leave it blank + TrackAlgorithm = cms.untracked.vstring('iter0'), ## ctf,rs,cosmics,iter0,iter1...; for all algos, leave it blank TrackQuality = cms.untracked.vstring(), ## loose, tight, highPurity...; for all qualities, leave it blank InputBeamWidth = cms.untracked.double(0.0060), ## beam width used for Trk fitter, used only when result from PV is not available FractionOfFittedTrks = cms.untracked.double(0.9), diff --git a/RecoVertex/BeamSpotProducer/python/d0_phi_analyzer_pixelLess_cff.py b/RecoVertex/BeamSpotProducer/python/d0_phi_analyzer_pixelLess_cff.py index 9f271508c4116..521b808e47e39 100644 --- a/RecoVertex/BeamSpotProducer/python/d0_phi_analyzer_pixelLess_cff.py +++ b/RecoVertex/BeamSpotProducer/python/d0_phi_analyzer_pixelLess_cff.py @@ -21,7 +21,7 @@ MinimumTotalLayers = cms.untracked.int32(8), MinimumPixelLayers = cms.untracked.int32(0), MaximumNormChi2 = cms.untracked.double(5.0), - TrackAlgorithm = cms.untracked.vstring(), ## ctf,rs,cosmics,initialStep,lowPtTripletStep...; for all algos, leave it blank + TrackAlgorithm = cms.untracked.vstring(), ## ctf,rs,cosmics,iter0,iter1...; for all algos, leave it blank TrackQuality = cms.untracked.vstring(), ## loose, tight, highPurity...; for all qualities, leave it blank InputBeamWidth = cms.untracked.double(-1.0), ## if -1 use the value calculated by the analyzer FractionOfFittedTrks = cms.untracked.double(0.5), diff --git a/SimDataFormats/PileupSummaryInfo/interface/PileupMixingContent.h b/SimDataFormats/PileupSummaryInfo/interface/PileupMixingContent.h index 7dd78fcdfbf26..b9760c778337a 100644 --- a/SimDataFormats/PileupSummaryInfo/interface/PileupMixingContent.h +++ b/SimDataFormats/PileupSummaryInfo/interface/PileupMixingContent.h @@ -28,8 +28,7 @@ class PileupMixingContent { PileupMixingContent( std::vector& bunchCrossing, std::vector& n_interactions, - std::vector& True_interactions, - int bunchSpacing): bunchSpacing_(bunchSpacing) + std::vector& True_interactions ) { bunchCrossing_.reserve(bunchCrossing.size()); @@ -68,7 +67,6 @@ class PileupMixingContent { const std::vector& getMix_Ninteractions() const { return n_interactions_; } const std::vector& getMix_TrueInteractions() const { return n_TrueInteractions_; } const std::vector& getMix_bunchCrossing() const { return bunchCrossing_; } - const int & getMix_bunchSpacing() const { return bunchSpacing_; } private: @@ -78,7 +76,7 @@ class PileupMixingContent { std::vector bunchCrossing_; std::vector n_interactions_; std::vector n_TrueInteractions_; - int bunchSpacing_; + }; diff --git a/SimDataFormats/PileupSummaryInfo/interface/PileupSummaryInfo.h b/SimDataFormats/PileupSummaryInfo/interface/PileupSummaryInfo.h index 3fee9047cd31d..0165e65293f4c 100644 --- a/SimDataFormats/PileupSummaryInfo/interface/PileupSummaryInfo.h +++ b/SimDataFormats/PileupSummaryInfo/interface/PileupSummaryInfo.h @@ -50,8 +50,7 @@ class PileupSummaryInfo { std::vector& ntrks_lowpT, std::vector& ntrks_highpT, int bunchCrossing, - float TrueNumInteractions, - int bunchSpacing); + float TrueNumInteractions); PileupSummaryInfo( const int num_PU_vertices, std::vector& instLumi, @@ -69,7 +68,6 @@ class PileupSummaryInfo { const std::vector& getPU_instLumi() const { return instLumi_; } const std::vector& getPU_EventID() const { return eventInfo_; } const int getBunchCrossing() const { return bunchCrossing_;} - const int getBunchSpacing() const { return bunchSpacing_;} const float getTrueNumInteractions() const { return TrueNumInteractions_;} private: @@ -83,7 +81,6 @@ class PileupSummaryInfo { std::vector ntrks_lowpT_; std::vector ntrks_highpT_; int bunchCrossing_; - int bunchSpacing_; float TrueNumInteractions_; diff --git a/SimDataFormats/PileupSummaryInfo/src/PileupSummaryInfo.cc b/SimDataFormats/PileupSummaryInfo/src/PileupSummaryInfo.cc index eca50d7d50d61..3144854e74c00 100644 --- a/SimDataFormats/PileupSummaryInfo/src/PileupSummaryInfo.cc +++ b/SimDataFormats/PileupSummaryInfo/src/PileupSummaryInfo.cc @@ -81,8 +81,7 @@ PileupSummaryInfo::PileupSummaryInfo( const int num_PU_vertices, std::vector& ntrks_lowpT, std::vector& ntrks_highpT, int bunchCrossing, - float TrueNumInteractions, - int bunchSpacing) + float TrueNumInteractions ) { num_PU_vertices_ = num_PU_vertices; @@ -95,7 +94,6 @@ PileupSummaryInfo::PileupSummaryInfo( const int num_PU_vertices, eventInfo_.clear(); bunchCrossing_ = bunchCrossing; TrueNumInteractions_ = TrueNumInteractions; - bunchSpacing_ = bunchSpacing; int NLoop = zpositions.size(); diff --git a/SimDataFormats/PileupSummaryInfo/src/classes_def.xml b/SimDataFormats/PileupSummaryInfo/src/classes_def.xml index 1771d43472aab..701b09e57de55 100644 --- a/SimDataFormats/PileupSummaryInfo/src/classes_def.xml +++ b/SimDataFormats/PileupSummaryInfo/src/classes_def.xml @@ -1,12 +1,12 @@ - - + + - - + + diff --git a/SimG4Core/Application/interface/EventAction.h b/SimG4Core/Application/interface/EventAction.h index 72c45ededc4a4..1cf5511aa1d3e 100644 --- a/SimG4Core/Application/interface/EventAction.h +++ b/SimG4Core/Application/interface/EventAction.h @@ -50,7 +50,6 @@ class EventAction: public G4UserEventAction SimRunInterface* m_runInterface; SimTrackManager* m_trackManager; std::string m_stopFile; - bool m_printRandom; bool m_debug; }; diff --git a/SimG4Core/Application/python/g4SimHits_cfi.py b/SimG4Core/Application/python/g4SimHits_cfi.py index 2f7a39a47a88c..a50770c858a75 100644 --- a/SimG4Core/Application/python/g4SimHits_cfi.py +++ b/SimG4Core/Application/python/g4SimHits_cfi.py @@ -146,7 +146,6 @@ EventAction = cms.PSet( debug = cms.untracked.bool(False), StopFile = cms.string('StopRun'), - PrintRandomSeed = cms.bool(False), CollapsePrimaryVertices = cms.bool(False) ), StackingAction = cms.PSet( diff --git a/SimG4Core/Application/src/EventAction.cc b/SimG4Core/Application/src/EventAction.cc index 47696308bcf9d..0a04ee7dccc2d 100644 --- a/SimG4Core/Application/src/EventAction.cc +++ b/SimG4Core/Application/src/EventAction.cc @@ -8,7 +8,6 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" #include -#include "Randomize.hh" //using std::cout; //using std::endl; @@ -19,7 +18,6 @@ EventAction::EventAction(const edm::ParameterSet & p, : m_runInterface(rm), m_trackManager(iManager), m_stopFile(p.getParameter("StopFile")), - m_printRandom(p.getParameter("PrintRandomSeed")), m_debug(p.getUntrackedParameter("debug",false)) { m_trackManager->setCollapsePrimaryVertices(p.getParameter("CollapsePrimaryVertices")); @@ -47,14 +45,6 @@ void EventAction::BeginOfEventAction(const G4Event * anEvent) void EventAction::EndOfEventAction(const G4Event * anEvent) { - if(m_printRandom) - { - edm::LogInfo("SimG4CoreApplication") << " Event " << anEvent->GetEventID() - << " Random number: " << G4UniformRand(); - //std::cout << " Event " << anEvent->GetEventID() - // << " Random number: " << G4UniformRand() << std::endl; - //CLHEP::HepRandom::showEngineStatus(); - } if (std::ifstream(m_stopFile.c_str())) { edm::LogWarning("SimG4CoreApplication") diff --git a/SimGeneral/MixingModule/interface/DigiAccumulatorMixMod.h b/SimGeneral/MixingModule/interface/DigiAccumulatorMixMod.h index e42539c55ff69..58985285608b0 100644 --- a/SimGeneral/MixingModule/interface/DigiAccumulatorMixMod.h +++ b/SimGeneral/MixingModule/interface/DigiAccumulatorMixMod.h @@ -78,8 +78,8 @@ class DigiAccumulatorMixMod { virtual void StorePileupInformation( std::vector &numInteractionList, - std::vector &bunchCrossingList, - std::vector &TrueInteractionList, int bunchSpace){ } + std::vector &bunchCrossingList, + std::vector &TrueInteractionList){ } virtual PileupMixingContent* getEventPileupInfo() { std::cout << " You must override the virtual functions in DigiAccumulatorMixMod in\n" << "order to access PileupInformation. Returning empty object." << std::endl; diff --git a/SimGeneral/MixingModule/plugins/MixingModule.cc b/SimGeneral/MixingModule/plugins/MixingModule.cc index 79bddf42bf037..e48c6f262cfed 100644 --- a/SimGeneral/MixingModule/plugins/MixingModule.cc +++ b/SimGeneral/MixingModule/plugins/MixingModule.cc @@ -438,15 +438,13 @@ namespace edm { for(Accumulators::const_iterator accItr = digiAccumulators_.begin(), accEnd = digiAccumulators_.end(); accItr != accEnd; ++accItr) { (*accItr)->StorePileupInformation( bunchCrossingList, numInteractionList, - TrueInteractionList, - bunchSpace_); + TrueInteractionList); } PileupMixing_ = std::auto_ptr(new PileupMixingContent(bunchCrossingList, numInteractionList, - TrueInteractionList, - bunchSpace_)); + TrueInteractionList)); e.put(PileupMixing_); diff --git a/SimGeneral/MixingModule/python/pixelDigitizer_cfi.py b/SimGeneral/MixingModule/python/pixelDigitizer_cfi.py index c526b939aeeac..b4a6bb17c0d99 100644 --- a/SimGeneral/MixingModule/python/pixelDigitizer_cfi.py +++ b/SimGeneral/MixingModule/python/pixelDigitizer_cfi.py @@ -42,14 +42,17 @@ TanLorentzAnglePerTesla_BPix = cms.double(0.106), AddNoisyPixels = cms.bool(True), Alpha2Order = cms.bool(True), + AddPixelInefficiency = cms.int32(0), # deprecated, use next option AddPixelInefficiencyFromPython = cms.bool(True), AddNoise = cms.bool(True), ChargeVCALSmearing = cms.bool(True), GainSmearing = cms.double(0.0), GeometryType = cms.string('idealForDigi'), - useDB = cms.bool(False), + useDB = cms.bool(True), LorentzAngle_DB = cms.bool(True), DeadModules_DB = cms.bool(True), +## killModules = cms.bool(False), +## DeadModules_DB = cms.bool(False), killModules = cms.bool(True), NumPixelBarrel = cms.int32(3), NumPixelEndcap = cms.int32(2), diff --git a/SimGeneral/PileupInformation/plugins/PileupInformation.cc b/SimGeneral/PileupInformation/plugins/PileupInformation.cc index d88eb987114f9..562fe7691720e 100644 --- a/SimGeneral/PileupInformation/plugins/PileupInformation.cc +++ b/SimGeneral/PileupInformation/plugins/PileupInformation.cc @@ -64,8 +64,6 @@ void PileupInformation::produce(edm::Event &event, const edm::EventSetup & setup std::vector Interactions_Xing; std::vector TrueInteractions_Xing; - int bunchSpacing; - const PileupMixingContent* MixInfo = MixingPileup.product(); if(MixInfo) { // extract information - way easier than counting vertices @@ -74,7 +72,6 @@ void PileupInformation::produce(edm::Event &event, const edm::EventSetup & setup const std::vector interactions = MixInfo->getMix_Ninteractions(); const std::vector TrueInteractions = MixInfo->getMix_TrueInteractions(); - bunchSpacing = MixInfo->getMix_bunchSpacing(); for(int ib=0; ib<(int)bunchCrossing.size(); ++ib){ // std::cout << " bcr, nint " << bunchCrossing[ib] << " " << interactions[ib] << std::endl; @@ -301,8 +298,7 @@ void PileupInformation::produce(edm::Event &event, const edm::EventSetup & setup ntrks_lowpT, ntrks_highpT, (*BXIter), - (*TInteractionsIter), - bunchSpacing + (*TInteractionsIter) ); //std::cout << " " << std::endl; diff --git a/SimTracker/SiPixelDigitizer/plugins/SiPixelDigitizer.h b/SimTracker/SiPixelDigitizer/plugins/SiPixelDigitizer.h index 6555ae952dd1b..6e994e92d74a2 100644 --- a/SimTracker/SiPixelDigitizer/plugins/SiPixelDigitizer.h +++ b/SimTracker/SiPixelDigitizer/plugins/SiPixelDigitizer.h @@ -60,9 +60,9 @@ namespace cms { virtual void beginJob() {} virtual void StorePileupInformation( std::vector &numInteractionList, - std::vector &bunchCrossingList, - std::vector &TrueInteractionList, int bunchSpacing){ - PileupInfo_ = new PileupMixingContent(numInteractionList, bunchCrossingList, TrueInteractionList, bunchSpacing); + std::vector &bunchCrossingList, + std::vector &TrueInteractionList){ + PileupInfo_ = new PileupMixingContent(numInteractionList, bunchCrossingList, TrueInteractionList); } virtual PileupMixingContent* getEventPileupInfo() { return PileupInfo_; } diff --git a/SimTracker/SiPixelDigitizer/plugins/SiPixelDigitizerAlgorithm.cc b/SimTracker/SiPixelDigitizer/plugins/SiPixelDigitizerAlgorithm.cc index 6127d1a31bc47..54fbf9192dd5c 100644 --- a/SimTracker/SiPixelDigitizer/plugins/SiPixelDigitizerAlgorithm.cc +++ b/SimTracker/SiPixelDigitizer/plugins/SiPixelDigitizerAlgorithm.cc @@ -87,6 +87,8 @@ #include "CondFormats/SiPixelObjects/interface/PixelFEDCabling.h" #include "CondFormats/SiPixelObjects/interface/PixelFEDLink.h" #include "DataFormats/FEDRawData/interface/FEDNumbering.h" +#include "DataFormats/SiPixelDetId/interface/PixelBarrelName.h" +#include "DataFormats/SiPixelDetId/interface/PixelEndcapName.h" #include "SimDataFormats/PileupSummaryInfo/interface/PileupMixingContent.h" // Geometry @@ -360,92 +362,98 @@ SiPixelDigitizerAlgorithm::PixelEfficiencies::PixelEfficiencies(const edm::Param int NumberOfTotLayers = NumberOfBarrelLayers + NumberOfEndcapDisks; FPixIndex=NumberOfBarrelLayers; if (AddPixelInefficiency){ - int i=0; - thePixelColEfficiency[i++] = conf.getParameter("thePixelColEfficiency_BPix1"); - thePixelColEfficiency[i++] = conf.getParameter("thePixelColEfficiency_BPix2"); - thePixelColEfficiency[i++] = conf.getParameter("thePixelColEfficiency_BPix3"); - if (NumberOfBarrelLayers>=4){thePixelColEfficiency[i++] = conf.getParameter("thePixelColEfficiency_BPix4");} - // - i=0; - thePixelEfficiency[i++] = conf.getParameter("thePixelEfficiency_BPix1"); - thePixelEfficiency[i++] = conf.getParameter("thePixelEfficiency_BPix2"); - thePixelEfficiency[i++] = conf.getParameter("thePixelEfficiency_BPix3"); - if (NumberOfBarrelLayers>=4){thePixelEfficiency[i++] = conf.getParameter("thePixelEfficiency_BPix4");} - // - i=0; - thePixelChipEfficiency[i++] = conf.getParameter("thePixelChipEfficiency_BPix1"); - thePixelChipEfficiency[i++] = conf.getParameter("thePixelChipEfficiency_BPix2"); - thePixelChipEfficiency[i++] = conf.getParameter("thePixelChipEfficiency_BPix3"); - if (NumberOfBarrelLayers>=4){thePixelChipEfficiency[i++] = conf.getParameter("thePixelChipEfficiency_BPix4");} - // - i=0; - theLadderEfficiency_BPix[i++] = conf.getParameter >("theLadderEfficiency_BPix1"); - theLadderEfficiency_BPix[i++] = conf.getParameter >("theLadderEfficiency_BPix2"); - theLadderEfficiency_BPix[i++] = conf.getParameter >("theLadderEfficiency_BPix3"); - if ( ((theLadderEfficiency_BPix[0].size()!=20) || (theLadderEfficiency_BPix[1].size()!=32) || - (theLadderEfficiency_BPix[2].size()!=44)) && (NumberOfBarrelLayers==3) ) - throw cms::Exception("Configuration") << "Wrong ladder number in efficiency config!"; - // - i=0; - theModuleEfficiency_BPix[i++] = conf.getParameter >("theModuleEfficiency_BPix1"); - theModuleEfficiency_BPix[i++] = conf.getParameter >("theModuleEfficiency_BPix2"); - theModuleEfficiency_BPix[i++] = conf.getParameter >("theModuleEfficiency_BPix3"); - if ( ((theModuleEfficiency_BPix[0].size()!=4) || (theModuleEfficiency_BPix[1].size()!=4) || - (theModuleEfficiency_BPix[2].size()!=4)) && (NumberOfBarrelLayers==3) ) - throw cms::Exception("Configuration") << "Wrong module number in efficiency config!"; - // - i=0; - thePUEfficiency_BPix[i++] = conf.getParameter >("thePUEfficiency_BPix1"); - thePUEfficiency_BPix[i++] = conf.getParameter >("thePUEfficiency_BPix2"); - thePUEfficiency_BPix[i++] = conf.getParameter >("thePUEfficiency_BPix3"); - if ( ((thePUEfficiency_BPix[0].size()==0) || (thePUEfficiency_BPix[1].size()==0) || - (thePUEfficiency_BPix[2].size()==0)) && (NumberOfBarrelLayers==3) ) - throw cms::Exception("Configuration") << "At least one PU efficiency number is needed in efficiency config!"; - // The next is needed for Phase2 Tracker studies - if (NumberOfBarrelLayers>=5){ - if (NumberOfTotLayers>20){throw cms::Exception("Configuration") <<"SiPixelDigitizer was given more layers than it can handle";} - // For Phase2 tracker layers just set the outermost BPix inefficiency to 99.9% - for (int j=5 ; j<=NumberOfBarrelLayers ; j++){ - thePixelColEfficiency[j-1]=0.999; - thePixelEfficiency[j-1]=0.999; - thePixelChipEfficiency[j-1]=0.999; - } - } - // - i=FPixIndex; - thePixelColEfficiency[i++] = conf.getParameter("thePixelColEfficiency_FPix1"); - thePixelColEfficiency[i++] = conf.getParameter("thePixelColEfficiency_FPix2"); - if (NumberOfEndcapDisks>=3){thePixelColEfficiency[i++] = conf.getParameter("thePixelColEfficiency_FPix3");} - i=FPixIndex; - thePixelEfficiency[i++] = conf.getParameter("thePixelEfficiency_FPix1"); - thePixelEfficiency[i++] = conf.getParameter("thePixelEfficiency_FPix2"); - if (NumberOfEndcapDisks>=3){thePixelEfficiency[i++] = conf.getParameter("thePixelEfficiency_FPix3");} - i=FPixIndex; - thePixelChipEfficiency[i++] = conf.getParameter("thePixelChipEfficiency_FPix1"); - thePixelChipEfficiency[i++] = conf.getParameter("thePixelChipEfficiency_FPix2"); - if (NumberOfEndcapDisks>=3){thePixelChipEfficiency[i++] = conf.getParameter("thePixelChipEfficiency_FPix3");} - // The next is needed for Phase2 Tracker studies - if (NumberOfEndcapDisks>=4){ - if (NumberOfTotLayers>20){throw cms::Exception("Configuration") <<"SiPixelDigitizer was given more layers than it can handle";} - // For Phase2 tracker layers just set the extra FPix disk inefficiency to 99.9% - for (int j=4+FPixIndex ; j<=NumberOfEndcapDisks+NumberOfBarrelLayers ; j++){ - thePixelColEfficiency[j-1]=0.999; - thePixelEfficiency[j-1]=0.999; - thePixelChipEfficiency[j-1]=0.999; - } - } + int i=0; + thePixelColEfficiency[i++] = conf.getParameter("thePixelColEfficiency_BPix1"); + thePixelColEfficiency[i++] = conf.getParameter("thePixelColEfficiency_BPix2"); + thePixelColEfficiency[i++] = conf.getParameter("thePixelColEfficiency_BPix3"); + if (NumberOfBarrelLayers>=4){thePixelColEfficiency[i++] = conf.getParameter("thePixelColEfficiency_BPix4");} + // + i=0; + thePixelEfficiency[i++] = conf.getParameter("thePixelEfficiency_BPix1"); + thePixelEfficiency[i++] = conf.getParameter("thePixelEfficiency_BPix2"); + thePixelEfficiency[i++] = conf.getParameter("thePixelEfficiency_BPix3"); + if (NumberOfBarrelLayers>=4){thePixelEfficiency[i++] = conf.getParameter("thePixelEfficiency_BPix4");} + // + i=0; + thePixelChipEfficiency[i++] = conf.getParameter("thePixelChipEfficiency_BPix1"); + thePixelChipEfficiency[i++] = conf.getParameter("thePixelChipEfficiency_BPix2"); + thePixelChipEfficiency[i++] = conf.getParameter("thePixelChipEfficiency_BPix3"); + if (NumberOfBarrelLayers>=4){thePixelChipEfficiency[i++] = conf.getParameter("thePixelChipEfficiency_BPix4");} + // + i=0; + theLadderEfficiency_BPix[i++] = conf.getParameter >("theLadderEfficiency_BPix1"); + theLadderEfficiency_BPix[i++] = conf.getParameter >("theLadderEfficiency_BPix2"); + theLadderEfficiency_BPix[i++] = conf.getParameter >("theLadderEfficiency_BPix3"); + if ( ((theLadderEfficiency_BPix[0].size()!=20) || (theLadderEfficiency_BPix[1].size()!=32) || + (theLadderEfficiency_BPix[2].size()!=44)) && (NumberOfBarrelLayers==3) ) + throw cms::Exception("Configuration") << "Wrong ladder number in efficiency config!"; + // + i=0; + theModuleEfficiency_BPix[i++] = conf.getParameter >("theModuleEfficiency_BPix1"); + theModuleEfficiency_BPix[i++] = conf.getParameter >("theModuleEfficiency_BPix2"); + theModuleEfficiency_BPix[i++] = conf.getParameter >("theModuleEfficiency_BPix3"); + if ( ((theModuleEfficiency_BPix[0].size()!=4) || (theModuleEfficiency_BPix[1].size()!=4) || + (theModuleEfficiency_BPix[2].size()!=4)) && (NumberOfBarrelLayers==3) ) + throw cms::Exception("Configuration") << "Wrong module number in efficiency config!"; + // + i=0; + thePUEfficiency_BPix[i++] = conf.getParameter >("thePUEfficiency_BPix1"); + thePUEfficiency_BPix[i++] = conf.getParameter >("thePUEfficiency_BPix2"); + thePUEfficiency_BPix[i++] = conf.getParameter >("thePUEfficiency_BPix3"); + if ( ((thePUEfficiency_BPix[0].size()==0) || (thePUEfficiency_BPix[1].size()==0) || + (thePUEfficiency_BPix[2].size()==0)) && (NumberOfBarrelLayers==3) ) + throw cms::Exception("Configuration") << "At least one PU efficiency number is needed in efficiency config!"; + // The next is needed for Phase2 Tracker studies + if (NumberOfBarrelLayers>=5){ + if (NumberOfTotLayers>20){throw cms::Exception("Configuration") <<"SiPixelDigitizer was given more layers than it can handle";} + // For Phase2 tracker layers just set the outermost BPix inefficiency to 99.9% + for (int j=5 ; j<=NumberOfBarrelLayers ; j++){ + thePixelColEfficiency[j-1]=0.999; + thePixelEfficiency[j-1]=0.999; + thePixelChipEfficiency[j-1]=0.999; + } + } + // + i=FPixIndex; + thePixelColEfficiency[i++] = conf.getParameter("thePixelColEfficiency_FPix1"); + thePixelColEfficiency[i++] = conf.getParameter("thePixelColEfficiency_FPix2"); + if (NumberOfEndcapDisks>=3){thePixelColEfficiency[i++] = conf.getParameter("thePixelColEfficiency_FPix3");} + i=FPixIndex; + thePixelEfficiency[i++] = conf.getParameter("thePixelEfficiency_FPix1"); + thePixelEfficiency[i++] = conf.getParameter("thePixelEfficiency_FPix2"); + if (NumberOfEndcapDisks>=3){thePixelEfficiency[i++] = conf.getParameter("thePixelEfficiency_FPix3");} + i=FPixIndex; + thePixelChipEfficiency[i++] = conf.getParameter("thePixelChipEfficiency_FPix1"); + thePixelChipEfficiency[i++] = conf.getParameter("thePixelChipEfficiency_FPix2"); + if (NumberOfEndcapDisks>=3){thePixelChipEfficiency[i++] = conf.getParameter("thePixelChipEfficiency_FPix3");} + // The next is needed for Phase2 Tracker studies + if (NumberOfEndcapDisks>=4){ + if (NumberOfTotLayers>20){throw cms::Exception("Configuration") <<"SiPixelDigitizer was given more layers than it can handle";} + // For Phase2 tracker layers just set the extra FPix disk inefficiency to 99.9% + for (int j=4+FPixIndex ; j<=NumberOfEndcapDisks+NumberOfBarrelLayers ; j++){ + thePixelColEfficiency[j-1]=0.999; + thePixelEfficiency[j-1]=0.999; + thePixelChipEfficiency[j-1]=0.999; + } + } } // the first "NumberOfBarrelLayers" settings [0],[1], ... , [NumberOfBarrelLayers-1] are for the barrel pixels // the next "NumberOfEndcapDisks" settings [NumberOfBarrelLayers],[NumberOfBarrelLayers+1], ... [NumberOfEndcapDisks+NumberOfBarrelLayers-1] + if(!AddPixelInefficiency) { // No inefficiency, all 100% efficient + for (int i=0; i("thePixelPseudoRadDamage_BPix1"); thePixelPseudoRadDamage[i++] = conf.getParameter("thePixelPseudoRadDamage_BPix2"); @@ -477,6 +485,11 @@ SiPixelDigitizerAlgorithm::PixelAging::PixelAging(const edm::ParameterSet& conf, } // the first "NumberOfBarrelLayers" settings [0],[1], ... , [NumberOfBarrelLayers-1] are for the barrel pixels // the next "NumberOfEndcapDisks" settings [NumberOfBarrelLayers],[NumberOfBarrelLayers+1], ... [NumberOfEndcapDisks+NumberOfBarrelLayers-1] + else { // No inefficiency, all 100% efficientaging, no decrease of signal + for (int i=0; i::const_iterator pu; std::vector::const_iterator pu0 = bunchCrossing.end(); - + for (pu=bunchCrossing.begin(); pu!=bunchCrossing.end(); ++pu) { if (*pu==0) { pu0 = pu; @@ -572,25 +585,25 @@ void SiPixelDigitizerAlgorithm::digitize(const PixelGeomDetUnit* pixdet, const TrackerTopology *tTopo, CLHEP::HepRandomEngine* engine) { - // Pixel Efficiency moved from the constructor to this method because - // the information of the det are not available in the constructor - // Efficiency parameters. 0 - no inefficiency, 1-low lumi, 10-high lumi - - uint32_t detID = pixdet->geographicalId().rawId(); - const signal_map_type& theSignal = _signal[detID]; - - const PixelTopology* topol=&pixdet->specificTopology(); - int numColumns = topol->ncolumns(); // det module number of cols&rows - int numRows = topol->nrows(); - - // Noise already defined in electrons - // thePixelThresholdInE = thePixelThreshold * theNoiseInElectrons ; - // Find the threshold in noise units, needed for the noiser. - + // Pixel Efficiency moved from the constructor to this method because + // the information of the det are not available in the constructor + // Effciency parameters. 0 - no inefficiency, 1-low lumi, 10-high lumi + + uint32_t detID = pixdet->geographicalId().rawId(); + const signal_map_type& theSignal = _signal[detID]; + + const PixelTopology* topol=&pixdet->specificTopology(); + int numColumns = topol->ncolumns(); // det module number of cols&rows + int numRows = topol->nrows(); + + // Noise already defined in electrons + //thePixelThresholdInE = thePixelThreshold * theNoiseInElectrons ; + // Find the threshold in noise units, needed for the noiser. + unsigned int Sub_detid=DetId(detID).subdetId(); float thePixelThresholdInE = 0.; - + if(theNoiseInElectrons>0.){ if(Sub_detid == PixelSubdetector::PixelBarrel){ // Barrel modules int lay = tTopo->pxbLayer(detID); @@ -615,36 +628,36 @@ void SiPixelDigitizerAlgorithm::digitize(const PixelGeomDetUnit* pixdet, } } } - + #ifdef TP_DEBUG - // full detector thickness - float moduleThickness = pixdet->specificSurface().bounds().thickness(); - LogDebug ("PixelDigitizer") - << " PixelDigitizer " - << numColumns << " " << numRows << " " << moduleThickness; + // full detector thickness + float moduleThickness = pixdet->specificSurface().bounds().thickness(); + LogDebug ("PixelDigitizer") + << " PixelDigitizer " + << numColumns << " " << numRows << " " << moduleThickness; #endif - - if(addNoise) add_noise(pixdet, thePixelThresholdInE/theNoiseInElectrons, engine); // generate noise - - // Do only if needed - - if((AddPixelInefficiency) && (theSignal.size()>0)) - pixel_inefficiency(pixelEfficiencies_, pixdet, tTopo, engine); // Kill some pixels - - if(use_ineff_from_db_ && (theSignal.size()>0)) - pixel_inefficiency_db(detID); - - if(use_module_killing_) { - if (use_deadmodule_DB_) { // remove dead modules using DB - module_killing_DB(detID); - } else { // remove dead modules using the list in cfg file - module_killing_conf(detID); + + if(addNoise) add_noise(pixdet, thePixelThresholdInE/theNoiseInElectrons, engine); // generate noise + + // Do only if needed + + if((AddPixelInefficiency) && (theSignal.size()>0)) + pixel_inefficiency(pixelEfficiencies_, pixdet, tTopo, engine); // Kill some pixels + + if(use_ineff_from_db_ && (theSignal.size()>0)) + pixel_inefficiency_db(detID); + + if(use_module_killing_) { + if (use_deadmodule_DB_) { // remove dead modules using DB + module_killing_DB(detID); + } else { // remove dead modules using the list in cfg file + module_killing_conf(detID); + } } - } - - make_digis(thePixelThresholdInE, detID, digis, simlinks, tTopo); - + + make_digis(thePixelThresholdInE, detID, digis, simlinks, tTopo); + #ifdef TP_DEBUG LogDebug ("PixelDigitizer") << "[SiPixelDigitizerAlgorithm] converted " << digis.size() << " PixelDigis in DetUnit" << detID; #endif @@ -654,21 +667,21 @@ void SiPixelDigitizerAlgorithm::digitize(const PixelGeomDetUnit* pixdet, // Generate primary ionization along the track segment. // Divide the track into small sub-segments void SiPixelDigitizerAlgorithm::primary_ionization(const PSimHit& hit, std::vector& ionization_points, CLHEP::HepRandomEngine* engine) const { - - // Straight line approximation for trajectory inside active media - + +// Straight line approximation for trajectory inside active media + const float SegmentLength = 0.0010; //10microns in cm float energy; - + // Get the 3D segment direction vector LocalVector direction = hit.exitPoint() - hit.entryPoint(); - + float eLoss = hit.energyLoss(); // Eloss in GeV float length = direction.mag(); // Track length in Silicon - + int NumberOfSegments = int ( length / SegmentLength); // Number of segments if(NumberOfSegments < 1) NumberOfSegments = 1; - + #ifdef TP_DEBUG LogDebug ("Pixel Digitizer") << " enter primary_ionzation " << NumberOfSegments @@ -678,36 +691,36 @@ void SiPixelDigitizerAlgorithm::primary_ionization(const PSimHit& hit, std::vect << (hit.exitPoint().z()-hit.entryPoint().z()) << " " << hit.particleType() <<" "<< hit.pabs() ; #endif - + float* elossVector = new float[NumberOfSegments]; // Eloss vector - + if( fluctuateCharge ) { //MP DA RIMUOVERE ASSOLUTAMENTE int pid = hit.particleType(); //int pid=211; // assume it is a pion - + float momentum = hit.pabs(); // Generate fluctuated charge points fluctuateEloss(pid, momentum, eLoss, length, NumberOfSegments, elossVector, engine); } - + ionization_points.resize( NumberOfSegments); // set size - + // loop over segments for ( int i = 0; i != NumberOfSegments; i++) { // Divide the segment into equal length subsegments Local3DPoint point = hit.entryPoint() + float((i+0.5)/NumberOfSegments) * direction; - + if( fluctuateCharge ) energy = elossVector[i]/GeVperElectron; // Convert charge to elec. else energy = hit.energyLoss()/GeVperElectron/float(NumberOfSegments); - + EnergyDepositUnit edu( energy, point); //define position,energy point ionization_points[i] = edu; // save - + #ifdef TP_DEBUG LogDebug ("Pixel Digitizer") << i << " " << ionization_points[i].x() << " " @@ -715,11 +728,11 @@ void SiPixelDigitizerAlgorithm::primary_ionization(const PSimHit& hit, std::vect << ionization_points[i].z() << " " << ionization_points[i].energy(); #endif - + } // end for loop - + delete[] elossVector; - + } //****************************************************************************** @@ -729,12 +742,12 @@ void SiPixelDigitizerAlgorithm::fluctuateEloss(int pid, float particleMomentum, float eloss, float length, int NumberOfSegs,float elossVector[], CLHEP::HepRandomEngine* engine) const { - + // Get dedx for this track //float dedx; //if( length > 0.) dedx = eloss/length; //else dedx = eloss; - + double particleMass = 139.6; // Mass in MeV, Assume pion pid = std::abs(pid); if(pid!=211) { // Mass in MeV @@ -745,7 +758,7 @@ void SiPixelDigitizerAlgorithm::fluctuateEloss(int pid, float particleMomentum, } // What is the track segment length. float segmentLength = length/NumberOfSegs; - + // Generate charge fluctuations. float de=0.; float sum=0.; @@ -758,17 +771,18 @@ void SiPixelDigitizerAlgorithm::fluctuateEloss(int pid, float particleMomentum, // Returns fluctuated eloss in MeV double deltaCutoff = tMax; // the cutoff is sometimes redefined inside, so fix it. de = fluctuate->SampleFluctuations(double(particleMomentum*1000.), - particleMass, deltaCutoff, - double(segmentLength*10.), - segmentEloss, engine )/1000.; //convert to GeV + particleMass, deltaCutoff, + double(segmentLength*10.), + segmentEloss, engine )/1000.; //convert to GeV + elossVector[i]=de; sum +=de; } - + if(sum>0.) { // If fluctuations give eloss>0. // Rescale to the same total eloss float ratio = eloss/sum; - + for (int ii=0;ii pIndexConverter(new PixelIndices(numColumns,numRows)); @@ -1658,15 +1675,16 @@ LocalVector SiPixelDigitizerAlgorithm::DriftDirection(const PixelGeomDetUnit* pi dir_x = -( tanLorentzAnglePerTesla_BPix * Bfield.y() + alpha2_BPix* Bfield.z()* Bfield.x() ); dir_y = +( tanLorentzAnglePerTesla_BPix * Bfield.x() - alpha2_BPix* Bfield.z()* Bfield.y() ); dir_z = -(1 + alpha2_BPix* Bfield.z()*Bfield.z() ); - scale = -dir_z; + scale = (1 + alpha2_BPix* Bfield.z()*Bfield.z() ); + } else {// forward disks dir_x = -( tanLorentzAnglePerTesla_FPix * Bfield.y() + alpha2_FPix* Bfield.z()* Bfield.x() ); dir_y = +( tanLorentzAnglePerTesla_FPix * Bfield.x() - alpha2_FPix* Bfield.z()* Bfield.y() ); dir_z = -(1 + alpha2_FPix* Bfield.z()*Bfield.z() ); - scale = -dir_z; + scale = (1 + alpha2_FPix* Bfield.z()*Bfield.z() ); } } // end: Read LA from cfg file. - + //Read Lorentz angle from DB:******************************************************************** if(use_LorentzAngle_DB_){ float lorentzAngle = SiPixelLorentzAngle_->getLorentzAngle(detId); @@ -1675,7 +1693,7 @@ LocalVector SiPixelDigitizerAlgorithm::DriftDirection(const PixelGeomDetUnit* pi dir_x = -( lorentzAngle * Bfield.y() + alpha2 * Bfield.z()* Bfield.x() ); dir_y = +( lorentzAngle * Bfield.x() - alpha2 * Bfield.z()* Bfield.y() ); dir_z = -(1 + alpha2 * Bfield.z()*Bfield.z() ); - scale = -dir_z; + scale = (1 + alpha2 * Bfield.z()*Bfield.z() ); }// end: Read LA from DataBase. LocalVector theDriftDirection = LocalVector(dir_x/scale, dir_y/scale, dir_z/scale ); @@ -1691,7 +1709,9 @@ LocalVector SiPixelDigitizerAlgorithm::DriftDirection(const PixelGeomDetUnit* pi //**************************************************************************************************** void SiPixelDigitizerAlgorithm::pixel_inefficiency_db(uint32_t detID) { - + if(!use_ineff_from_db_) + return; + signal_map_type& theSignal = _signal[detID]; // Loop over hit pixels, amplitude in electrons, channel = coded row,col @@ -1714,6 +1734,8 @@ void SiPixelDigitizerAlgorithm::pixel_inefficiency_db(uint32_t detID) { //**************************************************************************************************** void SiPixelDigitizerAlgorithm::module_killing_conf(uint32_t detID) { + if(!use_module_killing_) + return; bool isbad=false; @@ -1756,6 +1778,8 @@ void SiPixelDigitizerAlgorithm::module_killing_conf(uint32_t detID) { //**************************************************************************************************** void SiPixelDigitizerAlgorithm::module_killing_DB(uint32_t detID) { // Not SLHC safe for now + if(!use_module_killing_) + return; bool isbad=false; diff --git a/TrackingTools/GsfTracking/src/GsfBetheHeitlerUpdator.cc b/TrackingTools/GsfTracking/src/GsfBetheHeitlerUpdator.cc index 1758715a5fcd2..5f41cef51bb9a 100644 --- a/TrackingTools/GsfTracking/src/GsfBetheHeitlerUpdator.cc +++ b/TrackingTools/GsfTracking/src/GsfBetheHeitlerUpdator.cc @@ -122,12 +122,7 @@ GsfBetheHeitlerUpdator::compute (const TrajectoryStateOnSurface& TSoS, if ( rl<0.01f ) rl = 0.01f; if ( rl>0.20f ) rl = 0.20f; - #if __clang__ - std::vector mixtureHolder(theNrComponents); - GSContainer *mixture = mixtureHolder.data(); - #else GSContainer mixture[theNrComponents]; - #endif getMixtureParameters(rl,mixture); correctWeights(mixture); if ( theCorrectionFlag>=1 ) diff --git a/TrackingTools/GsfTracking/src/GsfCombinedMaterialEffectsUpdator.cc b/TrackingTools/GsfTracking/src/GsfCombinedMaterialEffectsUpdator.cc index 7e0e8cd5e0603..7a35b4e87f0b1 100644 --- a/TrackingTools/GsfTracking/src/GsfCombinedMaterialEffectsUpdator.cc +++ b/TrackingTools/GsfTracking/src/GsfCombinedMaterialEffectsUpdator.cc @@ -16,17 +16,10 @@ GsfCombinedMaterialEffectsUpdator::GsfCombinedMaterialEffectsUpdator(GsfMaterial void GsfCombinedMaterialEffectsUpdator::compute (const TrajectoryStateOnSurface& TSoS, const PropagationDirection propDir, Effect effects[]) const { - #if __clang__ - std::vector msEffects(theMSUpdator->size()); - theMSUpdator->compute(TSoS,propDir,msEffects.data()); - std::vector elEffects(theELUpdator->size()); - theELUpdator->compute(TSoS,propDir,elEffects.data()); - #else Effect msEffects[theMSUpdator->size()]; theMSUpdator->compute(TSoS,propDir,msEffects); Effect elEffects[theELUpdator->size()]; theELUpdator->compute(TSoS,propDir,elEffects); - #endif // // combine the two multi-updates diff --git a/TrackingTools/GsfTracking/src/GsfMaterialEffectsUpdator.cc b/TrackingTools/GsfTracking/src/GsfMaterialEffectsUpdator.cc index 46c66658644bd..355029f3a7c28 100644 --- a/TrackingTools/GsfTracking/src/GsfMaterialEffectsUpdator.cc +++ b/TrackingTools/GsfTracking/src/GsfMaterialEffectsUpdator.cc @@ -27,13 +27,8 @@ GsfMaterialEffectsUpdator::updateState (const TrajectoryStateOnSurface& TSoS, // // Get components (will force recalculation, if necessary) // - #if __clang__ - std::vector effects(size()); - compute(TSoS,propDir,effects.data()); - #else Effect effects[size()]; compute(TSoS,propDir,effects); - #endif // // prepare output vector diff --git a/Utilities/ReleaseScripts/scripts/addOnTests.py b/Utilities/ReleaseScripts/scripts/addOnTests.py index fa44a510edcbe..cb5a0734f31b6 100755 --- a/Utilities/ReleaseScripts/scripts/addOnTests.py +++ b/Utilities/ReleaseScripts/scripts/addOnTests.py @@ -94,6 +94,9 @@ def prepare(self): } hltTests = { + 'hlt_mc_2014' : ['cmsDriver.py TTbar_Tauola_8TeV_cfi -s GEN,SIM,DIGI,L1,DIGI2RAW --mc --scenario=pp -n 10 --conditions auto:run1_mc_2014 --relval 9000,50 --datatier "GEN-SIM-RAW" --eventcontent RAW --fileout file:RelVal_Raw_2014_MC.root', + 'cmsRun '+self.file2Path('HLTrigger/Configuration/test/OnMc_HLT_2014.py'), + 'cmsDriver.py RelVal -s HLT:2014,RAW2DIGI,L1Reco,RECO --mc --scenario=pp -n 10 --conditions auto:run1_mc_2014 --relval 9000,50 --datatier "RAW-HLT-RECO" --eventcontent FEVTDEBUGHLT --customise=HLTrigger/Configuration/CustomConfigs.L1THLT --processName=HLTRECO --filein file:RelVal_Raw_2014_MC.root --fileout file:RelVal_Raw_2014_MC_HLT_RECO.root'], 'hlt_mc_Fake' : ['cmsDriver.py TTbar_Tauola_8TeV_cfi -s GEN,SIM,DIGI,L1,DIGI2RAW --mc --scenario=pp -n 10 --conditions auto:run1_mc_Fake --relval 9000,50 --datatier "GEN-SIM-RAW" --eventcontent RAW --fileout file:RelVal_Raw_Fake_MC.root', 'cmsRun '+self.file2Path('HLTrigger/Configuration/test/OnMc_HLT_Fake.py'), 'cmsDriver.py RelVal -s HLT:Fake,RAW2DIGI,L1Reco,RECO --mc --scenario=pp -n 10 --conditions auto:run1_mc_Fake --relval 9000,50 --datatier "RAW-HLT-RECO" --eventcontent FEVTDEBUGHLT --customise=HLTrigger/Configuration/CustomConfigs.L1THLT --processName=HLTRECO --filein file:RelVal_Raw_Fake_MC.root --fileout file:RelVal_Raw_Fake_MC_HLT_RECO.root'], @@ -109,6 +112,9 @@ def prepare(self): 'hlt_mc_PIon' : ['cmsDriver.py TTbar_Tauola_13TeV_cfi -s GEN,SIM,DIGI,L1,DIGI2RAW --mc --scenario=pp -n 10 --conditions auto:run2_mc_PIon --relval 9000,50 --datatier "GEN-SIM-RAW" --eventcontent RAW --customise SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1 --magField 38T_PostLS1 --fileout file:RelVal_Raw_PIon_MC.root', 'cmsRun ' + self.file2Path('HLTrigger/Configuration/test/OnMc_HLT_PIon.py'), 'cmsDriver.py RelVal -s HLT:PIon,RAW2DIGI,L1Reco,RECO --mc --scenario=pp -n 10 --conditions auto:run2_mc_PIon --relval 9000,50 --datatier "RAW-HLT-RECO" --eventcontent FEVTDEBUGHLT --customise=HLTrigger/Configuration/CustomConfigs.L1THLT --customise=SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1 --magField 38T_PostLS1 --processName=HLTRECO --filein file:RelVal_Raw_PIon_MC.root --fileout file:RelVal_Raw_PIon_MC_HLT_RECO.root'], + 'hlt_data_2014' : ['cmsDriver.py RelVal -s L1REPACK --data --scenario=pp -n 10 --conditions auto:run1_hlt_2014 --relval 9000,50 --datatier "RAW" --eventcontent RAW --fileout file:RelVal_Raw_2014_DATA.root --filein /store/data/Run2012A/MuEG/RAW/v1/000/191/718/14932935-E289-E111-830C-5404A6388697.root', + 'cmsRun '+self.file2Path('HLTrigger/Configuration/test/OnData_HLT_2014.py'), + 'cmsDriver.py RelVal -s HLT:2014,RAW2DIGI,L1Reco,RECO --data --scenario=pp -n 10 --conditions auto:run1_data_2014 --relval 9000,50 --datatier "RAW-HLT-RECO" --eventcontent FEVTDEBUGHLT --customise=HLTrigger/Configuration/CustomConfigs.L1THLT --processName=HLTRECO --filein file:RelVal_Raw_2014_DATA.root --fileout file:RelVal_Raw_2014_DATA_HLT_RECO.root'], 'hlt_data_Fake' : ['cmsDriver.py RelVal -s L1REPACK --data --scenario=pp -n 10 --conditions auto:run1_hlt_Fake --relval 9000,50 --datatier "RAW" --eventcontent RAW --fileout file:RelVal_Raw_Fake_DATA.root --filein /store/data/Run2012A/MuEG/RAW/v1/000/191/718/14932935-E289-E111-830C-5404A6388697.root', 'cmsRun '+self.file2Path('HLTrigger/Configuration/test/OnData_HLT_Fake.py'), 'cmsDriver.py RelVal -s HLT:Fake,RAW2DIGI,L1Reco,RECO --data --scenario=pp -n 10 --conditions auto:run1_data_Fake --relval 9000,50 --datatier "RAW-HLT-RECO" --eventcontent FEVTDEBUGHLT --customise=HLTrigger/Configuration/CustomConfigs.L1THLT --processName=HLTRECO --filein file:RelVal_Raw_Fake_DATA.root --fileout file:RelVal_Raw_Fake_DATA_HLT_RECO.root'], diff --git a/Utilities/ReleaseScripts/scripts/checkdeps b/Utilities/ReleaseScripts/scripts/checkdeps new file mode 100755 index 0000000000000..2688ccd45eede --- /dev/null +++ b/Utilities/ReleaseScripts/scripts/checkdeps @@ -0,0 +1,335 @@ +#!/usr/bin/env perl +# +# +# Created by: David Lange +# LLNL +# 12 September 207 +# +use strict; +use warnings; +use Getopt::Long; +use Cwd; + +#Idea: diff checked out packages. +# looking for changed headers +# find all packages that depend on those headers +# print that list. + +#if any argument, print help and exit + +my $poisondir="poison"; +my $cvsOpt=""; +my $checkout=0; +my $checkpython=0; +my $checkheader=0; +my $checkbuildfile=0; +my $printFileNames=0; +my $poison_includes=undef; +my $poison_only=0; +my $jobs=4; + +while (my $arg=shift) { + if ( $arg eq "-a" ) { + $checkout=1; + if (!defined $poison_includes) {$poison_includes=1;} + } + elsif ( $arg eq "-p" ) { + $checkpython=1; + } + elsif ( $arg eq "-q" ) { + $cvsOpt="$cvsOpt -Q"; + } + elsif ( $arg eq "-h" ) { + $checkheader=1; + } + elsif ( $arg eq "-b" ) { + $checkbuildfile=1; + } + elsif ( $arg eq "-f" ) { + $printFileNames=1; + } + elsif ( $arg eq "-d" ) { + $poison_includes=0; + } + elsif ( $arg eq "-D" ) { + $poison_only=1; + } + elsif ( $arg eq "-j" ) { + $arg = shift; + if ($arg!~/^\d+$/){die "Error: Invalid value '$arg' use with -j command-line argument.\n";} + $jobs=int($arg); + if ($jobs<1){$jobs=1;} + } + elsif ( $arg eq "-A" ) { + $checkpython=1; + $checkheader=1; + $checkbuildfile=1; + } + else{ + print "checkdeps:\n", + " Utility to check your local development area against the CMSSW release.\n", + " Any modified header files or python modules are found and the package\n", + " dependencies of these files will be returned. addpkg-ing these packages\n", + " and rebuilding them should provide a full and consistent build.\n", + "\nUsage: \n", + " -p look for python modules and their dependencies (ON by default)\n", + " -h look for header files and their dependencies (ON by default)\n", + " -b look for BuildFile files and their dependencies (OFF by default)\n", + " -f print name of changed file name instead of type of dependency (OFF by default)\n", + " -a will add/checkout the packages into your development area\n", + " -A will check all dependencies i.e. header (-h), python(-p) and BuildFile(-b)\n", + " -d do not create dummy copy of deleted files in ${poisondir} directory. Dummy copies\n", + " are useful to find out if deleted headers files are included by other source files.\n", + " -D only dummy copy of deleted files in ${poisondir} directory created.\n", + " NOTE: all other dependency check/add command-line args are ignored.\n", + " -j Run N threads to checkout packages. Default is ${jobs}\n", + " -q will pass -Q option to cvs to make it quiet\n\n"; + exit; + } +} + +if ($poison_only) { + $checkpython=0; + $checkheader=0; + $checkbuildfile=0; + $checkout=0; + $poison_includes=1; +} +elsif ((!$checkpython) && (!$checkheader) && (!$checkbuildfile)) { + $checkpython=1; + $checkheader=1; +} + +if(!defined $poison_includes) { $poison_includes = 0; } + +# make sure cvs is setup +die "ERROR: CVS not set. Do |project CMSSW| first\n" unless(defined $ENV{"CVSROOT"}); + +my $localtop=&getLocalTop(); +die "ERROR: Could not find developers area base path. Please run this script from a developer area.\n" if ($localtop eq ""); + +my $releasetop=&getReleaseTop($localtop); +die "ERROR: Could not find release base path. Please run this script from a developer area.\n" if ($releasetop eq ""); + +my $taglist = "${releasetop}/src/PackageList.cmssw"; +die "ERROR: Cannot find release package/tag list at $taglist\n" if (!-e $taglist); + +my %vals=(); +if ($checkheader){ + my $depfile = "${releasetop}/etc/dependencies/usedby.out.gz"; + die "ERROR: This release appears not to support the functionality of this script (170pre4 and higher). Sorry\n" if (!-e "$depfile"); + &readDependencyInfo("$depfile",\%vals); +} + +if ($checkpython) { + my $depfile = "${releasetop}/etc/dependencies/pyusedby.out.gz"; + &readDependencyInfo("$depfile",\%vals) if (-e "$depfile"); +} + +if ($checkbuildfile) +{ + my $depfile = "${releasetop}/etc/dependencies/bfusedby.out.gz"; + &readDependencyInfo("$depfile",\%vals) if (-e "$depfile"); +} + +chdir("${localtop}/src"); + +# Get the list of packages +my @packages; +foreach my $pack (glob("*/*")){ + if (-d "$pack/.admin"){ + push @packages, $pack; + } +} + +my $tags=&readTags($taglist); +my @changedFiles; +my @deletedFiles; + +foreach my $package (@packages) { + next if ($package =~/^UserCode.*/o); + next if (!exists $tags->{$package}); + my $reltag=$tags->{$package}; + print ">> Checking $package $reltag\n"; + my $diffs=`cvs -q -n update -r $reltag $package 2>&1`; + my @diffs=split('\n',$diffs); + my %msgs=("-" => {}, "x" => {}); + foreach my $diff (@diffs) { + my $del = 0; + if ( ($diff =~/^(M)/o) || ($diff =~/^(U)/o) || ($diff =~/^(R)/o) ) { + if ($1 eq "R"){$del =1;} + my @sp2=split(' ', $diff); + $diff = $sp2[1]; + } + elsif ($diff=~/^\s*cvs\s+update:\s+warning:\s+(.+)\s+was\s+lost\s*$/o){ + $diff = $1; $diff=~s/^.//o; $diff=~s/.$//o; + $del = 1; + } + else {$diff = "";} + if ($diff) {$msgs{"x"}{$diff}=1;} + if ($del) {$msgs{"-"}{$diff}=1;} + } + &checkDeleted($package,"${localtop}/src","${releasetop}/src",$msgs{"-"}); + my @files=sort keys %{$msgs{"-"}}; + push(@deletedFiles,@files); + push(@changedFiles,@files); + foreach my $diff (@files){print " - $diff\n"; delete $msgs{"x"}{$diff};} + @files=sort keys %{$msgs{"x"}}; + push(@changedFiles,@files); + foreach my $diff (@files){print " x $diff\n";} +} + +&poisonIncludes(\@deletedFiles,$localtop) if ($poison_includes); +if ($poison_only) {exit 0;} + +my %recompileList; +foreach my $file (@changedFiles) { + next if (!(exists $vals{$file})); + foreach my $dep (@{$vals{$file}}) { + my @sp=split('/',$dep); + my $recompile="$sp[0]/$sp[1]"; + if (!(grep {$_ eq $recompile} @packages)) { + my $scope="header"; + if ($file=~/\.py$/o){$scope="python";} + elsif($file=~/BuildFile(\.xml|)$/o){$scope="buildfile";} + $recompileList{$recompile}{$scope}=$file; + } + } +} + +my @t=sort(keys %recompileList); +my $len=scalar(@t); +if ( $checkout == 0 ) { + print "Packages to check out and compile: $len\n"; +} +else{ + print "Checking out these packages\n"; +} + +my $exitcode=0; +if ( $len > 0 ) { + foreach my $pk (@t) { + if ( $printFileNames == 1 ) { + print "$pk (",join(", ",sort values %{$recompileList{$pk}}),")\n"; + } else { + print "$pk (",join(", ",sort keys %{$recompileList{$pk}}),")\n"; + } + } + if ( $checkout == 1 ) { + chdir ($localtop); + use File::Temp qw(tempfile); + my ($fh,$fname) = tempfile('./tmp/checkdepsXXXXX', UNLINK => 1);; + foreach my $pk (@t) { + my $tag = $tags->{$pk}; + print $fh "$pk ",$tags->{$pk},"\n"; + } + system("cmspm co --n-threads $jobs < $fname"); + $exitcode+=$?; + close($fh); + } +} +if ($exitcode>0){$exitcode=1;} +exit($exitcode); + +sub readDependencyInfo() +{ + my $file=shift; + my $cache=shift; + my $ref; + open($ref,"gunzip -c $file |") || die "Can not open file for reading: $file\n"; + while (my $line=<$ref>) { + chomp($line); + my ($file1,$rest)=split(' ',$line,2); + if ($file1 ne "") + { + if (!exists $vals{$file1}){$vals{$file1}=[];} + push @{$vals{$file1}},split(' ',$rest); + } + } + close($ref); +} + +sub readTags(){ + my ($taglist)=@_; + my $cache={}; + my $ref; + if (open($ref,$taglist)) { + while(my $l=<$ref>) { + chomp $l; + if ($l=~/^\s*(#.*|)$/o){next;} + my ($pk,$tag)=split '\s+', $l; + $cache->{$pk}=$tag; + } + close($ref); + } + else { + die "ERROR: Can not open file for reading: $taglist\n"; + } + return $cache; +} + +sub getLocalTop(){ + use File::Basename; + my $dir=getcwd; + my $subdir=".SCRAM"; + while((!-d "${dir}/${subdir}") && ($dir!~/^[\.\/]$/o)){$dir=dirname($dir);} + if(-d "${dir}/${subdir}"){return $dir;} + return ""; +} + +sub getReleaseTop(){ + my ($dev)=@_; + &setArch(); + my $reltop=""; + if (-f "${dev}/.SCRAM/$ENV{SCRAM_ARCH}/Environment"){ + $reltop=`cat ${dev}/.SCRAM/$ENV{SCRAM_ARCH}/Environment | grep '^RELEASETOP=' | sed 's|RELEASETOP=||'`; chomp $reltop; + } + return $reltop; +} + +sub setArch(){ + if (!defined $ENV{SCRAM_ARCH}){ + my $arch=`scram arch`; chomp $arch; + $ENV{SCRAM_ARCH}=$arch; + } +} + +sub poisonIncludes() { + my ($deletedFiles,$topdir)=@_; + use File::Path qw (mkpath rmtree); + use File::Basename qw(dirname); + my $poison="${topdir}/${poisondir}"; + if (-d $poison){rmtree($poison);} + if (scalar(@$deletedFiles)>0) {print ">> Creating dummy files under $poison directory.\n";} + foreach my $file (@$deletedFiles) { + my $f="${poison}/${file}"; + my $dir=dirname($f); + if (!-d $dir){mkpath($dir);} + my $ref; + if(!open($ref,">${f}")){die "ERROR: Can not open file for writing: $f\n";} + print $ref "#error THIS FILE HAS BEEN REMOVED FROM THE PACKAGE.\n"; + close($ref); + print " $file\n"; + } +} + +sub checkDeleted() { + my ($rpath,$dev,$rel,$deleted,$add)=@_; + my $rdir="${rel}/${rpath}"; + if (-d "$rdir") { + my $ref; + if(!opendir($ref,"$rdir")){die "ERROR: Can not open directory: $rdir\n";} + my @files=readdir($ref); + closedir($ref); + foreach my $f (@files) { + if (($f eq "doc") || ($f eq "CVS") || ($f eq "html") || ($f=~/^\./o) || ($f=~/\.pyc/o) || ($f=~/^__init__\.py/o)){next;} + my $rfile="${rpath}/${f}"; + if (-d "${rdir}/${f}") { + my $radd=$add; + if (!-e "${dev}/${rfile}"){$radd=1;} + &checkDeleted($rfile,$dev,$rel,$deleted,$radd); + } + elsif($add || (!-e "${dev}/${rfile}")){$deleted->{$rfile}=1;} + } + } +} diff --git a/Utilities/StaticAnalyzers/src/ClangCmsCheckerPluginRegister.cpp b/Utilities/StaticAnalyzers/src/ClangCmsCheckerPluginRegister.cpp index 9fa2190cce994..0e593075f5013 100644 --- a/Utilities/StaticAnalyzers/src/ClangCmsCheckerPluginRegister.cpp +++ b/Utilities/StaticAnalyzers/src/ClangCmsCheckerPluginRegister.cpp @@ -7,7 +7,6 @@ #include "ConstCastChecker.h" -#include "TrunCastChecker.h" #include "ConstCastAwayChecker.h" #include "GlobalStaticChecker.h" #include "StaticLocalChecker.h" @@ -35,7 +34,6 @@ void clang_registerCheckers ( clang::ento::CheckerRegistry ®istry) registry.addChecker< clangcms::ConstCastAwayChecker>( "threadsafety.ConstCastAway", "Checks for casts which remove const qualifier and might result in thread-unsafe code" ); registry.addChecker< clangcms::ConstCastChecker>( "threadsafety.ConstCast", "Checks for casts which remove const qualifier and might result in thread-unsafe code" ); - registry.addChecker< clangcms::TrunCastChecker>( "optional.TruncatingCast", "Checks for implicit casts where ToType is smaller than FromType which might result in truncation" ); registry.addChecker< clangcms::StaticLocalChecker>( "threadsafety.StaticLocal", "Checks for non-const method local statics which might not be thread-safe" ); registry.addChecker< clangcms::MutableMemberChecker>( "threadsafety.MutableMember", "Checks for members with the mutable keyword which might not be thread-safe" ); registry.addChecker< clangcms::GlobalStaticChecker>( "threadsafety.GlobalStatic", "Checks for global non-const statics which might not be thread-safe" ); diff --git a/Utilities/StaticAnalyzers/src/TrunCastChecker.cpp b/Utilities/StaticAnalyzers/src/TrunCastChecker.cpp deleted file mode 100644 index 5c14b05237a7f..0000000000000 --- a/Utilities/StaticAnalyzers/src/TrunCastChecker.cpp +++ /dev/null @@ -1,76 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "TrunCastChecker.h" -#include "CmsSupport.h" - -using namespace clang; -using namespace ento; -using namespace llvm; - -namespace clangcms -{ - -class ICEVisitor: public clang::RecursiveASTVisitor { - const clang::ento::CheckerBase *Checker; - clang::ento::BugReporter &BR; - clang::AnalysisDeclContext* AC; - - public: - ICEVisitor(const clang::ento::CheckerBase *checker, clang::ento::BugReporter &br, clang::AnalysisDeclContext *ac) - : Checker(checker), BR(br), AC(ac) {} - -bool VisitImplicitCastExpr( ImplicitCastExpr *CE); - -}; - -bool ICEVisitor::VisitImplicitCastExpr( ImplicitCastExpr *CE ) -{ - BR.getContext(); - llvm::SmallString<100> buf; - llvm::raw_svector_ostream os(buf); - const Expr * SE = CE->getSubExprAsWritten(); - std::string sname = SE->getType().getAsString(); - if (!(sname=="EventNumber_t")) return true; - const clang::Expr *E = CE->getSubExpr(); - clang::QualType OrigTy = BR.getContext().getCanonicalType(E->getType()); - clang::QualType ToTy = BR.getContext().getCanonicalType(CE->getType()); - if (!OrigTy->isIntegerType()) return true; - if (!(ToTy->isIntegerType()||ToTy->isFloatingType())) return true; - uint64_t size_otype = BR.getContext().getTypeSize(OrigTy); - uint64_t size_ttype = BR.getContext().getTypeSize(ToTy); - std::string oname = OrigTy.getAsString(); - std::string tname = ToTy.getAsString(); - - if ( size_ttype < size_otype || ToTy->isFloatingType() ) { - os <<"Size of cast-to type, "<addRange(CE->getSourceRange()); - BR.emitReport(R); - return true; - } - return true; -} - -void TrunCastChecker::checkASTDecl(const TranslationUnitDecl *D, AnalysisManager& Mgr,BugReporter &BR) const { - ICEVisitor icevisitor(this, BR, Mgr.getAnalysisDeclContext(D)); - icevisitor.TraverseDecl(const_cast(D)); -} - - -} diff --git a/Utilities/StaticAnalyzers/src/TrunCastChecker.h b/Utilities/StaticAnalyzers/src/TrunCastChecker.h deleted file mode 100644 index 3a5ae59a3d0b8..0000000000000 --- a/Utilities/StaticAnalyzers/src/TrunCastChecker.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef Utilities_StaticAnalyzers_CastSizeChecker_h -#define Utilities_StaticAnalyzers_CastSizeChecker_h - -#include -#include -#include -#include "CmsException.h" - -namespace clangcms { - -class TrunCastChecker: public clang::ento::Checker< clang::ento::check::ASTDecl > { -public: - mutable std::unique_ptr BT; - void checkASTDecl(const clang::TranslationUnitDecl *D, clang::ento::AnalysisManager& Mgr, clang::ento::BugReporter &BR) const; - -private: - CmsException m_exception; - -}; - -} - -#endif diff --git a/Utilities/StorageFactory/interface/StorageFactory.h b/Utilities/StorageFactory/interface/StorageFactory.h index 36b8cef4d9bb5..e89e6e4f86052 100644 --- a/Utilities/StorageFactory/interface/StorageFactory.h +++ b/Utilities/StorageFactory/interface/StorageFactory.h @@ -6,8 +6,7 @@ # include "Utilities/StorageFactory/interface/IOTypes.h" # include "Utilities/StorageFactory/interface/IOFlags.h" # include -#include -#include "tbb/concurrent_unordered_map.h" +# include class Storage; class StorageFactory @@ -66,8 +65,8 @@ class StorageFactory const std::string &path, int mode); -private: - typedef tbb::concurrent_unordered_map> MakerTable; +protected: + typedef std::map MakerTable; StorageFactory (void); StorageMaker *getMaker (const std::string &proto); diff --git a/Utilities/StorageFactory/src/StorageFactory.cc b/Utilities/StorageFactory/src/StorageFactory.cc index ff711a2931932..7363eb73320c3 100644 --- a/Utilities/StorageFactory/src/StorageFactory.cc +++ b/Utilities/StorageFactory/src/StorageFactory.cc @@ -25,6 +25,8 @@ StorageFactory::StorageFactory (void) StorageFactory::~StorageFactory (void) { + for (MakerTable::iterator i = m_makers.begin (); i != m_makers.end (); ++i) + delete i->second; } StorageFactory * @@ -130,18 +132,12 @@ StorageFactory::tempMinFree(void) const StorageMaker * StorageFactory::getMaker (const std::string &proto) { - auto itFound = m_makers.find(proto); - if(itFound != m_makers.end()) { - return itFound->second.get(); - } - if (! edmplugin::PluginManager::isAvailable()) { + StorageMaker *&instance = m_makers [proto]; + if (! edmplugin::PluginManager::isAvailable()) edmplugin::PluginManager::configure(edmplugin::standard::config()); - } - std::shared_ptr instance{ StorageMakerFactory::get()->tryToCreate(proto)}; - auto insertResult = m_makers.insert(MakerTable::value_type(proto,instance)); - //Can't use instance since it is possible that another thread beat - // us to the insertion so the map contains a different instance. - return insertResult.first->second.get(); + if (! instance) + instance = StorageMakerFactory::get()->tryToCreate(proto); + return instance; } StorageMaker * diff --git a/Validation/RecoHI/plugins/HiBasicGenTest.cc b/Validation/RecoHI/plugins/HiBasicGenTest.cc index ae64a9f40cf46..ea2c38ad0cd12 100644 --- a/Validation/RecoHI/plugins/HiBasicGenTest.cc +++ b/Validation/RecoHI/plugins/HiBasicGenTest.cc @@ -72,28 +72,26 @@ void HiBasicGenTest::analyze(const edm::Event& iEvent,const edm::EventSetup& iSe const HepMC::GenEvent *evt = mc->GetEvent(); const HepMC::HeavyIon *hi = evt->heavy_ion(); - int cbin = 0; - double phi0 =0.; - - if(hi){ - - double ip = hi->impact_parameter(); - phi0 = hi->event_plane_angle(); - - // fill reaction plane distribution - rp->Fill(phi0); - - // if the event is in one of the centrality bins of interest fill hists - int cbin=-1; - if(ip < 5.045) cbin=0; - else if (ip < 7.145 && ip > 5.045) cbin=1; - else if (ip < 15.202 && ip > 14.283) cbin=2; - if(cbin<0) return; - - // fill impact parameter distributions - b[cbin]->Fill(ip); + double ip = 0; + double phi0 = 0; + if ( hi ) { + ip = hi->impact_parameter(); + phi0 = hi->event_plane_angle(); } + // fill reaction plane distribution + rp->Fill(phi0); + + // if the event is in one of the centrality bins of interest fill hists + int cbin=-1; + if(ip < 5.045) cbin=0; + else if (ip < 7.145 && ip > 5.045) cbin=1; + else if (ip < 15.202 && ip > 14.283) cbin=2; + if(cbin<0) return; + + // fill impact parameter distributions + b[cbin]->Fill(ip); + // loop over particles HepMC::GenEvent::particle_const_iterator begin = evt->particles_begin(); HepMC::GenEvent::particle_const_iterator end = evt->particles_end(); diff --git a/Validation/RecoHI/python/TrackValidationHeavyIons_cff.py b/Validation/RecoHI/python/TrackValidationHeavyIons_cff.py index 5ee438cea39b6..00d4db0638000 100644 --- a/Validation/RecoHI/python/TrackValidationHeavyIons_cff.py +++ b/Validation/RecoHI/python/TrackValidationHeavyIons_cff.py @@ -10,7 +10,7 @@ # reco track quality cuts from Validation.RecoTrack.cuts_cff import * -cutsRecoTracks.src = "hiGeneralTracks" +cutsRecoTracks.src = "hiSelectedTracks" cutsRecoTracks.ptMin = 2.0 cutsRecoTracks.quality = [] @@ -26,8 +26,8 @@ hiTrackValidator = multiTrackValidator.clone( label_tp_effic = cms.InputTag("primaryChgSimTracks"), label_tp_fake = cms.InputTag("cutsTPFake"), - signalOnlyTP = cms.bool(False), trackCollectionForDrCalculation = cms.InputTag("cutsRecoTracks"), + signalOnlyTP = cms.bool(False), skipHistoFit = cms.untracked.bool(True), # done in post-processing minpT = cms.double(1.0), maxpT = cms.double(100.0), diff --git a/Validation/RecoHI/python/globalValidationHeavyIons_cff.py b/Validation/RecoHI/python/globalValidationHeavyIons_cff.py index 60780df6f9a8a..da6aedc7e087f 100644 --- a/Validation/RecoHI/python/globalValidationHeavyIons_cff.py +++ b/Validation/RecoHI/python/globalValidationHeavyIons_cff.py @@ -6,7 +6,7 @@ from Validation.RecoHI.muonValidationHeavyIons_cff import * # change track label for rechits -hiTracks = 'hiGeneralTracks' +hiTracks = 'hiSelectedTracks' PixelTrackingRecHitsValid.src = hiTracks StripTrackingRecHitsValid.trajectoryInput = hiTracks @@ -47,7 +47,7 @@ + hcalRecHitsValidationSequence + calotowersValidationSequence - + hiTrackValidation # validation of 'hiGeneralTracks' + + hiTrackValidation # validation of 'hiSelectedTracks' + hiJetValidation # validation of pileup jet finders + hiRecoMuonValidation # validation of offline muon reco diff --git a/Validation/RecoHI/python/muonValidationHeavyIons_cff.py b/Validation/RecoHI/python/muonValidationHeavyIons_cff.py index 9979187a97afb..b4bdff0be2121 100644 --- a/Validation/RecoHI/python/muonValidationHeavyIons_cff.py +++ b/Validation/RecoHI/python/muonValidationHeavyIons_cff.py @@ -5,7 +5,7 @@ # pt-selection of reco tracks import PhysicsTools.RecoAlgos.recoTrackSelector_cfi cutsRecoTrkMuons = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() -cutsRecoTrkMuons.src = "hiGeneralTracks" +cutsRecoTrkMuons.src = "hiSelectedTracks" cutsRecoTrkMuons.quality = [] cutsRecoTrkMuons.ptMin = 2.0 diff --git a/Validation/RecoParticleFlow/python/PFElectronValidation_cff.py b/Validation/RecoParticleFlow/python/PFElectronValidation_cff.py index e870fbd0c379a..32350f5d2ca8c 100644 --- a/Validation/RecoParticleFlow/python/PFElectronValidation_cff.py +++ b/Validation/RecoParticleFlow/python/PFElectronValidation_cff.py @@ -17,6 +17,8 @@ pfElectronValidation1 = pfElectronDQMAnalyzer.clone() +pfElectronValidation1.InputCollection = cms.InputTag('pfAllElectrons') # for global Validation +pfElectronValidation1.MatchCollection = cms.InputTag('gensource') # for global Validation pfElectronValidation1.BenchmarkLabel = cms.string('PFElectronValidation/CompWithGenElectron') pfElectronValidationSequence = cms.Sequence( gensource + pfElectronValidation1 ) diff --git a/Validation/RecoParticleFlow/python/PFJetValidation_cff.py b/Validation/RecoParticleFlow/python/PFJetValidation_cff.py index b99a5f28d4214..b4a9bdd439484 100644 --- a/Validation/RecoParticleFlow/python/PFJetValidation_cff.py +++ b/Validation/RecoParticleFlow/python/PFJetValidation_cff.py @@ -12,6 +12,7 @@ pfJetValidation2.InputCollection = cms.InputTag('ak4PFJets') pfJetValidation2.MatchCollection = cms.InputTag('ak4CaloJets') pfJetValidation2.BenchmarkLabel = cms.string('PFJetValidation/CompWithCaloJet') +pfJetValidation2.SkimParameter.switchOn = cms.bool(False) pfJetValidationSequence = cms.Sequence( pfJetValidation1 * pfJetValidation2 ) diff --git a/Validation/RecoParticleFlow/python/PFMETValidation_cff.py b/Validation/RecoParticleFlow/python/PFMETValidation_cff.py index 5f424354aba68..0bdcc003b1300 100644 --- a/Validation/RecoParticleFlow/python/PFMETValidation_cff.py +++ b/Validation/RecoParticleFlow/python/PFMETValidation_cff.py @@ -12,5 +12,6 @@ pfMETValidation2.InputCollection = cms.InputTag('pfMet') pfMETValidation2.MatchCollection = cms.InputTag('caloMet') pfMETValidation2.BenchmarkLabel = cms.string('PFMETValidation/CompWithCaloMET') +pfMETValidation2.SkimParameter.switchOn = cms.bool(False) pfMETValidationSequence = cms.Sequence( pfMETValidation1 * pfMETValidation2 ) diff --git a/Validation/RecoParticleFlow/python/miniAODDQM_cff.py b/Validation/RecoParticleFlow/python/miniAODDQM_cff.py deleted file mode 100644 index ce4585176e546..0000000000000 --- a/Validation/RecoParticleFlow/python/miniAODDQM_cff.py +++ /dev/null @@ -1,91 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -# jet -from DQMOffline.PFTau.PFJetDQMAnalyzer_cfi import pfJetDQMAnalyzer - -JetValidation1 = pfJetDQMAnalyzer.clone() -JetValidation1.BenchmarkLabel = cms.string('slimmedJetValidation/CompWithPFJets') -JetValidation1.InputCollection = cms.InputTag('slimmedJets') -JetValidation1.MatchCollection = cms.InputTag('ak4PFJetsCHS') # ak5PFJetsCHS # ak5PFJets -JetValidation1.ptMin = cms.double(10.0) -JetValidation1.CreatePFractionHistos = cms.bool(True) -#JetValidation1.InputCollection = cms.InputTag('ak5PFJets') -#JetValidation1.MatchCollection = cms.InputTag('slimmedJets') - -JetValidation2 = pfJetDQMAnalyzer.clone() -JetValidation2.BenchmarkLabel = cms.string('slimmedJetValidation/CompWithPFJetsEC') -#JetValidation2.InputCollection = JetValidation1.MatchCollection -#JetValidation2.MatchCollection = JetValidation1.InputCollection -JetValidation2.InputCollection = cms.InputTag('slimmedJets') -JetValidation2.MatchCollection = cms.InputTag('ak4PFJetsNewL1Fast23') # ak4PFJetsCHSEC # ak4PFJetsCHS -JetValidation2.ptMin = JetValidation1.ptMin -JetValidation2.CreatePFractionHistos = cms.bool(True) - - -# jetRes plots -from DQMOffline.PFTau.PFJetResDQMAnalyzer_cfi import pfJetResDQMAnalyzer - -JetResValidation1 = pfJetResDQMAnalyzer.clone() -JetResValidation1.InputCollection = JetValidation1.InputCollection -JetResValidation1.MatchCollection = JetValidation1.MatchCollection -JetResValidation1.ptMin = JetValidation1.ptMin - -JetResValidation2 = pfJetResDQMAnalyzer.clone() -JetResValidation2.InputCollection = JetValidation2.InputCollection -JetResValidation2.MatchCollection = JetValidation2.MatchCollection -JetResValidation2.ptMin = JetValidation2.ptMin - - -# MET -from DQMOffline.PFTau.PFMETDQMAnalyzer_cfi import pfMETDQMAnalyzer - -METValidation1 = pfMETDQMAnalyzer.clone() -METValidation1.BenchmarkLabel = cms.string('slimmedMETValidation/CompWithPFMET') -METValidation1.InputCollection = cms.InputTag('slimmedMETs') -METValidation1.MatchCollection = cms.InputTag('pfMet') - -METValidation2 = pfMETDQMAnalyzer.clone() -METValidation2.BenchmarkLabel = cms.string('slimmedMETValidation/CompWithPFMETT1') -METValidation2.InputCollection = cms.InputTag('slimmedMETs') -METValidation2.MatchCollection = cms.InputTag('pfMetT1') - - -# muons -from DQMOffline.PFTau.PFMuonDQMAnalyzer_cfi import pfMuonDQMAnalyzer - -slimmedMuonValidation1 = pfMuonDQMAnalyzer.clone() -slimmedMuonValidation1.BenchmarkLabel = cms.string('SlimmedMuonValidation/CompWithRecoMuons') -slimmedMuonValidation1.InputCollection = cms.InputTag('slimmedMuons') -slimmedMuonValidation1.MatchCollection = cms.InputTag('muons') -# official -#muonPFsequenceMC.inputTagMuonReco = cms.InputTag('slimmedMuons') -#muonPFsequenceMC.inputTagGenParticles = cms.InputTag('muons') -#muonPFsequenceMC.runOnMC = cms.bool(False) -# RefCore: A request to resolve a reference to a product of type 'std::vector' with ProductID '3:1469' can not be satisfied because the product cannot be found. -# with the following: -#muonPFsequenceMC.inputTagMuonReco = cms.InputTag('muons') -#muonPFsequenceMC.inputTagGenParticles = cms.InputTag('slimmedMuons') - - -# electrons -from DQMOffline.PFTau.PFElectronDQMAnalyzer_cfi import pfElectronDQMAnalyzer - -ElectronValidation1 = pfElectronDQMAnalyzer.clone() -ElectronValidation1.BenchmarkLabel = cms.string('slimmedElectronValidation/CompWithGedGsfElectrons') -ElectronValidation1.InputCollection = cms.InputTag('slimmedElectrons') -ElectronValidation1.MatchCollection = cms.InputTag('gedGsfElectrons') -# use electrons plots for muons -#ElectronValidation2 = pfElectronDQMAnalyzer.clone() -#ElectronValidation2.BenchmarkLabel = slimmedMuonValidation1.BenchmarkLabel -#ElectronValidation2.InputCollection = slimmedMuonValidation1.InputCollection -#ElectronValidation2.MatchCollection = slimmedMuonValidation1.MatchCollection - - - -miniAODDQMSequence = cms.Sequence( - JetValidation1 * JetValidation2 * - JetResValidation1 * JetResValidation2 * - METValidation1 * METValidation2 * - slimmedMuonValidation1 * - ElectronValidation1 - ) diff --git a/Validation/RecoParticleFlow/test/pflowValidationStep1_Template_cfg.py b/Validation/RecoParticleFlow/test/pflowValidationStep1_Template_cfg.py index 2982c89308eaf..b20964b351317 100644 --- a/Validation/RecoParticleFlow/test/pflowValidationStep1_Template_cfg.py +++ b/Validation/RecoParticleFlow/test/pflowValidationStep1_Template_cfg.py @@ -24,7 +24,7 @@ #,SkipEvent = cms.untracked.vstring('ProductNotFound') ) process.maxEvents = cms.untracked.PSet( - input = cms.untracked.int32(100) + input = cms.untracked.int32(-1) ) #dataset = 'QCD' @@ -39,21 +39,20 @@ if dataset == 'QCD' : sourceFiles = cms.untracked.vstring( # '/store/relval/CMSSW_7_0_0_pre11/RelValQCD_FlatPt_15_3000/GEN-SIM-DIGI-RECO/START70_V4_OldEG_FastSim-v1/00000/F0132E22-A76A-E311-BE6D-0025905A60B6.root', - #'/store/relval/CMSSW_7_0_0_pre4/RelValQCD_FlatPt_15_3000HS/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/EE4D1086-0F25-E311-BD19-003048678A6C.root', - # '/store/relval/CMSSW_7_0_0_pre4/RelValQCD_FlatPt_15_3000HS/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/CCA45DB9-1325-E311-B521-0025905938AA.root', - # '/store/relval/CMSSW_7_0_0_pre4/RelValQCD_FlatPt_15_3000HS/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/686ECB84-1025-E311-95BF-00261894387E.root', - # '/store/relval/CMSSW_7_0_0_pre4/RelValQCD_FlatPt_15_3000HS/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/6666ACEF-0F25-E311-B2CE-00248C0BE01E.root', - # '/store/relval/CMSSW_7_0_0_pre4/RelValQCD_FlatPt_15_3000HS/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/4E0FDB84-1025-E311-90B7-0026189438E0.root', - # '/store/relval/CMSSW_7_0_0_pre4/RelValQCD_FlatPt_15_3000HS/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/483621D2-1025-E311-BB70-003048B95B30.root', - # '/store/relval/CMSSW_7_0_0_pre4/RelValQCD_FlatPt_15_3000HS/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/48118597-1125-E311-8645-003048678B7C.root' - '/store/relval/CMSSW_7_2_0_pre1/RelValQCD_FlatPt_15_3000HS_13/GEN-SIM-RECO/POSTLS172_V1-v1/00000/1EB9CDDA-C8FE-E311-9082-0025905A6066.root' + '/store/relval/CMSSW_7_0_0_pre4/RelValQCD_FlatPt_15_3000HS/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/EE4D1086-0F25-E311-BD19-003048678A6C.root', + '/store/relval/CMSSW_7_0_0_pre4/RelValQCD_FlatPt_15_3000HS/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/CCA45DB9-1325-E311-B521-0025905938AA.root', + '/store/relval/CMSSW_7_0_0_pre4/RelValQCD_FlatPt_15_3000HS/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/686ECB84-1025-E311-95BF-00261894387E.root', + '/store/relval/CMSSW_7_0_0_pre4/RelValQCD_FlatPt_15_3000HS/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/6666ACEF-0F25-E311-B2CE-00248C0BE01E.root', + '/store/relval/CMSSW_7_0_0_pre4/RelValQCD_FlatPt_15_3000HS/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/4E0FDB84-1025-E311-90B7-0026189438E0.root', + '/store/relval/CMSSW_7_0_0_pre4/RelValQCD_FlatPt_15_3000HS/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/483621D2-1025-E311-BB70-003048B95B30.root', + '/store/relval/CMSSW_7_0_0_pre4/RelValQCD_FlatPt_15_3000HS/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/48118597-1125-E311-8645-003048678B7C.root' + ) elif dataset == 'TTbar' : sourceFiles = cms.untracked.vstring( - #'/store/relval/CMSSW_6_2_0/RelValTTbar/GEN-SIM-RECO/PRE_ST62_V8-v3/00000/1A4CBAAC-48EC-E211-8A00-001E67397EB8.root', - #'/store/relval/CMSSW_6_2_0/RelValTTbar/GEN-SIM-RECO/PRE_ST62_V8-v3/00000/24366CE4-42EC-E211-A3B9-003048D4988C.root', - #'/store/relval/CMSSW_6_2_0/RelValTTbar/GEN-SIM-RECO/PRE_ST62_V8-v3/00000/8476F595-44EC-E211-B8E7-003048F00B16.root' - 'file:/afs/cern.ch/user/l/lecriste/miniAOD_validation_sequence_multiThreaded/CMSSW_7_2_0_pre3/src/20.0_SingleMuPt10+SingleMuPt10+DIGI+RECO+HARVEST/patTuple_mini.root' + '/store/relval/CMSSW_6_2_0/RelValTTbar/GEN-SIM-RECO/PRE_ST62_V8-v3/00000/1A4CBAAC-48EC-E211-8A00-001E67397EB8.root', + '/store/relval/CMSSW_6_2_0/RelValTTbar/GEN-SIM-RECO/PRE_ST62_V8-v3/00000/24366CE4-42EC-E211-A3B9-003048D4988C.root', + '/store/relval/CMSSW_6_2_0/RelValTTbar/GEN-SIM-RECO/PRE_ST62_V8-v3/00000/8476F595-44EC-E211-B8E7-003048F00B16.root' ) elif dataset == 'ZEE' : sourceFiles = cms.untracked.vstring( @@ -247,27 +246,29 @@ # PFDQM modules to book/fill actual histograms #---------------------------------------------- process.load("Validation.RecoParticleFlow.PFJetValidation_cff") +process.pfJetValidation1.SkimParameter.switchOn = cms.bool(False) +process.pfJetValidation2.SkimParameter.switchOn = cms.bool(False) process.load("Validation.RecoParticleFlow.PFMETValidation_cff") process.load("Validation.RecoParticleFlow.PFJetResValidation_cff") +process.pfJetResValidation1.SkimParameter.switchOn = cms.bool(True) +process.pfJetResValidation2.SkimParameter.switchOn = cms.bool(True) process.load("Validation.RecoParticleFlow.PFElectronValidation_cff") #process.load("Validation.RecoParticleFlow.PFMuonValidation_cff") process.load("Validation.RecoMET.METRelValForDQM_cff") -process.load("Validation.RecoParticleFlow.miniAODDQM_cff") # The complete reprocessing process.p = cms.Path( # process.pfElectronSequence + # process.pfReRecoSequence + # not needed for global validation used in case of software development - #process.pfJetValidationSequence + - #process.pfMETValidationSequence + - #process.pfJetResValidationSequence + - #process.METValidation + + process.pfJetValidationSequence + + process.pfMETValidationSequence + + process.pfJetResValidationSequence + + process.METValidation + # process.pfMuonValidationSequence + - #process.pfElectronValidationSequence + + process.pfElectronValidationSequence + # process.pfElectronBenchmarkGeneric + # replaced by pfElectronBenchmarkGeneric - process.miniAODDQMSequence + process.MEtoEDMConverter ) diff --git a/Validation/RecoParticleFlow/test/pflowValidationStep2_Template_cfg.py b/Validation/RecoParticleFlow/test/pflowValidationStep2_Template_cfg.py index d8ac1b3cfa10d..8fa5a875a6966 100644 --- a/Validation/RecoParticleFlow/test/pflowValidationStep2_Template_cfg.py +++ b/Validation/RecoParticleFlow/test/pflowValidationStep2_Template_cfg.py @@ -47,17 +47,6 @@ #-------------- process.load("Validation.RecoParticleFlow.PFValidationClient_cff") -process.pfClientSequence = cms.Sequence( - process.pfJetClient * - process.pfMETClient * - process.pfJetResClient * - process.pfElectronClient - ) - -process.p = cms.Path( - process.EDMtoME * - process.pfClientSequence * - process.dqmEnv * - process.dqmSaver - ) +process.pfClientSequence = cms.Sequence(process.pfJetClient * process.pfMETClient * process.pfJetResClient * process.pfElectronClient) +process.p = cms.Path(process.EDMtoME * process.pfClientSequence * process.dqmEnv * process.dqmSaver) diff --git a/Validation/RecoTrack/python/TrackValidation_cff.py b/Validation/RecoTrack/python/TrackValidation_cff.py index ccc3cad2cd537..c4818081e6b58 100644 --- a/Validation/RecoTrack/python/TrackValidation_cff.py +++ b/Validation/RecoTrack/python/TrackValidation_cff.py @@ -16,77 +16,77 @@ # Validation iterative steps cutsRecoTracksZero = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() -cutsRecoTracksZero.algorithm=cms.vstring("initialStep") +cutsRecoTracksZero.algorithm=cms.vstring("iter0") cutsRecoTracksFirst = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() -cutsRecoTracksFirst.algorithm=cms.vstring("lowPtTripletStep") +cutsRecoTracksFirst.algorithm=cms.vstring("iter1") cutsRecoTracksSecond = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() -cutsRecoTracksSecond.algorithm=cms.vstring("pixelPairStep") +cutsRecoTracksSecond.algorithm=cms.vstring("iter2") cutsRecoTracksThird = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() -cutsRecoTracksThird.algorithm=cms.vstring("detachedTripletStep") +cutsRecoTracksThird.algorithm=cms.vstring("iter3") cutsRecoTracksFourth = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() -cutsRecoTracksFourth.algorithm=cms.vstring("mixedTripletStep") +cutsRecoTracksFourth.algorithm=cms.vstring("iter4") cutsRecoTracksFifth = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() -cutsRecoTracksFifth.algorithm=cms.vstring("pixelLessStep") +cutsRecoTracksFifth.algorithm=cms.vstring("iter5") cutsRecoTracksSixth = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() -cutsRecoTracksSixth.algorithm=cms.vstring("tobTecStep") +cutsRecoTracksSixth.algorithm=cms.vstring("iter6") cutsRecoTracksSeventh = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() -cutsRecoTracksSeventh.algorithm=cms.vstring("jetCoreRegionalStep") +cutsRecoTracksSeventh.algorithm=cms.vstring("iter7") cutsRecoTracksNinth = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() -cutsRecoTracksNinth.algorithm=cms.vstring("muonSeededStepInOut") +cutsRecoTracksNinth.algorithm=cms.vstring("iter9") cutsRecoTracksTenth = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() -cutsRecoTracksTenth.algorithm=cms.vstring("muonSeededStepOutIn") +cutsRecoTracksTenth.algorithm=cms.vstring("iter10") # high purity cutsRecoTracksHp = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() cutsRecoTracksHp.quality=cms.vstring("highPurity") cutsRecoTracksZeroHp = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() -cutsRecoTracksZeroHp.algorithm=cms.vstring("initialStep") +cutsRecoTracksZeroHp.algorithm=cms.vstring("iter0") cutsRecoTracksZeroHp.quality=cms.vstring("highPurity") cutsRecoTracksFirstHp = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() -cutsRecoTracksFirstHp.algorithm=cms.vstring("lowPtTripletStep") +cutsRecoTracksFirstHp.algorithm=cms.vstring("iter1") cutsRecoTracksFirstHp.quality=cms.vstring("highPurity") cutsRecoTracksSecondHp = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() -cutsRecoTracksSecondHp.algorithm=cms.vstring("pixelPairStep") +cutsRecoTracksSecondHp.algorithm=cms.vstring("iter2") cutsRecoTracksSecondHp.quality=cms.vstring("highPurity") cutsRecoTracksThirdHp = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() -cutsRecoTracksThirdHp.algorithm=cms.vstring("detachedTripletStep") +cutsRecoTracksThirdHp.algorithm=cms.vstring("iter3") cutsRecoTracksThirdHp.quality=cms.vstring("highPurity") cutsRecoTracksFourthHp = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() -cutsRecoTracksFourthHp.algorithm=cms.vstring("mixedTripletStep") +cutsRecoTracksFourthHp.algorithm=cms.vstring("iter4") cutsRecoTracksFourthHp.quality=cms.vstring("highPurity") cutsRecoTracksFifthHp = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() -cutsRecoTracksFifthHp.algorithm=cms.vstring("pixelLessStep") +cutsRecoTracksFifthHp.algorithm=cms.vstring("iter5") cutsRecoTracksFifthHp.quality=cms.vstring("highPurity") cutsRecoTracksSixthHp = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() -cutsRecoTracksSixthHp.algorithm=cms.vstring("tobTecStep") +cutsRecoTracksSixthHp.algorithm=cms.vstring("iter6") cutsRecoTracksSixthHp.quality=cms.vstring("highPurity") cutsRecoTracksSeventhHp = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() -cutsRecoTracksSeventhHp.algorithm=cms.vstring("jetCoreRegionalStep") +cutsRecoTracksSeventhHp.algorithm=cms.vstring("iter7") cutsRecoTracksSeventhHp.quality=cms.vstring("highPurity") cutsRecoTracksNinthHp = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() -cutsRecoTracksNinthHp.algorithm=cms.vstring("muonSeededStepInOut") +cutsRecoTracksNinthHp.algorithm=cms.vstring("iter9") cutsRecoTracksNinthHp.quality=cms.vstring("highPurity") cutsRecoTracksTenthHp = PhysicsTools.RecoAlgos.recoTrackSelector_cfi.recoTrackSelector.clone() -cutsRecoTracksTenthHp.algorithm=cms.vstring("muonSeededStepOutIn") +cutsRecoTracksTenthHp.algorithm=cms.vstring("iter10") cutsRecoTracksTenthHp.quality=cms.vstring("highPurity") trackValidator= Validation.RecoTrack.MultiTrackValidator_cfi.multiTrackValidator.clone() diff --git a/Validation/RecoTrack/test/MultiTrackValidatorGenPs_cfg.py b/Validation/RecoTrack/test/MultiTrackValidatorGenPs_cfg.py index f69f5eeebf5fd..a70b38d4d3562 100644 --- a/Validation/RecoTrack/test/MultiTrackValidatorGenPs_cfg.py +++ b/Validation/RecoTrack/test/MultiTrackValidatorGenPs_cfg.py @@ -82,7 +82,7 @@ process.cutsRecoTracks.quality = cms.vstring('highPurity') #process.cutsRecoTracks.min3DHit = cms.int32(3) #process.cutsRecoTracks.minPixHit = cms.int32(0) -#process.cutsRecoTracks.algorithm = cms.vstring('tobTecStep') +#process.cutsRecoTracks.algorithm = cms.vstring('iter6') #process.cutsRecoTracks.maxChi2 = 10 #process.cutsRecoTracks.minHit = cms.int32(10) #process.cutsRecoTracks.src = cms.InputTag("TrackRefitter") diff --git a/Validation/RecoTrack/test/trackingPerformanceValidation.py b/Validation/RecoTrack/test/trackingPerformanceValidation.py index 056410dea60ba..b0585931699e4 100755 --- a/Validation/RecoTrack/test/trackingPerformanceValidation.py +++ b/Validation/RecoTrack/test/trackingPerformanceValidation.py @@ -61,7 +61,7 @@ ### Track algorithm name and quality. Can be a list. -Algos= ['ootb', 'initialStep', 'lowPtTripletStep','pixelPairStep','detachedTripletStep','mixedTripletStep','pixelLessStep','tobTecStep','jetCoreRegionalStep','muonSeededStepInOut','muonSeededStepOutIn'] +Algos= ['ootb', 'iter0', 'iter1','iter2','iter3','iter4','iter5','iter6','iter7','iter9','iter10'] Qualities=['', 'highPurity'] ### Leave unchanged unless the track collection name changes @@ -132,25 +132,25 @@ def replace(map, filein, fileout): def do_validation(samples, GlobalTag, trackquality, trackalgorithm, PileUp, sampleType, dofastfull): global Sequence, Version, RefSelection, RefRepository, NewSelection, NewRepository, defaultNevents, Events, castorHarvestedFilesDirectory global cfg, macro, Tracksname - tracks_map = { 'ootb':'general_AssociatorByHitsRecoDenom','initialStep':'cutsRecoZero_AssociatorByHitsRecoDenom','lowPtTripletStep':'cutsRecoFirst_AssociatorByHitsRecoDenom','pixelPairStep':'cutsRecoSecond_AssociatorByHitsRecoDenom','detachedTripletStep':'cutsRecoThird_AssociatorByHitsRecoDenom','mixedTripletStep':'cutsRecoFourth_AssociatorByHitsRecoDenom','pixelLessStep':'cutsRecoFifth_AssociatorByHitsRecoDenom','tobTecStep':'cutsRecoSixth_AssociatorByHitsRecoDenom','jetCoreRegionalStep':'cutsRecoSeventh_AssociatorByHitsRecoDenom','muonSeededStepInOut':'cutsRecoNinth_AssociatorByHitsRecoDenom','muonSeededStepOutIn':'cutsRecoTenth_AssociatorByHitsRecoDenom'} - tracks_map_hp = { 'ootb':'cutsRecoHp_AssociatorByHitsRecoDenom','initialStep':'cutsRecoZeroHp_AssociatorByHitsRecoDenom','lowPtTripletStep':'cutsRecoFirstHp_AssociatorByHitsRecoDenom','pixelPairStep':'cutsRecoSecondHp_AssociatorByHitsRecoDenom','detachedTripletStep':'cutsRecoThirdHp_AssociatorByHitsRecoDenom','mixedTripletStep':'cutsRecoFourthHp_AssociatorByHitsRecoDenom','pixelLessStep':'cutsRecoFifthHp_AssociatorByHitsRecoDenom','tobTecStep':'cutsRecoSixthHp_AssociatorByHitsRecoDenom','jetCoreRegionalStep':'cutsRecoSeventhHp_AssociatorByHitsRecoDenom','muonSeededStepInOut':'cutsRecoNinthHp_AssociatorByHitsRecoDenom','muonSeededStepOutIn':'cutsRecoTenthHp_AssociatorByHitsRecoDenom'} - if(trackalgorithm=='initialStep' or trackalgorithm=='ootb'): + tracks_map = { 'ootb':'general_AssociatorByHitsRecoDenom','iter0':'cutsRecoZero_AssociatorByHitsRecoDenom','iter1':'cutsRecoFirst_AssociatorByHitsRecoDenom','iter2':'cutsRecoSecond_AssociatorByHitsRecoDenom','iter3':'cutsRecoThird_AssociatorByHitsRecoDenom','iter4':'cutsRecoFourth_AssociatorByHitsRecoDenom','iter5':'cutsRecoFifth_AssociatorByHitsRecoDenom','iter6':'cutsRecoSixth_AssociatorByHitsRecoDenom','iter7':'cutsRecoSeventh_AssociatorByHitsRecoDenom','iter9':'cutsRecoNinth_AssociatorByHitsRecoDenom','iter10':'cutsRecoTenth_AssociatorByHitsRecoDenom'} + tracks_map_hp = { 'ootb':'cutsRecoHp_AssociatorByHitsRecoDenom','iter0':'cutsRecoZeroHp_AssociatorByHitsRecoDenom','iter1':'cutsRecoFirstHp_AssociatorByHitsRecoDenom','iter2':'cutsRecoSecondHp_AssociatorByHitsRecoDenom','iter3':'cutsRecoThirdHp_AssociatorByHitsRecoDenom','iter4':'cutsRecoFourthHp_AssociatorByHitsRecoDenom','iter5':'cutsRecoFifthHp_AssociatorByHitsRecoDenom','iter6':'cutsRecoSixthHp_AssociatorByHitsRecoDenom','iter7':'cutsRecoSeventhHp_AssociatorByHitsRecoDenom','iter9':'cutsRecoNinthHp_AssociatorByHitsRecoDenom','iter10':'cutsRecoTenthHp_AssociatorByHitsRecoDenom'} + if(trackalgorithm=='iter0' or trackalgorithm=='ootb'): mineff='0.0' maxeff='1.025' maxfake='0.7' - elif(trackalgorithm=='lowPtTripletStep'): + elif(trackalgorithm=='iter1'): mineff='0.0' maxeff='0.5' maxfake='0.8' - elif(trackalgorithm=='pixelPairStep'): + elif(trackalgorithm=='iter2'): mineff='0.0' maxeff='0.25' maxfake='0.8' - elif(trackalgorithm=='mixedTripletStep'): + elif(trackalgorithm=='iter4'): mineff='0.0' maxeff='0.3' maxfake='0.8' - elif(trackalgorithm=='pixelLessStep' or trackalgorithm=='tobTecStep'): + elif(trackalgorithm=='iter5' or trackalgorithm=='iter6'): mineff='0.0' maxeff='1.0' maxfake='0.8'